summaryrefslogtreecommitdiff
path: root/src/main/java/darkknight/jewelrycraft/container/SlotRing.java
diff options
context:
space:
mode:
authorOnyxDarkKnight <sor1n.iliutza16@gmail.com>2015-03-23 14:51:06 +0000
committerOnyxDarkKnight <sor1n.iliutza16@gmail.com>2015-03-23 14:51:06 +0000
commit6312636fd9a4d0f56dc7c9ff474a99d879bcb4e9 (patch)
treee3279753210bfb169a00cd3f146a80baf624150e /src/main/java/darkknight/jewelrycraft/container/SlotRing.java
parente86949a1ad3269ec66c9de65e2c92f5e66251411 (diff)
Reworked the whole repo.
Diffstat (limited to 'src/main/java/darkknight/jewelrycraft/container/SlotRing.java')
-rw-r--r--src/main/java/darkknight/jewelrycraft/container/SlotRing.java52
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;
+ }
+}