aboutsummaryrefslogtreecommitdiff
path: root/src/Java/miscutil/core/xmod
diff options
context:
space:
mode:
authorDraknyte1 <Draknyte1@hotmail.com>2016-07-04 15:21:58 +1000
committerDraknyte1 <Draknyte1@hotmail.com>2016-07-04 15:21:58 +1000
commitb1c319fa2d6fbf34d0db684f4fc3d7dc51b43a54 (patch)
treeb1061e2d9c569424d508ffcd26d33c13a565fa9a /src/Java/miscutil/core/xmod
parent7b5dbdc81b2f8f393dafc3268efe5eb5cd084c39 (diff)
downloadGT5-Unofficial-b1c319fa2d6fbf34d0db684f4fc3d7dc51b43a54.tar.gz
GT5-Unofficial-b1c319fa2d6fbf34d0db684f4fc3d7dc51b43a54.tar.bz2
GT5-Unofficial-b1c319fa2d6fbf34d0db684f4fc3d7dc51b43a54.zip
+ Added in base and Abstract classes to begin usage of RainsinToastCore.
+ Started work on a new GUI handler based off others, featuring dynamic ID ranges. (Internal code changes) - Removed a very old GUI handler class, left the current one until the new one is done.
Diffstat (limited to 'src/Java/miscutil/core/xmod')
-rw-r--r--src/Java/miscutil/core/xmod/forestry/core/interfaces/IFilterSlotDelegate.java10
-rw-r--r--src/Java/miscutil/core/xmod/forestry/core/interfaces/IInventoryAdapter.java7
-rw-r--r--src/Java/miscutil/core/xmod/forestry/core/interfaces/INBTTagable.java10
-rw-r--r--src/Java/miscutil/core/xmod/forestry/core/inventory/FakeInventoryAdapter.java120
4 files changed, 147 insertions, 0 deletions
diff --git a/src/Java/miscutil/core/xmod/forestry/core/interfaces/IFilterSlotDelegate.java b/src/Java/miscutil/core/xmod/forestry/core/interfaces/IFilterSlotDelegate.java
new file mode 100644
index 0000000000..d3290d7491
--- /dev/null
+++ b/src/Java/miscutil/core/xmod/forestry/core/interfaces/IFilterSlotDelegate.java
@@ -0,0 +1,10 @@
+package miscutil.core.xmod.forestry.core.interfaces;
+
+import net.minecraft.item.ItemStack;
+
+public abstract interface IFilterSlotDelegate
+{
+ public abstract boolean canSlotAccept(int paramInt, ItemStack paramItemStack);
+
+ public abstract boolean isLocked(int paramInt);
+}
diff --git a/src/Java/miscutil/core/xmod/forestry/core/interfaces/IInventoryAdapter.java b/src/Java/miscutil/core/xmod/forestry/core/interfaces/IInventoryAdapter.java
new file mode 100644
index 0000000000..95a24d90e3
--- /dev/null
+++ b/src/Java/miscutil/core/xmod/forestry/core/interfaces/IInventoryAdapter.java
@@ -0,0 +1,7 @@
+package miscutil.core.xmod.forestry.core.interfaces;
+
+import net.minecraft.inventory.ISidedInventory;
+
+public abstract interface IInventoryAdapter
+ extends ISidedInventory, IFilterSlotDelegate, INBTTagable
+{} \ No newline at end of file
diff --git a/src/Java/miscutil/core/xmod/forestry/core/interfaces/INBTTagable.java b/src/Java/miscutil/core/xmod/forestry/core/interfaces/INBTTagable.java
new file mode 100644
index 0000000000..6053e5f5ba
--- /dev/null
+++ b/src/Java/miscutil/core/xmod/forestry/core/interfaces/INBTTagable.java
@@ -0,0 +1,10 @@
+package miscutil.core.xmod.forestry.core.interfaces;
+
+import net.minecraft.nbt.NBTTagCompound;
+
+public abstract interface INBTTagable
+{
+ public abstract void readFromNBT(NBTTagCompound paramNBTTagCompound);
+
+ public abstract void writeToNBT(NBTTagCompound paramNBTTagCompound);
+}
diff --git a/src/Java/miscutil/core/xmod/forestry/core/inventory/FakeInventoryAdapter.java b/src/Java/miscutil/core/xmod/forestry/core/inventory/FakeInventoryAdapter.java
new file mode 100644
index 0000000000..39d1075dc7
--- /dev/null
+++ b/src/Java/miscutil/core/xmod/forestry/core/inventory/FakeInventoryAdapter.java
@@ -0,0 +1,120 @@
+package miscutil.core.xmod.forestry.core.inventory;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import forestry.core.inventory.IInventoryAdapter;
+
+public class FakeInventoryAdapter implements IInventoryAdapter {
+
+ public static final int[] SLOTS_NONE = new int[0];
+ private static FakeInventoryAdapter instance;
+ public static FakeInventoryAdapter instance(){
+ if (instance == null) {
+ instance = new FakeInventoryAdapter();
+ }
+ return instance;
+ }
+
+ @Override
+ public boolean canSlotAccept(int slotIndex, ItemStack itemStack){
+ return false;
+ }
+
+ @Override
+ public boolean isLocked(int slotIndex)
+ {
+ return false;
+ }
+
+ @Override
+ public int[] getAccessibleSlotsFromSide(int p_94128_1_)
+ {
+ return SLOTS_NONE;
+ }
+
+ @Override
+ public boolean canInsertItem(int p_102007_1_, ItemStack p_102007_2_, int p_102007_3_)
+ {
+ return false;
+ }
+
+ @Override
+ public boolean canExtractItem(int p_102008_1_, ItemStack p_102008_2_, int p_102008_3_)
+ {
+ return false;
+ }
+
+ @Override
+ public int getSizeInventory()
+ {
+ return 0;
+ }
+
+ @Override
+ public ItemStack getStackInSlot(int p_70301_1_)
+ {
+ return null;
+ }
+
+ @Override
+ public ItemStack decrStackSize(int p_70298_1_, int p_70298_2_)
+ {
+ return null;
+ }
+
+ @Override
+ public ItemStack getStackInSlotOnClosing(int p_70304_1_)
+ {
+ return null;
+ }
+
+ @Override
+ public void setInventorySlotContents(int p_70299_1_, ItemStack p_70299_2_) {}
+
+ @Override
+ public String getInventoryName()
+ {
+ return null;
+ }
+
+ @Override
+ public boolean hasCustomInventoryName()
+ {
+ return false;
+ }
+
+ @Override
+ public int getInventoryStackLimit()
+ {
+ return 0;
+ }
+
+ @Override
+ public void markDirty() {}
+
+ @Override
+ public boolean isUseableByPlayer(EntityPlayer p_70300_1_)
+ {
+ return false;
+ }
+
+ @Override
+ public void openInventory() {}
+
+ @Override
+ public void closeInventory() {}
+
+ @Override
+ public boolean isItemValidForSlot(int p_94041_1_, ItemStack p_94041_2_)
+ {
+ return false;
+ }
+
+ @Override
+ public void readFromNBT(NBTTagCompound nbttagcompound) {}
+
+ @Override
+ public void writeToNBT(NBTTagCompound nbttagcompound) {}
+
+}