May or may not fix https://github.com/Blood-Asp/GT5-Unofficial/issues/565
Possibly fix issue #565 Assembly line books: item names not shown correctly on server Possibly not the right way but it should do.
This commit is contained in:
parent
0476a03635
commit
6401399e94
1 changed files with 5 additions and 4 deletions
|
@ -11,6 +11,7 @@ import gregtech.api.metatileentity.MetaTileEntity;
|
||||||
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine;
|
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine;
|
||||||
import gregtech.api.objects.GT_RenderedTexture;
|
import gregtech.api.objects.GT_RenderedTexture;
|
||||||
import gregtech.api.objects.ItemData;
|
import gregtech.api.objects.ItemData;
|
||||||
|
import gregtech.api.util.GT_LanguageManager;
|
||||||
import gregtech.api.util.GT_Log;
|
import gregtech.api.util.GT_Log;
|
||||||
import gregtech.api.util.GT_OreDictUnificator;
|
import gregtech.api.util.GT_OreDictUnificator;
|
||||||
import gregtech.api.util.GT_Recipe;
|
import gregtech.api.util.GT_Recipe;
|
||||||
|
@ -156,7 +157,7 @@ public class GT_MetaTileEntity_Scanner
|
||||||
|
|
||||||
this.mOutputItems[0] = GT_Utility.copyAmount(1L, new Object[]{getSpecialSlot()});
|
this.mOutputItems[0] = GT_Utility.copyAmount(1L, new Object[]{getSpecialSlot()});
|
||||||
getSpecialSlot().stackSize -= 1;
|
getSpecialSlot().stackSize -= 1;
|
||||||
GT_Utility.ItemNBT.setBookTitle(this.mOutputItems[0], tRecipe.mOutput.getDisplayName()+" Construction Data");
|
GT_Utility.ItemNBT.setBookTitle(this.mOutputItems[0], GT_LanguageManager.getTranslation(tRecipe.mOutput.getDisplayName())+" Construction Data");
|
||||||
|
|
||||||
NBTTagCompound tNBT = this.mOutputItems[0].getTagCompound();
|
NBTTagCompound tNBT = this.mOutputItems[0].getTagCompound();
|
||||||
if (tNBT == null) {
|
if (tNBT == null) {
|
||||||
|
@ -176,15 +177,15 @@ public class GT_MetaTileEntity_Scanner
|
||||||
|
|
||||||
tNBT.setString("author", "Assembly Line Recipe Generator");
|
tNBT.setString("author", "Assembly Line Recipe Generator");
|
||||||
NBTTagList tNBTList = new NBTTagList();
|
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)));
|
tNBTList.appendTag(new NBTTagString("Constructionplan for "+tRecipe.mOutput.stackSize+" "+GT_LanguageManager.getTranslation(tRecipe.mOutput.getDisplayName())+". Needed EU/t: "+tRecipe.mEUt+" Productiontime: "+(tRecipe.mDuration/20)));
|
||||||
for(int i=0;i<tRecipe.mInputs.length;i++){
|
for(int i=0;i<tRecipe.mInputs.length;i++){
|
||||||
if(tRecipe.mInputs[i]!=null){
|
if(tRecipe.mInputs[i]!=null){
|
||||||
tNBTList.appendTag(new NBTTagString("Input Bus "+(i+1)+": "+tRecipe.mInputs[i].stackSize+" "+tRecipe.mInputs[i].getDisplayName()));
|
tNBTList.appendTag(new NBTTagString("Input Bus "+(i+1)+": "+tRecipe.mInputs[i].stackSize+" "+GT_LanguageManager.getTranslation(tRecipe.mInputs[i].getDisplayName())));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for(int i=0;i<tRecipe.mFluidInputs.length;i++){
|
for(int i=0;i<tRecipe.mFluidInputs.length;i++){
|
||||||
if(tRecipe.mFluidInputs[i]!=null){
|
if(tRecipe.mFluidInputs[i]!=null){
|
||||||
tNBTList.appendTag(new NBTTagString("Input Hatch "+(i+1)+": "+tRecipe.mFluidInputs[i].amount+"L "+tRecipe.mFluidInputs[i].getLocalizedName()));
|
tNBTList.appendTag(new NBTTagString("Input Hatch "+(i+1)+": "+tRecipe.mFluidInputs[i].amount+"L "+GT_LanguageManager.getTranslation(tRecipe.mFluidInputs[i].getLocalizedName())));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tNBT.setTag("pages", tNBTList);
|
tNBT.setTag("pages", tNBTList);
|
||||||
|
|
Loading…
Reference in a new issue