public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, @Nullable ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ) {
if (!world.isRemote && hand == EnumHand.MAIN_HAND) {
TurretBase base = (TurretBase) world.getTileEntity(pos);
if (player.isSneaking() && base != null && player.getHeldItemMainhand() != null &&
player.getHeldItemMainhand().getItem() instanceof UsableMetaItem && player.getHeldItemMainhand().getItemDamage() == 2) {
<BUG>player.getHeldItemMainhand().setTagCompound(base.writeMemoryCardNBT());
} else if ( !player.isSneaking() && base != null && player.getHeldItemMainhand() != null &&</BUG>
player.getHeldItemMainhand().getItem() instanceof UsableMetaItem && player.getHeldItemMainhand().getItemDamage() == 2 &&
<BUG>player.getHeldItemMainhand().hasTagCompound()) {
base.readMemoryCardNBT(player.getHeldItemMainhand().getTagCompound());
} else if ( !player.isSneaking() && base != null) {</BUG>
TrustedPlayer trustedPlayer = PlayerUtil.getTrustedPlayer(player, base);

public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, @Nullable ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ) {
if (!world.isRemote && hand == EnumHand.MAIN_HAND) {
TurretBase base = (TurretBase) world.getTileEntity(pos);
if (player.isSneaking() && base != null && player.getHeldItemMainhand() != null &&
player.getHeldItemMainhand().getItem() instanceof UsableMetaItem && player.getHeldItemMainhand().getItemDamage() == 2) {
((UsableMetaItem) player.getHeldItemMainhand().getItem()).setDataStored(player.getHeldItemMainhand(),base.writeMemoryCardNBT());
} else if ( !player.isSneaking() && base != null && player.getHeldItemMainhand() != null &&
player.getHeldItemMainhand().getItem() instanceof UsableMetaItem && player.getHeldItemMainhand().getItemDamage() == 2 &&
((UsableMetaItem) player.getHeldItemMainhand().getItem()).hasDataStored(player.getHeldItemMainhand())) {
base.readMemoryCardNBT(((UsableMetaItem) player.getHeldItemMainhand().getItem()).getDataStored(player.getHeldItemMainhand()));
} else if ( !player.isSneaking() && base != null) {
TrustedPlayer trustedPlayer = PlayerUtil.getTrustedPlayer(player, base);
