diff --git a/Spigot-Server-Patches/Prevent-headless-pistons-from-being-created.patch b/Spigot-Server-Patches/Prevent-headless-pistons-from-being-created.patch index 85c8bd5b40..8c7e0dc7a6 100644 --- a/Spigot-Server-Patches/Prevent-headless-pistons-from-being-created.patch +++ b/Spigot-Server-Patches/Prevent-headless-pistons-from-being-created.patch @@ -32,8 +32,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 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())); + }