Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix getMaxHeight to be exclusive instead of inclusive to match docs #11675

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: MrPowerGamerBR <[email protected]>
Date: Wed, 27 Nov 2024 02:26:32 -0300
Subject: [PATCH] Fix getMaxHeight to be exclusive instead of inclusive to
match docs


diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 8f234b46c24a0ae08aa5f8190c5b27e1f62dfbab..372581a1a44870c53afa5ecd456b1b09ea77b2ae 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1538,7 +1538,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {

@Override
public int getMaxHeight() {
- return this.world.getMaxY();
+ return this.world.getMaxY() + 1; // Paper - Fix getMaxHeight to be exclusive instead of inclusive
}

@Override
Loading