diff options
Diffstat (limited to 'src/main/java/darkknight/jewelrycraft/container/SlotRing.java')
| -rw-r--r-- | src/main/java/darkknight/jewelrycraft/container/SlotRing.java | 52 |
1 files changed, 52 insertions, 0 deletions
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; + } +} |
