Clear Memory Card When Shift Clicking on a non-machine / air.

Fixed Tooltip to properly localize names.
This commit is contained in:
AlgorithmX2
2014-05-25 18:32:16 -05:00
parent cbc2486161
commit 6b0fa0f142
5 changed files with 68 additions and 6 deletions
+9
View File
@@ -7,6 +7,9 @@ import java.io.IOException;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import appeng.api.AEApi;
import appeng.api.implementations.items.IMemoryCard;
import appeng.api.implementations.items.MemoryCardMessages;
import appeng.core.sync.AppEngPacket;
import appeng.core.sync.network.INetworkInfo;
import appeng.items.tools.ToolNetworkTool;
@@ -37,6 +40,12 @@ public class PacketClick extends AppEngPacket
ToolNetworkTool tnt = (ToolNetworkTool) is.getItem();
tnt.serverSideToolLogic( is, player, player.worldObj, x, y, z, side, hitX, hitY, hitZ );
}
else if ( is != null && AEApi.instance().items().itemMemoryCard.sameAs( is ) )
{
IMemoryCard mem = (IMemoryCard) is.getItem();
mem.notifyUser( player, MemoryCardMessages.SETTINGS_CLEARED );
is.setTagCompound( null );
}
}
// api