mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-19 19:59:36 +00:00
Fixed the Weight Lens being able to drop blocks that normally can't be Silk Touched. Closes #1359
This commit is contained in:
1 parent
0d29e9c365
commit
6ae5f709ea
1 file changed
+3
-2
@@ -27,8 +27,9 @@ public class LensWeight extends Lens {
|
||||
int z = pos.blockZ;
|
||||
Block block = entity.worldObj.getBlock(x, y, z);
|
||||
Block blockBelow = entity.worldObj.getBlock(x, y - 1, z);
|
||||
if(blockBelow.isAir(entity.worldObj, x, y - 1, z) && block.getBlockHardness(entity.worldObj, x, y, z) != -1 && entity.worldObj.getTileEntity(x, y, z) == null) {
|
||||
EntityFallingBlock falling = new EntityFallingBlock(entity.worldObj, x + 0.5, y + 0.5, z + 0.5, block, entity.worldObj.getBlockMetadata(x, y, z));
|
||||
int meta = entity.worldObj.getBlockMetadata(x, y, z);
|
||||
if(blockBelow.isAir(entity.worldObj, x, y - 1, z) && block.getBlockHardness(entity.worldObj, x, y, z) != -1 && entity.worldObj.getTileEntity(x, y, z) == null && block.canSilkHarvest(entity.worldObj, null, x, y, z, meta)) {
|
||||
EntityFallingBlock falling = new EntityFallingBlock(entity.worldObj, x + 0.5, y + 0.5, z + 0.5, block, meta);
|
||||
if(!entity.worldObj.isRemote)
|
||||
entity.worldObj.spawnEntityInWorld(falling);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user