From 18c7ac051b3e7c392666c63b7b439560ae915c07 Mon Sep 17 00:00:00 2001 From: Connor-Colenso <52056774+Connor-Colenso@users.noreply.github.com> Date: Sun, 19 Jun 2022 19:47:52 +0100 Subject: Add Plasma Forge (Endgame multi) (#1076) * Basis of changes. * Fix item stack and fluid vanishing. * Add new plasma forge UI, change tooltip and fix recipe map. * Fix corrupted fluid registry. * Fix fluids in recipes. Items still need adjusting. * Working. * Liquid spacetime and rename multi to D.T.P.S. so it can fit in GUI properly. * Make animation of spacetime fluid slower. * Fix recipe map (again). * Remove screwdriver junk. Clean up code slightly. * More cleaning. * Comments * Add hatch limitations and add some additional information. Also update NEI GUI. * Add proper recipes and change SpaceTime to a fluid not a gas. * Remove depreciated coil check (since I stole the IDs). * Remove depreciated coil check (since I stole the IDs). Add more comments. * Change temp of SpaceTime. * Add catalyst recipes + support for 16:16 fusion recipes. * Add comments. * Scala fix maybe? * Change plasma forge GUI. * Uncap temperature of materials. (Short -> Int) * Add chunkloading support (when multi is active). * Fix NEI merge issues. * fix used ids in kevlar * Add fluid support for laser engraver. * fix sh***t (cherry picked from commit 01851c100c52fd8292028cf6dda2cb136c617afc) * Add new intermediate materials to facilitate crafting. Also fix fusion typo. * Fix heat/fluid quantity display to be formatted correctly. * Change recipes to be more balanced. * Change residue fluid texture. * Restore better naming for multiblock. * Fix recipe typo. * Fix text not wrapping in multi controller. * Give laser engraver internal fluid storage. * Add IMC NEI support. * Update material properties. * Remove old dev comments. * Fix NEI texture. Co-authored-by: GTNH-Colen <54497873+GTNH-Colen@users.noreply.github.com> Co-authored-by: Martin Robertz --- src/main/java/gregtech/api/enums/Element.java | 9 +- src/main/java/gregtech/api/enums/ItemList.java | 7 +- src/main/java/gregtech/api/enums/Materials.java | 34 +- src/main/java/gregtech/api/enums/Textures.java | 5 +- .../api/gui/GT_GUIContainer_MultiMachine.java | 106 ++++- .../api/interfaces/internal/IGT_RecipeAdder.java | 54 ++- src/main/java/gregtech/api/util/GT_Recipe.java | 7 +- src/main/java/gregtech/common/GT_RecipeAdder.java | 35 ++ .../gregtech/common/blocks/GT_Block_Casings1.java | 29 +- .../gregtech/common/blocks/GT_Item_Casings1.java | 10 - .../common/blocks/GT_Item_Casings_Abstract.java | 2 - .../gregtech/common/items/GT_FluidDisplayItem.java | 4 +- .../GT_MetaTileEntity_ElectricBlastFurnace.java | 35 -- .../multi/GT_MetaTileEntity_FusionComputer.java | 8 +- .../multi/GT_MetaTileEntity_PlasmaForge.java | 326 +++++++++++++ .../loaders/postload/GT_MachineRecipeLoader.java | 184 +++++++- .../preload/GT_Loader_Item_Block_And_Fluid.java | 518 +++++++++++---------- .../preload/GT_Loader_MetaTileEntities.java | 11 +- .../java/gregtech/nei/GT_NEI_DefaultHandler.java | 112 +++-- .../fluid.dimensionallytranscendentresidue.png | Bin 0 -> 45673 bytes ...uid.dimensionallytranscendentresidue.png.mcmeta | 5 + .../textures/blocks/fluids/fluid.exciteddtcc.png | Bin 0 -> 30215 bytes .../blocks/fluids/fluid.exciteddtcc.png.mcmeta | 5 + .../textures/blocks/fluids/fluid.exciteddtec.png | Bin 0 -> 30215 bytes .../blocks/fluids/fluid.exciteddtec.png.mcmeta | 5 + .../textures/blocks/fluids/fluid.exciteddtpc.png | Bin 0 -> 30215 bytes .../blocks/fluids/fluid.exciteddtpc.png.mcmeta | 5 + .../textures/blocks/fluids/fluid.exciteddtrc.png | Bin 0 -> 30215 bytes .../blocks/fluids/fluid.exciteddtrc.png.mcmeta | 5 + .../textures/blocks/fluids/fluid.spacetime.png | Bin 0 -> 17362 bytes .../blocks/fluids/fluid.spacetime.png.mcmeta | 5 + .../blocks/iconsets/MACHINE_DIM_BRIDGE.png | Bin 0 -> 709 bytes .../blocks/iconsets/MACHINE_DIM_BRIDGE.png.mcmeta | 5 + .../blocks/iconsets/MACHINE_DIM_INJECTOR.png | Bin 0 -> 1166 bytes .../blocks/iconsets/MACHINE_DIM_TRANS_CASING.png | Bin 0 -> 1166 bytes .../gui/basicmachines/ComplexFusionReactor.png | Bin 0 -> 5714 bytes .../textures/gui/basicmachines/LaserEngraver.png | Bin 5220 -> 5505 bytes .../gui/basicmachines/LaserEngraverNEI.png | Bin 0 -> 5274 bytes .../textures/gui/basicmachines/PlasmaForge.png | Bin 0 -> 5010 bytes .../textures/gui/multimachines/PlasmaForge.png | Bin 0 -> 3940 bytes 40 files changed, 1133 insertions(+), 398 deletions(-) create mode 100644 src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PlasmaForge.java create mode 100644 src/main/resources/assets/gregtech/textures/blocks/fluids/fluid.dimensionallytranscendentresidue.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/fluids/fluid.dimensionallytranscendentresidue.png.mcmeta create mode 100644 src/main/resources/assets/gregtech/textures/blocks/fluids/fluid.exciteddtcc.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/fluids/fluid.exciteddtcc.png.mcmeta create mode 100644 src/main/resources/assets/gregtech/textures/blocks/fluids/fluid.exciteddtec.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/fluids/fluid.exciteddtec.png.mcmeta create mode 100644 src/main/resources/assets/gregtech/textures/blocks/fluids/fluid.exciteddtpc.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/fluids/fluid.exciteddtpc.png.mcmeta create mode 100644 src/main/resources/assets/gregtech/textures/blocks/fluids/fluid.exciteddtrc.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/fluids/fluid.exciteddtrc.png.mcmeta create mode 100644 src/main/resources/assets/gregtech/textures/blocks/fluids/fluid.spacetime.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/fluids/fluid.spacetime.png.mcmeta create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/MACHINE_DIM_BRIDGE.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/MACHINE_DIM_BRIDGE.png.mcmeta create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/MACHINE_DIM_INJECTOR.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/MACHINE_DIM_TRANS_CASING.png create mode 100644 src/main/resources/assets/gregtech/textures/gui/basicmachines/ComplexFusionReactor.png create mode 100644 src/main/resources/assets/gregtech/textures/gui/basicmachines/LaserEngraverNEI.png create mode 100644 src/main/resources/assets/gregtech/textures/gui/basicmachines/PlasmaForge.png create mode 100644 src/main/resources/assets/gregtech/textures/gui/multimachines/PlasmaForge.png (limited to 'src') diff --git a/src/main/java/gregtech/api/enums/Element.java b/src/main/java/gregtech/api/enums/Element.java index 72b2adfab8..5eadd70960 100644 --- a/src/main/java/gregtech/api/enums/Element.java +++ b/src/main/java/gregtech/api/enums/Element.java @@ -135,9 +135,10 @@ public enum Element { Tn(125, 198, 0, -1, null, "Tritanium", false), SpFe(26, 42, 0, -1, null, "Meteoric Iron", false), - De(22, 27, 0, -1, null, "Desh", false), + De(22, 27, 0, -1, null, "Desh", false), Oh(76, 125, 0, -1, null, "Oriharukon", false), - + Di(500, 500, 0, -1, null, "Dimensionally Transcendent Matter", false), + Ma(0, 0, 100, -1, null, "Magic", false), Nq(130, 200, 0, -1, null, "Naquadah", false), Nt(0, 1000, 0, -1, null, "Neutronium", false), @@ -266,9 +267,9 @@ public enum Element { $Ts(-117, -177, 0, -1, null, "Anti-Tenness", false), $Og(-118, -176, 0, -1, null, "Anti-Oganesson", false), $Tn(-125, -198, 0, -1, null, "Anti-Tritanium", false), - + $SpFe(-26, -42, 0, -1, null, "Anti-Meteoric Iron", true), - $De(-22, -27, 0, -1, null, "Anti-Desh", true), + $De(-22, -27, 0, -1, null, "Anti-Desh", true), $Oh(-76, -125, 0, -1, null, "Anti-Oriharukon", true), $Ma(0, 0, -100, -1, null, "Anti-Magic", false), diff --git a/src/main/java/gregtech/api/enums/ItemList.java b/src/main/java/gregtech/api/enums/ItemList.java index 2c1aacf3b1..46f18a4999 100644 --- a/src/main/java/gregtech/api/enums/ItemList.java +++ b/src/main/java/gregtech/api/enums/ItemList.java @@ -795,9 +795,9 @@ public enum ItemList implements IItemContainer { Casing_MAX, Casing_BronzePlatedBricks, Casing_HeatProof, - Casing_Coil_Cupronickel_Deprecated, - Casing_Coil_Kanthal_Deprecated, - Casing_Coil_Nichrome_Deprecated, + Casing_Dim_Trans, + Casing_Dim_Injector, + Casing_Dim_Bridge, Casing_Coil_Superconductor, Casing_SolidSteel, @@ -1083,6 +1083,7 @@ public enum ItemList implements IItemContainer { Machine_Multi_LargeBoiler_Titanium, Machine_Multi_LargeBoiler_TungstenSteel, Machine_Multi_BlastFurnace, + Machine_Multi_PlasmaForge, Machine_Multi_ImplosionCompressor, Machine_Multi_VacuumFreezer, Machine_Multi_Furnace, diff --git a/src/main/java/gregtech/api/enums/Materials.java b/src/main/java/gregtech/api/enums/Materials.java index 2dc29af7ab..4a66779a58 100644 --- a/src/main/java/gregtech/api/enums/Materials.java +++ b/src/main/java/gregtech/api/enums/Materials.java @@ -363,7 +363,7 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { public static Materials Ethanol = new Materials( 706, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 255, 128, 0, 0, "Ethanol" , "Ethanol" , 0, 192, -1, 0, false, false, 1, 1, 1, Dyes.dyeOrange , 1, Arrays.asList(new MaterialStack(Carbon, 2), new MaterialStack(Hydrogen, 6), new MaterialStack(Oxygen, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.VENENUM, 1), new TC_AspectStack(TC_Aspects.AQUA, 1))); public static Materials FishOil = new Materials( 711, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 255, 196, 0, 0, "FishOil" , "Fish Oil" , 3, 2, -1, 0, false, false, 1, 1, 1, Dyes.dyeYellow , Arrays.asList(new TC_AspectStack(TC_Aspects.CORPUS, 2))); public static Materials FermentedBiomass = new MaterialBuilder(691, TextureSet.SET_FLUID , "Fermented Biomass").addCell().addFluid().setRGB(68, 85, 0).setColor(Dyes.dyeBrown).constructMaterial(); - public static Materials Fuel = new Materials( 708, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 255, 255, 0, 0, "Fuel" , "Diesel" , 0, 480, -1, 0, false, false, 1, 1, 1, Dyes.dyeYellow ); + public static Materials Fuel = new Materials( 708, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 255, 255, 0, 0, "Fuel" , "Diesel" , 0, 480, -1, 0, false, false, 1, 1, 1, Dyes.dyeYellow ); public static Materials Glue = new Materials( 726, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 200, 196, 0, 0, "Glue" , "Refined Glue" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeOrange , Arrays.asList(new TC_AspectStack(TC_Aspects.LIMUS, 2))); public static Materials Gunpowder = new Materials( 800, TextureSet.SET_DULL , 1.0F, 0, 0, 1 , 128, 128, 128, 0, "Gunpowder" , "Gunpowder" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeGray , Arrays.asList(new TC_AspectStack(TC_Aspects.PERDITIO, 3), new TC_AspectStack(TC_Aspects.IGNIS, 4))); public static Materials FryingOilHot = new Materials( 727, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 200, 196, 0, 0, "FryingOilHot" , "Hot Frying Oil" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeOrange , Arrays.asList(new TC_AspectStack(TC_Aspects.AQUA, 1), new TC_AspectStack(TC_Aspects.IGNIS, 1))); @@ -846,6 +846,20 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { public static Materials SuperCoolant = new MaterialBuilder( -1, TextureSet.SET_DULL,"Super Coolant").setRGB(2, 91, 111).addFluid().constructMaterial().setLiquidTemperature(1); + public static Materials DimensionallyTranscendentCrudeCatalyst = new Materials( 748, TextureSet.SET_FLUID , 1.0F, 0, 2, 16 , 10, 20, 20, 1, "DimensionallyTranscendentCrudeCatalyst" , "Dimensionally Transcendent Crude Catalyst" , 0, 0, 100000000, 1, false, true, 1, 1, 1, Dyes.dyeCyan).setHasCorrespondingFluid(true); + public static Materials DimensionallyTranscendentProsaicCatalyst = new Materials( 747, TextureSet.SET_FLUID , 1.0F, 0, 2, 16 , 10, 20, 20, 1, "DimensionallyTranscendentProsaicCatalyst" , "Dimensionally Transcendent Prosaic Catalyst" , 0, 0, 100000000, 1, false, true, 1, 1, 1, Dyes.dyeGreen).setHasCorrespondingFluid(true); + public static Materials DimensionallyTranscendentResplendentCatalyst = new Materials( 746, TextureSet.SET_FLUID , 1.0F, 0, 2, 16 , 10, 20, 20, 1, "DimensionallyTranscendentResplendentCatalyst" , "Dimensionally Transcendent Resplendent Catalyst" , 0, 0, 100000000, 1, false, true, 1, 1, 1, Dyes.dyeLime).setHasCorrespondingFluid(true); + public static Materials DimensionallyTranscendentExoticCatalyst = new Materials( 745, TextureSet.SET_FLUID , 1.0F, 0, 2, 16 , 10, 20, 20, 1, "DimensionallyTranscendentExoticCatalyst" , "Dimensionally Transcendent Exotic Catalyst" , 0, 0, 100000000, 1, false, true, 1, 1, 1, Dyes.dyeMagenta).setHasCorrespondingFluid(true); + + public static Materials ExcitedDTCC = new Materials( 109, TextureSet.SET_FLUID , 1.0F, 0, 2, 16 , 10, 20, 20, 1, "ExcitedDTCC" , "Excited Dimensionally Transcendent Crude Catalyst" , -1, -1, 500000000, 1, false, true, 1, 1, 1, Dyes.dyeCyan); + public static Materials ExcitedDTPC = new Materials( 113, TextureSet.SET_FLUID , 1.0F, 0, 2, 16 , 35, 59, 41, 1, "ExcitedDTPC" , "Excited Dimensionally Transcendent Prosaic Catalyst" , -1, -1, 500000000, 1, false, true, 1, 1, 1, Dyes.dyeGreen); + public static Materials ExcitedDTRC = new Materials( 121, TextureSet.SET_FLUID , 1.0F, 0, 2, 16 , 38, 20, 56, 1, "ExcitedDTRC" , "Excited Dimensionally Transcendent Resplendent Catalyst" , -1, -1, 500000000, 1, false, true, 1, 1, 1, Dyes.dyeLime); + public static Materials ExcitedDTEC = new Materials( 126, TextureSet.SET_FLUID , 1.0F, 0, 2, 16 , 240, 240, 41, 1, "ExcitedDTEC" , "Excited Dimensionally Transcendent Exotic Catalyst" , -1, -1, 500000000, 1, false, true, 1, 1, 1, Dyes.dyeMagenta); + + public static Materials DimensionallyTranscendentResidue = new Materials( 589, TextureSet.SET_FLUID , 1.0F, 0, 2, 16 , 0, 0, 0, 1, "DimensionallyTranscendentResidue" , "Dimensionally Transcendent Residue" , -1, -1, 25, 1, false, true, 1, 1, 1, Dyes.dyeBlack); + + public static Materials SpaceTime = new Materials( 588, TextureSet.SET_FLUID , 1.0F, 0, 2, 16 , 0, 0, 255, 240, "SpaceTime" , "SpaceTime" , -1, -1, 14, 0, false, true, 2, 1, 1, Dyes.dyeBlue , Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1))); + /** * Materials which are renamed automatically */ @@ -964,10 +978,10 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { mEnchantmentArmorsLevel = 0, mToolQuality = 0; public short - mMeltingPoint = 0, - mBlastFurnaceTemp = 0, - mGasTemp = 0; + mBlastFurnaceTemp = 0; public int + mMeltingPoint = 0, + mGasTemp = 0, mMetaItemSubID, mTypes = 0, mDurability = 16, @@ -1082,7 +1096,7 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { */ public Materials(int aMetaItemSubID, TextureSet aIconSet, float aToolSpeed, int aDurability, int aToolQuality, int aTypes, int aR, int aG, int aB, int aA, String aName, String aDefaultLocalName, int aFuelType, int aFuelPower, int aMeltingPoint, int aBlastFurnaceTemp, boolean aBlastFurnaceRequired, boolean aTransparent, int aOreValue, int aDensityMultiplier, int aDensityDivider, Dyes aColor, String aConfigSection, boolean aCustomOre, String aCustomID) { this(aMetaItemSubID, aIconSet, aToolSpeed, aDurability, aToolQuality, true, aName, aDefaultLocalName, aConfigSection, aCustomOre, aCustomID); - mMeltingPoint = (short) aMeltingPoint; + mMeltingPoint = aMeltingPoint; mBlastFurnaceRequired = aBlastFurnaceRequired; mBlastFurnaceTemp = (short) aBlastFurnaceTemp; mTransparent = aTransparent; @@ -1603,6 +1617,8 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { //Pentacadmiummagneiumhexaoxid.mChemicalFormula="Cd5MgO6"; CosmicNeutronium.mChemicalFormula = "SpNt"; Aluminiumhydroxide.mChemicalFormula = "Al\u0028OH\u0029\u2083"; + + SpaceTime.mChemicalFormula = "Reality itself distilled into liquid form"; } private static void initSubTags() { @@ -2182,10 +2198,10 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { } private static void addTemperatureValues(Materials aMaterial, String aConfigPath) { - aMaterial.mMeltingPoint = (short) GregTech_API.sMaterialProperties.get(aConfigPath, "MeltingPoint", aMaterial.mMeltingPoint); + aMaterial.mMeltingPoint = GregTech_API.sMaterialProperties.get(aConfigPath, "MeltingPoint", aMaterial.mMeltingPoint); aMaterial.mBlastFurnaceRequired = GregTech_API.sMaterialProperties.get(aConfigPath, "BlastFurnaceRequired", aMaterial.mBlastFurnaceRequired); aMaterial.mBlastFurnaceTemp = (short) GregTech_API.sMaterialProperties.get(aConfigPath, "BlastFurnaceTemp", aMaterial.mBlastFurnaceTemp); - aMaterial.mGasTemp = (short) GregTech_API.sMaterialProperties.get(aConfigPath, "GasTemp", aMaterial.mGasTemp); + aMaterial.mGasTemp = GregTech_API.sMaterialProperties.get(aConfigPath, "GasTemp", aMaterial.mGasTemp); aMaterial.setHeatDamage((float) GregTech_API.sMaterialProperties.get(aConfigPath, "HeatDamage", aMaterial.mHeatDamage)); } @@ -2761,7 +2777,7 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { } public Materials setLiquidTemperature(int liquidTemperature) { - this.mMeltingPoint = (short) liquidTemperature; + this.mMeltingPoint = liquidTemperature; return this; } @@ -2770,7 +2786,7 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { } public Materials setGasTemperature(int gasTemperature) { - this.mGasTemp = (short) gasTemperature; + this.mGasTemp = gasTemperature; return this; } diff --git a/src/main/java/gregtech/api/enums/Textures.java b/src/main/java/gregtech/api/enums/Textures.java index 960a6b6a07..7e917b7db4 100644 --- a/src/main/java/gregtech/api/enums/Textures.java +++ b/src/main/java/gregtech/api/enums/Textures.java @@ -235,6 +235,9 @@ public class Textures { MACHINE_MAX_BOTTOM, MACHINE_BRONZEPLATEDBRICKS, MACHINE_HEATPROOFCASING, + MACHINE_DIM_TRANS_CASING, + MACHINE_DIM_INJECTOR, + MACHINE_DIM_BRIDGE, MACHINE_COIL_SUPERCONDUCTOR, MACHINE_BRONZEBLASTFURNACE, @@ -308,7 +311,7 @@ public class Textures { MACHINE_CASING_FIREBOX_STEEL, MACHINE_CASING_FIREBOX_TUNGSTENSTEEL, MACHINE_CASING_ENGINE_INTAKE, - MACHINE_CASING_EXTREME_ENGINE_INTAKE,//changed color in a terrible way + MACHINE_CASING_EXTREME_ENGINE_INTAKE, //changed color in a terrible way MACHINE_CASING_CHEMICALLY_INERT, MACHINE_COIL_CUPRONICKEL, diff --git a/src/main/java/gregtech/api/gui/GT_GUIContainer_MultiMachine.java b/src/main/java/gregtech/api/gui/GT_GUIContainer_MultiMachine.java index a477789d06..f84b8547bc 100644 --- a/src/main/java/gregtech/api/gui/GT_GUIContainer_MultiMachine.java +++ b/src/main/java/gregtech/api/gui/GT_GUIContainer_MultiMachine.java @@ -30,41 +30,105 @@ public class GT_GUIContainer_MultiMachine extends GT_GUIContainerMetaTile_Machin @Override protected void drawGuiContainerForegroundLayer(int par1, int par2) { - fontRendererObj.drawString(mName, 10, 8, 16448255); + + // If text is drawn iterate down GUI 8 pixels (height of characters). + int line_counter = 7; + int max_chars_per_line = 26; + + if (mName.length() > 26) { + + // Split the machine name into an array, so we can try fit it on one line but if not use more. + String[] split = mName.split(" "); + + int total_line_length = 0; + String current_line = ""; + + int index = 0; + + for (String str : split) { + + total_line_length += str.length(); + + if (total_line_length > max_chars_per_line) { + fontRendererObj.drawString(current_line, 10, line_counter, 16448255); + line_counter += 8; + current_line = ""; + index = 0; + total_line_length = str.length(); + } + + if (index == 0) { + current_line += str; + } else { + current_line += " " + str; + } + index++; + } + fontRendererObj.drawString(current_line, 10, line_counter, 16448255); + line_counter += 8; + } else { + fontRendererObj.drawString(mName, 10, line_counter, 16448255); + line_counter += 8; + } + if (mContainer != null) {//(mWrench ? 0 : 1) | (mScrewdriver ? 0 : 2) | (mSoftHammer ? 0 : 4) | (mHardHammer ? 0 : 8) | (mSolderingTool ? 0 : 16) | (mCrowbar ? 0 : 32) | (mMachine ? 0 : 64)); - if ((((GT_Container_MultiMachine) mContainer).mDisplayErrorCode & 1) != 0) - fontRendererObj.drawString(GT_Utility.trans("132", "Pipe is loose."), 10, 16, 16448255); - if ((((GT_Container_MultiMachine) mContainer).mDisplayErrorCode & 2) != 0) - fontRendererObj.drawString(GT_Utility.trans("133", "Screws are loose."), 10, 24, 16448255); - if ((((GT_Container_MultiMachine) mContainer).mDisplayErrorCode & 4) != 0) - fontRendererObj.drawString(GT_Utility.trans("134", "Something is stuck."), 10, 32, 16448255); - if ((((GT_Container_MultiMachine) mContainer).mDisplayErrorCode & 8) != 0) - fontRendererObj.drawString(GT_Utility.trans("135", "Platings are dented."), 10, 40, 16448255); - if ((((GT_Container_MultiMachine) mContainer).mDisplayErrorCode & 16) != 0) - fontRendererObj.drawString(GT_Utility.trans("136", "Circuitry burned out."), 10, 48, 16448255); - if ((((GT_Container_MultiMachine) mContainer).mDisplayErrorCode & 32) != 0) - fontRendererObj.drawString(GT_Utility.trans("137", "That doesn't belong there."), 10, 56, 16448255); - if ((((GT_Container_MultiMachine) mContainer).mDisplayErrorCode & 64) != 0) - fontRendererObj.drawString(GT_Utility.trans("138", "Incomplete Structure."), 10, 64, 16448255); + if ((((GT_Container_MultiMachine) mContainer).mDisplayErrorCode & 1) != 0) { + fontRendererObj.drawString(GT_Utility.trans("132", "Pipe is loose."), 10, line_counter, 16448255); + line_counter += 8; + } + + if ((((GT_Container_MultiMachine) mContainer).mDisplayErrorCode & 2) != 0) { + fontRendererObj.drawString(GT_Utility.trans("133", "Screws are loose."), 10, line_counter, 16448255); + line_counter += 8; + } + + if ((((GT_Container_MultiMachine) mContainer).mDisplayErrorCode & 4) != 0) { + fontRendererObj.drawString(GT_Utility.trans("134", "Something is stuck."), 10, line_counter, 16448255); + line_counter += 8; + } + + if ((((GT_Container_MultiMachine) mContainer).mDisplayErrorCode & 8) != 0) { + fontRendererObj.drawString(GT_Utility.trans("135", "Platings are dented."), 10, line_counter, 16448255); + line_counter += 8; + } + + if ((((GT_Container_MultiMachine) mContainer).mDisplayErrorCode & 16) != 0) { + fontRendererObj.drawString(GT_Utility.trans("136", "Circuitry burned out."), 10, line_counter, 16448255); + line_counter += 8; + } + + if ((((GT_Container_MultiMachine) mContainer).mDisplayErrorCode & 32) != 0) { + fontRendererObj.drawString(GT_Utility.trans("137", "That doesn't belong there."), 10, line_counter, 16448255); + line_counter += 8; + } + + if ((((GT_Container_MultiMachine) mContainer).mDisplayErrorCode & 64) != 0) { + fontRendererObj.drawString(GT_Utility.trans("138", "Incomplete Structure."), 10, line_counter, 16448255); + line_counter += 8; + } if (((GT_Container_MultiMachine) mContainer).mDisplayErrorCode == 0) { if (((GT_Container_MultiMachine) mContainer).mActive == 0) { - fontRendererObj.drawString(GT_Utility.trans("139", "Hit with Soft Mallet"), 10, 16, 16448255); - fontRendererObj.drawString(GT_Utility.trans("140", "to (re-)start the Machine"), 10, 24, 16448255); - fontRendererObj.drawString(GT_Utility.trans("141", "if it doesn't start."), 10, 32, 16448255); + fontRendererObj.drawString(GT_Utility.trans("139", "Hit with Soft Mallet"), 10, line_counter, 16448255); + line_counter += 8; + fontRendererObj.drawString(GT_Utility.trans("140", "to (re-)start the Machine"), 10, line_counter, 16448255); + line_counter += 8; + fontRendererObj.drawString(GT_Utility.trans("141", "if it doesn't start."), 10, line_counter, 16448255); + line_counter += 8; } else { - fontRendererObj.drawString(GT_Utility.trans("142", "Running perfectly."), 10, 16, 16448255); + fontRendererObj.drawString(GT_Utility.trans("142", "Running perfectly."), 10, line_counter, 16448255); + line_counter += 8; } if (mContainer.mTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_DrillerBase) { ItemStack tItem = mContainer.mTileEntity.getMetaTileEntity().getStackInSlot(1); if (tItem == null || !GT_Utility.areStacksEqual(tItem, GT_ModHandler.getIC2Item("miningPipe", 1L))) { - fontRendererObj.drawString(GT_Utility.trans("143", "Missing Mining Pipe"), 10, ((GT_Container_MultiMachine) mContainer).mActive == 0 ? 40 : 24, 16448255); + fontRendererObj.drawString(GT_Utility.trans("143", "Missing Mining Pipe"), 10, line_counter, 16448255); } } else if (mContainer.mTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_LargeTurbine) { ItemStack tItem = mContainer.mTileEntity.getMetaTileEntity().getStackInSlot(1); if (tItem == null || !(tItem.getItem() == GT_MetaGenerated_Tool_01.INSTANCE && tItem.getItemDamage() >= 170 && tItem.getItemDamage() <= 177)) { - fontRendererObj.drawString(GT_Utility.trans("144", "Missing Turbine Rotor"), 10, ((GT_Container_MultiMachine) mContainer).mActive == 0 ? 40 : 24, 16448255); + fontRendererObj.drawString(GT_Utility.trans("144", "Missing Turbine Rotor"), 10, line_counter, 16448255); } } } diff --git a/src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java b/src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java index 7b8daddfd4..fb2f15f49a 100644 --- a/src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java +++ b/src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java @@ -25,6 +25,19 @@ public interface IGT_RecipeAdder { */ boolean addFusionReactorRecipe(FluidStack aInput1, FluidStack aInput2, FluidStack aOutput1, int aFusionDurationInTicks, int aFusionEnergyPerTick, int aEnergyNeededForStartingFusion); + /** + * Adds a Fusion Reactor Recipe + * + * @param FluidOutputArray : Array of input fluids. + * @param FluidOutputArray : Array of output fluids. + * @param aFusionDurationInTicks : How many ticks the Fusion lasts (must be > 0). + * @param aFusionEnergyPerTick : The EU generated per Tick (can even be negative!). + * @param aEnergyNeededForStartingFusion : EU needed for heating the Reactor up (must be >= 0). + * @return true if the Recipe got added, otherwise false. + */ + boolean addFusionReactorRecipe(FluidStack[] FluidInputArray, FluidStack[] FluidOutputArray, int aFusionDurationInTicks, int aFusionEnergyPerTick, int aEnergyNeededForStartingFusion); + + /** * Adds a Centrifuge Recipe * @@ -169,7 +182,7 @@ public interface IGT_RecipeAdder { /** * Adds a Chemical Recipe that only exists in the Large Chemical Reactor - * + * * @param aInputs item inputs * @param aFluidInputs fluid inputs * @param aFluidOutputs fluid outputs @@ -178,7 +191,7 @@ public interface IGT_RecipeAdder { * @param aEUtick must be > 0 *
aInputs and aFluidInputs must contain at least one valid input. *
aOutputs and aFluidOutputs must contain at least one valid output. - * + * */ boolean addMultiblockChemicalRecipe(ItemStack[] aInputs, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, ItemStack[] aOutputs, int aDuration, int aEUtick); @@ -214,15 +227,17 @@ public interface IGT_RecipeAdder { boolean addBlastRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aInput3, ItemStack aInput4, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4,int aDuration, int aEUt, int aLevel); /** - * Adds a Blast Furnace Recipe + * Adds a Plasma Forge Recipe * - * @param aInput1 must be != null if aInput2 == null - * @param aInput2 must be != null if aInput1 == null - * @param aCoalAmount must be > 0 - * @param aOutput1 must be != null if aOutput2 == null - * @param aOutput2 must be != null if aOutput1 == null - * @param aDuration must be > 0 + * @param ItemInputArray Array of input items. + * @param FluidInputArray Array of output items. + * @param OutputItemArray Array of input fluids. + * @param FluidOutputArray Array of output items. + * @param aDuration Must be > 0. Duration in ticks. + * @param aEUt Should be > 0. EU/t. + * @param coil_heat_level Should be > 0. Heat of the coils used. */ + boolean addPlasmaForgeRecipe(ItemStack[] ItemInputArray, FluidStack[] FluidInputArray, ItemStack[] OutputItemArray, FluidStack[] FluidOutputArray, int aDuration, int aEUt, int coil_heat_level); boolean addPrimitiveBlastRecipe(ItemStack aInput1, ItemStack aInput2, int aCoalAmount, ItemStack aOutput1, ItemStack aOutput2, int aDuration); @@ -274,12 +289,12 @@ public interface IGT_RecipeAdder { /** * Adds an Assembler Recipe - * + * * @param aInputs must be != null * @param aOutput1 must be != null * @param aDuration must be > 0 * @param aEUt should be > 0 - * + * */ boolean addAssemblerRecipe(ItemStack[] aInputs, FluidStack aFluidInput, ItemStack aOutput1, int aDuration, int aEUt); @@ -639,15 +654,28 @@ public interface IGT_RecipeAdder { boolean addMixerRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aInput3, ItemStack aInput4, ItemStack aInput5, ItemStack aInput6, ItemStack aInput7, ItemStack aInput8, ItemStack aInput9, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, int aDuration, int aEUt); /** - * Adds a Recipe for the Laser Engraver + * Adds a Recipe for the Laser Engraver. */ boolean addLaserEngraverRecipe(ItemStack aItemToEngrave, ItemStack aLens, ItemStack aEngravedItem, int aDuration, int aEUt); /** - * Adds a Recipe for the Laser Engraver + * Adds a Recipe for the Laser Engraver. */ boolean addLaserEngraverRecipe(ItemStack aItemToEngrave, ItemStack aLens, ItemStack aEngravedItem, int aDuration, int aEUt, boolean aCleanroom); + /** + * Adds a Generalised Laser Engraver Recipe. + * + * @param ItemInputArray Array of input items. + * @param FluidInputArray Array of output items. + * @param OutputItemArray Array of input fluids. + * @param FluidOutputArray Array of output items. + * @param aDuration Must be > 0. Duration in ticks. + * @param aEUt Should be > 0. EU/t. + * @param aCleanroom Boolean for usage of cleanroom in recipe. + */ + boolean addLaserEngraverRecipe(ItemStack[] ItemInputArray, FluidStack[] FluidInputArray, ItemStack[] OutputItemArray, FluidStack[] FluidOutputArray, int aDuration, int aEUt, boolean aCleanroom); + /** * Adds a Recipe for the Forming Press */ diff --git a/src/main/java/gregtech/api/util/GT_Recipe.java b/src/main/java/gregtech/api/util/GT_Recipe.java index 1e0954af3b..833059f195 100644 --- a/src/main/java/gregtech/api/util/GT_Recipe.java +++ b/src/main/java/gregtech/api/util/GT_Recipe.java @@ -769,7 +769,7 @@ public class GT_Recipe implements Comparable { public static final GT_Recipe_Map sPrinterRecipes = new GT_Recipe_Map_Printer(new HashSet<>(5), "gt.recipe.printer", "Printer", null, RES_PATH_GUI + "basicmachines/Printer", 1, 1, 1, 1, 1, E, 1, E, true, true); public static final GT_Recipe_Map sSifterRecipes = new GT_Recipe_Map(new HashSet<>(105), "gt.recipe.sifter", "Sifter", null, RES_PATH_GUI + "basicmachines/Sifter", 1, 9, 0, 0, 1, E, 1, E, true, true); public static final GT_Recipe_Map sPressRecipes = new GT_Recipe_Map_FormingPress(new HashSet<>(300), "gt.recipe.press", "Forming Press", null, RES_PATH_GUI + "basicmachines/Press", 2, 1, 2, 0, 1, E, 1, E, true, true); - public static final GT_Recipe_Map sLaserEngraverRecipes = new GT_Recipe_Map(new HashSet<>(810), "gt.recipe.laserengraver", "Precision Laser Engraver", null, RES_PATH_GUI + "basicmachines/LaserEngraver", 2, 1, 2, 0, 1, E, 1, E, true, true); + public static final GT_Recipe_Map sLaserEngraverRecipes = new GT_Recipe_Map(new HashSet<>(810), "gt.recipe.laserengraver", "Precision Laser Engraver", null, RES_PATH_GUI + "basicmachines/LaserEngraverNEI", 2, 1, 0, 0, 1, E, 1, E, true, true); public static final GT_Recipe_Map sMixerRecipes = new GT_Recipe_Map(new HashSet<>(900), "gt.recipe.mixer", "Mixer", null, RES_PATH_GUI + "basicmachines/Mixer6", 9, 4, 1, 0, 1, E, 1, E, true, true); public static final GT_Recipe_Map sAutoclaveRecipes = new GT_Recipe_Map(new HashSet<>(300), "gt.recipe.autoclave", "Autoclave", null, RES_PATH_GUI + "basicmachines/Autoclave4", 2, 4, 1, 1, 1, E, 1, E, true, true); public static final GT_Recipe_Map sElectroMagneticSeparatorRecipes = new GT_Recipe_Map(new HashSet<>(50), "gt.recipe.electromagneticseparator", "Electromagnetic Separator", null, RES_PATH_GUI + "basicmachines/ElectromagneticSeparator", 1, 3, 1, 0, 1, E, 1, E, true, true); @@ -786,9 +786,11 @@ public class GT_Recipe implements Comparable { public static final GT_Recipe_Map sBoxinatorRecipes = new GT_Recipe_Map(new HashSet<>(2500), "gt.recipe.packager", "Packager", null, RES_PATH_GUI + "basicmachines/Packager", 2, 1, 2, 0, 1, E, 1, E, true, true); public static final GT_Recipe_Map sUnboxinatorRecipes = new GT_Recipe_Map_Unboxinator(new HashSet<>(2500), "gt.recipe.unpackager", "Unpackager", null, RES_PATH_GUI + "basicmachines/Unpackager", 1, 2, 1, 0, 1, E, 1, E, true, true); public static final GT_Recipe_Map sFusionRecipes = new GT_Recipe_Map(new HashSet<>(50), "gt.recipe.fusionreactor", "Fusion Reactor", null, RES_PATH_GUI + "basicmachines/FusionReactor", 0, 0, 0, 2, 1, "Start: ", 1, " EU", true, true); + public static final GT_Recipe_Map sComplexFusionRecipes = new GT_Recipe_Map(new HashSet<>(50), "gt.recipe.complexfusionreactor", "Complex Fusion Reactor", null, RES_PATH_GUI + "basicmachines/ComplexFusionReactor", 3, 0, 0, 2, 1, "Start: ", 1, " EU", true, true); public static final GT_Recipe_Map sCentrifugeRecipes = new GT_Recipe_Map(new HashSet<>(1200), "gt.recipe.centrifuge", "Centrifuge", null, RES_PATH_GUI + "basicmachines/Centrifuge", 2, 6, 0, 0, 1, E, 1, E, true, true); public static final GT_Recipe_Map sElectrolyzerRecipes = new GT_Recipe_Map(new HashSet<>(300), "gt.recipe.electrolyzer", "Electrolyzer", null, RES_PATH_GUI + "basicmachines/Electrolyzer", 2, 6, 0, 0, 1, E, 1, E, true, true); public static final GT_Recipe_Map sBlastRecipes = new GT_Recipe_Map(new HashSet<>(800), "gt.recipe.blastfurnace", "Blast Furnace", null, RES_PATH_GUI + "basicmachines/Default", 4, 4, 1, 0, 1, "Heat Capacity: ", 1, " K", false, true); + public static final GT_Recipe_Map sPlasmaForgeRecipes = new GT_Recipe_Map(new HashSet<>(20), "gt.recipe.plasmaforge", "Dimensionally Transcendent Plasma Forge", null, RES_PATH_GUI + "basicmachines/PlasmaForge", 1, 1, 0, 0, 1, "Heat Capacity: ", 1, " K", false, true); public static final GT_Recipe_Map sPrimitiveBlastRecipes = new GT_Recipe_Map(new HashSet<>(200), "gt.recipe.primitiveblastfurnace", "Primitive Blast Furnace", null, RES_PATH_GUI + "basicmachines/Default", 3, 3, 1, 0, 1, E, 1, E, false, true); public static final GT_Recipe_Map sImplosionRecipes = new GT_Recipe_Map(new HashSet<>(900), "gt.recipe.implosioncompressor", "Implosion Compressor", null, RES_PATH_GUI + "basicmachines/Default", 2, 2, 2, 0, 1, E, 1, E, true, true); public static final GT_Recipe_Map sVacuumRecipes = new GT_Recipe_Map(new HashSet<>(305), "gt.recipe.vacuumfreezer", "Vacuum Freezer", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 0, 0, 1, E, 1, E, false, true); @@ -1143,6 +1145,9 @@ public class GT_Recipe implements Comparable { public boolean usesSpecialSlot() { return mUsesSpecialSlot; } + + public void addRecipe(Object o, FluidStack[] fluidInputArray, FluidStack[] fluidOutputArray) { + } } // ----------------------------------------------------------------------------------------------------------------- diff --git a/src/main/java/gregtech/common/GT_RecipeAdder.java b/src/main/java/gregtech/common/GT_RecipeAdder.java index 7b9905669b..38acb4ac92 100644 --- a/src/main/java/gregtech/common/GT_RecipeAdder.java +++ b/src/main/java/gregtech/common/GT_RecipeAdder.java @@ -51,6 +51,26 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return true; } + @Override + public boolean addFusionReactorRecipe(FluidStack[] FluidInputArray, FluidStack[] FluidOutputArray, int aFusionDurationInTicks, int aFusionEnergyPerTick, int aEnergyNeededForStartingFusion) { + if (FluidInputArray.length == 0) + return false; + + if (FluidOutputArray.length == 0) + return false; + + // If the recipe has more than 2 inputs or 2 outputs it is added to a different recipe map. + // This is so NEI can function properly and understand the recipe. Otherwise it gets cut off. + if ((FluidInputArray.length > 2) || (FluidInputArray.length > 2)) { + GT_Recipe.GT_Recipe_Map.sComplexFusionRecipes.addRecipe(null, FluidInputArray, FluidOutputArray, aFusionDurationInTicks, aFusionEnergyPerTick, aEnergyNeededForStartingFusion); + return true; + } + + GT_Recipe.GT_Recipe_Map.sFusionRecipes.addRecipe(null, FluidInputArray, FluidOutputArray, aFusionDurationInTicks, aFusionEnergyPerTick, aEnergyNeededForStartingFusion); + return true; + } + + @Override public boolean addCentrifugeRecipe(ItemStack aInput1, int aInput2, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, ItemStack aOutput5, ItemStack aOutput6, int aDuration) { return addCentrifugeRecipe(aInput1, aInput2 < 0 ? ItemList.IC2_Fuel_Can_Empty.get(-aInput2, new Object[0]) : aInput2 > 0 ? ItemList.Cell_Empty.get(aInput2, new Object[0]) : null, null, null, aOutput1, aOutput2, aOutput3, aOutput4, aOutput5, aOutput6, null, aDuration, 5); @@ -247,6 +267,13 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return true; } + @Override + public boolean addPlasmaForgeRecipe(ItemStack[] ItemInputArray, FluidStack[] FluidInputArray, ItemStack[] OutputItemArray, FluidStack[] FluidOutputArray, int aDuration, int aEUt, int coil_heat_level) { + GT_Recipe.GT_Recipe_Map.sPlasmaForgeRecipes.addRecipe(false, ItemInputArray, OutputItemArray, null, null, + FluidInputArray, FluidOutputArray, aDuration, aEUt, coil_heat_level); + return true; + } + @Override public boolean addPrimitiveBlastRecipe(ItemStack aInput1, ItemStack aInput2, int aCoalAmount, ItemStack aOutput1, ItemStack aOutput2, int aDuration) { if ((aInput1 == null && aInput2 == null) || (aOutput1 == null && aOutput2 == null)) { @@ -1223,6 +1250,14 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return true; } + + @Override + public boolean addLaserEngraverRecipe(ItemStack[] ItemInputArray, FluidStack[] FluidInputArray, ItemStack[] OutputItemArray, FluidStack[] FluidOutputArray, int aDuration, int aEUt, boolean aCleanroom) { + GT_Recipe.GT_Recipe_Map.sLaserEngraverRecipes.addRecipe(false, ItemInputArray, OutputItemArray, null, null, + FluidInputArray, FluidOutputArray, aDuration, aEUt, aCleanroom ? -200 : 0); + return true; + } + @Override public boolean addFormingPressRecipe(ItemStack aItemToImprint, ItemStack aForm, ItemStack aImprintedItem, int aDuration, int aEUt) { if ((aItemToImprint == null) || (aForm == null) || (aImprintedItem == null)) { diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings1.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings1.java index 2f8e248117..edbdacdfbd 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings1.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings1.java @@ -1,5 +1,6 @@ package gregtech.common.blocks; +import gregtech.api.GregTech_API; import gregtech.api.enums.ItemList; import gregtech.api.enums.Textures; import gregtech.api.render.TextureFactory; @@ -8,8 +9,10 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; +import static gregtech.api.enums.GT_Values.RES_PATH_BLOCK; + public class GT_Block_Casings1 extends GT_Block_Casings_Abstract { - + /** * Texture Index Information * Textures.BlockIcons.casingTexturePages[0][0-63] - Gregtech @@ -21,10 +24,10 @@ public class GT_Block_Casings1 extends GT_Block_Casings_Abstract { * Textures.BlockIcons.casingTexturePages[5][0-127] - Free * Textures.BlockIcons.casingTexturePages[6][0-127] - Free * Textures.BlockIcons.casingTexturePages[7][0-127] - Free - * Textures.BlockIcons.casingTexturePages[8][0-127] - TecTech + * Textures.BlockIcons.casingTexturePages[8][0-127] - TecTech */ - - + + public GT_Block_Casings1() { super(GT_Item_Casings1.class, "gt.blockcasings", GT_Material_Casings.INSTANCE); for (int i = 0; i < 16; i++) { @@ -43,9 +46,9 @@ public class GT_Block_Casings1 extends GT_Block_Casings_Abstract { GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".9.name", "UHV Machine Casing"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".10.name", "Bronze Plated Bricks"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".11.name", "Heat Proof Machine Casing"); - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".12.name", "Cupronickel Coil Block (Deprecated)"); - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".13.name", "Kanthal Coil Block (Deprecated)"); - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".14.name", "Nichrome Coil Block (Deprecated)"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".12.name", "Dimensionally Transcendent Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".13.name", "Dimensional Injection Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".14.name", "Dimensional Bridge"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".15.name", "Superconducting Coil Block"); ItemList.Casing_ULV.set(new ItemStack(this, 1, 0)); ItemList.Casing_LV.set(new ItemStack(this, 1, 1)); @@ -59,9 +62,9 @@ public class GT_Block_Casings1 extends GT_Block_Casings_Abstract { ItemList.Casing_MAX.set(new ItemStack(this, 1, 9)); ItemList.Casing_BronzePlatedBricks.set(new ItemStack(this, 1, 10)); ItemList.Casing_HeatProof.set(new ItemStack(this, 1, 11)); - ItemList.Casing_Coil_Cupronickel_Deprecated.set(new ItemStack(this, 1, 12)); - ItemList.Casing_Coil_Kanthal_Deprecated.set(new ItemStack(this, 1, 13)); - ItemList.Casing_Coil_Nichrome_Deprecated.set(new ItemStack(this, 1, 14)); + ItemList.Casing_Dim_Trans.set(new ItemStack(this, 1, 12)); + ItemList.Casing_Dim_Injector.set(new ItemStack(this, 1, 13)); + ItemList.Casing_Dim_Bridge.set(new ItemStack(this, 1, 14)); ItemList.Casing_Coil_Superconductor.set(new ItemStack(this, 1, 15)); } @@ -74,11 +77,11 @@ public class GT_Block_Casings1 extends GT_Block_Casings_Abstract { case 11: return Textures.BlockIcons.MACHINE_HEATPROOFCASING.getIcon(); case 12: - return Textures.BlockIcons.RENDERING_ERROR.getIcon(); + return Textures.BlockIcons.MACHINE_DIM_TRANS_CASING.getIcon(); case 13: - return Textures.BlockIcons.RENDERING_ERROR.getIcon(); + return Textures.BlockIcons.MACHINE_DIM_INJECTOR.getIcon(); case 14: - return Textures.BlockIcons.RENDERING_ERROR.getIcon(); + return Textures.BlockIcons.MACHINE_DIM_BRIDGE.getIcon(); case 15: return Textures.BlockIcons.MACHINE_COIL_SUPERCONDUCTOR.getIcon(); } diff --git a/src/main/java/gregtech/common/blocks/GT_Item_Casings1.java b/src/main/java/gregtech/common/blocks/GT_Item_Casings1.java index bcb50b2176..98b0c24c61 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Casings1.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Casings1.java @@ -13,14 +13,4 @@ public class GT_Item_Casings1 extends GT_Item_Casings_Abstract { public GT_Item_Casings1(Block par1) { super(par1); } - @Override - @SideOnly(Side.CLIENT) - public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) { - super.addInformation(aStack, aPlayer, aList, aF3_H); - int tMeta = getDamage(aStack); - if (tMeta >= 12 && tMeta <= 14) { - aList.add(EnumChatFormatting.ITALIC + this.mCoilOverheated1Tooltip); - aList.add(EnumChatFormatting.ITALIC + this.mCoilOverheated2Tooltip); - } - } } diff --git a/src/main/java/gregtech/common/blocks/GT_Item_Casings_Abstract.java b/src/main/java/gregtech/common/blocks/GT_Item_Casings_Abstract.java index 0468da20d8..6a4b6e0695 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Casings_Abstract.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Casings_Abstract.java @@ -21,8 +21,6 @@ public abstract class GT_Item_Casings_Abstract extends ItemBlock { protected final String mCoil07Tooltip = GT_LanguageManager.addStringLocalization("gt.coil07tooltip", "Base Heating Capacity = 9001 Kelvin"); protected final String mCoil08Tooltip = GT_LanguageManager.addStringLocalization("gt.coil08tooltip", "Base Heating Capacity = 9900 Kelvin"); protected final String mCoil09Tooltip = GT_LanguageManager.addStringLocalization("gt.coil09tooltip", "Base Heating Capacity = 10800 Kelvin"); - protected final String mCoilOverheated1Tooltip = GT_LanguageManager.addStringLocalization("gt.coil.overheated1.tooltip", "These coils are deprecated"); - protected final String mCoilOverheated2Tooltip = GT_LanguageManager.addStringLocalization("gt.coil.overheated2.tooltip", "Place in crafting grid to get regular coils"); protected final String mBlastProofTooltip = GT_LanguageManager.addStringLocalization("gt.blastprooftooltip", "This Block is Blast Proof"); public GT_Item_Casings_Abstract(Block par1) { diff --git a/src/main/java/gregtech/common/items/GT_FluidDisplayItem.java b/src/main/java/gregtech/common/items/GT_FluidDisplayItem.java index 92224646d8..55e10bd62e 100644 --- a/src/main/java/gregtech/common/items/GT_FluidDisplayItem.java +++ b/src/main/java/gregtech/common/items/GT_FluidDisplayItem.java @@ -52,9 +52,9 @@ public class GT_FluidDisplayItem extends GT_Generic_Item { if (aNBT != null) { long tToolTipAmount = aNBT.getLong("mFluidDisplayAmount"); if (tToolTipAmount > 0L) { - aList.add(EnumChatFormatting.BLUE + String.format(transItem("016", "Amount: %s L"), "" + tToolTipAmount) + EnumChatFormatting.GRAY); + aList.add(EnumChatFormatting.BLUE + "Amount: " + GT_Utility.formatNumbers(tToolTipAmount) + " L" + EnumChatFormatting.GRAY); } - aList.add(EnumChatFormatting.RED + String.format(transItem("017", "Temperature: %s K"), "" + aNBT.getLong("mFluidDisplayHeat")) + EnumChatFormatting.GRAY); + aList.add(EnumChatFormatting.RED + "Temperature: " + GT_Utility.formatNumbers(aNBT.getLong("mFluidDisplayHeat")) + " K" + EnumChatFormatting.GRAY); aList.add(EnumChatFormatting.GREEN + String.format(transItem("018", "State: %s"), aNBT.getBoolean("mFluidState") ? "Gas" : "Liquid") + EnumChatFormatting.GRAY); } } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java index 4c5ae32b79..f39174435c 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java @@ -288,8 +288,6 @@ public class GT_MetaTileEntity_ElectricBlastFurnace extends GT_MetaTileEntity_Ab public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { this.mHeatingCapacity = 0; - replaceDeprecatedCoils(aBaseMetaTileEntity); - setCoilLevel(HeatingCoilLevel.None); mPollutionOutputHatches.clear(); @@ -307,39 +305,6 @@ public class GT_MetaTileEntity_ElectricBlastFurnace extends GT_MetaTileEntity_Ab return true; } - private void replaceDeprecatedCoils(IGregTechTileEntity aBaseMetaTileEntity) { - int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX; - int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ; - int tX = aBaseMetaTileEntity.getXCoord() + xDir; - int tY = aBaseMetaTileEntity.getYCoord(); - int tZ = aBaseMetaTileEntity.getZCoord() + zDir; - int tUsedMeta; - for (int xPos = tX - 1; xPos <= tX + 1; xPos++) { - for (int zPos = tZ - 1; zPos <= tZ + 1; zPos++) { - if ((xPos == tX) && (zPos == tZ)) - continue; - for (int yPos = tY + 1; yPos <= tY + 2; yPos++) { - tUsedMeta = aBaseMetaTileEntity.getMetaID(xPos, yPos, zPos); - if (tUsedMeta < 12) - continue; - if (tUsedMeta > 14) - continue; - if (aBaseMetaTileEntity.getBlock(xPos, yPos, zPos) != GregTech_API.sBlockCasings1) - continue; - - aBaseMetaTileEntity.getWorld().setBlock( - xPos, - yPos, - zPos, - GregTech_API.sBlockCasings5, - tUsedMeta - 12, - 3 - ); - } - } - } - } - @Override public boolean addOutput(FluidStack aLiquid) { if (aLiquid == null) diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java index 02748d08c6..92c2db3472 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java @@ -278,7 +278,13 @@ public abstract class GT_MetaTileEntity_FusionComputer extends GT_MetaTileEntity } if (tFluidList.size() > 1) { FluidStack[] tFluids = tFluidList.toArray(new FluidStack[tFluidList.size()]); - GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sFusionRecipes.findRecipe(this.getBaseMetaTileEntity(), this.mLastRecipe, false, GT_Values.V[8], tFluids); + GT_Recipe tRecipe; + + if (tFluids.length <= 2) + tRecipe = GT_Recipe.GT_Recipe_Map.sFusionRecipes.findRecipe(this.getBaseMetaTileEntity(), this.mLastRecipe, false, GT_Values.V[8], tFluids); + else + tRecipe = GT_Recipe.GT_Recipe_Map.sComplexFusionRecipes.findRecipe(this.getBaseMetaTileEntity(), this.mLastRecipe, false, GT_Values.V[8], tFluids); + if ((tRecipe == null && !mRunningOnLoad) || (maxEUStore() < tRecipe.mSpecialValue)) { turnCasingActive(false); this.mLastRecipe = null; diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PlasmaForge.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PlasmaForge.java new file mode 100644 index 0000000000..34c38537a9 --- /dev/null +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PlasmaForge.java @@ -0,0 +1,326 @@ +package gregtech.common.tileentities.machines.multi; + +import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable; +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; +import gregtech.api.GregTech_API; +import gregtech.api.enums.HeatingCoilLevel; +import gregtech.api.gui.GT_GUIContainer_MultiMachine; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy; +import gregtech.api.objects.GT_ChunkManager; +import gregtech.api.render.TextureFactory; +import gregtech.api.util.GT_Multiblock_Tooltip_Builder; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.StatCollector; +import net.minecraft.world.ChunkCoordIntPair; +import net.minecraftforge.fluids.FluidStack; + + +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static gregtech.api.enums.GT_Values.V; +import static gregtech.api.enums.GT_Values.VN; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_GLOW; +import static gregtech.api.enums.Textures.BlockIcons.casingTexturePages; +import static gregtech.api.util.GT_StructureUtility.ofCoil; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; + + + +public class GT_MetaTileEntity_PlasmaForge extends GT_MetaTileEntity_AbstractMultiFurnace implements IConstructable { + private int mHeatingCapacity = 0; + + protected static final int NULL_CASING = 12; + protected static final int USEFUL_CASING = 13; + protected static final int DIM_CASING = 14; + + private boolean isMultiChunkloaded = true; + + protected static final String STRUCTURE_PIECE_MAIN = "main"; + private static final IStructureDefinition STRUCTURE_DEFINITION = StructureDefinition.builder() + .addShape(STRUCTURE_PIECE_MAIN, new String[][] { + {" ", " N N N N ", " N N N N ", " N N N N ", " ", " ", " ", " N N N N ", " N N N N ", " NNN NNN N N NNN NNN ", " ", " ", " ", " NNN NNN NNN NNN ", " ", " ", " ", " ", " ", " NNN NNN NNN NNN ", " ", " ", " ", " NNN NNN NNN NNN "}, + {" N N N N ", " bCCCb bCCCb ", " bCCCb bCCCb ", " bCCCb bCCCb ", " N N N N ", " ", " N N N N ", " bCCCb bCCCb ", " bCCCb bCCCb ", "NbbbN NbbNCCCb bCCCNbbN NbbbN", " CCC CCC N N CCC CCC ", " CCC CCC CCC CCC ", " CCC CCC CCC CCC ", "NbbbN NbbbN NbbbN NbbbN", " N N N N ", " N N N N ", " ", " N N N N ", " N N N N ", "NbbbN NbbbN NbbbN NbbbN", " CCC CCC CCC CCC ", " CCC CCC CCC CCC ", " CCC CCC CCC CCC ", "NbbbN NbbbN N N NbbbN NbbbN",}, + {" N N N N ", " bCCCb bCCCb ", " NNNbbbbbNNsNNbbbbbNNN ", " ss bCCCb bCCCb ss ", " s N N N N s ", " s s ", " N N N N N N ", " N bCCCb bCCCb N ", " N sbbbbbNNsNNbbbbbs N ", "NbbbN NbbNCCCb bCCCNbbN NbbbN", " CbC CbC N N CbC CbC ", " CbC CbC CbC CbC ", " CbC CbC CbC CbC ", "NbbbN NbbbN NbbbN NbbbN", " NNN NNN NNN NNN ", " NNN NNN NNN NNN ", " s s s s ", " NNN NNN NNN NNN ", " NNN NNN NNN NNN ", "NbbbN NbbbN NbbbN NbbbN", " CbC CbC CbC CbC ", " CbC CbC CbC CbC ", " CbC CbC CbC CbC ", "NbbbN NbbbNNNNNsNsNNNNNbbbN NbbbN",}, + {" N N N N ", " bCCCb bCCCb ", " ss bCCCb bCCCb ss ", " bCCCb bCCCb ", " s NCCCN NCCCN s ", " s NCCCN NCCCN s ", " NCCCN NCCCN ", " bCCCb bCCCb ", " bCCCb bCCCb ", "NbbbNNNbbNCCCb bCCCNbbNNNbbbN", " CCCCCCCCC N N CCCCCCCCC ", " CCCCCCCCC CCCCCCCCC ", " CCCCCCCCC CCCCCCCCC ", "NbbbNNNbbbN NbbbNNNbbbN", " N N N N ", " N N N N ", " ", " N N N N ", " N N N N ", "NbbbNNNbbbN NbbbNNNbbbN", " CCCCCCCCC CCCCCCCCC ", " CCCCCCCCC CCCCCCCCC ", " CCCCCCCCC CCCCCCCCC ", "NbbbNNNbbbN NbN NbbbNNNbbbN",}, + {" ", " N N N N ", " s N N N N s ", " s NCCCN NCCCN s ", " ", " ", " ", " NCCCN NCCCN ", " N N N N ", " NNN NN N N NN NNN ", " C C C C ", " C C C C ", " C C C C ", " NNN NNN NNN NNN ", " ", " ", " ", " ", " ", " NNN NNN NNN NNN ", " C C C C ", " C C C C ", " C C C C ", " NNN NNN NbN NNN NNN ",}, + {" ", " ", " s s ", " s NCCCN NCCCN s ", " ", " ", " ", " NCCCN NCCCN ", " ", " N N N N ", " C C C C ", " C C C C ", " C C C C ", " N N N N ", " ", " ", " ", " ", " ", " N N N N ", " C C C C ", " C C C C ", " C C C C ", " N N N