mirror of
https://github.com/barkeser2002/CatServer.git
synced 2026-09-25 02:20:01 +03:00
55 lines
2.7 KiB
Diff
55 lines
2.7 KiB
Diff
--- ../src-base/minecraft/net/minecraft/block/state/BlockPistonStructureHelper.java
|
|
+++ ../src-work/minecraft/net/minecraft/block/state/BlockPistonStructureHelper.java
|
|
@@ -65,7 +65,7 @@
|
|
{
|
|
BlockPos blockpos = this.toMove.get(i);
|
|
|
|
- if (this.world.getBlockState(blockpos).getBlock() == Blocks.SLIME_BLOCK && !this.addBranchingBlocks(blockpos))
|
|
+ if (this.world.getBlockState(blockpos).getBlock().isStickyBlock(this.world.getBlockState(blockpos)) && !this.addBranchingBlocks(blockpos))
|
|
{
|
|
return false;
|
|
}
|
|
@@ -80,7 +80,7 @@
|
|
IBlockState iblockstate = this.world.getBlockState(origin);
|
|
Block block = iblockstate.getBlock();
|
|
|
|
- if (iblockstate.getMaterial() == Material.AIR)
|
|
+ if (iblockstate.getBlock().isAir(iblockstate, this.world, origin))
|
|
{
|
|
return true;
|
|
}
|
|
@@ -106,13 +106,13 @@
|
|
}
|
|
else
|
|
{
|
|
- while (block == Blocks.SLIME_BLOCK)
|
|
+ while (block.isStickyBlock(iblockstate))
|
|
{
|
|
BlockPos blockpos = origin.offset(this.moveDirection.getOpposite(), i);
|
|
iblockstate = this.world.getBlockState(blockpos);
|
|
block = iblockstate.getBlock();
|
|
|
|
- if (iblockstate.getMaterial() == Material.AIR || !BlockPistonBase.canPush(iblockstate, this.world, blockpos, this.moveDirection, false, this.moveDirection.getOpposite()) || blockpos.equals(this.pistonPos))
|
|
+ if (iblockstate.getBlock().isAir(iblockstate, this.world, blockpos) || !BlockPistonBase.canPush(iblockstate, this.world, blockpos, this.moveDirection, false, this.moveDirection.getOpposite()) || blockpos.equals(this.pistonPos))
|
|
{
|
|
break;
|
|
}
|
|
@@ -148,7 +148,7 @@
|
|
{
|
|
BlockPos blockpos2 = this.toMove.get(l);
|
|
|
|
- if (this.world.getBlockState(blockpos2).getBlock() == Blocks.SLIME_BLOCK && !this.addBranchingBlocks(blockpos2))
|
|
+ if (this.world.getBlockState(blockpos2).getBlock().isStickyBlock(this.world.getBlockState(blockpos2)) && !this.addBranchingBlocks(blockpos2))
|
|
{
|
|
return false;
|
|
}
|
|
@@ -159,7 +159,7 @@
|
|
|
|
iblockstate = this.world.getBlockState(blockpos1);
|
|
|
|
- if (iblockstate.getMaterial() == Material.AIR)
|
|
+ if (iblockstate.getBlock().isAir(iblockstate, this.world, blockpos1))
|
|
{
|
|
return true;
|
|
}
|