diff options
author | Alkalus <Draknyte1@hotmail.com> | 2020-05-27 18:33:53 +0100 |
---|---|---|
committer | Alkalus <Draknyte1@hotmail.com> | 2020-05-27 18:33:53 +0100 |
commit | 59c6a1bf700132d0f5b7da49f59b05ac8b9f2894 (patch) | |
tree | 7f06006b4000abbb4dd04ced14009ba334a8e983 /src | |
parent | 1813051f41ff12ce33be373e956a2bcc3d439669 (diff) | |
download | GT5-Unofficial-59c6a1bf700132d0f5b7da49f59b05ac8b9f2894.tar.gz GT5-Unofficial-59c6a1bf700132d0f5b7da49f59b05ac8b9f2894.tar.bz2 GT5-Unofficial-59c6a1bf700132d0f5b7da49f59b05ac8b9f2894.zip |
+ Added recipe for pine saplings.
+ Added tier info into Chemical Plant NEI handler.
+ Added custom NEI handlers for Dehydration and Reactor Fuel Processing Plant recipes.
% Adjusted output of Fluorite ore production recipes.
% Finished Work on Chemical Plant user manual.
$ Added another safety catch to the VFC GUI.
Diffstat (limited to 'src')
10 files changed, 1611 insertions, 94 deletions
diff --git a/src/Java/gtPlusPlus/core/gui/machine/GUI_VolumetricFlaskSetter.java b/src/Java/gtPlusPlus/core/gui/machine/GUI_VolumetricFlaskSetter.java index b0c1e8b6ff..0257e51d0c 100644 --- a/src/Java/gtPlusPlus/core/gui/machine/GUI_VolumetricFlaskSetter.java +++ b/src/Java/gtPlusPlus/core/gui/machine/GUI_VolumetricFlaskSetter.java @@ -33,9 +33,11 @@ public class GUI_VolumetricFlaskSetter extends GuiContainer { public void initGui(){ super.initGui(); + Keyboard.enableRepeatEvents(true); mIsOpen = true; this.mText = new GuiValueField(this.fontRendererObj, 26, 31, this.width / 2 - 62, this.height/2-52, 106, 14); mText.setMaxStringLength(5); + mText.setEnableBackgroundDrawing(true); mText.setText("0"); mText.setFocused(true); } @@ -83,7 +85,10 @@ public class GUI_VolumetricFlaskSetter extends GuiContainer { @Override public void onGuiClosed() { mIsOpen = false; + mText.setEnabled(false); + mText.setVisible(false); super.onGuiClosed(); + Keyboard.enableRepeatEvents(false); } public void updateScreen(){ @@ -120,8 +125,10 @@ public class GUI_VolumetricFlaskSetter extends GuiContainer { } protected void mouseClicked(int x, int y, int btn) { - super.mouseClicked(x, y, btn); - this.mText.mouseClicked(x, y, btn); + if (mIsOpen) { + super.mouseClicked(x, y, btn); + this.mText.mouseClicked(x, y, btn); + } } @@ -141,7 +148,7 @@ public class GUI_VolumetricFlaskSetter extends GuiContainer { this.fontRendererObj.drawString(I18n.format("6 = 864l", new Object[0]), 64, aYVal, 4210752); this.fontRendererObj.drawString(I18n.format("3 = 432l", new Object[0]), 8, aYVal+=8, 4210752); this.fontRendererObj.drawString(I18n.format("-> = Custom", new Object[0]), 59, aYVal, 4210752); - + } @Override diff --git a/src/Java/gtPlusPlus/core/handler/BookHandler.java b/src/Java/gtPlusPlus/core/handler/BookHandler.java index 57d371905f..13c57677a0 100644 --- a/src/Java/gtPlusPlus/core/handler/BookHandler.java +++ b/src/Java/gtPlusPlus/core/handler/BookHandler.java @@ -3,6 +3,8 @@ package gtPlusPlus.core.handler; import java.util.HashMap; import java.util.Map; +import gregtech.api.enums.GT_Values; +import gregtech.api.util.GT_OreDictUnificator; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.item.ModItems; import gtPlusPlus.core.recipe.common.CI; @@ -57,45 +59,45 @@ public class BookHandler { "Power Storage & You [Version 0.64]", "Alkalus", new String[] { - //Page 1 - "So, when it comes to power storage you relaly have three seperate options:\n"+ - " \n"+ - "Battery Buffers,\n"+ - "Energy Buffers,\n"+ - "The Power Sub-Station\n", - //Page 2 - "Battery Buffer\n" + - " \n" + - "Is rather portable. Allowing you to throw set one up and insert batteries where ever you may need."+"\n"+ - "They output 1A for each battery stored inside, upto a maximum of 16A.", - //Page 3 - "Energy Buffer\n" + - " \n" + - "Is a more optimal choice for storage in your base. Once placed down, they cannot be moved without losing all stored power."+"\n"+ - "Energy Buffers can output 4A from the output side, however accept 16A as input.", - //Page 4 - "The Power Sub-Station"+ - " \n"+ - "Is used for storing Insane amounts of power later game."+"\n"+ - "Consumes 2% of the average voltage of all energy type hatches every tick."+"\n", - //Page 5 - "Allows Insertation/Removal of power from the rear face of the controller, swap with a screwdriver."+"\n"+ - "Variable Height Structure, between 4-16Y. Inserted Redox Cells dictate max energy tier of structure."+"\n", - //Page 6 - "Redox Cells cannot be placed into the Top or Bottom layer and only take up 3xhx3 internally."+"\n"+ - "Different Tier cells CANNOT be mixed together."+"\n", - //Page 7 - "All Hatches Must be HV at a Minimum, this minimum tier is in place to stop people abusing ULV/LV hatches to lower the avg/t."+"\n"+ - "Currently the GUI will NOT display anything at all until the structure forms, this is a known bug."+"\n", - //Page 8 - "Valid Hatches:\n"+ - "Energy Hatch,\n"+ - "Dynamo Hatch,\n"+ - "Charging Bus,\n"+ - "Discharging Bus,\n"+ - "Dynamo Buffer,\n"+ - "Multi-Amp Dynamo Hatch.\n\n\n"+ - "Structure MUST contain at least one energy input and one energy output hatch." + //Page 1 + "So, when it comes to power storage you relaly have three seperate options:\n"+ + " \n"+ + "Battery Buffers,\n"+ + "Energy Buffers,\n"+ + "The Power Sub-Station\n", + //Page 2 + "Battery Buffer\n" + + " \n" + + "Is rather portable. Allowing you to throw set one up and insert batteries where ever you may need."+"\n"+ + "They output 1A for each battery stored inside, upto a maximum of 16A.", + //Page 3 + "Energy Buffer\n" + + " \n" + + "Is a more optimal choice for storage in your base. Once placed down, they cannot be moved without losing all stored power."+"\n"+ + "Energy Buffers can output 4A from the output side, however accept 16A as input.", + //Page 4 + "The Power Sub-Station"+ + " \n"+ + "Is used for storing Insane amounts of power later game."+"\n"+ + "Consumes 2% of the average voltage of all energy type hatches every tick."+"\n", + //Page 5 + "Allows Insertation/Removal of power from the rear face of the controller, swap with a screwdriver."+"\n"+ + "Variable Height Structure, between 4-16Y. Inserted Redox Cells dictate max energy tier of structure."+"\n", + //Page 6 + "Redox Cells cannot be placed into the Top or Bottom layer and only take up 3xhx3 internally."+"\n"+ + "Different Tier cells CANNOT be mixed together."+"\n", + //Page 7 + "All Hatches Must be HV at a Minimum, this minimum tier is in place to stop people abusing ULV/LV hatches to lower the avg/t."+"\n"+ + "Currently the GUI will NOT display anything at all until the structure forms, this is a known bug."+"\n", + //Page 8 + "Valid Hatches:\n"+ + "Energy Hatch,\n"+ + "Dynamo Hatch,\n"+ + "Charging Bus,\n"+ + "Discharging Bus,\n"+ + "Dynamo Buffer,\n"+ + "Multi-Amp Dynamo Hatch.\n\n\n"+ + "Structure MUST contain at least one energy input and one energy output hatch." }); //Test Novel @@ -103,7 +105,7 @@ public class BookHandler { "Manual_Modular_Bauble", "How to: Modular Baubles", "Alkalus", new String[] { "Concept: This idea came from wanting flexibility. \n" + - "First step, Build a Modularity table to begin customisation of your Bauble. \n" + "First step, Build a Modularity table to begin customisation of your Bauble. \n" + " After this has been constructed, you can now combine the upgrades listed within this book to improve the baubles level/100.", "Defence:\n" + "Can be upgraded by combining metal plates with the bauble. \n" @@ -128,7 +130,7 @@ public class BookHandler { "[Fluid Work] Mode B - Allows the multiblock to function as a Fermenter, a Fluid Extractor or an Extractor. To allow a hatch to run in Fermenter mode, insert a No. 20 circuit. For Fluid Extractor, use No. 21 and for Extractor use No. 22.", "[Misc. Work] Mode C - Allows the multiblock to function as a Laser Engraver, an Autoclave or a Fluid Solidifier. To allow a hatch to run in Laser Engraver mode, insert a No. 20 circuit. For Autoclave, use No. 21 and for Solidifier use No. 22.", }); - + book_NuclearManual = writeBookTemplate( "Manual_NuclearStuff_1", "Nuclear Chemistry [FFPP]", "Alkalus", new String[] { @@ -178,20 +180,167 @@ public class BookHandler { "Processing Plant"+ "----------------------\n"+ "This structure is used to produce the Molten Salts required to run a Liquid Fluorine Thorium Reactor [LFTR]." - + }); - + + book_MultiChemicalPlant = writeBookTemplate( "book_Multi_ChemicalPlant", "Chemical Plant Manual", "Alkalus", new String[] { - "This Multiblock, depending upon the mode used, can function as a variety of different machines. The idea behind this, was that most of these machines are rather niche compared to any others, as such, not used often.", - "To build, you need to construct a hollow 3x3x3 structure made from Multi-Use casings, With a minimum of 6. Any Casing position can be substituted out with an Input Hatch/Bus, an Output Hatch/Bus, Muffler, Maint. Hatch or Energy Injector Hatch.", - "The Mode can be set by using a Screwdriver on the controller block. Each mode allows the use of Numbered Circuits, to allow a different machine 'type' for each input bus.", - "[Metal Work] Mode A - Allows the multiblock to function as a Compressor, a Lathe or an Electro-Magnet. To allow a hatch to run in Compressor mode, insert a No. 20 circuit. For Lathe, use No. 21 and for Electro-Magnet use No. 22.", - "[Fluid Work] Mode B - Allows the multiblock to function as a Fermenter, a Fluid Extractor or an Extractor. To allow a hatch to run in Fermenter mode, insert a No. 20 circuit. For Fluid Extractor, use No. 21 and for Extractor use No. 22.", - "[Misc. Work] Mode C - Allows the multiblock to function as a Laser Engraver, an Autoclave or a Fluid Solidifier. To allow a hatch to run in Laser Engraver mode, insert a No. 20 circuit. For Autoclave, use No. 21 and for Solidifier use No. 22.", + + // Intro + "This book will explain how the Chemical Plant is constructed, which blocks are valid to upgrade it and also how the upgrades work.", + + // Info + "Solid Casings = Plant tier" + "\n" + + "Machine Casings = Hatch tier" + "\n" + + "Higher tier coils More Speed" + "\n" + + "T1 50% , T2 100% , T3 150%, etc" + "\n", + + "Higher tier pipe casings boost parallel"+ "\n" + + "and reduce catalyst consumption" + "\n" + + "+2 parallel per tier, 20% extra chance of"+ "\n" + + "not damaging catalyst per tier" + "\n", + + + // Machine Casings + "Valid Solid Machine Casings:" + "\n" + + "0 - Strong Bronze" + "\n" + + "1 - Solid Steel" + "\n" + + "2 - Sturdy Aluminium" + "\n" + + "3 - Clean Stainless Steel" + "\n" + + "4 - Stable Titanium" + "\n" + + "5 - Robust Tungstensteel" + "\n" + + "6 - Vigorous Laurenium" + "\n" + + "7 - Rugged Botmium", + + // Machine Casings + "Valid Tiered Machine Casings:" + "\n" + "\n" + + "1 - " + GT_Values.VN[0] + "\n" + + "2 - " + GT_Values.VN[1] + "\n" + + "3 - " + GT_Values.VN[2] + "\n" + + "4 - " + GT_Values.VN[3] + "\n" + + "5 - " + GT_Values.VN[4] + "\n" + + "6 - " + GT_Values.VN[5] + "\n" + + "7 - " + GT_Values.VN[6] + "\n" + + "8 - " + GT_Values.VN[7] + "\n" + + "9 - " + GT_Values.VN[8] + "\n" + + "10 - " + GT_Values.VN[9], + + // Pipe Casings + "Valid Pipe Casings:" + "\n" + "\n" + + "1 - Bronze" + "\n" + + "2 - Steel" + "\n" + + "3 - Titanium" + "\n" + + "4 - Tungstensteel", + + //Coils + "Valid Coils:" + "\n" + "\n" + + "1 - Cupronickel" + "\n" + + "2 - Kanthal" + "\n" + + "3 - Nichrome" + "\n" + + "4 - Tungstensteel" + "\n" + + "5 - HSS-G" + "\n" + + "6 - Naquadah" + "\n" + + "7 - Naquadah Alloy", + + // Requirements + "Multiblock Requirements:" + "\n" + "\n" + + "27x Coils" + "\n" + + "18x Pipe Casings" + "\n" + + "57x Tiered Machine Casings" + "\n" + + "80+ Solid Casings", + + // Construction Guide + "Construction Guide Pt1:" + "\n" + "\n" + + "Controller is placed on a middle casing in the bottom layer" + "\n" + + "Hatches can only be placed on the bottom layer edges", + + "Construction Guide Pt2:" + "\n" + "\n" + + "7x7x7 Hollow frame of solid casings" + "\n" + + "5x1x5 layer of solid casings (fills in top layer)" + "\n" + + "5x1x5 layer of machine casings (fills in bottom layer)", + + "Construction Guide Pt3:" + "\n" + + "In the central 3x5x3:" + "\n" + + "3x1x3 layer of Coils, surrounded by ring of Machine Casings" + "\n" + + "3x1x3 layer of Pipe Casings" + "\n" + + "3x1x3 layer of Coils" + "\n" + + "3x1x3 layer of Pipe Casings" + "\n" + + "3x1x3 layer of Coils, surrounded by ring of Machine Casings", + + // Construction Guide Info + "Information:" + "\n" + "\n" + + "A = Air" + "\n" + + "X = Solid Casing" + "\n" + + "M = Machine Casing" + "\n" + + "P = Pipe Casing" + "\n" + + "C = Coil Casing", + + "Layer 1:" + "\n" + "\n" + + "XXXXXXX" + "\n" + + "XMMMMMX" + "\n" + + "XMMMMMX" + "\n" + + "XMMMMMX" + "\n" + + "XMMMMMX" + "\n" + + "XMMMMMX" + "\n" + + "XXXXXXX", + + "Layer 2:" + "\n" + "\n" + + "AAAAAAA" + "\n" + + "AMMMMMA" + "\n" + + "AMCCCMA" + "\n" + + "AMCCCMA" + "\n" + + "AMCCCMA" + "\n" + + "AMMMMMA" + "\n" + + "AAAAAAA", + + "Layer 3:" + "\n" + "\n" + + "AAAAAAA" + "\n" + + "AAAAAAA" + "\n" + + "AAPPPAA" + "\n" + + "AAPPPAA" + "\n" + + "AAPPPAA" + "\n" + + "AAAAAAA" + "\n" + + "AAAAAAA", + + "Layer 4:" + "\n" + "\n" + + "AAAAAAA" + "\n" + + "AAAAAAA" + "\n" + + "AACCCAA" + "\n" + + "AACCCAA" + "\n" + + "AACCCAA" + "\n" + + "AAAAAAA" + "\n" + + "AAAAAAA", + + "Layer 5:" + "\n" + "\n" + + "AAAAAAA" + "\n" + + "AAAAAAA" + "\n" + + "AAPPPAA" + "\n" + + "AAPPPAA" + "\n" + + "AAPPPAA" + "\n" + + "AAAAAAA" + "\n" + + "AAAAAAA", + + "Layer 6:" + "\n" + "\n" + + "AAAAAAA" + "\n" + + "AMMMMMA" + "\n" + + "AMCCCMA" + "\n" + + "AMCCCMA" + "\n" + + "AMCCCMA" + "\n" + + "AMMMMMA" + "\n" + + "AAAAAAA", + + "Layer 7:" + "\n" + "\n" + + "XXXXXXX" + "\n" + + "XXXXXXX" + "\n" + + "XXXXXXX" + "\n" + + "XXXXXXX" + "\n" + + "XXXXXXX" + "\n" + + "XXXXXXX" + "\n" + + "XXXXXXX", }); - + } @@ -218,6 +367,13 @@ public class BookHandler { RecipeUtils.addShapelessGregtechRecipe(new ItemStack[]{ItemUtils.getSimpleStack(Items.writable_book), ItemUtils.getItemStackOfAmountFromOreDict("wireGt01Tin", 1)}, ItemBookWritten_MultiPowerStorage); RecipeUtils.addShapelessGregtechRecipe(new ItemStack[]{ItemUtils.getSimpleStack(Items.writable_book), ItemUtils.getItemStackOfAmountFromOreDict("dustUranium", 1)}, ItemBookWritten_NuclearManual); RecipeUtils.addShapelessGregtechRecipe(new ItemStack[]{ItemUtils.getSimpleStack(Items.writable_book), ItemUtils.getItemStackOfAmountFromOreDict("wireGt01Copper", 1)}, ItemBookWritten_MultiChemicalPlant); + + for (int i=0;i<mBookKeeperCount;i++){ + ItemStack bookstack = ItemUtils.simpleMetaStack(ModItems.itemCustomBook, i, 1); + GT_OreDictUnificator.registerOre("bookWritten", bookstack); + GT_OreDictUnificator.registerOre("craftingBook", bookstack); + } + } private static BookTemplate writeBookTemplate(String aMapping, String aTitle, String aAuthor, String[] aPages){ diff --git a/src/Java/gtPlusPlus/core/item/general/books/ItemBaseBook.java b/src/Java/gtPlusPlus/core/item/general/books/ItemBaseBook.java index 2f49ac1287..9ac09b92e4 100644 --- a/src/Java/gtPlusPlus/core/item/general/books/ItemBaseBook.java +++ b/src/Java/gtPlusPlus/core/item/general/books/ItemBaseBook.java @@ -26,6 +26,7 @@ import gregtech.api.util.GT_Utility; import gtPlusPlus.core.creative.AddToCreativeTab; import gtPlusPlus.core.handler.BookHandler; import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.Utils; import gtPlusPlus.core.util.minecraft.NBTUtils; import gtPlusPlus.core.util.reflect.ReflectionUtils; @@ -54,9 +55,6 @@ public class ItemBaseBook extends ItemWritableBook{ mBookMap.get(i).mPages);*/ NBTUtils.createIntegerTagCompound(bookstack, "stats", "mMeta", i); - - GT_OreDictUnificator.registerOre("bookWritten", bookstack); - GT_OreDictUnificator.registerOre("craftingBook", bookstack); list.add(bookstack); } } @@ -106,7 +104,9 @@ public class ItemBaseBook extends ItemWritableBook{ public ItemStack onItemRightClick(ItemStack item, World world, EntityPlayer player) { //player.displayGUIBook(item); int i = item.getItemDamage(); - ItemStack bookstack = GT_Utility.getWrittenBook( + ItemStack bookstack = Utils.getWrittenBook( + null, + mBookMap.get(i).mMeta, mBookMap.get(i).mMapping, mBookMap.get(i).mTitle, mBookMap.get(i).mAuthor, diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java index 67614ce18b..d152e9afd2 100644 --- a/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java +++ b/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java @@ -39,6 +39,7 @@ import gtPlusPlus.core.util.minecraft.ItemUtils; import gtPlusPlus.core.util.minecraft.MaterialUtils; import gtPlusPlus.core.util.reflect.AddGregtechRecipe; import gtPlusPlus.everglades.dimension.Dimension_Everglades; +import gtPlusPlus.xmod.bop.blocks.BOP_Block_Registrator; import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; import net.minecraft.init.Blocks; import net.minecraft.init.Items; @@ -151,10 +152,10 @@ public class RECIPES_GREGTECH { FluidUtils.getAir(8000) }, new ItemStack[] { - FLUORIDES.FLUORITE.getOre(16), - FLUORIDES.FLUORITE.getOre(8), - FLUORIDES.FLUORITE.getOre(8), FLUORIDES.FLUORITE.getOre(8), + FLUORIDES.FLUORITE.getOre(4), + FLUORIDES.FLUORITE.getOre(4), + FLUORIDES.FLUORITE.getOre(4), }, new FluidStack[] { @@ -179,10 +180,10 @@ public class RECIPES_GREGTECH { FluidUtils.getAir(12000) }, new ItemStack[] { - FLUORIDES.FLUORITE.getOre(8), - FLUORIDES.FLUORITE.getOre(4), - FLUORIDES.FLUORITE.getOre(4), FLUORIDES.FLUORITE.getOre(4), + FLUORIDES.FLUORITE.getOre(2), + FLUORIDES.FLUORITE.getOre(2), + FLUORIDES.FLUORITE.getOre(2), }, new FluidStack[] { @@ -260,6 +261,26 @@ public class RECIPES_GREGTECH { 20 * 300, MaterialUtils.getVoltageForTier(4), 4); + + // Modify Sapling into Pine Sapling + CORE.RA.addChemicalPlantRecipe( + new ItemStack[] { + CI.getNumberedBioCircuit(6), + ItemUtils.getSimpleStack(Blocks.sapling, 32) + }, + new FluidStack[] { + FluidUtils.getFluidStack("fluid.geneticmutagen", 2000), + FluidUtils.getDistilledWater(8000) + }, + new ItemStack[] { + ItemUtils.getSimpleStack(BOP_Block_Registrator.sapling_Pine, 16) + }, + new FluidStack[] { + + }, + 120 * 20, + 64, + 2); } diff --git a/src/Java/gtPlusPlus/core/util/Utils.java b/src/Java/gtPlusPlus/core/util/Utils.java index 72b13b3067..982c55282e 100644 --- a/src/Java/gtPlusPlus/core/util/Utils.java +++ b/src/Java/gtPlusPlus/core/util/Utils.java @@ -735,11 +735,6 @@ public class Utils { } } - private static int sBookCount = 0; - - public static int getBookCount() { - return sBookCount; - } public static ItemStack getWrittenBook(final ItemStack aBook, final int aID, final String aMapping, final String aTitle, final String aAuthor, final String[] aPages) { @@ -753,8 +748,7 @@ public class Utils { if ((GT_Utility.isStringInvalid(aTitle)) || (GT_Utility.isStringInvalid(aAuthor)) || (aPages.length <= 0)) { return null; } - sBookCount += 1; - final int vMeta = (aID == -1 ? sBookCount : aID); + final int vMeta = aID; rStack = (aBook == null ? new ItemStack(ModItems.itemCustomBook, 1, vMeta) : aBook); final NBTTagCompound tNBT = new NBTTagCompound(); tNBT.setString("title", GT_LanguageManager.addStringLocalization( @@ -771,17 +765,19 @@ public class Utils { tNBTList.appendTag(new NBTTagString(aPages[i])); } else { + Logger.INFO("WARNING: String for written Book too long! -> "+aPages[i]); GT_Log.err.println(new StringBuilder().append("WARNING: String for written Book too long! -> ") .append(aPages[i]).toString()); } } else { + Logger.INFO("WARNING: Too much Pages for written Book! -> "+aTitle); GT_Log.err.println(new StringBuilder().append("WARNING: Too much Pages for written Book! -> ") .append(aTitle).toString()); break; } } tNBTList.appendTag(new NBTTagString(new StringBuilder().append("Credits to ").append(aAuthor) - .append(" for writing this Book. This was Book Nr. ").append(sBookCount) + .append(" for writing this Book. This was Book Nr. ").append(aID) .append(" at its creation. Gotta get 'em all!").toString())); tNBT.setTag("pages", tNBTList); rStack.setTagCompound(tNBT); diff --git a/src/Java/gtPlusPlus/nei/GT_NEI_Dehydrator.java b/src/Java/gtPlusPlus/nei/GT_NEI_Dehydrator.java new file mode 100644 index 0000000000..8a7d4fae64 --- /dev/null +++ b/src/Java/gtPlusPlus/nei/GT_NEI_Dehydrator.java @@ -0,0 +1,864 @@ +package gtPlusPlus.nei; + +import java.awt.Point; +import java.awt.Rectangle; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + +import org.lwjgl.opengl.GL11; + +import cpw.mods.fml.common.event.FMLInterModComms; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; + +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.gui.GT_GUIContainer_BasicMachine; +import gregtech.api.objects.ItemData; +import gregtech.api.util.*; +import gregtech.api.util.GT_Recipe.GT_Recipe_Map; +import codechicken.lib.gui.GuiDraw; +import codechicken.nei.PositionedStack; +import codechicken.nei.guihook.GuiContainerManager; +import codechicken.nei.guihook.IContainerInputHandler; +import codechicken.nei.guihook.IContainerTooltipHandler; +import codechicken.nei.recipe.*; +import net.minecraftforge.fluids.FluidContainerRegistry; +import net.minecraftforge.fluids.FluidStack; + +public class GT_NEI_Dehydrator +extends TemplateRecipeHandler { + public static final int sOffsetX = 5; + public static final int sOffsetY = 11; + + static { + GuiContainerManager.addInputHandler(new GT_RectHandler()); + GuiContainerManager.addTooltipHandler(new GT_RectHandler()); + } + + protected final GT_Recipe_Map mRecipeMap; + + public GT_NEI_Dehydrator() { + this.mRecipeMap = GTPP_Recipe.GTPP_Recipe_Map.sChemicalDehydratorRecipes; + this.transferRects.add(new TemplateRecipeHandler.RecipeTransferRect(new Rectangle(65, 13, 36, 18), this.getOverlayIdentifier(), new Object[0])); + if (!NEI_GT_Config.sIsAdded) { + FMLInterModComms.sendRuntimeMessage(GT_Values.GT, "NEIPlugins", "register-crafting-handler", "gregtechplusplus@" + this.getRecipeName() + "@" + this.getOverlayIdentifier()); + GuiCraftingRecipe.craftinghandlers.add(this); + GuiUsageRecipe.usagehandlers.add(this); + } + } + + public static void drawText(final int aX, final int aY, final String aString, final int aColor) { + Minecraft.getMinecraft().fontRenderer.drawString(aString, aX, aY, aColor); + } + + @Override + public TemplateRecipeHandler newInstance() { + return new GT_NEI_Dehydrator(); + } + + @Override + public void loadCraftingRecipes(final String outputId, final Object... results) { + if (outputId.equals(this.getOverlayIdentifier())) { + for (final GT_Recipe tRecipe : this.mRecipeMap.mRecipeList) { + if (!tRecipe.mHidden) { + this.arecipes.add(new CachedDefaultRecipe(tRecipe)); + } + } + } else { + super.loadCraftingRecipes(outputId, results); + } + } + + @Override + public void loadCraftingRecipes(final ItemStack aResult) { + final ItemData tPrefixMaterial = GT_OreDictUnificator.getAssociation(aResult); + + final ArrayList<ItemStack> tResults = new ArrayList<ItemStack>(); + tResults.add(aResult); + tResults.add(GT_OreDictUnificator.get(true, aResult)); + if ((tPrefixMaterial != null) && (!tPrefixMaterial.mBlackListed) && (!tPrefixMaterial.mPrefix.mFamiliarPrefixes.isEmpty())) { + for (final OrePrefixes tPrefix : tPrefixMaterial.mPrefix.mFamiliarPrefixes) { + tResults.add(GT_OreDictUnificator.get(tPrefix, tPrefixMaterial.mMaterial.mMaterial, 1L)); + } + } + final FluidStack tFluid = GT_Utility.getFluidForFilledItem(aResult, true); + if (tFluid != null) { + tResults.add(GT_Utility.getFluidDisplayStack(tFluid, false)); + for (final FluidContainerRegistry.FluidContainerData tData : FluidContainerRegistry.getRegisteredFluidContainerData()) { + if (tData.fluid.isFluidEqual(tFluid)) { + tResults.add(GT_Utility.copy(new Object[]{tData.filledContainer})); + } + } + } + for (final GT_Recipe tRecipe : this.mRecipeMap.mRecipeList) { + if (!tRecipe.mHidden) { + final CachedDefaultRecipe tNEIRecipe = new CachedDefaultRecipe(tRecipe); + for (final ItemStack tStack : tResults) { + if (tNEIRecipe.contains(tNEIRecipe.mOutputs, tStack)) { + this.arecipes.add(tNEIRecipe); + break; + } + } + } + } + } + + @Override + public void loadUsageRecipes(final ItemStack aInput) { + final ItemData tPrefixMaterial = GT_OreDictUnificator.getAssociation(aInput); + + final ArrayList<ItemStack> tInputs = new ArrayList<ItemStack>(); + tInputs.add(aInput); + tInputs.add(GT_OreDictUnificator.get(false, aInput)); + if ((tPrefixMaterial != null) && (!tPrefixMaterial.mPrefix.mFamiliarPrefixes.isEmpty())) { + for (final OrePrefixes tPrefix : tPrefixMaterial.mPrefix.mFamiliarPrefixes) { + tInputs.add(GT_OreDictUnificator.get(tPrefix, tPrefixMaterial.mMaterial.mMaterial, 1L)); + } + } + final FluidStack tFluid = GT_Utility.getFluidForFilledItem(aInput, true); + if (tFluid != null) { + tInputs.add(GT_Utility.getFluidDisplayStack(tFluid, false)); + for (final FluidContainerRegistry.FluidContainerData tData : FluidContainerRegistry.getRegisteredFluidContainerData()) { + if (tData.fluid.isFluidEqual(tFluid)) { + tInputs.add(GT_Utility.copy(new Object[]{tData.filledContainer})); + } + } + } + for (final GT_Recipe tRecipe : this.mRecipeMap.mRecipeList) { + if (!tRecipe.mHidden) { + final CachedDefaultRecipe tNEIRecipe = new CachedDefaultRecipe(tRecipe); + for (final ItemStack tStack : tInputs) { + if (tNEIRecipe.contains(tNEIRecipe.mInputs, tStack)) { + this.arecipes.add(tNEIRecipe); + break; + } + } + } + } + } + + @Override + public String getOverlayIdentifier() { + return this.mRecipeMap.mNEIName; + } + + @Override + public void drawBackground(final int recipe) { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + GuiDraw.changeTexture(this.getGuiTexture()); + GuiDraw.drawTexturedModalRect(-4, -8, 1, 3, 174, 78); + } + + @Override + public int recipiesPerPage() { + return 1; + } + + @Override + public String getRecipeName() { + return GT_LanguageManager.getTranslation(this.mRecipeMap.mUnlocalizedName); + } + + @Override + public String getGuiTexture() { + // return "gregtech:textures/gui/" + this.mRecipeMap.mUnlocalizedName + ".png"; + return this.mRecipeMap.mNEIGUIPath; + } + + @Override + public List<String> handleItemTooltip(final GuiRecipe gui, final ItemStack aStack, final List<String> currenttip, final int aRecipeIndex) { + final TemplateRecipeHandler.CachedRecipe tObject = this.arecipes.get(aRecipeIndex); + if ((tObject instanceof CachedDefaultRecipe)) { + final CachedDefaultRecipe tRecipe = (CachedDefaultRecipe) tObject; + for (final PositionedStack tStack : tRecipe.mOutputs) { + if (aStack == tStack.item) { + if ((!(tStack instanceof FixedPositionedStack)) || (((FixedPositionedStack) tStack).mChance <= 0) || (((FixedPositionedStack) tStack).mChance == 10000)) { + break; + } + currenttip.add("Chance: " + (((FixedPositionedStack) tStack).mChance / 100) + "." + ((((FixedPositionedStack) tStack).mChance % 100) < 10 ? "0" + (((FixedPositionedStack) tStack).mChance % 100) : Integer.valueOf(((FixedPositionedStack) tStack).mChance % 100)) + "%"); + break; + } + } + for (final PositionedStack tStack : tRecipe.mInputs) { + if (aStack == tStack.item) { + if ((gregtech.api.enums.ItemList.Display_Fluid.isStackEqual(tStack.item, true, true)) || + (tStack.item.stackSize != 0)) { + break; + } + currenttip.add("Does not get consumed in the process"); + break; + } + } + } + return currenttip; + } + + @Override + public void drawExtras(final int aRecipeIndex) { + final int tEUt = ((CachedDefaultRecipe) this.arecipes.get(aRecipeIndex)).mRecipe.mEUt; + final int tDuration = ((CachedDefaultRecipe) this.arecipes.get(aRecipeIndex)).mRecipe.mDuration; + if (tEUt != 0) { + drawText(10, 73, "Total: " + (tDuration * tEUt) + " EU", -16777216); + drawText(10, 83, "Usage: " + tEUt + " EU/t", -16777216); + if (this.mRecipeMap.mShowVoltageAmperageInNEI) { + drawText(10, 93, "Voltage: " + (tEUt / this.mRecipeMap.mAmperage) + " EU", -16777216); + drawText(10, 103, "Amperage: " + this.mRecipeMap.mAmperage, -16777216); + } else { + drawText(10, 93, "Voltage: unspecified", -16777216); + drawText(10, 103, "Amperage: unspecified", -16777216); + } + } + if (tDuration > 0) { + drawText(10, 113, "Time: " + (tDuration < 20 ? "< 1" : Integer.valueOf(tDuration / 20)) + " secs", -16777216); + } + if ((GT_Utility.isStringValid(this.mRecipeMap.mNEISpecialValuePre)) || (GT_Utility.isStringValid(this.mRecipeMap.mNEISpecialValuePost))) { + drawText(10, 123, this.mRecipeMap.mNEISpecialValuePre + (((CachedDefaultRecipe) this.arecipes.get(aRecipeIndex)).mRecipe.mSpecialValue * this.mRecipeMap.mNEISpecialValueMultiplier) + this.mRecipeMap.mNEISpecialValuePost, -16777216); + } + } + + public static class GT_RectHandler + implements IContainerInputHandler, IContainerTooltipHandler { + @Override + public boolean mouseClicked(final GuiContainer gui, final int mousex, final int mousey, final int button) { + if (this.canHandle(gui)) { + if (button == 0) { + return this.transferRect(gui, false); + } + if (button == 1) { + return this.transferRect(gui, true); + } + } + return false; + } + + @Override + public boolean lastKeyTyped(final GuiContainer gui, final char keyChar, final int keyCode) { + return false; + } + + public boolean canHandle(final GuiContainer gui) { + return (((gui instanceof GT_GUIContainer_BasicMachine)) && (GT_Utility.isStringValid(((GT_GUIContainer_BasicMachine) gui).mNEI)) /*|| ((gui instanceof GT_GUIContainer_FusionReactor)) && (GT_Utility.isStringValid(((GT_GUIContainer_FusionReactor) gui).mNEI))*/); + } + + @Override + public List<String> handleTooltip(final GuiContainer gui, final int mousex, final int mousey, final List<String> currenttip) { + if ((this.canHandle(gui)) && (currenttip.isEmpty())) { + if ((gui instanceof GT_GUIContainer_BasicMachine) && new Rectangle(65, 13, 36, 18).contains(new Point(GuiDraw.getMousePosition().x - ((GT_GUIContainer_BasicMachine) gui).getLeft() - codechicken.nei.recipe.RecipeInfo.getGuiOffset(gui)[0], GuiDraw.getMousePosition().y - ((GT_GUIContainer_BasicMachine) gui).getTop() - codechicken.nei.recipe.RecipeInfo.getGuiOffset(gui)[1]))) { + currenttip.add("Recipes"); + } /*else if (gui instanceof GT_GUIContainer_FusionReactor && new Rectangle(145, 0, 24, 24).contains(new Point(GuiDraw.getMousePosition().x - ((GT_GUIContainer_FusionReactor) gui).getLeft() - codechicken.nei.recipe.RecipeInfo.getGuiOffset(gui)[0], GuiDraw.getMousePosition().y - ((GT_GUIContainer_FusionReactor) gui).getTop() - codechicken.nei.recipe.RecipeInfo.getGuiOffset(gui)[1]))) { + currenttip.add("Recipes"); + }*/ + + } + return currenttip; + } + + private boolean transferRect(final GuiContainer gui, final boolean usage) { + if (gui instanceof GT_GUIContainer_BasicMachine) { + return (this.canHandle(gui)) && (new Rectangle(65, 13, 36, 18).contains(new Point(GuiDraw.getMousePosition().x - ((GT_GUIContainer_BasicMachine) gui).getLeft() - codechicken.nei.recipe.RecipeInfo.getGuiOffset(gui)[0], GuiDraw.getMousePosition().y - ((GT_GUIContainer_BasicMachine) gui).getTop() - codechicken.nei.recipe.RecipeInfo.getGuiOffset(gui)[1]))) && (usage ? GuiUsageRecipe.openRecipeGui(((GT_GUIContainer_BasicMachine) gui).mNEI, new Object[0]) : GuiCraftingRecipe.openRecipeGui(((GT_GUIContainer_BasicMachine) gui).mNEI, new Object[0])); + } /*else if (gui instanceof GT_GUIContainer_FusionReactor) { + return (canHandle(gui)) && (new Rectangle(145, 0, 24, 24).contains(new Point(GuiDraw.getMousePosition().x - ((GT_GUIContainer_FusionReactor) gui).getLeft() - codechicken.nei.recipe.RecipeInfo.getGuiOffset(gui)[0], GuiDraw.getMousePosition().y - ((GT_GUIContainer_FusionReactor) gui).getTop() - codechicken.nei.recipe.RecipeInfo.getGuiOffset(gui)[1]))) && (usage ? GuiUsageRecipe.openRecipeGui(((GT_GUIContainer_FusionReactor) gui).mNEI, new Object[0]) : GuiCraftingRecipe.openRecipeGui(((GT_GUIContainer_FusionReactor) gui).mNEI, new Object[0])); + }*/ + return false; + } + + @Override + public List<String> handleItemDisplayName(final GuiContainer gui, final ItemStack itemstack, final List<String> currenttip) { + return currenttip; + } + + @Override + public List<String> handleItemTooltip(final GuiContainer gui, final ItemStack itemstack, final int mousex, final int mousey, final List<String> currenttip) { + return currenttip; + } + + @Override + public boolean keyTyped(final GuiContainer gui, final char keyChar, final int keyCode) { + return false; + } + + @Override + public void onKeyTyped(final GuiContainer gui, final char keyChar, final int keyID) { + } + + @Override + public void onMouseClicked(final GuiContainer gui, final int mousex, final int mousey, final int button) { + } + + @Override + public void onMouseUp(final GuiContainer gui, final int mousex, final int mousey, final int button) { + } + + @Override + public boolean mouseScrolled(final GuiContainer gui, final int mousex, final int mousey, final int scrolled) { + return false; + } + + @Override + public void onMouseScrolled(final GuiContainer gui, final int mousex, final int mousey, final int scrolled) { + } + + @Override + public void onMouseDragged(final GuiContainer gui, final int mousex, final int mousey, final int button, final long heldTime) { + } + } + + public class FixedPositionedStack + extends PositionedStack { + public final int mChance; + public boolean permutated = false; + + public FixedPositionedStack(final Object object, final int x, final int y) { + this(object, x, y, 0); + } + + public FixedPositionedStack(final Object object, final int x, final int y, final int aChance) { + super(object, x, y, true); + this.mChance = aChance; + } + + @Override + public void generatePermutations() { + if (this.permutated) { + return; + } + final ArrayList<ItemStack> tDisplayStacks = new ArrayList<ItemStack>(); + for (final ItemStack tStack : this.items) { + if (GT_Utility.isStackValid(tStack)) { + if (tStack.getItemDamage() == 32767) { + final List<ItemStack> permutations = codechicken.nei.ItemList.itemMap.get(tStack.getItem()); + if (!permutations.isEmpty()) { + ItemStack stack; + for (final Iterator<ItemStack> i$ = permutations.iterator(); i$.hasNext(); tDisplayStacks.add(GT_Utility.copyAmount(tStack.stackSize, new Object[]{stack}))) { + stack = i$.next(); + } + } else { + final ItemStack base = new ItemStack(tStack.getItem(), tStack.stackSize); + base.stackTagCompound = tStack.stackTagCompound; + tDisplayStacks.add(base); + } + } else { + tDisplayStacks.add(GT_Utility.copy(new Object[]{tStack})); + } + } + } + this.items = (tDisplayStacks.toArray(new ItemStack[0])); + if (this.items.length == 0) { + this.items = new ItemStack[]{new ItemStack(Blocks.fire)}; + } + this.permutated = true; + this.setPermutationToRender(0); + } + } + + public class CachedDefaultRecipe + extends TemplateRecipeHandler.CachedRecipe { + public final GT_Recipe mRecipe; + public final List<PositionedStack> mOutputs = new ArrayList<PositionedStack>(); + public final List<PositionedStack> mInputs = new ArrayList<PositionedStack>(); + + public CachedDefaultRecipe(final GT_Recipe aRecipe) { + super(); + this.mRecipe = aRecipe; + + int tStartIndex = 0; + switch (GT_NEI_Dehydrator.this.mRecipeMap.mUsualInputCount) { + case 0: + break; + case 1: + if (aRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, 14)); + } + tStartIndex++; + break; + case 2: + if (aRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, 14)); + } + tStartIndex++; + if (aRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, 14)); + } + tStartIndex++; + break; + case 3: + if (aRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 12, 14)); + } + tStartIndex++; + if (aRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, 14)); + } + tStartIndex++; + if (aRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, 14)); + } + tStartIndex++; + break; + case 4: + if (aRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, 5)); + } + tStartIndex++; + if (aRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, 5)); + } + tStartIndex++; + if (aRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, 23)); + } + tStartIndex++; + if (aRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, 23)); + } + tStartIndex++; + break; + case 5: + if (aRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 12, 5)); + } + tStartIndex++; + if (aRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, 5)); + } + tStartIndex++; + if (aRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, 5)); + } + tStartIndex++; + if (aRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, 23)); + } + tStartIndex++; + if (aRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, 23)); + } + tStartIndex++; + break; + case 6: + if (aRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 12, 5)); + } + tStartIndex++; + if (aRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, 5)); + } + tStartIndex++; + if (aRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, 5)); + } + tStartIndex++; + if (aRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 12, 23)); + } + tStartIndex++; + if (aRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, 23)); + } + tStartIndex++; + if (aRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, 23)); + } + tStartIndex++; + break; + case 7: + if (aRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 12, -4)); + } + tStartIndex++; + if (aRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, -4)); + } + tStartIndex++; + if (aRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, -4)); + } + tStartIndex++; + if (aRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 12, 14)); + } + tStartIndex++; + if (aRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, 14)); + } + tStartIndex++; + if (aRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, 14)); + } + tStartIndex++; + if (aRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 12, 32)); + } + tStartIndex++; + break; + case 8: + if (aRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 12, -4)); + } + tStartIndex++; + if (aRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, -4)); + } + tStartIndex++; + if (aRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, -4)); + } + tStartIndex++; + if (aRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 12, 14)); + } + tStartIndex++; + if (aRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, 14)); + } + tStartIndex++; + if (aRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, 14)); + } + tStartIndex++; + if (aRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 12, 32)); + } + tStartIndex++; + if (aRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, 32)); + } + tStartIndex++; + break; + default: + if (aRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 12, -4)); + } + tStartIndex++; + if (aRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, -4)); + } + tStartIndex++; + if (aRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, -4)); + } + tStartIndex++; + if (aRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 12, 14)); + } + tStartIndex++; + if (aRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, 14)); + } + tStartIndex++; + if (aRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, 14)); + } + tStartIndex++; + if (aRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 12, 32)); + } + tStartIndex++; + if (aRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, 32)); + } + tStartIndex++; + if (aRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, 32)); + } + tStartIndex++; + } + if (aRecipe.mSpecialItems != null) { + this.mInputs.add(new FixedPositionedStack(aRecipe.mSpecialItems, 120, 52)); + } + tStartIndex = 0; + switch (GT_NEI_Dehydrator.this.mRecipeMap.mUsualOutputCount) { + case 0: + break; + case 1: + if (aRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, 14, aRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + break; + case 2: + if (aRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, 14, aRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (aRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 120, 14, aRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + break; + case 3: + if (aRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, 14, aRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (aRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 120, 14, aRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (aRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 138, 14, aRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + break; + case 4: + if (aRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, 5, aRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (aRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 120, 5, aRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (aRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, 23, aRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (aRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 120, 23, aRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + break; + case 5: + if (aRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, 5, aRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (aRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 120, 5, aRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (aRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 138, 5, aRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (aRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, 23, aRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (aRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 120, 23, aRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + break; + case 6: + if (aRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, 5, aRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (aRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 120, 5, aRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (aRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 138, 5, aRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (aRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, 23, aRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (aRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 120, 23, aRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (aRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 138, 23, aRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + break; + case 7: + if (aRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, -4, aRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (aRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 120, -4, aRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (aRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 138, -4, aRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (aRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, 14, aRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (aRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 120, 14, aRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (aRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 138, 14, aRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (aRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, 32, aRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + break; + case 8: + if (aRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, -4, aRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (aRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 120, -4, aRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (aRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 138, -4, aRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (aRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, 14, aRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (aRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 120, 14, aRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (aRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 138, 14, aRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (aRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, 32, aRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (aRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 120, 32, aRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + break; + default: + if (aRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, -4, aRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (aRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 120, -4, aRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (aRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 138, -4, aRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (aRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, 14, aRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (aRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 120, 14, aRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (aRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 138, 14, aRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (aRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, 32, aRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (aRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 120, 32, aRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (aRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 138, 32, aRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + } + + + //New fluid display behaviour when 3 fluid inputs are detected. (Basically a mix of the code below for outputs an the code above for 9 input slots.) + if (aRecipe.mFluidInputs.length > 2) { + if ((aRecipe.mFluidInputs[0] != null) && (aRecipe.mFluidInputs[0].getFluid() != null)) { + this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(aRecipe.mFluidInputs[0], true), 12, 5)); + } + if ((aRecipe.mFluidInputs[1] != null) && (aRecipe.mFluidInputs[1].getFluid() != null)) { + this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(aRecipe.mFluidInputs[1], true), 30, 5)); + } + if ((aRecipe.mFluidInputs.length > 2) && (aRecipe.mFluidInputs[2] != null) && (aRecipe.mFluidInputs[2].getFluid() != null)) { + this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(aRecipe.mFluidInputs[2], true), 48, 5)); + } + if ((aRecipe.mFluidInputs.length > 3) && (aRecipe.mFluidInputs[3] != null) && (aRecipe.mFluidInputs[3].getFluid() != null)) { + this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(aRecipe.mFluidInputs[3], true), 12, 23)); + } + if ((aRecipe.mFluidInputs.length > 4) && (aRecipe.mFluidInputs[4] != null) && (aRecipe.mFluidInputs[4].getFluid() != null)) { + this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(aRecipe.mFluidInputs[4], true), 30, 23)); + } + if ((aRecipe.mFluidInputs.length > 5) && (aRecipe.mFluidInputs[5] != null) && (aRecipe.mFluidInputs[5].getFluid() != null)) { + this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(aRecipe.mFluidInputs[5], true), 48, 23)); + } + if ((aRecipe.mFluidInputs.length > 6) && (aRecipe.mFluidInputs[6] != null) && (aRecipe.mFluidInputs[6].getFluid() != null)) { + this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(aRecipe.mFluidInputs[6], true), 12, 41)); + } + if ((aRecipe.mFluidInputs.length > 7) && (aRecipe.mFluidInputs[7] != null) && (aRecipe.mFluidInputs[7].getFluid() != null)) { + this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(aRecipe.mFluidInputs[7], true), 30, 41)); + } + if ((aRecipe.mFluidInputs.length > 8) && (aRecipe.mFluidInputs[8] != null) && (aRecipe.mFluidInputs[8].getFluid() != null)) { + this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(aRecipe.mFluidInputs[8], true), 48, 41)); + } + } + //Returns to old behaviour if fluid inputs < 3 + else if ((aRecipe.mFluidInputs.length > 0) && (aRecipe.mFluidInputs[0] != null) && (aRecipe.mFluidInputs[0].getFluid() != null)) { + this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(aRecipe.mFluidInputs[0], true), 48, 52)); + if ((aRecipe.mFluidInputs.length == 2) && (aRecipe.mFluidInputs[1] != null) && (aRecipe.mFluidInputs[1].getFluid() != null)) { + this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(aRecipe.mFluidInputs[1], true), 30, 52)); + } + } + + if (aRecipe.mFluidOutputs.length > 1) { + if ((aRecipe.mFluidOutputs[0] != null) && (aRecipe.mFluidOutputs[0].getFluid() != null)) { + this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(aRecipe.mFluidOutputs[0], true), 102, 5)); + } + if ((aRecipe.mFluidOutputs[1] != null) && (aRecipe.mFluidOutputs[1].getFluid() != null)) { + this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(aRecipe.mFluidOutputs[1], true), 120, 5)); + } + if ((aRecipe.mFluidOutputs.length > 2) && (aRecipe.mFluidOutputs[2] != null) && (aRecipe.mFluidOutputs[2].getFluid() != null)) { + this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(aRecipe.mFluidOutputs[2], true), 138, 5)); + } + if ((aRecipe.mFluidOutputs.length > 3) && (aRecipe.mFluidOutputs[3] != null) && (aRecipe.mFluidOutputs[3].getFluid() != null)) { + this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(aRecipe.mFluidOutputs[3], true), 102, 23)); + } + if ((aRecipe.mFluidOutputs.length > 4) && (aRecipe.mFluidOutputs[4] != null) && (aRecipe.mFluidOutputs[4].getFluid() != null)) { + this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(aRecipe.mFluidOutputs[4], true), 120, 23)); + } + if ((aRecipe.mFluidOutputs.length > 5) && (aRecipe.mFluidOutputs[5] != null) && (aRecipe.mFluidOutputs[5].getFluid() != null)) { + this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(aRecipe.mFluidOutputs[5], true), 138, 23)); + } + if ((aRecipe.mFluidOutputs.length > 6) && (aRecipe.mFluidOutputs[6] != null) && (aRecipe.mFluidOutputs[6].getFluid() != null)) { + this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(aRecipe.mFluidOutputs[6], true), 102, 41)); + } + if ((aRecipe.mFluidOutputs.length > 7) && (aRecipe.mFluidOutputs[7] != null) && (aRecipe.mFluidOutputs[7].getFluid() != null)) { + this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(aRecipe.mFluidOutputs[7], true), 120, 41)); + } + if ((aRecipe.mFluidOutputs.length > 8) && (aRecipe.mFluidOutputs[8] != null) && (aRecipe.mFluidOutputs[8].getFluid() != null)) { + this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(aRecipe.mFluidOutputs[8], true), 138, 41)); + } + } else if ((aRecipe.mFluidOutputs.length > 0) && (aRecipe.mFluidOutputs[0] != null) && (aRecipe.mFluidOutputs[0].getFluid() != null)) { + this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(aRecipe.mFluidOutputs[0], true), 102, 5)); + } + } + + @Override + public List<PositionedStack> getIngredients() { + return this.getCycledIngredients(GT_NEI_Dehydrator.this.cycleticks / 10, this.mInputs); + } + + @Override + public PositionedStack getResult() { + return null; + } + + @Override + public List<PositionedStack> getOtherStacks() { + return this.mOutputs; + } + } +} diff --git a/src/Java/gtPlusPlus/nei/GT_NEI_FluidReactor.java b/src/Java/gtPlusPlus/nei/GT_NEI_FluidReactor.java index 57e6e1a899..213d022478 100644 --- a/src/Java/gtPlusPlus/nei/GT_NEI_FluidReactor.java +++ b/src/Java/gtPlusPlus/nei/GT_NEI_FluidReactor.java @@ -242,7 +242,34 @@ extends TemplateRecipeHandler { drawText(10, 103, "Time: " + (tDuration < 20 ? "< 1" : Integer.valueOf(tDuration / 20)) + " secs", -16777216); } if ((GT_Utility.isStringValid(this.mRecipeMap.mNEISpecialValuePre)) || (GT_Utility.isStringValid(this.mRecipeMap.mNEISpecialValuePost))) { - drawText(10, 113, this.mRecipeMap.mNEISpecialValuePre + (((CachedDefaultRecipe) this.arecipes.get(aRecipeIndex)).mRecipe.mSpecialValue * this.mRecipeMap.mNEISpecialValueMultiplier) + this.mRecipeMap.mNEISpecialValuePost, -16777216); + int aTier = (((CachedDefaultRecipe) this.arecipes.get(aRecipeIndex)).mRecipe.mSpecialValue); + String aTierMaterial = " - "; + if (aTier <= 0) { + aTierMaterial += "Bronze"; + } + else if (aTier == 1) { + aTierMaterial += "Steel"; + } + else if (aTier == 2) { + aTierMaterial += "Aluminium"; + } + else if (aTier == 3) { + aTierMaterial += "Stainless Steel"; + } + else if (aTier == 4) { + aTierMaterial += "Titanium"; + } + else if (aTier == 5) { + aTierMaterial += "Tungsten Steel"; + } + else if (aTier == 6) { + aTierMaterial += "Laurenium"; + } + else if (aTier == 7) { + aTierMaterial += "Botmium"; + } + + drawText(10, 113, this.mRecipeMap.mNEISpecialValuePre + (((CachedDefaultRecipe) this.arecipes.get(aRecipeIndex)).mRecipe.mSpecialValue * this.mRecipeMap.mNEISpecialValueMultiplier) + aTierMaterial, -16777216); } } diff --git a/src/Java/gtPlusPlus/nei/GT_NEI_RFPP.java b/src/Java/gtPlusPlus/nei/GT_NEI_RFPP.java new file mode 100644 index 0000000000..c91d2bb47a --- /dev/null +++ b/src/Java/gtPlusPlus/nei/GT_NEI_RFPP.java @@ -0,0 +1,460 @@ +package gtPlusPlus.nei; + +import java.awt.Point; +import java.awt.Rectangle; +import java.util.*; + +import org.lwjgl.opengl.GL11; + +import codechicken.lib.gui.GuiDraw; +import codechicken.nei.PositionedStack; +import codechicken.nei.guihook.GuiContainerManager; +import codechicken.nei.guihook.IContainerInputHandler; +import codechicken.nei.guihook.IContainerTooltipHandler; +import codechicken.nei.recipe.*; +import cpw.mods.fml.common.event.FMLInterModComms; +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.gui.GT_GUIContainer_BasicMachine; +import gregtech.api.objects.ItemData; +import gregtech.api.util.*; +import gtPlusPlus.core.util.minecraft.ItemUtils; +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidContainerRegistry; +import net.minecraftforge.fluids.FluidStack; + +public class GT_NEI_RFPP +extends TemplateRecipeHandler { + public static final int sOffsetX = 5; + public static final int sOffsetY = 11; + + static { + GuiContainerManager.addInputHandler(new GT_RectHandler()); + GuiContainerManager.addTooltipHandler(new GT_RectHandler()); + } + + protected CustomRecipeMap mRecipeMap; + + public GT_NEI_RFPP() { + this.mRecipeMap = CustomRecipeMap.sFissionFuelProcessing; + this.transferRects.add(new TemplateRecipeHandler.RecipeTransferRect(new Rectangle(65, 13, 36, 18), this.getRecipeMapName(), new Object[0])); + if (!NEI_GT_Config.sIsAdded) { + FMLInterModComms.sendRuntimeMessage(GT_Values.GT, "NEIPlugins", "register-crafting-handler", "gregtechplusplus@" + this.getRecipeName() + "@" + this.getRecipeMapName()); + GuiCraftingRecipe.craftinghandlers.add(this); + GuiUsageRecipe.usagehandlers.add(this); + } + } + + public List<GTPP_Recipe> getSortedRecipes() { + List<GTPP_Recipe> result = new ArrayList(this.mRecipeMap.mRecipeList); + Collections.sort(result); + return result; + } + + public static void drawText(final int aX, final int aY, final String aString, final int aColor) { + Minecraft.getMinecraft().fontRenderer.drawString(aString, aX, aY, aColor); + } + + @Override + public TemplateRecipeHandler newInstance() { + return new GT_NEI_RFPP(); + } + + @Override + public void loadCraftingRecipes(final String outputId, final Object... results) { + if (outputId.equals(getRecipeMapName())) { + for (GTPP_Recipe tRecipe : getSortedRecipes()) { + if (!tRecipe.mHidden) { + this.arecipes.add(new CachedDefaultRecipe(tRecipe)); + } + } + } else { + super.loadCraftingRecipes(outputId, results); + } + } + + @Override + public void loadCraftingRecipes(final ItemStack aResult) { + ItemData tPrefixMaterial = GT_OreDictUnificator.getAssociation(aResult); + + ArrayList<ItemStack> tResults = new ArrayList<ItemStack>(); + tResults.add(aResult); + tResults.add(GT_OreDictUnificator.get(true, aResult)); + if ((tPrefixMaterial != null) && (!tPrefixMaterial.mBlackListed) && (!tPrefixMaterial.mPrefix.mFamiliarPrefixes.isEmpty())) { + for (OrePrefixes tPrefix : tPrefixMaterial.mPrefix.mFamiliarPrefixes) { + tResults.add(GT_OreDictUnificator.get(tPrefix, tPrefixMaterial.mMaterial.mMaterial, 1L)); + } + } + FluidStack tFluid = GT_Utility.getFluidForFilledItem(aResult, true); + if (tFluid != null) { + tResults.add(GT_Utility.getFluidDisplayStack(tFluid, false)); + for (FluidContainerRegistry.FluidContainerData tData : FluidContainerRegistry.getRegisteredFluidContainerData()) { + if (tData.fluid.isFluidEqual(tFluid)) { + tResults.add(GT_Utility.copy(new Object[]{tData.filledContainer})); + } + } + } + for (GTPP_Recipe tRecipe : getSortedRecipes()) { + if (!tRecipe.mHidden) { + CachedDefaultRecipe tNEIRecipe = new CachedDefaultRecipe(tRecipe); + for (ItemStack tStack : tResults) { + if (tNEIRecipe.contains(tNEIRecipe.mOutputs, tStack)) { + this.arecipes.add(tNEIRecipe); + break; + } + } + } + } + //CachedDefaultRecipe tNEIRecipe; + } + + public void loadUsageRecipes(ItemStack aInput) { + ItemData tPrefixMaterial = GT_OreDictUnificator.getAssociation(aInput); + + ArrayList<ItemStack> tInputs = new ArrayList<ItemStack>(); + tInputs.add(aInput); + tInputs.add(GT_OreDictUnificator.get(false, aInput)); + if ((tPrefixMaterial != null) && (!tPrefixMaterial.mPrefix.mFamiliarPrefixes.isEmpty())) { + for (OrePrefixes tPrefix : tPrefixMaterial.mPrefix.mFamiliarPrefixes) { + tInputs.add(GT_OreDictUnificator.get(tPrefix, tPrefixMaterial.mMaterial.mMaterial, 1L)); + } + } + FluidStack tFluid = GT_Utility.getFluidForFilledItem(aInput, true); + if (tFluid != null) { + tInputs.add(GT_Utility.getFluidDisplayStack(tFluid, false)); + for (FluidContainerRegistry.FluidContainerData tData : FluidContainerRegistry.getRegisteredFluidContainerData()) { + if (tData.fluid.isFluidEqual(tFluid)) { + tInputs.add(GT_Utility.copy(new Object[]{tData.filledContainer})); + } + } + } + for (GTPP_Recipe tRecipe : getSortedRecipes()) { + if (!tRecipe.mHidden) { + CachedDefaultRecipe tNEIRecipe = new CachedDefaultRecipe(tRecipe); + for (ItemStack tStack : tInputs) { + if (tNEIRecipe.contains(tNEIRecipe.mInputs, tStack)) { + this.arecipes.add(tNEIRecipe); + break; + } + } + } + } + //CachedDefaultRecipe tNEIRecipe; + } + + public String getRecipeMapName() { + return this.mRecipeMap.mNEIName; + } + + @Override + public String getOverlayIdentifier() { + return this.mRecipeMap.mNEIName; + } + + @Override + public void drawBackground(final int recipe) { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + GuiDraw.changeTexture(this.getGuiTexture()); + GuiDraw.drawTexturedModalRect(-4, -8, 1, 3, 174, 78); + } + + @Override + public int recipiesPerPage() { + return 1; + } + + @Override + public String getRecipeName() { + return GT_LanguageManager.getTranslation(this.mRecipeMap.mUnlocalizedName); + } + + @Override + public String getGuiTexture() { + return this.mRecipeMap.mNEIGUIPath; + } + + @Override + public List<String> handleItemTooltip(final GuiRecipe gui, final ItemStack aStack, final List<String> currenttip, final int aRecipeIndex) { + final TemplateRecipeHandler.CachedRecipe tObject = this.arecipes.get(aRecipeIndex); + if ((tObject instanceof CachedDefaultRecipe)) { + final CachedDefaultRecipe tRecipe = (CachedDefaultRecipe) tObject; + for (final PositionedStack tStack : tRecipe.mOutputs) { + if (aStack == tStack.item) { + if ((!(tStack instanceof FixedPositionedStack)) || (((FixedPositionedStack) tStack).mChance <= 0) || (((FixedPositionedStack) tStack).mChance == 10000)) { + break; + } + currenttip.add("Chance: " + (((FixedPositionedStack) tStack).mChance / 100) + "." + ((((FixedPositionedStack) tStack).mChance % 100) < 10 ? "0" + (((FixedPositionedStack) tStack).mChance % 100) : Integer.valueOf(((FixedPositionedStack) tStack).mChance % 100)) + "%"); + break; + } + } + for (final PositionedStack tStack : tRecipe.mInputs) { + if (GT_Utility.areStacksEqual(aStack, tStack.item)) { + if ((gregtech.api.enums.ItemList.Display_Fluid.isStackEqual(tStack.item, true, true)) || + (tStack.item.stackSize != 0)) { + break; + } + if (ItemUtils.isControlCircuit(aStack)) { + currenttip.add("Does not get consumed in the process"); + } + break; + } + } + } + return currenttip; + } + + @Override + public void drawExtras(final int aRecipeIndex) { + final long tEUt = ((CachedDefaultRecipe) this.arecipes.get(aRecipeIndex)).mRecipe.mEUt; + final int tDuration = ((CachedDefaultRecipe) this.arecipes.get(aRecipeIndex)).mRecipe.mDuration; + if (tEUt != 0) { + drawText(10, 73, "Total: " + (long) (tDuration * tEUt) + " EU", -16777216); + //drawText(10, 83, "Usage: " + tEUt + " EU/t", -16777216); + if (this.mRecipeMap.mShowVoltageAmperageInNEI) { + drawText(10, 83, "Voltage: " + (tEUt / this.mRecipeMap.mAmperage) + " EU/t", -16777216); + drawText(10, 93, "Amperage: " + this.mRecipeMap.mAmperage, -16777216); + } else { + drawText(10, 93, "Voltage: unspecified", -16777216); + drawText(10, 103, "Amperage: unspecified", -16777216); + } + } + if (tDuration > 0) { + drawText(10, 103, "Time: " + (tDuration < 20 ? "< 1" : Integer.valueOf(tDuration / 20)) + " secs", -16777216); + } + //if ((GT_Utility.isStringValid(this.mRecipeMap.mNEISpecialValuePre)) || (GT_Utility.isStringValid(this.mRecipeMap.mNEISpecialValuePost))) { + //drawText(10, 113, this.mRecipeMap.mNEISpecialValuePre + (((CachedDefaultRecipe) this.arecipes.get(aRecipeIndex)).mRecipe.mSpecialValue * this.mRecipeMap.mNEISpecialValueMultiplier) + this.mRecipeMap.mNEISpecialValuePost, -16777216); + //} + } + + public static class GT_RectHandler + implements IContainerInputHandler, IContainerTooltipHandler { + @Override + public boolean mouseClicked(final GuiContainer gui, final int mousex, final int mousey, final int button) { + if (this.canHandle(gui)) { + if (button == 0) { + return this.transferRect(gui, false); + } + if (button == 1) { + return this.transferRect(gui, true); + } + } + return false; + } + + @Override + public boolean lastKeyTyped(final GuiContainer gui, final char keyChar, final int keyCode) { + return false; + } + + public boolean canHandle(final GuiContainer gui) { + return (((gui instanceof GT_GUIContainer_BasicMachine)) && (GT_Utility.isStringValid(((GT_GUIContainer_BasicMachine) gui).mNEI)) /*|| ((gui instanceof GT_GUIContainer_FusionReactor)) && (GT_Utility.isStringValid(((GT_GUIContainer_FusionReactor) gui).mNEI))*/); + } + + @Override + public List<String> handleTooltip(final GuiContainer gui, final int mousex, final int mousey, final List<String> currenttip) { + if ((this.canHandle(gui)) && (currenttip.isEmpty())) { + if ((gui instanceof GT_GUIContainer_BasicMachine) && new Rectangle(65, 13, 36, 18).contains(new Point(GuiDraw.getMousePosition().x - ((GT_GUIContainer_BasicMachine) gui).getLeft() - codechicken.nei.recipe.RecipeInfo.getGuiOffset(gui)[0], GuiDraw.getMousePosition().y - ((GT_GUIContainer_BasicMachine) gui).getTop() - codechicken.nei.recipe.RecipeInfo.getGuiOffset(gui)[1]))) { + currenttip.add("Recipes"); + } /*else if (gui instanceof GT_GUIContainer_FusionReactor && new Rectangle(145, 0, 24, 24).contains(new Point(GuiDraw.getMousePosition().x - ((GT_GUIContainer_FusionReactor) gui).getLeft() - codechicken.nei.recipe.RecipeInfo.getGuiOffset(gui)[0], GuiDraw.getMousePosition().y - ((GT_GUIContainer_FusionReactor) gui).getTop() - codechicken.nei.recipe.RecipeInfo.getGuiOffset(gui)[1]))) { + currenttip.add("Recipes"); + }*/ + + } + return currenttip; + } + + private boolean transferRect(final GuiContainer gui, final boolean usage) { + if (gui instanceof GT_GUIContainer_BasicMachine) { + return (this.canHandle(gui)) && (new Rectangle(65, 13, 36, 18).contains(new Point(GuiDraw.getMousePosition().x - ((GT_GUIContainer_BasicMachine) gui).getLeft() - codechicken.nei.recipe.RecipeInfo.getGuiOffset(gui)[0], GuiDraw.getMousePosition().y - ((GT_GUIContainer_BasicMachine) gui).getTop() - codechicken.nei.recipe.RecipeInfo.getGuiOffset(gui)[1]))) && (usage ? GuiUsageRecipe.openRecipeGui(((GT_GUIContainer_BasicMachine) gui).mNEI, new Object[0]) : GuiCraftingRecipe.openRecipeGui(((GT_GUIContainer_BasicMachine) gui).mNEI, new Object[0])); + } /*else if (gui instanceof GT_GUIContainer_FusionReactor) { + return (canHandle(gui)) && (new Rectangle(145, 0, 24, 24).contains(new Point(GuiDraw.getMousePosition().x - ((GT_GUIContainer_FusionReactor) gui).getLeft() - codechicken.nei.recipe.RecipeInfo.getGuiOffset(gui)[0], GuiDraw.getMousePosition().y - ((GT_GUIContainer_FusionReactor) gui).getTop() - codechicken.nei.recipe.RecipeInfo.getGuiOffset(gui)[1]))) && (usage ? GuiUsageRecipe.openRecipeGui(((GT_GUIContainer_FusionReactor) gui).mNEI, new Object[0]) : GuiCraftingRecipe.openRecipeGui(((GT_GUIContainer_FusionReactor) gui).mNEI, new Object[0])); + }*/ + return false; + } + + @Override + public List<String> handleItemDisplayName(final GuiContainer gui, final ItemStack itemstack, final List<String> currenttip) { + return currenttip; + } + + @Override + public List<String> handleItemTooltip(final GuiContainer gui, final ItemStack itemstack, final int mousex, final int mousey, final List<String> currenttip) { + return currenttip; + } + + @Override + public boolean keyTyped(final GuiContainer gui, final char keyChar, final int keyCode) { + return false; + } + + @Override + public void onKeyTyped(final GuiContainer gui, final char keyChar, final int keyID) { + } + + @Override + public void onMouseClicked(final GuiContainer gui, final int mousex, final int mousey, final int button) { + } + + @Override + public void onMouseUp(final GuiContainer gui, final int mousex, final int mousey, final int button) { + } + + @Override + public boolean mouseScrolled(final GuiContainer gui, final int mousex, final int mousey, final int scrolled) { + return false; + } + + @Override + public void onMouseScrolled(final GuiContainer gui, final int mousex, final int mousey, final int scrolled) { + } + + @Override + public void onMouseDragged(final GuiContainer gui, final int mousex, final int mousey, final int button, final long heldTime) { + } + } + + public class FixedPositionedStack + extends PositionedStack { + public final int mChance; + public boolean permutated = false; + + public FixedPositionedStack(final Object object, final int x, final int y) { + this(object, x, y, 0); + } + + public FixedPositionedStack(final Object object, final int x, final int y, final int aChance) { + super(object, x, y, true); + this.mChance = aChance; + } + + @Override + public void generatePermutations() { + if (this.permutated) { + return; + } + final ArrayList<ItemStack> tDisplayStacks = new ArrayList<ItemStack>(); + for (final ItemStack tStack : this.items) { + if (GT_Utility.isStackValid(tStack)) { + if (tStack.getItemDamage() == 32767) { + final List<ItemStack> permutations = codechicken.nei.ItemList.itemMap.get(tStack.getItem()); + if (!permutations.isEmpty()) { + ItemStack stack; + for (final Iterator<ItemStack> i$ = permutations.iterator(); i$.hasNext(); tDisplayStacks.add(GT_Utility.copyAmount(tStack.stackSize, new Object[]{stack}))) { + stack = i$.next(); + } + } else { + final ItemStack base = new ItemStack(tStack.getItem(), tStack.stackSize); + base.stackTagCompound = tStack.stackTagCompound; + tDisplayStacks.add(base); + } + } else { + tDisplayStacks.add(GT_Utility.copy(new Object[]{tStack})); + } + } + } + this.items = (tDisplayStacks.toArray(new ItemStack[0])); + if (this.items.length == 0) { + this.items = new ItemStack[]{new ItemStack(Blocks.fire)}; + } + this.permutated = true; + this.setPermutationToRender(0); + } + } + + public class CachedDefaultRecipe + extends TemplateRecipeHandler.CachedRecipe { + public final GT_Recipe mRecipe; + public final List<PositionedStack> mOutputs = new ArrayList<PositionedStack>(); + public final List<PositionedStack> mInputs = new ArrayList<PositionedStack>(); + + public CachedDefaultRecipe(final GT_Recipe aRecipe) { + super(); + this.mRecipe = aRecipe; + + int tStartIndex = 0; + + + if (aRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 12, 5)); + } + tStartIndex++; + if (aRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, 5)); + } + tStartIndex++; + if (aRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, 5)); + } + tStartIndex++; + if (aRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 12, 23)); + } + tStartIndex++; + if (aRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, 23)); + } + tStartIndex++; + if (aRecipe.getRepresentativeInput(tStartIndex) != null) { + this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, 23)); + } + tStartIndex++; + + if (aRecipe.mSpecialItems != null) { + this.mInputs.add(new FixedPositionedStack(aRecipe.mSpecialItems, 120, 52)); + } + tStartIndex = 0; + + //Four Output Slots + if (aRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, 5, aRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (aRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 120, 5, aRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (aRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, 23, aRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + if (aRecipe.getOutput(tStartIndex) != null) { + this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 120, 23, aRecipe.getOutputChance(tStartIndex))); + } + tStartIndex++; + + if ((aRecipe.mFluidInputs.length > 0) && (aRecipe.mFluidInputs[0] != null) && (aRecipe.mFluidInputs[0].getFluid() != null)) { + this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(aRecipe.mFluidInputs[0], true), 30, 52)); + if ((aRecipe.mFluidInputs.length > 1) && (aRecipe.mFluidInputs[1] != null) && (aRecipe.mFluidInputs[1].getFluid() != null)) { + this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(aRecipe.mFluidInputs[1], true), 48, 52)); + } + } + + if (aRecipe.mFluidOutputs.length > 0) { + if ((aRecipe.mFluidOutputs[0] != null) && (aRecipe.mFluidOutputs[0].getFluid() != null)) { + this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(aRecipe.mFluidOutputs[0], true), 102, 52)); + } + if ((aRecipe.mFluidOutputs.length > 1) && (aRecipe.mFluidOutputs[1] != null) && (aRecipe.mFluidOutputs[1].getFluid() != null)) { + this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(aRecipe.mFluidOutputs[1], true), 120, 52)); + } + } + } + + @Override + public List<PositionedStack> getIngredients() { + return this.getCycledIngredients(GT_NEI_RFPP.this.cycleticks / 10, this.mInputs); + } + + @Override + public PositionedStack getResult() { + return null; + } + + @Override + public List<PositionedStack> getOtherStacks() { + return this.mOutputs; + } + } +} diff --git a/src/Java/gtPlusPlus/nei/NEI_GT_Config.java b/src/Java/gtPlusPlus/nei/NEI_GT_Config.java index 40826168d2..e89ec9a13b 100644 --- a/src/Java/gtPlusPlus/nei/NEI_GT_Config.java +++ b/src/Java/gtPlusPlus/nei/NEI_GT_Config.java @@ -19,9 +19,11 @@ implements IConfigureNEI { @Override public synchronized void loadConfig() { + mUniqueRecipeMapHandling.add(CustomRecipeMap.sFissionFuelProcessing.mUnlocalizedName); mUniqueRecipeMapHandling.add(GTPP_Recipe_Map.sChemicalPlantRecipes.mUnlocalizedName); mUniqueRecipeMapHandling.add(GTPP_Recipe_Map.sOreMillRecipes.mUnlocalizedName); mUniqueRecipeMapHandling.add(GTPP_Recipe_Map.sFlotationCellRecipes.mUnlocalizedName); + mUniqueRecipeMapHandling.add(GTPP_Recipe_Map.sChemicalDehydratorRecipes.mUnlocalizedName); mUniqueRecipeMapHandling.add(GTPP_Recipe_Map.sVacuumFurnaceRecipes.mUnlocalizedName); // Custom Recipe Maps @@ -78,6 +80,10 @@ implements IConfigureNEI { new GT_NEI_FlotationCell(); Logger.INFO("NEI Registration: Registering NEI handler for "+GTPP_Recipe.GTPP_Recipe_Map.sVacuumFurnaceRecipes.mNEIName); new GT_NEI_VacFurnace(); + Logger.INFO("NEI Registration: Registering NEI handler for "+GTPP_Recipe.GTPP_Recipe_Map.sChemicalDehydratorRecipes.mNEIName); + new GT_NEI_Dehydrator(); + Logger.INFO("NEI Registration: Registering NEI handler for "+CustomRecipeMap.sFissionFuelProcessing.mNEIName); + new GT_NEI_RFPP(); Logger.INFO("NEI Registration: Registering NEI handler for "+DecayableRecipeHandler.mNEIName); API.registerRecipeHandler(new DecayableRecipeHandler()); API.registerUsageHandler(new DecayableRecipeHandler()); diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/chemplant/GregtechMTE_ChemicalPlant.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/chemplant/GregtechMTE_ChemicalPlant.java index 0883647c3d..4b1acf6494 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/chemplant/GregtechMTE_ChemicalPlant.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/chemplant/GregtechMTE_ChemicalPlant.java @@ -108,28 +108,8 @@ public class GregtechMTE_ChemicalPlant extends GregtechMeta_MultiBlockBase { return new String[] { "Controller Block for the Chemical Plant", "Heavy Industry, now right at your doorstep!", - "Solid Casings dictate Chemical Plant tier", - "Machine Casings dictate Hatch tier", - "Higher tier coils speed up the machine", - "CuNi 50% , FeAlCr 100% , Ni4Cr 150% , ...", - "Higher tier pipe casings boost parallel and reduce catalyst consumption", - "+2 parallel per tier, 20% extra chance of not damaging catalyst per tier", - "27x Coils", - "18x Pipe Casings", - "57x Tiered Machine Casings", - "80+ Solid Casings", - "Construction Guide:", - "Controller is placed on a middle casing in the bottom layer", - "Hatches can only be placed on the bottom layer edges", - "7x7x7 Hollow frame of solid casings", - "5x1x5 layer of solid casings (fills in top layer)", - "5x1x5 layer of machine casings (fills in bottom layer)", - "In the central 3x5x3:", - "3x1x3 layer of Coils, surrounded by ring of Machine Casings", - "3x1x3 layer of Pipe Casings", - "3x1x3 layer of Coils", - "3x1x3 layer of Pipe Casings", - "3x1x3 layer of Coils, surrounded by ring of Machine Casings", + "Please read to user manual for more information on construction & usage", + TAG_HIDE_MAINT }; } |