mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-16 14:33:09 +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);
|
set.add(blockposition);
|
||||||
+ // Paper start - prevent headless pistons from forming
|
+ // Paper start - prevent headless pistons from forming
|
||||||
+ if (!com.destroystokyo.paper.PaperConfig.allowHeadlessPistons && iblockdata.getBlock() == Blocks.MOVING_PISTON) {
|
+ if (!com.destroystokyo.paper.PaperConfig.allowHeadlessPistons && iblockdata.getBlock() == Blocks.MOVING_PISTON) {
|
||||||
+ TileEntityPiston extension = (TileEntityPiston)this.world.getTileEntity(blockposition);
|
+ TileEntity extension = this.world.getTileEntity(blockposition);
|
||||||
+ if (extension.isHead()) {
|
+ if (extension instanceof TileEntityPiston && ((TileEntityPiston) extension).isHead()) {
|
||||||
+ EnumDirection direction = iblockdata.get(BlockPistonExtension.FACING);
|
+ EnumDirection direction = iblockdata.get(BlockPistonExtension.FACING);
|
||||||
+ set.add(blockposition.shift(direction.opposite()));
|
+ set.add(blockposition.shift(direction.opposite()));
|
||||||
+ }
|
+ }
|
||||||
|
|
Loading…
Reference in a new issue