aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api/util/GT_Shapeless_Recipe.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/gregtech/api/util/GT_Shapeless_Recipe.java')
-rw-r--r--src/main/java/gregtech/api/util/GT_Shapeless_Recipe.java17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/main/java/gregtech/api/util/GT_Shapeless_Recipe.java b/src/main/java/gregtech/api/util/GT_Shapeless_Recipe.java
index 02c479cc94..fc1d523ecc 100644
--- a/src/main/java/gregtech/api/util/GT_Shapeless_Recipe.java
+++ b/src/main/java/gregtech/api/util/GT_Shapeless_Recipe.java
@@ -36,9 +36,12 @@ public class GT_Shapeless_Recipe extends ShapelessOreRecipe implements IGT_Craft
for (int i = 0; i < aGrid.getSizeInventory(); i++) {
if (aGrid.getStackInSlot(i) != null) {
if (tStack != null) {
- if ((tStack.hasTagCompound() != aGrid.getStackInSlot(i).hasTagCompound())
- || (tStack.hasTagCompound()
- && !tStack.getTagCompound().equals(aGrid.getStackInSlot(i).getTagCompound())))
+ if ((tStack.hasTagCompound() != aGrid.getStackInSlot(i)
+ .hasTagCompound())
+ || (tStack.hasTagCompound() && !tStack.getTagCompound()
+ .equals(
+ aGrid.getStackInSlot(i)
+ .getTagCompound())))
return false;
}
tStack = aGrid.getStackInSlot(i);
@@ -57,8 +60,12 @@ public class GT_Shapeless_Recipe extends ShapelessOreRecipe implements IGT_Craft
// Keeping NBT
if (mKeepingNBT) for (int i = 0; i < aGrid.getSizeInventory(); i++) {
- if (aGrid.getStackInSlot(i) != null && aGrid.getStackInSlot(i).hasTagCompound()) {
- rStack.setTagCompound((NBTTagCompound) aGrid.getStackInSlot(i).getTagCompound().copy());
+ if (aGrid.getStackInSlot(i) != null && aGrid.getStackInSlot(i)
+ .hasTagCompound()) {
+ rStack.setTagCompound(
+ (NBTTagCompound) aGrid.getStackInSlot(i)
+ .getTagCompound()
+ .copy());
break;
}
}