mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-22 21:19:46 +00:00
Added mobility check to the Piston Relay.
This commit is contained in:
1 parent
804902be89
commit
ce17eef893
1 file changed
+2
-1
@@ -223,8 +223,9 @@ public class BlockPistonRelay extends BlockMod implements IWandable {
|
||||
int srcId = world.getBlockId(x, y, z);
|
||||
int srcMeta = world.getBlockMetadata(x, y, z);
|
||||
TileEntity tile = world.getBlockTileEntity(x, y, z);
|
||||
Material mat = world.getBlockMaterial(x, y, z);
|
||||
|
||||
if(tile == null && Block.blocksList[srcId] != null && !Block.blocksList[srcId].isAirBlock(world, x, y, z)) {
|
||||
if(tile == null && mat.getMaterialMobility() == 0 && Block.blocksList[srcId] != null && !Block.blocksList[srcId].isAirBlock(world, x, y, z)) {
|
||||
Material destMat = world.getBlockMaterial(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ);
|
||||
if(world.isAirBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ) || destMat.isReplaceable()) {
|
||||
world.setBlock(x, y, z, 0);
|
||||
|
||||
Reference in new issue
Block a user