mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-13 00:37:57 +00:00
Force Relays will not push the block they're bound to if pushed by a sticky piston. Remote Controlled Frames anybody?
This commit is contained in:
1 parent
ca5104c129
commit
70f19e2305
1 file changed
+2
-1
@@ -193,6 +193,7 @@ public class BlockPistonRelay extends BlockMod implements IWandable, ILexiconabl
|
||||
|
||||
if(block == Blocks.piston_extension) {
|
||||
int meta = getBlockMetaAt(s);
|
||||
boolean sticky = (meta & 8) == 8;
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(meta & ~8);
|
||||
|
||||
MinecraftServer server = MinecraftServer.getServer();
|
||||
@@ -219,7 +220,7 @@ public class BlockPistonRelay extends BlockMod implements IWandable, ILexiconabl
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
Material mat = srcBlock.getMaterial();
|
||||
|
||||
if(tile == null && mat.getMaterialMobility() == 0 && !srcBlock.isAir(world, x, y, z)) {
|
||||
if(!sticky && tile == null && mat.getMaterialMobility() == 0 && !srcBlock.isAir(world, x, y, z)) {
|
||||
Material destMat = world.getBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ).getMaterial();
|
||||
if(world.isAirBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ) || destMat.isReplaceable()) {
|
||||
world.setBlock(x, y, z, Blocks.air);
|
||||
|
||||
Reference in new issue
Block a user