mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 23:38:25 +01:00
fix compile issues
This commit is contained in:
parent
a84faa9d7d
commit
7e83323ab7
2 changed files with 5 additions and 5 deletions
|
@ -12,7 +12,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
}
|
||||
|
||||
public void blockChanged(BlockPos pos) {
|
||||
+ if (!blockposition.isValidLocation()) return; // Paper - SPIGOT-6086 for all invalid locations; avoid acquiring locks
|
||||
+ if (!pos.isValidLocation(levelHeightAccessor)) return; // Paper - SPIGOT-6086 for all invalid locations; avoid acquiring locks
|
||||
LevelChunk chunk = this.getSendingChunk(); // Paper - no-tick view distance
|
||||
|
||||
if (chunk != null) {
|
||||
|
|
|
@ -21,11 +21,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
private int z;
|
||||
|
||||
+ // Paper start
|
||||
+ public boolean isValidLocation(net.minecraft.world.level.Level level) {
|
||||
+ return getX() >= -30000000 && getZ() >= -30000000 && getX() < 30000000 && getZ() < 30000000 && !level.isOutsideBuildHeight(getY());
|
||||
+ public boolean isValidLocation(net.minecraft.world.level.LevelHeightAccessor levelHeightAccessor) {
|
||||
+ return getX() >= -30000000 && getZ() >= -30000000 && getX() < 30000000 && getZ() < 30000000 && !levelHeightAccessor.isOutsideBuildHeight(getY());
|
||||
+ }
|
||||
+ public boolean isInvalidYLocation(net.minecraft.world.level.Level level) {
|
||||
+ return level.isOutsideBuildHeight(getY());
|
||||
+ public boolean isInvalidYLocation(net.minecraft.world.level.LevelHeightAccessor levelHeightAccessor) {
|
||||
+ return levelHeightAccessor.isOutsideBuildHeight(getY());
|
||||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
|
|
Loading…
Reference in a new issue