From 31f07a0b5a7e6abaedb64ea6f202637f634a8696 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sat, 20 May 2017 19:41:51 +0200 Subject: [PATCH] fix the chest to crate upgrade doing some stuff again Closes #764 --- .../mod/items/ItemChestToCrateUpgrade.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemChestToCrateUpgrade.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemChestToCrateUpgrade.java index e494256b4..3060f32ab 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemChestToCrateUpgrade.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemChestToCrateUpgrade.java @@ -40,7 +40,7 @@ public class ItemChestToCrateUpgrade extends ItemBase{ } @Override - public EnumActionResult onItemUse(EntityPlayer player, World world, BlockPos pos, EnumHand hand, EnumFacing facing, float par8, float par9, float par10){ + public EnumActionResult onItemUseFirst(EntityPlayer player, World world, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ, EnumHand hand){ ItemStack heldStack = player.getHeldItem(hand); if(player.isSneaking()){ TileEntity tileHit = world.getTileEntity(pos); @@ -90,14 +90,13 @@ public class ItemChestToCrateUpgrade extends ItemBase{ } } } - return EnumActionResult.SUCCESS; + return world.isRemote ? EnumActionResult.PASS : EnumActionResult.SUCCESS; } } - return super.onItemUse(player, world, pos, hand, facing, par8, par9, par10); + return super.onItemUseFirst(player, world, pos, side, hitX, hitY, hitZ, hand); } - @Override public EnumRarity getRarity(ItemStack stack){ return EnumRarity.RARE;