aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/api
diff options
context:
space:
mode:
authorJordan Byrne <draknyte1@hotmail.com>2018-03-28 21:54:34 +1000
committerJordan Byrne <draknyte1@hotmail.com>2018-03-28 21:54:34 +1000
commit634ba57d8239096e36ef23d62c52763e442c2375 (patch)
treeb927b6ec21d475ca6e8ce01696955617eae35ca7 /src/Java/gtPlusPlus/api
parentdfabbe2c18c26725cb03b01746868f087e022732 (diff)
downloadGT5-Unofficial-634ba57d8239096e36ef23d62c52763e442c2375.tar.gz
GT5-Unofficial-634ba57d8239096e36ef23d62c52763e442c2375.tar.bz2
GT5-Unofficial-634ba57d8239096e36ef23d62c52763e442c2375.zip
$ Rewrote handling for the ABS to dynamically generate all recipes based on all pre-existing EBF recipes.
$ Rewrote ABS recipe handler to support temps within the recipes. This will allow coil upgrades like the EBF for higher tier smelting. $ Fix Polonium Material trying to access ELEMENT.java instance before it's created. + Added ItemStackData.java, which allows storing ItemStacks for easy retrieval.
Diffstat (limited to 'src/Java/gtPlusPlus/api')
-rw-r--r--src/Java/gtPlusPlus/api/objects/minecraft/ItemStackData.java33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/Java/gtPlusPlus/api/objects/minecraft/ItemStackData.java b/src/Java/gtPlusPlus/api/objects/minecraft/ItemStackData.java
new file mode 100644
index 0000000000..4fb6b9d8a7
--- /dev/null
+++ b/src/Java/gtPlusPlus/api/objects/minecraft/ItemStackData.java
@@ -0,0 +1,33 @@
+package gtPlusPlus.api.objects.minecraft;
+
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+
+import gtPlusPlus.core.util.minecraft.ItemUtils;
+
+public class ItemStackData {
+
+ protected final Item mItem;
+ protected final int mDamage;
+ protected final int mStackSize;
+ protected final NBTTagCompound mNBT;
+ protected final String mUniqueDataTag;
+
+ public ItemStackData (ItemStack aStack) {
+ mItem = aStack.getItem();
+ mDamage = aStack.getItemDamage();
+ mStackSize = aStack.stackSize;
+ mNBT = (aStack.getTagCompound() != null ? aStack.getTagCompound() : new NBTTagCompound());
+ mUniqueDataTag = ""+Item.getIdFromItem(mItem)+""+mDamage+""+mStackSize+""+mNBT.getId();
+ }
+
+ public String getUniqueDataIdentifier() {
+ return this.mUniqueDataTag;
+ }
+
+ public ItemStack getStack() {
+ return ItemUtils.simpleMetaStack(mItem, mDamage, mStackSize);
+ }
+
+}