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/SlotDataStick.java36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/Java/gtPlusPlus/core/slots/SlotDataStick.java b/src/Java/gtPlusPlus/core/slots/SlotDataStick.java
new file mode 100644
index 0000000000..2c8e073769
--- /dev/null
+++ b/src/Java/gtPlusPlus/core/slots/SlotDataStick.java
@@ -0,0 +1,36 @@
+package gtPlusPlus.core.slots;
+
+import gregtech.api.enums.ItemList;
+import gregtech.api.enums.OrePrefixes;
+import gregtech.api.items.GT_MetaGenerated_Tool;
+import gregtech.common.items.GT_MetaGenerated_Item_01;
+import gregtech.common.items.GT_MetaGenerated_Item_02;
+import gregtech.common.items.behaviors.Behaviour_DataStick;
+import net.minecraft.inventory.IInventory;
+import net.minecraft.inventory.Slot;
+import net.minecraft.item.ItemStack;
+
+public class SlotDataStick extends Slot{
+
+ public SlotDataStick(final IInventory inventory, final int slot, final int x, final int y) {
+ super(inventory, slot, x, y);
+
+ }
+
+ @Override
+ public boolean isItemValid(final ItemStack itemstack) {
+ boolean isValid = false;
+
+ if (itemstack != null){
+ if ((itemstack.getItem() instanceof GT_MetaGenerated_Item_01 && itemstack.getItemDamage() == 708) || (itemstack == ItemList.Tool_DataStick.get(1))){
+ isValid = true;
+ }
+ }
+ return isValid;
+ }
+
+ @Override
+ public int getSlotStackLimit() {
+ return 1;
+ }
+}