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

@@ -47,3 +47,14 @@
return this.z;
}
@@ -235,4 +_,10 @@
public String toShortString() {
return this.getX() + ", " + this.getY() + ", " + this.getZ();
}
+
+ // Paper start - Perf: Optimize isInWorldBounds
+ public final boolean isInsideBuildHeightAndWorldBoundsHorizontal(final net.minecraft.world.level.LevelHeightAccessor levelHeightAccessor) {
+ return this.getX() >= -30000000 && this.getZ() >= -30000000 && this.getX() < 30000000 && this.getZ() < 30000000 && !levelHeightAccessor.isOutsideBuildHeight(this.getY());
+ }
+ // Paper end - Perf: Optimize isInWorldBounds
}