From 420faddca46e70e3a70def168fb4e452ef193b0d Mon Sep 17 00:00:00 2001 From: OnyxDarkKnight Date: Sat, 21 Feb 2015 21:31:16 +0000 Subject: Added just a butt ton of stuff, also thanks to pau101 for helping me with the Hand Pedestal animation :) --- .../jewelrycraft/container/SlotNecklace.java | 52 ++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 java/darkknight/jewelrycraft/container/SlotNecklace.java (limited to 'java/darkknight/jewelrycraft/container/SlotNecklace.java') diff --git a/java/darkknight/jewelrycraft/container/SlotNecklace.java b/java/darkknight/jewelrycraft/container/SlotNecklace.java new file mode 100644 index 0000000..42543b0 --- /dev/null +++ b/java/darkknight/jewelrycraft/container/SlotNecklace.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.ItemNecklace; + +public class SlotNecklace extends Slot +{ + + /** + * @param tile + * @param slotID + * @param x + * @param y + */ + public SlotNecklace(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 ItemNecklace; + } + + /** + * @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