diff options
author | Blood-Asp <bloodasphendrik@gmail.com> | 2016-06-30 00:12:00 +0200 |
---|---|---|
committer | Blood-Asp <bloodasphendrik@gmail.com> | 2016-06-30 00:12:00 +0200 |
commit | 90d776893e1d48fbdaf4ee781c78357ec5f9cc35 (patch) | |
tree | 5166a4aec2f8c7eedc8674b5300299eb4ba0a30f /src/main/java/gregtech/common/tileentities/machines | |
parent | 22525fd6e83776b2727c5a33141aaac9a2a06be3 (diff) | |
download | GT5-Unofficial-90d776893e1d48fbdaf4ee781c78357ec5f9cc35.tar.gz GT5-Unofficial-90d776893e1d48fbdaf4ee781c78357ec5f9cc35.tar.bz2 GT5-Unofficial-90d776893e1d48fbdaf4ee781c78357ec5f9cc35.zip |
More Assembly Line recipe work
Diffstat (limited to 'src/main/java/gregtech/common/tileentities/machines')
-rw-r--r-- | src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java | 36 |
1 files changed, 36 insertions, 0 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 95d6ef9364..167ba141d6 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 @@ -16,6 +16,7 @@ import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
import gregtech.common.items.behaviors.Behaviour_DataOrb;
+import gregtech.common.items.behaviors.Behaviour_DataStick;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
@@ -147,6 +148,41 @@ public class GT_MetaTileEntity_Scanner }
}
+ if(ItemList.Tool_DataStick.isStackEqual(getSpecialSlot(), false, true)&& aStack !=null){
+ for(GT_Recipe.GT_Recipe_AssemblyLine tRecipe:GT_Recipe.GT_Recipe_AssemblyLine.sAssemblylineRecipes){
+ if(GT_Utility.areStacksEqual(tRecipe.mResearchItem, aStack, true)){
+
+ this.mOutputItems[0] = GT_Utility.copyAmount(1L, new Object[]{getSpecialSlot()});
+ getSpecialSlot().stackSize -= 1;
+ GT_Utility.ItemNBT.setBookTitle(this.mOutputItems[0], tRecipe.mOutput.getDisplayName()+" Construction Data");
+
+
+
+ NBTTagCompound tNBT = this.mOutputItems[0].getTagCompound();
+ if (tNBT == null) {
+ tNBT = new NBTTagCompound();
+ }
+ tNBT.setTag("output", new NBTTagCompound());
+ tNBT.setInteger("time", tRecipe.mDuration);
+ tNBT.setInteger("eu", tRecipe.mEUt);
+ for(int i = 0 ; i < tRecipe.mInputs.length ; i++){
+
+ tNBT.setTag(""+i, new NBTTagCompound());
+ }
+ for(int i = 0 ; i < tRecipe.mFluidInputs.length ; i++){
+
+ tNBT.setTag("f"+i, new NBTTagCompound());
+ }
+ this.mOutputItems[0].setTagCompound(tNBT);
+
+ aStack.stackSize -= 1;
+ this.mMaxProgresstime = (tRecipe.mResearchTime / (1 << this.mTier - 1));
+ this.mEUt = (30 * (1 << this.mTier - 1) * (1 << this.mTier - 1));
+ getSpecialSlot().stackSize -= 1;
+ return 2;
+ }
+ }
+ }
}
return 0;
|