Fixed Wrench opening GUIs while performing action

This commit is contained in:
raoulvdberge
2017-05-15 22:46:40 +02:00
parent bd3ddee1bd
commit afe9b5bd0e
2 changed files with 6 additions and 1 deletions

View File

@@ -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());