aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/common/tileentities
diff options
context:
space:
mode:
authorbartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com>2018-06-18 02:35:47 +0200
committerbartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com>2018-06-18 02:35:47 +0200
commita59d2fbaed3057b8f5ad4961ee65b4ef7a5e0693 (patch)
tree455fa35678bfc49f9d3f937207b94b3a45726a52 /src/main/java/gregtech/common/tileentities
parent0770169ad8b40b4354bed58f4a82fdb7415ec57e (diff)
downloadGT5-Unofficial-a59d2fbaed3057b8f5ad4961ee65b4ef7a5e0693.tar.gz
GT5-Unofficial-a59d2fbaed3057b8f5ad4961ee65b4ef7a5e0693.tar.bz2
GT5-Unofficial-a59d2fbaed3057b8f5ad4961ee65b4ef7a5e0693.zip
fix for #2152
fix for reused DataSticks keep parts of old NBTTagCompound fixed blockores and removed one hashmap
Diffstat (limited to 'src/main/java/gregtech/common/tileentities')
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java
index 4fa4059108..c5dfb5483f 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java
@@ -105,8 +105,8 @@ public class GT_MetaTileEntity_Scanner
}
if (ItemList.Tool_DataOrb.isStackEqual(getSpecialSlot(), false, true)) {
if (ItemList.Tool_DataOrb.isStackEqual(aStack, false, true)) {
- aStack.stackSize -= 1;
- this.mOutputItems[0] = GT_Utility.copyAmount(1L, new Object[]{ItemList.Tool_DataStick.get(1, new Object[]{})});
+ aStack.stackSize -= 1;
+ this.mOutputItems[0] = GT_Utility.copyAmount(1L, new Object[]{getSpecialSlot()});
calculateOverclockedNess(30,512);
//In case recipe is too OP for that machine
if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1)
@@ -227,12 +227,16 @@ public class GT_MetaTileEntity_Scanner
s=tRecipe.mOutput.getDisplayName();
}
this.mOutputItems[0] = GT_Utility.copyAmount(1L, new Object[]{getSpecialSlot()});
+
+ //remove possible old NBTTagCompound
+ this.mOutputItems[0].setTagCompound(new NBTTagCompound());
GT_Utility.ItemNBT.setBookTitle(this.mOutputItems[0], s+" Construction Data");
NBTTagCompound tNBT = this.mOutputItems[0].getTagCompound();
if (tNBT == null) {
tNBT = new NBTTagCompound();
- }
+ }
+
tNBT.setTag("output", tRecipe.mOutput.writeToNBT(new NBTTagCompound()));
tNBT.setInteger("time", tRecipe.mDuration);
tNBT.setInteger("eu", tRecipe.mEUt);