aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/core/util
diff options
context:
space:
mode:
authorAlkalus <3060479+draknyte1@users.noreply.github.com>2018-05-27 15:03:29 +1000
committerAlkalus <3060479+draknyte1@users.noreply.github.com>2018-05-27 15:03:29 +1000
commit79f37cfd42c53af7969fba388b711955e389b76d (patch)
tree3b1c23174f11d95be12c77747a1fed570f8884a0 /src/Java/gtPlusPlus/core/util
parent087fbb268c0fa9ff82fb0f3d30cd45c35aa57f6a (diff)
downloadGT5-Unofficial-79f37cfd42c53af7969fba388b711955e389b76d.tar.gz
GT5-Unofficial-79f37cfd42c53af7969fba388b711955e389b76d.tar.bz2
GT5-Unofficial-79f37cfd42c53af7969fba388b711955e389b76d.zip
+ Added ability to disassemble Large eggs into Stem Cells.
% Updated Large egg tooltips. % Made the Giant Chickens occasionally try and fly around. $ Small fix to writeItemsToGtCraftingComponents() in NBTUtils.java.
Diffstat (limited to 'src/Java/gtPlusPlus/core/util')
-rw-r--r--src/Java/gtPlusPlus/core/util/minecraft/NBTUtils.java16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/Java/gtPlusPlus/core/util/minecraft/NBTUtils.java b/src/Java/gtPlusPlus/core/util/minecraft/NBTUtils.java
index 524e7ab7f3..66abbded15 100644
--- a/src/Java/gtPlusPlus/core/util/minecraft/NBTUtils.java
+++ b/src/Java/gtPlusPlus/core/util/minecraft/NBTUtils.java
@@ -112,8 +112,16 @@ public class NBTUtils {
return itemstack;
}
- public static ItemStack writeItemsToGtCraftingComponents(ItemStack rStack, ItemStack[] stored, boolean copyTags) {
-
+ public static ItemStack writeItemsToGtCraftingComponents(ItemStack rStack, ItemStack[] input, boolean copyTags) {
+ try {
+ ItemStack stored[] = new ItemStack[9];
+ if (input.length != 9) {
+ for (int e=0;e<input.length;e++) {
+ if (input[e] != null)
+ stored[e] = input[e];
+ }
+ }
+
if (copyTags) {
for (int i = 0; i < stored.length; i++) {
if (stored[i] != null && stored[i].hasTagCompound()) {
@@ -140,6 +148,10 @@ public class NBTUtils {
}
rNBT.setTag("GT.CraftingComponents", tNBT);
rStack.setTagCompound(rNBT);
+ }
+ catch (Throwable t) {
+ t.printStackTrace();
+ }
return rStack;
}