13
0
geforkt von Mirrors/Paper

fix compile issues

Dieser Commit ist enthalten in:
Aurora 2021-06-14 17:10:25 +02:00
Ursprung a84faa9d7d
Commit 7e83323ab7
2 geänderte Dateien mit 5 neuen und 5 gelöschten Zeilen

Datei anzeigen

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

Datei anzeigen

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