Fix more items and unsafe checks that made items get deleted.

This commit is contained in:
Gunther De Wachter
2017-07-02 07:44:21 +02:00
parent b67d7eed82
commit e96339dd2b
10 changed files with 23 additions and 23 deletions
@@ -274,9 +274,9 @@ public abstract class AEBaseTileBlock extends AEBaseBlock implements ITileEntity
public boolean onBlockActivated( World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ )
{
ItemStack heldItem;
if( player != null && !player.getHeldItemMainhand().isEmpty() )
if( player != null && !player.getHeldItem(hand).isEmpty() )
{
heldItem = player.getHeldItemMainhand();
heldItem = player.getHeldItem(hand);
if( Platform.isWrench( player, heldItem, pos ) && player.isSneaking() )
{
@@ -366,7 +366,7 @@ public abstract class AEBaseTileBlock extends AEBaseBlock implements ITileEntity
}
}
return this.onActivated( world, pos, player, hand, player.getHeldItemMainhand(), facing, hitX, hitY, hitZ );
return this.onActivated( world, pos, player, hand, player.getHeldItem(hand), facing, hitX, hitY, hitZ );
}
@Override