aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/core/slots
diff options
context:
space:
mode:
Diffstat (limited to 'src/Java/gtPlusPlus/core/slots')
-rw-r--r--src/Java/gtPlusPlus/core/slots/SlotBlueprint.java30
-rw-r--r--src/Java/gtPlusPlus/core/slots/SlotGeneric.java24
2 files changed, 54 insertions, 0 deletions
diff --git a/src/Java/gtPlusPlus/core/slots/SlotBlueprint.java b/src/Java/gtPlusPlus/core/slots/SlotBlueprint.java
new file mode 100644
index 0000000000..3c5c30966e
--- /dev/null
+++ b/src/Java/gtPlusPlus/core/slots/SlotBlueprint.java
@@ -0,0 +1,30 @@
+package gtPlusPlus.core.slots;
+
+import gtPlusPlus.core.interfaces.IItemBlueprint;
+import gtPlusPlus.core.util.Utils;
+import net.minecraft.inventory.IInventory;
+import net.minecraft.inventory.Slot;
+import net.minecraft.item.ItemStack;
+
+public class SlotBlueprint extends Slot{
+
+ public SlotBlueprint(IInventory inventory, int x, int y, int z) {
+ super(inventory, x, y, z);
+ }
+
+ @Override
+ public boolean isItemValid(ItemStack itemstack) {
+ if (itemstack.getItem() instanceof IItemBlueprint){
+ Utils.LOG_WARNING(itemstack.getDisplayName()+" is a valid Blueprint.");
+ return true;
+ }
+ Utils.LOG_WARNING(itemstack.getDisplayName()+" is not a valid Blueprint.");
+ return false;
+ }
+
+ @Override
+ public int getSlotStackLimit() {
+ return 1;
+ }
+
+}
diff --git a/src/Java/gtPlusPlus/core/slots/SlotGeneric.java b/src/Java/gtPlusPlus/core/slots/SlotGeneric.java
new file mode 100644
index 0000000000..bf7dc1fff5
--- /dev/null
+++ b/src/Java/gtPlusPlus/core/slots/SlotGeneric.java
@@ -0,0 +1,24 @@
+package gtPlusPlus.core.slots;
+
+import net.minecraft.inventory.IInventory;
+import net.minecraft.inventory.Slot;
+import net.minecraft.item.ItemStack;
+
+public class SlotGeneric extends Slot{
+
+ public SlotGeneric(IInventory inventory, int x, int y, int z) {
+ super(inventory, x, y, z);
+
+ }
+
+ @Override
+ public boolean isItemValid(ItemStack itemstack) {
+ return true;
+ }
+
+ @Override
+ public int getSlotStackLimit() {
+ return 64;
+ }
+
+}