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
@@ -216,8 +216,8 @@ public final class ItemBasicStorageCell extends AEBaseItem implements IStorageCe
@Override
public ActionResult<ItemStack> onItemRightClick( final World world, final EntityPlayer player, final EnumHand hand )
{
this.disassembleDrive( player.getHeldItemMainhand(), world, player );
return new ActionResult<ItemStack>( EnumActionResult.SUCCESS, player.getHeldItemMainhand() );
this.disassembleDrive( player.getHeldItem(hand), world, player );
return new ActionResult<ItemStack>( EnumActionResult.SUCCESS, player.getHeldItem(hand) );
}
private boolean disassembleDrive( final ItemStack stack, final World world, final EntityPlayer player )
@@ -283,7 +283,7 @@ public final class ItemBasicStorageCell extends AEBaseItem implements IStorageCe
@Override
public EnumActionResult onItemUseFirst( final EntityPlayer player, final World world, final BlockPos pos, final EnumFacing side, final float hitX, final float hitY, final float hitZ, final EnumHand hand )
{
return this.disassembleDrive( player.getHeldItemMainhand(), world, player ) ? EnumActionResult.SUCCESS : EnumActionResult.PASS;
return this.disassembleDrive( player.getHeldItem(hand), world, player ) ? EnumActionResult.SUCCESS : EnumActionResult.PASS;
}
@Override