fix compile issues

This commit is contained in:
Aurora 2021-06-14 17:10:25 +02:00
parent a84faa9d7d
commit 7e83323ab7
2 changed files with 5 additions and 5 deletions

View file

@ -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) {

View file

@ -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
+