From 6312636fd9a4d0f56dc7c9ff474a99d879bcb4e9 Mon Sep 17 00:00:00 2001 From: OnyxDarkKnight Date: Mon, 23 Mar 2015 14:51:06 +0000 Subject: Reworked the whole repo. --- .../jewelrycraft/container/SlotRing.java | 52 ++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 src/main/java/darkknight/jewelrycraft/container/SlotRing.java (limited to 'src/main/java/darkknight/jewelrycraft/container/SlotRing.java') diff --git a/src/main/java/darkknight/jewelrycraft/container/SlotRing.java b/src/main/java/darkknight/jewelrycraft/container/SlotRing.java new file mode 100644 index 0000000..52aa4fb --- /dev/null +++ b/src/main/java/darkknight/jewelrycraft/container/SlotRing.java @@ -0,0 +1,52 @@ +package darkknight.jewelrycraft.container; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; +import darkknight.jewelrycraft.item.ItemRing; + +public class SlotRing extends Slot +{ + + /** + * @param tile + * @param slotID + * @param x + * @param y + */ + public SlotRing(IInventory tile, int slotID, int x, int y) + { + super(tile, slotID, x, y); + } + + /** + * @param stack + * @return + */ + @Override + public boolean isItemValid(ItemStack stack) + { + return stack.getItem() instanceof ItemRing; + } + + /** + * @param amount + * @return + */ + @Override + public ItemStack decrStackSize(int amount) + { + return super.decrStackSize(amount); + } + + /** + * @param player + * @return + */ + @Override + public boolean canTakeStack(EntityPlayer player) + { + return true; + } +} -- cgit v1.2.3