mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 23:38:25 +01:00
Fix cast check (#4813)
This commit is contained in:
parent
8996aa88cd
commit
603d4bb5a6
1 changed files with 2 additions and 2 deletions
|
@ -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()));
|
||||
+ }
|
||||
|
|
Loading…
Reference in a new issue