fixed slot tongs rendering

This commit is contained in:
Mohammad-Ali Minaie
2018-09-21 23:25:16 -04:00
parent a45d502cc6
commit 6f5dd58fc5
2 changed files with 23 additions and 22 deletions

View File

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

View File

@@ -233,7 +233,7 @@ 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();
@@ -257,6 +257,7 @@ public interface AnvilHandler {
}
}
}
if (!world.isRemote) {
if (pItem.getItem().equals(Items.AIR) && player.isSneaking()) {