aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/core/slots
diff options
context:
space:
mode:
authorDraknyte1 <Draknyte1@hotmail.com>2016-10-10 23:17:59 +1000
committerDraknyte1 <Draknyte1@hotmail.com>2016-10-10 23:17:59 +1000
commitb1aa7032fe9e6bfedccf1bb08952c68100002489 (patch)
tree25b82e668a9ed1825fa3d021d0a80959ccc31639 /src/Java/gtPlusPlus/core/slots
parent26e10439a576e08bc3261a6d7c6c00c6cad7b761 (diff)
downloadGT5-Unofficial-b1aa7032fe9e6bfedccf1bb08952c68100002489.tar.gz
GT5-Unofficial-b1aa7032fe9e6bfedccf1bb08952c68100002489.tar.bz2
GT5-Unofficial-b1aa7032fe9e6bfedccf1bb08952c68100002489.zip
+ Added Blueprints - These are capable of storing a crafting recipe in it, to be used with the workbench.
% More Internal work on the Workbench and it's handling of shit. + Added an interface for blueprints and other shit to utilize.
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;
+ }
+
+}