aboutsummaryrefslogtreecommitdiff
path: root/src/Java/binnie/craftgui/minecraft/CustomSlot.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/Java/binnie/craftgui/minecraft/CustomSlot.java')
-rw-r--r--src/Java/binnie/craftgui/minecraft/CustomSlot.java54
1 files changed, 0 insertions, 54 deletions
diff --git a/src/Java/binnie/craftgui/minecraft/CustomSlot.java b/src/Java/binnie/craftgui/minecraft/CustomSlot.java
deleted file mode 100644
index ae45ffb3fd..0000000000
--- a/src/Java/binnie/craftgui/minecraft/CustomSlot.java
+++ /dev/null
@@ -1,54 +0,0 @@
-package binnie.craftgui.minecraft;
-
-import binnie.core.machines.Machine;
-import binnie.core.machines.inventory.IInventorySlots;
-import binnie.core.machines.inventory.InventorySlot;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.inventory.IInventory;
-import net.minecraft.inventory.Slot;
-import net.minecraft.item.ItemStack;
-
-public class CustomSlot
- extends Slot
-{
- public boolean isItemValid(ItemStack par1ItemStack)
- {
- return this.inventory.isItemValidForSlot(getSlotIndex(), par1ItemStack);
- }
-
- public CustomSlot(IInventory inventory, int index)
- {
- super(inventory, index, 0, 0);
- }
-
- public InventorySlot getInventorySlot()
- {
- IInventorySlots slots = (IInventorySlots)Machine.getInterface(IInventorySlots.class, this.inventory);
- if (slots != null) {
- return slots.getSlot(getSlotIndex());
- }
- return null;
- }
-
- public boolean handleClick()
- {
- InventorySlot slot = getInventorySlot();
- return (slot != null) && (slot.isRecipe());
- }
-
- public void onSlotClick(ContainerCraftGUI container, int mouseButton, int modifier, EntityPlayer player)
- {
- ItemStack stack = player.inventory.getItemStack();
- if ((stack == null) || (mouseButton == 2))
- {
- putStack(null);
- }
- else
- {
- stack = stack.copy();
- stack.stackSize = 1;
- putStack(stack);
- }
- }
-}