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

@@ -3,6 +3,7 @@
### 1.4.6
- Performance improvement to network scanning (raoulvdberge)
- Removed debug output from 1.4.5 (raoulvdberge)
- Fixed Wrench opening GUIs while performing action (raoulvdberge)
### 1.4.5
- Updated Forge to 2296 (raoulvdberge)

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