Apply some feature patches to files instead

They're small and/or really shouldn't be left unapplied
This commit is contained in:
Nassim Jahnke
2024-12-21 13:21:47 +01:00
parent e0593e9286
commit 82216a59fe
16 changed files with 424 additions and 578 deletions

View File

@@ -241,7 +241,7 @@
@Override
public boolean isClientSide() {
@@ -167,6 +_,13 @@
@@ -167,8 +_,15 @@
return null;
}
@@ -253,14 +253,17 @@
+ // Paper end
+
public boolean isInWorldBounds(BlockPos pos) {
return !this.isOutsideBuildHeight(pos) && isInWorldBoundsHorizontal(pos);
- return !this.isOutsideBuildHeight(pos) && isInWorldBoundsHorizontal(pos);
+ return pos.isInsideBuildHeightAndWorldBoundsHorizontal(this); // Paper - Perf: Optimize isInWorldBounds
}
public static boolean isInSpawnableBounds(BlockPos pos) {
@@ -176,21 +_,84 @@
}
private static boolean isInWorldBoundsHorizontal(BlockPos pos) {
- return pos.getX() >= -30000000 && pos.getZ() >= -30000000 && pos.getX() < 30000000 && pos.getZ() < 30000000;
+ return pos.getX() >= -30000000 && pos.getZ() >= -30000000 && pos.getX() < 30000000 && pos.getZ() < 30000000; // Diff on change warnUnsafeChunk()
+ return pos.getX() >= -30000000 && pos.getZ() >= -30000000 && pos.getX() < 30000000 && pos.getZ() < 30000000; // Diff on change warnUnsafeChunk() and isInsideBuildHeightAndWorldBoundsHorizontal
}
private static boolean isOutsideSpawnableHeight(int y) {