From 73749472d29673cb1e8da1ce9ceb64e809e93947 Mon Sep 17 00:00:00 2001 From: Blood-Asp Date: Fri, 1 Jul 2016 01:13:09 +0200 Subject: Finish Assemblyline recipe printing --- .../machines/basic/GT_MetaTileEntity_Scanner.java | 22 +++++++++++++++++++--- .../multi/GT_MetaTileEntity_AssemblyLine.java | 6 ++++-- 2 files changed, 23 insertions(+), 5 deletions(-) (limited to 'src/main/java/gregtech/common') 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 e087ae5a1b..3ffb86006b 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 @@ -20,6 +20,8 @@ import gregtech.common.items.behaviors.Behaviour_DataStick; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; +import net.minecraft.nbt.NBTTagString; public class GT_MetaTileEntity_Scanner extends GT_MetaTileEntity_BasicMachine { @@ -155,9 +157,7 @@ public class GT_MetaTileEntity_Scanner 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(); @@ -173,6 +173,22 @@ public class GT_MetaTileEntity_Scanner tNBT.setTag("f"+i, tRecipe.mFluidInputs[i].writeToNBT(new NBTTagCompound())); } + + tNBT.setString("author", "Assemblyline Recipe Generator"); + NBTTagList tNBTList = new NBTTagList(); + tNBTList.appendTag(new NBTTagString("Constructionplan for "+tRecipe.mOutput.stackSize+" "+tRecipe.mOutput.getDisplayName()+". Needed EU/t: "+tRecipe.mEUt+" Productiontime: "+(tRecipe.mDuration/20))); + for(int i=0;i