diff --git a/kfc/src/main/java/nmd/primal/forgecraft/items/SlottedTongs.java b/kfc/src/main/java/nmd/primal/forgecraft/items/SlottedTongs.java index 528f95b8..da3ca8db 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/items/SlottedTongs.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/items/SlottedTongs.java @@ -283,7 +283,7 @@ public class SlottedTongs extends Item implements IPickup, AnvilHandler{ @Override public EnumActionResult onItemUse(EntityPlayer player, World world, BlockPos pos, EnumHand hand, EnumFacing face, float hitx, float hity, float hitz) { - if(!world.isRemote){ + //if(!world.isRemote){ //if (hand.equals(player.swingingHand)) { IBlockState state = world.getBlockState(pos); Block block = world.getBlockState(pos).getBlock(); @@ -430,8 +430,8 @@ public class SlottedTongs extends Item implements IPickup, AnvilHandler{ } } return EnumActionResult.FAIL; - } - return EnumActionResult.FAIL; + //} + //return EnumActionResult.FAIL; } public ItemStack getItem(World world, BlockPos pos, IBlockState state, Block block) diff --git a/kfc/src/main/java/nmd/primal/forgecraft/util/AnvilHandler.java b/kfc/src/main/java/nmd/primal/forgecraft/util/AnvilHandler.java index 29d60dba..9693d55b 100644 --- a/kfc/src/main/java/nmd/primal/forgecraft/util/AnvilHandler.java +++ b/kfc/src/main/java/nmd/primal/forgecraft/util/AnvilHandler.java @@ -233,31 +233,32 @@ public interface AnvilHandler { static boolean doWork(ItemStack pItem, Integer counter, TileAnvil tile, World world, BlockPos pos, EntityPlayer player) { - if (!world.isRemote) { - if (pItem.getItem().equals(ModItems.slottedtongs)) { - SlottedTongs tongs = (SlottedTongs) pItem.getItem(); - ItemStack tongStack = tongs.getSlotList().get(0).copy(); + if (pItem.getItem().equals(ModItems.slottedtongs)) { - if (tongStack.isEmpty()) { - if (!tile.getSlotStack(counter).isEmpty()) { - ItemStack tempStack = tile.getSlotStack(counter).copy(); - tongs.setSlotList(tempStack); - tile.setSlotStack(counter, ItemStack.EMPTY); - return true; - } - } + SlottedTongs tongs = (SlottedTongs) pItem.getItem(); + ItemStack tongStack = tongs.getSlotList().get(0).copy(); - if (!tongStack.isEmpty()) { - if (tile.getSlotStack(counter).isEmpty()) { - ItemStack tempStack = tongs.getSlotList().get(0).copy(); - tile.setSlotStack(counter, tempStack); - tongs.setSlotList(ItemStack.EMPTY); - return true; - } + if (tongStack.isEmpty()) { + if (!tile.getSlotStack(counter).isEmpty()) { + ItemStack tempStack = tile.getSlotStack(counter).copy(); + tongs.setSlotList(tempStack); + tile.setSlotStack(counter, ItemStack.EMPTY); + return true; } } + if (!tongStack.isEmpty()) { + if (tile.getSlotStack(counter).isEmpty()) { + ItemStack tempStack = tongs.getSlotList().get(0).copy(); + tile.setSlotStack(counter, tempStack); + tongs.setSlotList(ItemStack.EMPTY); + return true; + } + } + } + if (!world.isRemote) { + if (pItem.getItem().equals(Items.AIR) && player.isSneaking()) { if (tile.getSlotStack(counter).getItem().equals(Items.DIAMOND)) {