diff --git a/Spigot-Server-Patches/0556-Prevent-headless-pistons-from-being-created.patch b/Spigot-Server-Patches/0556-Prevent-headless-pistons-from-being-created.patch index 823bc6e570..4a559ed86c 100644 --- a/Spigot-Server-Patches/0556-Prevent-headless-pistons-from-being-created.patch +++ b/Spigot-Server-Patches/0556-Prevent-headless-pistons-from-being-created.patch @@ -23,7 +23,7 @@ index d86474a1a97597c14ea8a28444e2a5d82fcda2a7..e0422471776f34b8e3c753d855aa06f0 public static int maxPlayerAutoSavePerTick = 10; private static void playerAutoSaveRate() { diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java -index 72de544c0782e4daff222a0ca04e5bc870cf148c..fe513a9470a0c474ca436ede4a5a7da476cf6c8d 100644 +index 72de544c0782e4daff222a0ca04e5bc870cf148c..5ca4d03215c979a4d122a32178a1859b4d9c3334 100644 --- a/src/main/java/net/minecraft/server/Explosion.java +++ b/src/main/java/net/minecraft/server/Explosion.java @@ -135,6 +135,15 @@ public class Explosion { @@ -32,8 +32,8 @@ index 72de544c0782e4daff222a0ca04e5bc870cf148c..fe513a9470a0c474ca436ede4a5a7da4 set.add(blockposition); + // Paper start - prevent headless pistons from forming + if (!com.destroystokyo.paper.PaperConfig.allowHeadlessPistons && iblockdata.getBlock() == Blocks.MOVING_PISTON) { -+ TileEntityPiston extension = (TileEntityPiston)this.world.getTileEntity(blockposition); -+ if (extension.isHead()) { ++ TileEntity extension = this.world.getTileEntity(blockposition); ++ if (extension instanceof TileEntityPiston && ((TileEntityPiston) extension).isHead()) { + EnumDirection direction = iblockdata.get(BlockPistonExtension.FACING); + set.add(blockposition.shift(direction.opposite())); + }