diff options
Diffstat (limited to 'patches/server/0194-Prevent-Frosted-Ice-from-loading-holding-chunks.patch')
-rw-r--r-- | patches/server/0194-Prevent-Frosted-Ice-from-loading-holding-chunks.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/patches/server/0194-Prevent-Frosted-Ice-from-loading-holding-chunks.patch b/patches/server/0194-Prevent-Frosted-Ice-from-loading-holding-chunks.patch new file mode 100644 index 0000000000..616f34fdc9 --- /dev/null +++ b/patches/server/0194-Prevent-Frosted-Ice-from-loading-holding-chunks.patch @@ -0,0 +1,33 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Aikar <[email protected]> +Date: Sat, 10 Mar 2018 16:33:15 -0500 +Subject: [PATCH] Prevent Frosted Ice from loading/holding chunks + +1.17: Shouldn't be needed as blocks no longer tick without at least 1 radius chunk loaded. + +diff --git a/src/main/java/net/minecraft/world/level/block/FrostedIceBlock.java b/src/main/java/net/minecraft/world/level/block/FrostedIceBlock.java +index 48776edab1479b5e861eca8146da04ebee01c46a..4f27969196fe21b38e81d070fe5c0a999dd320dc 100644 +--- a/src/main/java/net/minecraft/world/level/block/FrostedIceBlock.java ++++ b/src/main/java/net/minecraft/world/level/block/FrostedIceBlock.java +@@ -38,7 +38,8 @@ public class FrostedIceBlock extends IceBlock { + + for(Direction direction : Direction.values()) { + mutableBlockPos.setWithOffset(pos, direction); +- BlockState blockState = world.getBlockState(mutableBlockPos); ++ BlockState blockState = world.getBlockStateIfLoaded(mutableBlockPos); // Paper ++ if (blockState == null) { continue; } // Paper + if (blockState.is(this) && !this.slightlyMelt(blockState, world, mutableBlockPos)) { + world.scheduleTick(mutableBlockPos, this, Mth.nextInt(random, world.paperConfig.frostedIceDelayMin, world.paperConfig.frostedIceDelayMax)); // Paper - use configurable min/max delay + } +@@ -75,7 +76,10 @@ public class FrostedIceBlock extends IceBlock { + + for(Direction direction : Direction.values()) { + mutableBlockPos.setWithOffset(pos, direction); +- if (world.getBlockState(mutableBlockPos).is(this)) { ++ // Paper start ++ BlockState blockState = world.getBlockStateIfLoaded(mutableBlockPos); ++ if (blockState != null && blockState.is(this)) { ++ // Paper end + ++i; + if (i >= maxNeighbors) { + return false; |