Fixed Wrench opening GUIs while performing action
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
### 1.4.6
|
### 1.4.6
|
||||||
- Performance improvement to network scanning (raoulvdberge)
|
- Performance improvement to network scanning (raoulvdberge)
|
||||||
- Removed debug output from 1.4.5 (raoulvdberge)
|
- Removed debug output from 1.4.5 (raoulvdberge)
|
||||||
|
- Fixed Wrench opening GUIs while performing action (raoulvdberge)
|
||||||
|
|
||||||
### 1.4.5
|
### 1.4.5
|
||||||
- Updated Forge to 2296 (raoulvdberge)
|
- Updated Forge to 2296 (raoulvdberge)
|
||||||
|
|||||||
@@ -72,10 +72,14 @@ public class ItemWrench extends ItemBase {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public EnumActionResult onItemUse(EntityPlayer player, World world, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) {
|
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;
|
return EnumActionResult.PASS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (world.isRemote) {
|
||||||
|
return EnumActionResult.SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
ItemStack stack = player.getHeldItem(hand);
|
ItemStack stack = player.getHeldItem(hand);
|
||||||
|
|
||||||
WrenchMode mode = WrenchMode.readFromNBT(stack.getTagCompound());
|
WrenchMode mode = WrenchMode.readFromNBT(stack.getTagCompound());
|
||||||
|
|||||||
Reference in New Issue
Block a user