Fixed the Force Lens being able to move Bedrock. Closes #1115

This commit is contained in:
Lizbeth Rika committed 2015-06-24 17:35:35 +01:00
1 parent 5a835e4992
commit 41f94e46e7
1 file changed
+1 -1
@@ -36,7 +36,7 @@ public class LensPiston extends Lens {
int meta = entity.worldObj.getBlockMetadata(pos.blockX, pos.blockY, pos.blockZ);
TileEntity tile = entity.worldObj.getTileEntity(pos.blockX, pos.blockY, pos.blockZ);
if(block.getMobilityFlag() == 0 && block != Blocks.obsidian && tile == null) {
if(block.getMobilityFlag() == 0 && block != Blocks.obsidian && block.getBlockHardness(entity.worldObj, pos.blockX, pos.blockY, pos.blockZ) >= 0 && tile == null) {
entity.worldObj.setBlockToAir(pos.blockX, pos.blockY, pos.blockZ);
entity.worldObj.setBlock(x, y, z, block, meta, 1 | 2);
entity.worldObj.playAuxSFX(2001, pos.blockX, pos.blockY, pos.blockZ, Block.getIdFromBlock(block) + (meta << 12));