Fix more items and unsafe checks that made items get deleted.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user