Fixed Wrench opening GUIs while performing action
This commit is contained in:
@@ -72,10 +72,14 @@ public class ItemWrench extends ItemBase {
|
||||
|
||||
@Override
|
||||
public EnumActionResult onItemUse(EntityPlayer player, World world, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) {
|
||||
if (world.isRemote || !player.isSneaking()) {
|
||||
if (!player.isSneaking()) {
|
||||
return EnumActionResult.PASS;
|
||||
}
|
||||
|
||||
if (world.isRemote) {
|
||||
return EnumActionResult.SUCCESS;
|
||||
}
|
||||
|
||||
ItemStack stack = player.getHeldItem(hand);
|
||||
|
||||
WrenchMode mode = WrenchMode.readFromNBT(stack.getTagCompound());
|
||||
|
||||
Reference in New Issue
Block a user