mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-19 19:59:58 +00:00
Only dismantle machines when holding shift...
This commit is contained in:
1 parent
b03e9ee7a2
commit
22b3aa5ea2
1 file changed
+1
-1
@@ -105,7 +105,7 @@ public class ItemYetaWrench extends Item implements IYetaWrench, IResourceToolti
|
||||
@Override
|
||||
public void toolUsed(ItemStack item, EntityLivingBase user, int x, int y, int z) {
|
||||
Block block = user.worldObj.getBlock(x, y, z);
|
||||
if (block instanceof IDismantleable && user instanceof EntityPlayer) {
|
||||
if (user.isSneaking() && block instanceof IDismantleable && user instanceof EntityPlayer) {
|
||||
EntityPlayer player = (EntityPlayer) user;
|
||||
IDismantleable machine = (IDismantleable) block;
|
||||
if (machine.canDismantle(player, player.worldObj, x, y, z) && !player.worldObj.isRemote) {
|
||||
|
||||
Reference in new issue
Block a user