From 233181e78afc26be0a60acee88f601198a70be00 Mon Sep 17 00:00:00 2001 From: GlodBlock <1356392126@qq.com> Date: Sun, 14 Nov 2021 00:52:31 +0800 Subject: structurelib interation --- src/Java/gtPlusPlus/GTplusplus.java | 4 +- .../gtPlusPlus/core/handler/COMPAT_HANDLER.java | 22 +- .../gtPlusPlus/core/recipe/RECIPES_GREGTECH.java | 8 +- .../gtPlusPlus/core/recipe/RECIPES_Machines.java | 32 +- .../xmod/gregtech/api/enums/GregtechItemList.java | 38 +- .../gregtech/api/gui/CONTAINER_TreeFarmer.java | 3 +- .../xmod/gregtech/api/gui/GUI_TreeFarmer.java | 2 + .../GT_MetaTileEntity_Hatch_Turbine.java | 3 +- .../base/GregtechMeta_MultiBlockBase.java | 211 +++--- .../common/blocks/GregtechMetaCasingBlocks4.java | 7 +- .../blocks/GregtechMetaTieredCasingBlocks1.java | 1 - .../turbine/LargeTurbineTextureHandler.java | 20 +- .../machines/multi/misc/GMTE_AmazonPackager.java | 143 ++-- .../multi/misc/GregtechMTE_TeslaTower.java | 22 +- ...gtechMetaTileEntity_IndustrialAlloySmelter.java | 233 ++++--- ...regtechMetaTileEntity_IndustrialArcFurnace.java | 327 ++++----- ...regtechMetaTileEntity_IndustrialCentrifuge.java | 157 +++-- .../GregtechMetaTileEntity_IndustrialCokeOven.java | 215 +++--- ...echMetaTileEntity_IndustrialCuttingMachine.java | 186 ++--- ...regtechMetaTileEntity_IndustrialDehydrator.java | 210 +++--- ...gtechMetaTileEntity_IndustrialElectrolyzer.java | 190 ++--- .../GregtechMetaTileEntity_IndustrialExtruder.java | 214 +++--- ...GregtechMetaTileEntity_IndustrialMacerator.java | 229 +++--- .../GregtechMetaTileEntity_IndustrialMixer.java | 189 ++--- ...gtechMetaTileEntity_IndustrialMultiMachine.java | 178 +++-- ...regtechMetaTileEntity_IndustrialPlatePress.java | 151 ++-- .../GregtechMetaTileEntity_IndustrialSifter.java | 237 +++---- .../GregtechMetaTileEntity_IndustrialSinter.java | 2 + ...MetaTileEntity_IndustrialThermalCentrifuge.java | 188 +++-- ...techMetaTileEntity_IndustrialVacuumFreezer.java | 164 +++-- ...GregtechMetaTileEntity_IndustrialWashPlant.java | 250 +++---- .../GregtechMetaTileEntity_IndustrialWireMill.java | 188 ++--- .../processing/GregtechMetaTileEntity_IsaMill.java | 218 +++--- .../GregtechMetaTileEntity_Adv_AssemblyLine.java | 14 +- ...egtechMetaTileEntity_Adv_DistillationTower.java | 309 ++++----- .../advanced/GregtechMetaTileEntity_Adv_EBF.java | 281 ++++---- .../GregtechMetaTileEntity_Adv_Fusion_MK4.java | 266 +------ .../GregtechMetaTileEntity_Adv_Implosion.java | 145 ++-- .../GregtechMetaTileEntity_SteamMacerator.java | 142 ++-- .../multi/production/GT4Entity_AutoCrafter.java | 154 +++-- .../multi/production/GT4Entity_ThermalBoiler.java | 152 ++-- .../GregtechMTE_ElementalDuplicator.java | 8 +- .../production/GregtechMTE_FastNeutronReactor.java | 2 + .../production/GregtechMTE_FrothFlotationCell.java | 244 +++---- .../production/GregtechMTE_LargeNaqReactor.java | 3 +- .../production/GregtechMTE_MiniFusionPlant.java | 2 + .../production/GregtechMTE_NuclearReactor.java | 15 +- .../GregtechMetaTileEntityGeneratorArray.java | 14 +- .../production/GregtechMetaTileEntityTreeFarm.java | 15 +- .../GregtechMetaTileEntity_AlloyBlastSmelter.java | 194 +++--- .../GregtechMetaTileEntity_Cyclotron.java | 306 ++++---- ...egtechMetaTileEntity_IndustrialFishingPond.java | 238 +++---- .../GregtechMetaTileEntity_LargeRocketEngine.java | 357 +++++----- ...techMetaTileEntity_LargeSemifluidGenerator.java | 219 +++--- .../GregtechMetaTileEntity_MassFabricator.java | 217 +++--- .../GregtechMetaTileEntity_Refinery.java | 3 +- .../GregtechMetaTileEntity_SolarTower.java | 2 + .../algae/GregtechMTE_AlgaePondBase.java | 259 ++++--- ...gtechMetaTileEntity_BedrockMiningPlatform1.java | 3 +- ...gtechMetaTileEntity_BedrockMiningPlatform2.java | 3 +- .../chemplant/GregtechMTE_ChemicalPlant.java | 770 ++++++++------------- .../turbines/GT_MTE_LargeTurbine_SHSteam.java | 2 + .../turbines/GT_MTE_LargeTurbine_Steam.java | 2 + .../GregtechMetaTileEntity_LargerTurbineBase.java | 38 +- .../storage/GregtechMetaTileEntity_MultiTank.java | 35 +- ...chMetaTileEntity_PowerSubStationController.java | 355 +++++----- .../tileentities/misc/TileEntitySolarHeater.java | 2 + .../gregtech/GregtechBedrockPlatforms.java | 4 +- .../GregtechFactoryGradeReplacementMultis.java | 6 +- .../GregtechIndustrialElementDuplicator.java | 2 + .../gregtech/GregtechIndustrialFuelRefinery.java | 3 +- .../gregtech/GregtechIndustrialGeneratorArray.java | 3 +- .../gregtech/GregtechIndustrialMultiTank.java | 2 + .../gregtech/GregtechIndustrialTreeFarm.java | 3 +- .../registration/gregtech/GregtechLFTR.java | 2 + .../GregtechLargeTurbinesAndHeatExchanger.java | 7 +- .../gregtech/GregtechMiniRaFusion.java | 2 + .../registration/gregtech/GregtechNaqReactor.java | 2 + .../registration/gregtech/GregtechSolarTower.java | 3 +- .../registration/gregtech/GregtechTeslaTower.java | 4 +- 80 files changed, 4559 insertions(+), 4497 deletions(-) (limited to 'src/Java') diff --git a/src/Java/gtPlusPlus/GTplusplus.java b/src/Java/gtPlusPlus/GTplusplus.java index 405dbea790..eb51c0332e 100644 --- a/src/Java/gtPlusPlus/GTplusplus.java +++ b/src/Java/gtPlusPlus/GTplusplus.java @@ -42,7 +42,6 @@ import gtPlusPlus.core.util.data.LocaleUtils; import gtPlusPlus.core.util.minecraft.HazmatUtils; import gtPlusPlus.core.util.minecraft.ItemUtils; import gtPlusPlus.core.util.reflect.ReflectionUtils; -import gtPlusPlus.core.util.sys.SystemUtils; import gtPlusPlus.nei.NEI_IMC_Sender; import gtPlusPlus.plugin.manager.Core_Manager; import gtPlusPlus.xmod.gregtech.common.Meta_GT_Proxy; @@ -52,7 +51,6 @@ import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.ch import gtPlusPlus.xmod.gregtech.loaders.GT_Material_Loader; import gtPlusPlus.xmod.gregtech.loaders.RecipeGen_BlastSmelterGT_GTNH; import gtPlusPlus.xmod.gregtech.loaders.RecipeGen_MultisUsingFluidInsteadOfCells; -import gtPlusPlus.xmod.gregtech.registration.gregtech.GregtechMiniRaFusion; import gtPlusPlus.xmod.thaumcraft.commands.CommandDumpAspects; import net.minecraft.launchwrapper.Launch; import net.minecraft.util.IIcon; @@ -319,7 +317,7 @@ public class GTplusplus implements ActionListener { RecipeGen_BlastSmelterGT_GTNH.generateGTNHBlastSmelterRecipesFromEBFList(); FishPondFakeRecipe.generateFishPondRecipes(); - GregtechMiniRaFusion.generateSlowFusionrecipes(); + //GregtechMiniRaFusion.generateSlowFusionrecipes(); SemiFluidFuelHandler.generateFuels(); GregtechMTE_ChemicalPlant.generateRecipes(); diff --git a/src/Java/gtPlusPlus/core/handler/COMPAT_HANDLER.java b/src/Java/gtPlusPlus/core/handler/COMPAT_HANDLER.java index bbc0e44d7e..628127e711 100644 --- a/src/Java/gtPlusPlus/core/handler/COMPAT_HANDLER.java +++ b/src/Java/gtPlusPlus/core/handler/COMPAT_HANDLER.java @@ -93,7 +93,7 @@ public class COMPAT_HANDLER { new RECIPES_Extruder(); GregtechGeneratorsULV.run(); GregtechEnergyBuffer.run(); - GregtechLFTR.run(); + //GregtechLFTR.run(); GregtechSteamCondenser.run(); GregtechSafeBlock.run(); //GregtechSuperConductionPoint.run(); @@ -113,12 +113,12 @@ public class COMPAT_HANDLER { GregtechAdvancedBoilers.run(); GregtechPollutionDevices.run(); GregtechTieredFluidTanks.run(); - GregtechIndustrialMultiTank.run(); + //GregtechIndustrialMultiTank.run(); GregtechGeothermalThermalGenerator.run(); Gregtech4Content.run(); - GregtechIndustrialFuelRefinery.run(); + //GregtechIndustrialFuelRefinery.run(); GregtechTreeFarmerTE.run(); - GregtechIndustrialTreeFarm.run(); + //GregtechIndustrialTreeFarm.run(); GregtechIndustrialSifter.run(); GregtechSimpleWasher.run(); GregtechRTG.run(); @@ -129,17 +129,17 @@ public class COMPAT_HANDLER { GregtechSemiFluidgenerators.run(); GregtechAdvancedMixer.run(); GregtechWirelessChargers.run(); - GregtechIndustrialGeneratorArray.run(); + //GregtechIndustrialGeneratorArray.run(); GregtechIndustrialCuttingFactory.run(); - GregtechMiniRaFusion.run(); + //GregtechMiniRaFusion.run(); GregtechComponentAssembler.run(); - GregtechTeslaTower.run(); + //GregtechTeslaTower.run(); GregtechSuperChests.run(); GregtechIndustrialFishPond.run(); GregtechTieredChunkloaders.run(); GregtechIndustrialExtruder.run(); GregtechIndustrialMultiMachine.run(); - GregtechBedrockPlatforms.run(); + //GregtechBedrockPlatforms.run(); GregtechBufferDynamos.run(); GregtechAmazonWarehouse.run(); GregtechFactoryGradeReplacementMultis.run(); @@ -147,9 +147,9 @@ public class COMPAT_HANDLER { GregtechThreadedBuffers.run(); GregtechIndustrialMixer.run(); GregtechCustomHatches.run(); - GregtechNaqReactor.run(); + //GregtechNaqReactor.run(); GregtechIndustrialArcFurnace.run(); - GregtechSolarTower.run(); + //GregtechSolarTower.run(); GregtechLargeTurbinesAndHeatExchanger.run(); GregtechPowerBreakers.run(); GregtechFluidReactor.run(); @@ -157,7 +157,7 @@ public class COMPAT_HANDLER { GregtechIndustrialAlloySmelter.run(); GregtechIsaMill.run(); GregtechSteamMultis.run(); - GregtechIndustrialElementDuplicator.run(); + //GregtechIndustrialElementDuplicator.run(); //New Horizons Content NewHorizonsAccelerator.run(); diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java index f361fc8025..7410a507c4 100644 --- a/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java +++ b/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java @@ -511,7 +511,7 @@ public class RECIPES_GREGTECH { (int) MaterialUtils.getVoltageForTier(6)); //Slow Fusion Controller - CORE.RA.addAssemblylineRecipe( + /*CORE.RA.addAssemblylineRecipe( GregtechItemList.COMET_Cyclotron.get(1), 20 * 60 * 30, new ItemStack[] { @@ -536,11 +536,11 @@ public class RECIPES_GREGTECH { }, GregtechItemList.Miniature_Fusion.get(1), 20 * 60 * 5 * (GTNH ? 2 : 1), - (int) MaterialUtils.getVoltageForTier(7)); + (int) MaterialUtils.getVoltageForTier(7));*/ //Plasma Tank - CORE.RA.addAssemblylineRecipe( + /*CORE.RA.addAssemblylineRecipe( ItemUtils.getOrePrefixStack(OrePrefixes.pipeMedium, Materials.Superconductor, 1), 20 * 60 * 5, new ItemStack[] { @@ -559,7 +559,7 @@ public class RECIPES_GREGTECH { }, GregtechItemList.Plasma_Tank.get(1), 20 * 60 * 1 * (GTNH ? 2 : 1), - (int) MaterialUtils.getVoltageForTier(5)); + (int) MaterialUtils.getVoltageForTier(5));*/ // Turbine Automation Port CORE.RA.addAssemblylineRecipe( diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java index 0b0bf56a1c..e9c23f9f7d 100644 --- a/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java +++ b/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java @@ -95,7 +95,7 @@ public class RECIPES_Machines { public static ItemStack RECIPE_ThermalBoilerCasing; //Thorium Reactor - public static ItemStack RECIPE_LFTRController; + /*public static ItemStack RECIPE_LFTRController;*/ public static ItemStack RECIPE_LFTROuterCasing; public static ItemStack RECIPE_LFTRInnerCasing; @@ -975,7 +975,7 @@ public class RECIPES_Machines { if (CORE.ConfigSwitches.enableMultiblock_MultiTank){ //Industrial Multi Tank - RECIPE_IndustrialMultiTankController = GregtechItemList.Industrial_MultiTank.get(1); + //RECIPE_IndustrialMultiTankController = GregtechItemList.Industrial_MultiTank.get(1); RECIPE_IndustrialMultiTankFrame = GregtechItemList.Casing_MultitankExterior.get(Casing_Amount); //Industrial Multi Tank Casing @@ -1116,22 +1116,22 @@ public class RECIPES_Machines { if (CORE.ConfigSwitches.enableMultiblock_TreeFarmer){ //Industrial Tree Farmer - RECIPE_TreeFarmController = GregtechItemList.Industrial_TreeFarm.get(1); + /*RECIPE_TreeFarmController = GregtechItemList.Industrial_TreeFarm.get(1);*/ RECIPE_TreeFarmFrame = GregtechItemList.Casing_PLACEHOLDER_TreeFarmer.get(Casing_Amount); //Industrial Tree Farm Controller if (!GTNH) { - RecipeUtils.addShapedGregtechRecipe( + /*RecipeUtils.addShapedGregtechRecipe( "plateEglinSteel", "rotorEglinSteel", "plateEglinSteel", "cableGt02Steel", "pipeMediumSteel", "cableGt02Steel", "plateEglinSteel", CI.machineCasing_MV, "plateEglinSteel", - RECIPE_TreeFarmController); + RECIPE_TreeFarmController);*/ } else { - RecipeUtils.addShapedGregtechRecipe( + /*RecipeUtils.addShapedGregtechRecipe( "plateEglinSteel", "rotorEglinSteel", "plateEglinSteel", "cableGt02Silver", "pipeMediumStainlessSteel", "cableGt02Silver", "plateEglinSteel", CI.machineCasing_HV, "plateEglinSteel", - RECIPE_TreeFarmController); + RECIPE_TreeFarmController);*/ } //Industrial Tree Farm Frame RecipeUtils.addShapedGregtechRecipe( @@ -1374,23 +1374,23 @@ public class RECIPES_Machines { if (CORE.ConfigSwitches.enableMultiblock_LiquidFluorideThoriumReactor){ //Thorium Reactor - RECIPE_LFTRController = GregtechItemList.ThoriumReactor.get(1); + /*RECIPE_LFTRController = GregtechItemList.ThoriumReactor.get(1);*/ RECIPE_LFTRInnerCasing = GregtechItemList.Casing_Reactor_II.get(1); //Zeron RECIPE_LFTROuterCasing = GregtechItemList.Casing_Reactor_I.get(1); //Hastelloy ItemStack controlCircuit = ItemUtils.getSimpleStack(ModItems.itemCircuitLFTR); if(!GTNH) { - RecipeUtils.addShapedGregtechRecipe( + /*RecipeUtils.addShapedGregtechRecipe( controlCircuit, "cableGt12NaquadahAlloy", controlCircuit, "plateDoubleHastelloyN", GregtechItemList.Gregtech_Computer_Cube.get(1), "plateDoubleHastelloyN", "plateThorium232", CI.machineHull_UV, "plateThorium232", - RECIPE_LFTRController); + RECIPE_LFTRController);*/ } else { - RecipeUtils.addShapedGregtechRecipe( + /*RecipeUtils.addShapedGregtechRecipe( controlCircuit, "cableGt12NaquadahAlloy", controlCircuit, "plateDoubleHastelloyN", GregtechItemList.Gregtech_Computer_Cube.get(1), "plateDoubleHastelloyN", "plateThorium232", CI.machineHull_LuV, "plateThorium232", - RECIPE_LFTRController); + RECIPE_LFTRController);*/ } RecipeUtils.addShapedGregtechRecipe( "plateDoubleZeron100", CI.craftingToolScrewdriver, "plateDoubleZeron100", @@ -1411,11 +1411,11 @@ public class RECIPES_Machines { //Fission Fuel Plant - RecipeUtils.addShapedGregtechRecipe( + /*RecipeUtils.addShapedGregtechRecipe( CI.getTieredCircuit(5), CI.craftingToolSolderingIron, CI.getTieredCircuit(5), "plateDenseTungstenSteel", GregtechItemList.Gregtech_Computer_Cube.get(1), "plateDenseTungstenSteel", "gearGtStellite", CI.machineHull_LuV, "gearGtStellite", - GregtechItemList.Industrial_FuelRefinery.get(1)); + GregtechItemList.Industrial_FuelRefinery.get(1));*/ ItemStack mInnerTank; @@ -1875,7 +1875,7 @@ public class RECIPES_Machines { ItemStack aDrillController = ItemUtils.getValueOfItemList("OreDrill4", ItemList.Hull_UV).get(1); //Drilling Platform - CORE.RA.addSixSlotAssemblingRecipe( + /*CORE.RA.addSixSlotAssemblingRecipe( new ItemStack[] { aDrillController, ItemUtils.getItemStackOfAmountFromOreDict("frameGtTriniumNaquadahCarbonite", 3), @@ -1886,7 +1886,7 @@ public class RECIPES_Machines { ALLOY.LAFIUM.getFluid(144 * 8 * (GTNH ? 2 : 1)), GregtechItemList.BedrockMiner_MKI.get(1), (int) GT_Values.V[5], - (int) GT_Values.V[7]); + (int) GT_Values.V[7]);*/ //Drilling Platform Casings CORE.RA.addSixSlotAssemblingRecipe( diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java index 9e62d05df2..8066c82862 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java @@ -227,18 +227,18 @@ public enum GregtechItemList implements GregtechItemContainer { //LFTR - ThoriumReactor, + /*ThoriumReactor,*/ Casing_Reactor_I, Casing_Reactor_II, //Multitank - Industrial_MultiTank, + /*Industrial_MultiTank,*/ Industrial_MultiTankDense, Casing_MultitankExterior, //Fission Fuel Refinery - Industrial_FuelRefinery, + /*Industrial_FuelRefinery,*/ Casing_Refinery_External, Casing_Refinery_Structural, Casing_Refinery_Internal, @@ -266,7 +266,7 @@ public enum GregtechItemList implements GregtechItemContainer { //Tree Farm - Industrial_TreeFarm, + /*Industrial_TreeFarm, */ TreeFarmer_Structural, Casing_PLACEHOLDER_TreeFarmer, @@ -292,7 +292,7 @@ public enum GregtechItemList implements GregtechItemContainer { //Generator Array - Generator_Array_Controller, + /*Generator_Array_Controller, */ //Cutting Factory Controller @@ -301,7 +301,7 @@ public enum GregtechItemList implements GregtechItemContainer { //Tesla Tower - TelsaTower, + /*TelsaTower,*/ Casing_TeslaTower, @@ -316,9 +316,9 @@ public enum GregtechItemList implements GregtechItemContainer { //Bedrock Mining Platforms - BedrockMiner_MKI, - BedrockMiner_MKII, - BedrockMiner_MKIII, + /*BedrockMiner_MKI, */ + /*BedrockMiner_MKII, */ + /*BedrockMiner_MKIII, */ Casing_BedrockMiner, @@ -334,7 +334,7 @@ public enum GregtechItemList implements GregtechItemContainer { Machine_Adv_DistillationTower, //Advanced Assembly Line - Machine_Adv_AssemblyLine, + /*Machine_Adv_AssemblyLine,*/ //Advanced Vacuum Freezer Industrial_Cryogenic_Freezer, @@ -355,7 +355,7 @@ public enum GregtechItemList implements GregtechItemContainer { Casing_Naq_Reactor_A, Casing_Naq_Reactor_B, Casing_Naq_Reactor_C, - Controller_Naq_Reactor, + /*Controller_Naq_Reactor, */ Casing_Containment, //Arc Furnace @@ -363,13 +363,13 @@ public enum GregtechItemList implements GregtechItemContainer { Casing_Industrial_Arc_Furnace, //Solar Tower - Industrial_Solar_Tower, + /*Industrial_Solar_Tower,*/ Casing_SolarTower_Structural, Casing_SolarTower_SaltContainment, Casing_SolarTower_HeatContainment, //Larger Turbines - Large_Steam_Turbine, Large_HPSteam_Turbine, + /*Large_Steam_Turbine, Large_HPSteam_Turbine, */ Casing_Turbine_Shaft, Casing_Turbine_LP, Casing_Turbine_HP, Casing_Turbine_Gas, Casing_Turbine_Plasma, @@ -398,7 +398,7 @@ public enum GregtechItemList implements GregtechItemContainer { Controller_Flotation_Cell, // Elemental Duplicator - Controller_ElementalDuplicator, + /*Controller_ElementalDuplicator,*/ Casing_ElementalDuplicator, // Big Steam Macerator @@ -427,7 +427,7 @@ public enum GregtechItemList implements GregtechItemContainer { Hatch_Air_Intake, //XL Turbine Rotor Hatch - Hatch_Turbine_Rotor, + /*Hatch_Turbine_Rotor,*/ //Standard Turbine Rotor Hatch Hatch_Input_TurbineHousing, @@ -452,7 +452,7 @@ public enum GregtechItemList implements GregtechItemContainer { Hatch_Output_Bus_Steam, //Elemental Duplicator Data Orb Bus - Hatch_Input_Elemental_Duplicator, + /*Hatch_Input_Elemental_Duplicator,*/ //RTG Hatch Hatch_RTG_LV, @@ -556,7 +556,7 @@ public enum GregtechItemList implements GregtechItemContainer { SimpleDustWasher_UV, //Solar Tower Reflector - Solar_Tower_Reflector, + /*Solar_Tower_Reflector,*/ //Super Tier Chests Super_Chest_LV, Super_Chest_MV, Super_Chest_HV, Super_Chest_EV, Super_Chest_IV, @@ -572,7 +572,7 @@ public enum GregtechItemList implements GregtechItemContainer { //Tiny Fusion - Miniature_Fusion, + /*Miniature_Fusion, */ //Component Makers @@ -696,7 +696,7 @@ public enum GregtechItemList implements GregtechItemContainer { RTG, //Plasma Tank - Plasma_Tank, + /*Plasma_Tank,*/ //---------------------------------------------------------------------------- diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_TreeFarmer.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_TreeFarmer.java index e7776fca46..0a8624354b 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_TreeFarmer.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_TreeFarmer.java @@ -1,3 +1,4 @@ +/* package gtPlusPlus.xmod.gregtech.api.gui; import java.util.List; @@ -67,4 +68,4 @@ public class CONTAINER_TreeFarmer extends GT_ContainerMetaTile_Machine { } } -} \ No newline at end of file +}*/ diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_TreeFarmer.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_TreeFarmer.java index d00a30673f..762dcbf640 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_TreeFarmer.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_TreeFarmer.java @@ -1,3 +1,4 @@ +/* package gtPlusPlus.xmod.gregtech.api.gui; @@ -43,3 +44,4 @@ public class GUI_TreeFarmer extends GT_GUIContainerMetaTile_Machine { this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); } } +*/ diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Turbine.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Turbine.java index bead570558..a9cd179214 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Turbine.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Turbine.java @@ -1,3 +1,4 @@ +/* package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations; import gregtech.api.GregTech_API; @@ -312,4 +313,4 @@ public class GT_MetaTileEntity_Hatch_Turbine extends GT_MetaTileEntity_Hatch { -} \ No newline at end of file +}*/ diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java index e4a6907335..19b98be9d3 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java @@ -1,5 +1,7 @@ package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base; +import com.gtnewhorizon.structurelib.StructureLibAPI; +import com.gtnewhorizon.structurelib.structure.IStructureElement; import gregtech.api.GregTech_API; import gregtech.api.enums.GT_Values; import gregtech.api.enums.Materials; @@ -55,10 +57,13 @@ import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.*; import java.util.concurrent.TimeUnit; +import java.util.function.BiConsumer; +import java.util.function.BiPredicate; +import java.util.function.Function; import static gtPlusPlus.core.util.data.ArrayUtils.removeNulls; -public abstract class GregtechMeta_MultiBlockBase extends GT_MetaTileEntity_MultiBlockBase { +public abstract class GregtechMeta_MultiBlockBase> extends GT_MetaTileEntity_EnhancedMultiBlockBase { public static final boolean DEBUG_DISABLE_CORES_TEMPORARILY = true; @@ -302,108 +307,6 @@ public abstract class GregtechMeta_MultiBlockBase extends GT_MetaTileEntity_Mult public final static String TAG_HIDE_POLLUTION = "TAG_HIDE_POLLUTION"; public final static String TAG_HIDE_MACHINE_TYPE = "TAG_HIDE_MACHINE_TYPE"; - @Override - public final String[] getDescription() { - /*if (aCachedToolTip != null) { - boolean uuuu = false; - for (String s : aCachedToolTip) { - if (s.toLowerCase().contains(".")) { - uuuu = true; - break; - } - } - if (!uuuu) { - return aCachedToolTip; - } - else { - aCachedToolTip = null; - } - }*/ - - String aRequiresMuffler = "1x Muffler Hatch"; - //String aRequiresCoreModule = "1x Core Module"; - String aRequiresMaint = "1x Maintenance Hatch"; - - String[] x = getTooltip(); - - //Filter List, toggle switches, rebuild map without flags - boolean showHatches = true; - boolean showMachineType = true; - boolean showMaint = true; - boolean showPollution = getPollutionPerTick(null) > 0; - AutoMap aTempMap = new AutoMap(); - for (int ee = 0; ee < x.length; ee++) { - String hh = x[ee]; - if (hh.equals(TAG_HIDE_HATCHES)) { - showHatches = false; - } - else if (hh.equals(TAG_HIDE_POLLUTION)) { - showPollution = false; - } - else if (hh.equals(TAG_HIDE_MACHINE_TYPE)) { - showMachineType = false; - } - else if (hh.equals(TAG_HIDE_MAINT)) { - showMaint = false; - } - else { - aTempMap.put(x[ee]); - } - } - //Rebuild - x = new String[aTempMap.size()]; - for (int ee = 0; ee < x.length; ee++) { - x[ee] = aTempMap.get(ee); - } - - - //Assemble ordered map for misc tooltips - AutoMap aOrderedMap = new AutoMap(); - if (showHatches) { - //aOrderedMap.put(aRequiresCoreModule); - if (showPollution) { - aOrderedMap.put(aRequiresMuffler); - } - if (showMaint) { - aOrderedMap.put(aRequiresMaint); - } - } - - if (showMachineType) { - aOrderedMap.put(getMachineTooltip()); - } - - if (showPollution) { - aOrderedMap.put(getPollutionTooltip()); - } - - - - - - //Add Stock Tooltip to bottom of list - String[] z; - z = new String[aOrderedMap.size()]; - for (int ee = 0; ee < z.length; ee++) { - z[ee] = aOrderedMap.get(ee); - } - - int a2, a3; - a2 = x != null ? x.length : 0; - a3 = z != null ? z.length : 0; - String[] aToolTip = new String[(a2 + a3)]; - aToolTip = ArrayUtils.addAll(aToolTip, x); - aToolTip = ArrayUtils.addAll(aToolTip, z); - - //Valid Cached Tooltip during Run-Time - if (aCachedToolTip == null || aCachedToolTip.length <= 0 || aCachedToolTip.length != aToolTip.length || this.mTotalRunTime % 100 == 0) { - aCachedToolTip = aToolTip; - } - return aCachedToolTip; - } - - public abstract String[] getTooltip(); - public synchronized final MultiblockRequirements getRequirements() { return mRequirements; } @@ -813,6 +716,25 @@ public abstract class GregtechMeta_MultiBlockBase extends GT_MetaTileEntity_Mult return checkRecipeGeneric(tItemInputs, tFluidInputs, aMaxParallelRecipes, aEUPercent, aSpeedBonusPercent, aOutputChanceRoll); } + public boolean checkRecipeGeneric(GT_Recipe aRecipe, + int aMaxParallelRecipes, int aEUPercent, + int aSpeedBonusPercent, int aOutputChanceRoll, boolean isPerfectOC) { + if (aRecipe == null) { + return false; + } + ArrayList tItems = getStoredInputs(); + ArrayList tFluids = getStoredFluids(); + ItemStack[] tItemInputs = tItems.toArray(new ItemStack[tItems.size()]); + FluidStack[] tFluidInputs = tFluids.toArray(new FluidStack[tFluids.size()]); + return checkRecipeGeneric(tItemInputs, tFluidInputs, aMaxParallelRecipes, aEUPercent, aSpeedBonusPercent, aOutputChanceRoll, aRecipe, isPerfectOC); + } + + public boolean checkRecipeGeneric( + ItemStack[] aItemInputs, FluidStack[] aFluidInputs, + int aMaxParallelRecipes, int aEUPercent, + int aSpeedBonusPercent, int aOutputChanceRoll) { + return checkRecipeGeneric(aItemInputs, aFluidInputs, aMaxParallelRecipes, aEUPercent, aSpeedBonusPercent, aOutputChanceRoll, null, false); + } public boolean checkRecipeGeneric(GT_Recipe aRecipe, int aMaxParallelRecipes, int aEUPercent, @@ -824,14 +746,14 @@ public abstract class GregtechMeta_MultiBlockBase extends GT_MetaTileEntity_Mult ArrayList tFluids = getStoredFluids(); ItemStack[] tItemInputs = tItems.toArray(new ItemStack[tItems.size()]); FluidStack[] tFluidInputs = tFluids.toArray(new FluidStack[tFluids.size()]); - return checkRecipeGeneric(tItemInputs, tFluidInputs, aMaxParallelRecipes, aEUPercent, aSpeedBonusPercent, aOutputChanceRoll, aRecipe); + return checkRecipeGeneric(tItemInputs, tFluidInputs, aMaxParallelRecipes, aEUPercent, aSpeedBonusPercent, aOutputChanceRoll, aRecipe, false); } public boolean checkRecipeGeneric( ItemStack[] aItemInputs, FluidStack[] aFluidInputs, int aMaxParallelRecipes, int aEUPercent, - int aSpeedBonusPercent, int aOutputChanceRoll) { - return checkRecipeGeneric(aItemInputs, aFluidInputs, aMaxParallelRecipes, aEUPercent, aSpeedBonusPercent, aOutputChanceRoll, null); + int aSpeedBonusPercent, int aOutputChanceRoll, boolean isPerfectOC) { + return checkRecipeGeneric(aItemInputs, aFluidInputs, aMaxParallelRecipes, aEUPercent, aSpeedBonusPercent, aOutputChanceRoll, null, isPerfectOC); } @@ -985,7 +907,7 @@ public abstract class GregtechMeta_MultiBlockBase extends GT_MetaTileEntity_Mult public boolean checkRecipeGeneric( ItemStack[] aItemInputs, FluidStack[] aFluidInputs, int aMaxParallelRecipes, int aEUPercent, - int aSpeedBonusPercent, int aOutputChanceRoll, GT_Recipe aRecipe) { + int aSpeedBonusPercent, int aOutputChanceRoll, GT_Recipe aRecipe, boolean isPerpectOC) { // Based on the Processing Array. A bit overkill, but very flexible. // Reset outputs and progress stats @@ -1110,7 +1032,8 @@ public abstract class GregtechMeta_MultiBlockBase extends GT_MetaTileEntity_Mult } else { while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { this.mEUt *= 4; - this.mMaxProgresstime /= 2; + if (isPerpectOC) this.mMaxProgresstime /= 4; + else this.mMaxProgresstime /= 2; } } @@ -2237,15 +2160,6 @@ public abstract class GregtechMeta_MultiBlockBase extends GT_MetaTileEntity_Mult return 0; } - public String getPollutionTooltip() { - if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) { - return "Causes " + 20 * this.getPollutionPerTick(null) + " Pollution per second"; - } - else { - return ""; - } - } - private static Method calculatePollutionReduction = null; public int calculatePollutionReductionForHatch(GT_MetaTileEntity_Hatch_Muffler i , int g) { if (calculatePollutionReduction != null) { @@ -2499,15 +2413,6 @@ public abstract class GregtechMeta_MultiBlockBase extends GT_MetaTileEntity_Mult return true; } - public final boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - boolean aStructureCheck = checkMultiblock(aBaseMetaTileEntity, aStack); - boolean aHasCore = DEBUG_DISABLE_CORES_TEMPORARILY; //(requireControlCores ? (this.getControlCoreBus() != null) : true); - return aStructureCheck && aHasCore; - } - - public abstract boolean checkMultiblock(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack); - - public boolean isValidBlockForStructure(IGregTechTileEntity aBaseMetaTileEntity, int aCasingID, boolean canBeHatch, Block aFoundBlock, int aFoundMeta, Block aExpectedBlock, int aExpectedMeta) { boolean isHatch = false; @@ -2627,7 +2532,61 @@ public abstract class GregtechMeta_MultiBlockBase extends GT_MetaTileEntity_Mult }*/ } + //Only support to use meta to tier + public static IStructureElement addTieredBlock(Block aBlock, BiConsumer aSetTheFuckingMeta, Function aGetTheFuckingMeta, int maxMeta) { + return addTieredBlock(aBlock, (t, i) -> { + aSetTheFuckingMeta.accept(t, i); + return true; + }, aGetTheFuckingMeta, 0, maxMeta + ); + } + + public static IStructureElement addTieredBlock(Block aBlock, BiConsumer aSetTheFuckingMeta, Function aGetTheFuckingMeta, int minMeta, int maxMeta) { + return addTieredBlock(aBlock, (t, i) -> { + aSetTheFuckingMeta.accept(t, i); + return true; + }, aGetTheFuckingMeta, minMeta, maxMeta + ); + } + + public static IStructureElement addTieredBlock(Block aBlock, BiPredicate aSetTheFuckingMeta, Function aGetTheFuckingMeta, int minMeta, int maxMeta) { + + return new IStructureElement() { + @Override + public boolean check(T t, World world, int x, int y, int z) { + Block tBlock = world.getBlock(x, y, z); + if (aBlock == tBlock) { + Integer currentMeta = aGetTheFuckingMeta.apply(t); + int newMeta = tBlock.getDamageValue(world, x, y, z) + 1; + if (newMeta > maxMeta || newMeta < minMeta + 1) return false; + if (currentMeta == 0) { + return aSetTheFuckingMeta.test(t, newMeta); + } else { + return currentMeta == newMeta; + } + } + return false; + } + + @Override + public boolean spawnHint(T t, World world, int x, int y, int z, ItemStack trigger) { + StructureLibAPI.hintParticle(world, x, y, z, aBlock, getMeta(trigger)); + return true; + } + + @Override + public boolean placeBlock(T t, World world, int x, int y, int z, ItemStack trigger) { + return world.setBlock(x, y, z, aBlock, getMeta(trigger), 3); + } + private int getMeta(ItemStack trigger) { + int meta = trigger.stackSize; + if (meta <= 0) meta = minMeta; + if (meta + minMeta > maxMeta) meta = maxMeta - 1; + return meta; + } + }; + } } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java index a357bd9103..419b5f3d30 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java @@ -13,7 +13,6 @@ import gregtech.common.blocks.GT_Material_Casings; import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.turbine.LargeTurbineTextureHandler; public class GregtechMetaCasingBlocks4 @@ -51,14 +50,14 @@ extends GregtechMetaCasingBlocksAbstract { GregtechItemList.Casing_RocketEngine.set(new ItemStack(this, 1, 11)); } - private static final LargeTurbineTextureHandler mTurbineTextures = new LargeTurbineTextureHandler(); + //private static final LargeTurbineTextureHandler mTurbineTextures = new LargeTurbineTextureHandler(); - @Override + /*@Override @SideOnly(Side.CLIENT) public IIcon getIcon(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, final int aSide) { final GregtechMetaCasingBlocks4 i = this; return mTurbineTextures.handleCasingsGT(aWorld, xCoord, yCoord, zCoord, aSide, i); - } + }*/ @Override public IIcon getIcon(final int aSide, final int aMeta) { diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaTieredCasingBlocks1.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaTieredCasingBlocks1.java index 240af72a3b..cbd585e50d 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaTieredCasingBlocks1.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaTieredCasingBlocks1.java @@ -21,7 +21,6 @@ import gregtech.common.blocks.GT_Material_Casings; import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; import gtPlusPlus.xmod.gregtech.common.blocks.textures.CasingTextureHandler; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -import gtPlusPlus.xmod.gregtech.common.blocks.textures.turbine.LargeTurbineTextureHandler; import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.storage.GregtechMetaTileEntity_PowerSubStationController; diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/turbine/LargeTurbineTextureHandler.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/turbine/LargeTurbineTextureHandler.java index 188b6ed4f6..c3d6a655c3 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/turbine/LargeTurbineTextureHandler.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/turbine/LargeTurbineTextureHandler.java @@ -1,3 +1,4 @@ +/* package gtPlusPlus.xmod.gregtech.common.blocks.textures.turbine; import net.minecraft.tileentity.TileEntity; @@ -13,9 +14,11 @@ import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock.CustomIco public class LargeTurbineTextureHandler { - /** + */ +/** * LP Turbines - */ + *//* + private static CustomIcon aTex1_Active = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_1"); private static CustomIcon aTex1 = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_LP_1"); private static CustomIcon aTex2_Active = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_2"); @@ -79,9 +82,11 @@ public class LargeTurbineTextureHandler { }; - /** + */ +/** * HP Turbines - */ + *//* + private static CustomIcon aTexHP1_Active = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_1"); private static CustomIcon aTexHP1 = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_HP_1"); private static CustomIcon aTexHP2_Active = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_2"); @@ -283,7 +288,8 @@ public class LargeTurbineTextureHandler { public boolean isUsingAnimatedTexture(TileEntity tTileEntity) { boolean aVal = true; - /*IGregTechTileEntity aTile; + */ +/*IGregTechTileEntity aTile; if (tTileEntity instanceof IGregTechTileEntity) { aTile = (IGregTechTileEntity) tTileEntity; if (aTile != null) { @@ -293,7 +299,8 @@ public class LargeTurbineTextureHandler { Logger.INFO("Returning "+aVal+" as Rotor Assembly controller status"); } } - } */ + } *//* + return aVal; } @@ -308,3 +315,4 @@ public class LargeTurbineTextureHandler { } } +*/ diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/misc/GMTE_AmazonPackager.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/misc/GMTE_AmazonPackager.java index 46b598308d..7993c456a2 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/misc/GMTE_AmazonPackager.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/misc/GMTE_AmazonPackager.java @@ -2,14 +2,17 @@ package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.misc; import java.util.ArrayList; +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; import gregtech.api.enums.*; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.interfaces.tileentity.IHasWorldObjectAndCoords; -import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_InputBus; +import gregtech.api.metatileentity.implementations.*; import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; import gtPlusPlus.api.objects.data.AutoMap; @@ -17,15 +20,18 @@ import gtPlusPlus.api.objects.minecraft.ItemStackData; import gtPlusPlus.core.block.ModBlocks; import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; -import net.minecraft.block.Block; import net.minecraft.item.ItemStack; -import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; + public class GMTE_AmazonPackager extends GregtechMeta_MultiBlockBase { private long mVoltage; private byte mTier; + private int mCasing; + private IStructureDefinition STRUCTURE_DEFINITION = null; @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { @@ -53,26 +59,87 @@ public class GMTE_AmazonPackager extends GregtechMeta_MultiBlockBase { @Override public String getCustomGUIResourceName() { return "Generic3By3"; - } + } + + @Override + public IStructureDefinition getStructureDefinition() { + if (STRUCTURE_DEFINITION == null) { + STRUCTURE_DEFINITION = StructureDefinition.builder() + .addShape(mName, transpose(new String[][]{ + {"CCC", "CCC", "CCC"}, + {"C~C", "C-C", "CCC"}, + {"CCC", "CCC", "CCC"}, + })) + .addElement( + 'C', + ofChain( + ofHatchAdder( + GMTE_AmazonPackager::addAmazonPackagerList, TAE.getIndexFromPage(2, 9), 1 + ), + onElementPass( + x -> ++x.mCasing, + ofBlock( + ModBlocks.blockCasings3Misc, 9 + ) + ) + ) + ) + .build(); + } + return STRUCTURE_DEFINITION; + } + + + + public final boolean addAmazonPackagerList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + if (aTileEntity == null) { + return false; + } else { + IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){ + ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex); + return this.mInputBusses.add((GT_MetaTileEntity_Hatch_InputBus)aMetaTileEntity); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ + ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex); + return this.mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance)aMetaTileEntity); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){ + ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex); + return this.mEnergyHatches.add((GT_MetaTileEntity_Hatch_Energy)aMetaTileEntity); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { + ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex); + return this.mOutputBusses.add((GT_MetaTileEntity_Hatch_OutputBus) aMetaTileEntity); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) { + ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex); + return this.mMufflerHatches.add((GT_MetaTileEntity_Hatch_Muffler) aMetaTileEntity); + } + } + return false; + } @Override - public String[] getTooltip() { - return new String[]{ - "Controller Block for the Amazon Warehouse", - "This Multiblock is used for EXTREME packaging requirements", - "Dust Schematics are inserted into the input busses", - "If inserted into the controller, it is shared across all busses", - "1x, 2x, 3x & Other Schematics are to be placed into the controller GUI slot", - "Uncomparably fast compared to a single packager of the same tier", - "Only uses 75% of the eu/t normally required", - "Processes five items per voltage tier", - "Size: 3x3x3 (Hollow)", - "Supply Depot. Casings (10 at least!)", - "Controller (front centered)", - "1x Input Bus", - "1x Output Bus", - "1x Energy Hatch", - }; + protected GT_Multiblock_Tooltip_Builder createTooltip() { + GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType(getMachineType()) + .addInfo("Controller Block for the Amazon Warehouse") + .addInfo("This Multiblock is used for EXTREME packaging requirements") + .addInfo("Dust Schematics are inserted into the input busses") + .addInfo("If inserted into the controller, it is shared across all busses") + .addInfo("1x, 2x, 3x & Other Schematics are to be placed into the controller GUI slot") + .addInfo("Uncomparably fast compared to a single packager of the same tier") + .addInfo("Only uses 75% of the eu/t normally required") + .addInfo("Processes five items per voltage tier") + .addPollutionAmount(getPollutionPerTick(null) * 20) + .addSeparator() + .beginStructureBlock(3, 3, 3, true) + .addController("Front center") + .addCasingInfo("Supply Depot Casings", 10) + .addInputBus("Any casing", 1) + .addOutputBus("Any casing", 1) + .addEnergyHatch("Any casing", 1) + .addMaintenanceHatch("Any casing", 1) + .addMufflerHatch("Any casing", 1) + .toolTipFinisher("GT++"); + return tt; } private final void initFields() { @@ -101,7 +168,6 @@ public class GMTE_AmazonPackager extends GregtechMeta_MultiBlockBase { } } - @Override public boolean checkRecipe(ItemStack aStack) { @@ -229,32 +295,9 @@ public class GMTE_AmazonPackager extends GregtechMeta_MultiBlockBase { } @Override - public boolean checkMultiblock(IGregTechTileEntity aBaseMetaTileEntity, ItemStack p1) { - final int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX; - final int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ; - if (!aBaseMetaTileEntity.getAirOffset(xDir, 0, zDir)) { - return false; - } - int tAmount = 0; - for (int i = -1; i < 2; i++) { - for (int j = -1; j < 2; j++) { - for (int h = -1; h < 2; h++) { - if ((h != 0) || ((((xDir + i) != 0) || ((zDir + j) != 0)) && ((i != 0) || (j != 0)))) { - final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, h, zDir + j); - if (!this.addToMachineList(tTileEntity, TAE.getIndexFromPage(2, 9))) { - final Block tBlock = aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j); - final byte tMeta = aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j); - - if (((tBlock != ModBlocks.blockCasings3Misc) || (tMeta != 9))) { - return false; - } - tAmount++; - } - } - } - } - } - return tAmount >= 10; + public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + mCasing = 0; + return checkPiece(mName, 1, 1, 0) && mCasing >= 10; } @Override @@ -277,4 +320,8 @@ public class GMTE_AmazonPackager extends GregtechMeta_MultiBlockBase { return 0; } + @Override + public void construct(ItemStack stackSize, boolean hintsOnly) { + buildPiece(mName, stackSize, hintsOnly, 1, 1, 0); + } } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/misc/GregtechMTE_TeslaTower.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/misc/GregtechMTE_TeslaTower.java index b68bc48ca0..7ddf16b36f 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/misc/GregtechMTE_TeslaTower.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/misc/GregtechMTE_TeslaTower.java @@ -1,3 +1,4 @@ +/* package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.misc; import static gregtech.api.enums.GT_Values.*; @@ -48,11 +49,13 @@ public class GregtechMTE_TeslaTower extends GregtechMeta_MultiBlockBase { private int xLoc, yLoc, zLoc; protected int mRange; - /** + */ +/** * Machine Mode, * {@value false} Attacks all entities, * {@value true} Only attacks players. - */ + *//* + protected volatile boolean mMode = false; @Override @@ -141,16 +144,20 @@ public class GregtechMTE_TeslaTower extends GregtechMeta_MultiBlockBase { @Override public boolean checkRecipe(ItemStack aStack) { - /*if (!isEnergyEnough()) { + */ +/*if (!isEnergyEnough()) { this.mProgresstime = 0; this.mMaxProgresstime = 20; this.getBaseMetaTileEntity().setActive(false); stopMachine(); } else {*//* +*/ +/* this.mProgresstime = 1; this.mMaxProgresstime = 100; - this.getBaseMetaTileEntity().setActive(true);*/ + this.getBaseMetaTileEntity().setActive(true);*//* + //} return false; } @@ -408,11 +415,13 @@ public class GregtechMTE_TeslaTower extends GregtechMeta_MultiBlockBase { } protected Materials getFrameMaterial() { - /*casingBlock = getCasingBlockItem().getBlock(); + */ +/*casingBlock = getCasingBlockItem().getBlock(); casingMeta = getCasingBlockItem().get(0).getItemDamage(); int frameId = 4096 + getFrameMaterial().mMetaItemSubID; frameMeta = GregTech_API.METATILEENTITIES[frameId] != null ? GregTech_API.METATILEENTITIES[frameId].getTileEntityBaseType() : W; - */return Materials.get("TungstenCarbide"); + *//* +return Materials.get("TungstenCarbide"); } protected int getCasingTextureIndex() { @@ -467,3 +476,4 @@ public class GregtechMTE_TeslaTower extends GregtechMeta_MultiBlockBase { } +*/ diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialAlloySmelter.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialAlloySmelter.java index 910ae8bff6..e4b6b277e1 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialAlloySmelter.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialAlloySmelter.java @@ -1,10 +1,19 @@ package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static gregtech.api.util.GT_StructureUtility.ofCoil; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; import static gtPlusPlus.core.util.data.ArrayUtils.removeNulls; import java.util.ArrayList; import java.util.List; +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; +import gregtech.api.enums.HeatingCoilLevel; +import gregtech.api.metatileentity.implementations.*; +import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import org.apache.commons.lang3.ArrayUtils; import gregtech.api.enums.TAE; @@ -19,18 +28,17 @@ import gregtech.api.util.GT_Utility; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.block.ModBlocks; import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; -import gtPlusPlus.xmod.gregtech.common.StaticFields59; -import net.minecraft.block.Block; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; -import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; public class GregtechMetaTileEntity_IndustrialAlloySmelter extends GregtechMeta_MultiBlockBase { public static int CASING_TEXTURE_ID; - private int mHeatingCapacity = 0; + private HeatingCoilLevel mHeatingCapacity; private int mLevel = 0; + private int mCasing; + private IStructureDefinition STRUCTURE_DEFINITION = null; public GregtechMetaTileEntity_IndustrialAlloySmelter(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); @@ -65,10 +73,6 @@ public class GregtechMetaTileEntity_IndustrialAlloySmelter extends GregtechMeta_ return true; } - public boolean isFacingValid(byte aFacing) { - return aFacing > 1; - } - public int getMaxEfficiency(ItemStack aStack) { return 10000; } @@ -101,23 +105,108 @@ public class GregtechMetaTileEntity_IndustrialAlloySmelter extends GregtechMeta_ } @Override - public String[] getTooltip() { - return new String[]{ - "Controller Block for the Industrial Alloy Smelter", - "Gains one parallel per voltage tier", - "Gains one multiplier per coil tier", - "parallel = tier * coil tier", - "Gains 5% speed bonus per coil tier", - "Size(WxHxD): 3x5x3 (Hollow)", - "Controller (Front middle at bottom)", - "Inconel Reinforced Casings (layers 0/4, 10 at least!)", - "16x Heating Coils (layers 1/3, hollow)", - "8x Integral Encasement V (middle layer, hollow)", - "1x Input Bus", - "1x Output Bus", - "1x Output Hatch", - "1x Energy Hatch", - }; + protected GT_Multiblock_Tooltip_Builder createTooltip() { + GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType(getMachineType()) + .addInfo("Controller Block for the Industrial Alloy Smelter") + .addInfo("Gains one parallel per voltage tier") + .addInfo("Gains one multiplier per coil tier") + .addInfo("parallel = tier * coil tier") + .addInfo("Gains 5% speed bonus per coil tier") + .addPollutionAmount(getPollutionPerTick(null) * 20) + .addSeparator() + .beginStructureBlock(3, 5, 3, true) + .addController("Bottom center") + .addCasingInfo("Inconel Reinforced Casings", 10) + .addCasingInfo("Integral Encasement V", 18) + .addCasingInfo("Heating Coils", 16) + .addInputBus("Any Inconel Reinforced Casing", 1) + .addOutputBus("Any Inconel Reinforced Casing", 1) + .addEnergyHatch("Any Inconel Reinforced Casing", 1) + .addMaintenanceHatch("Any Inconel Reinforced Casing", 1) + .addMufflerHatch("Any Inconel Reinforced Casing", 1) + .toolTipFinisher("GT++"); + return tt; + } + + @Override + public IStructureDefinition getStructureDefinition() { + if (STRUCTURE_DEFINITION == null) { + STRUCTURE_DEFINITION = StructureDefinition.builder() + .addShape(mName, transpose(new String[][]{ + {"CCC", "CCC", "CCC"}, + {"HHH", "H-H", "HHH"}, + {"VVV", "V-V", "VVV"}, + {"HHH", "H-H", "HHH"}, + {"CCC", "C~C", "CCC"}, + })) + .addElement( + 'C', + ofChain( + ofHatchAdder( + GregtechMetaTileEntity_IndustrialAlloySmelter::addIndustrialAlloySmelterList, CASING_TEXTURE_ID, 1 + ), + onElementPass( + x -> ++x.mCasing, + ofBlock( + ModBlocks.blockCasings3Misc, 1 + ) + ) + ) + ) + .addElement( + 'H', + ofCoil( + GregtechMetaTileEntity_IndustrialAlloySmelter::setCoilLevel, GregtechMetaTileEntity_IndustrialAlloySmelter::getCoilLevel + ) + ) + .addElement( + 'V', + ofBlock( + ModBlocks.blockCasingsTieredGTPP, 4 + ) + ) + .build(); + } + return STRUCTURE_DEFINITION; + } + + public final boolean addIndustrialAlloySmelterList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + if (aTileEntity == null) { + return false; + } else { + IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){ + ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex); + return this.mInputBusses.add((GT_MetaTileEntity_Hatch_InputBus)aMetaTileEntity); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){ + ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex); + return this.mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance)aMetaTileEntity); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){ + ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex); + return this.mEnergyHatches.add((GT_MetaTileEntity_Hatch_Energy)aMetaTileEntity); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) { + ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex); + return this.mOutputBusses.add((GT_MetaTileEntity_Hatch_OutputBus) aMetaTileEntity); + } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) { + ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex); + return this.mMufflerHatches.add((GT_MetaTileEntity_Hatch_Muffler) aMetaTileEntity); + } + } + return false; + } + + @Override + public void construct(ItemStack stackSize, boolean hintsOnly) { + buildPiece(mName, stackSize, hintsOnly, 1, 4, 0); + } + + @Override + public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + mCasing = 0; + mLevel = 0; + setCoilLevel(HeatingCoilLevel.None); + return checkPiece(mName, 1, 4, 0) && mCasing >= 10 && getCoilLevel() != HeatingCoilLevel.None && (mLevel = getCoilLevel().getTier() + 1) > 0; } @Override @@ -130,90 +219,6 @@ public class GregtechMetaTileEntity_IndustrialAlloySmelter extends GregtechMeta_ return 100; } - @Override - public boolean checkMultiblock(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX; - int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ; - - this.mLevel = 0; - this.mHeatingCapacity = 0; - for (int i=1;i<4;i++) { - if (!aBaseMetaTileEntity.getAirOffset(xDir, i, zDir)) { - Logger.INFO("Did not find air inside on layer "+i); - return false; - } - } - /*if (!addMufflerToMachineList(aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir, 3, zDir), - CASING_TEXTURE_ID)) { - return false; - }*/ - Block tUsedBlock = aBaseMetaTileEntity.getBlockOffset(xDir + 1, 1, zDir); - byte tUsedMeta = aBaseMetaTileEntity.getMetaIDOffset(xDir + 1, 1, zDir); - this.mLevel = StaticFields59.getTierForCoil(tUsedBlock, tUsedMeta); - this.mHeatingCapacity = StaticFields59.getHeatingCapacityForCoil(tUsedBlock, tUsedMeta); - - int aCasingCount = 0; - - for (int i = -1; i < 2; i++) { - for (int j = -1; j < 2; j++) { - - if ((i != 0) || (j != 0)) { - //Coils 1 - if (!isValidBlockForStructure(null, CASING_TEXTURE_ID, false, aBaseMetaTileEntity.getBlockOffset(xDir + i, 1, zDir + j), (int) aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 1, zDir + j), StaticFields59.getBlockCasings5(), tUsedMeta)) { - Logger.INFO("Heating Coils missing. First Layer"); - return false; - } - - //Integral Casings - if (!isValidBlockForStructure(null, CASING_TEXTURE_ID, false, aBaseMetaTileEntity.getBlockOffset(xDir + i, 2, zDir + j), (int) aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 2, zDir + j), ModBlocks.blockCasingsTieredGTPP, 4)) { - Logger.INFO("Integral Framework missing. Second Layer"); - return false; - } - - //Coils 2 - if (!isValidBlockForStructure(null, CASING_TEXTURE_ID, false, aBaseMetaTileEntity.getBlockOffset(xDir + i, 3, zDir + j), (int) aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 3, zDir + j), StaticFields59.getBlockCasings5(), tUsedMeta)) { - Logger.INFO("Heating Coils missing. Third Layer"); - return false; - } - } - - //Top Layer - - Block aCurrentBlock = aBaseMetaTileEntity.getBlockOffset(xDir + i, 4, zDir + j); - int aCurrentMeta = (int) aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 4, zDir + j); - if (aCurrentBlock == ModBlocks.blockCasings3Misc && aCurrentMeta == 1) { - aCasingCount++; - } - - final IGregTechTileEntity tTileEntity2 = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, 4, zDir + j); - if (!isValidBlockForStructure(tTileEntity2, CASING_TEXTURE_ID, true, aCurrentBlock, aCurrentMeta, ModBlocks.blockCasings3Misc, 1)) { - Logger.INFO("Top Layer missing."); - return false; - } - } - } - for (int i = -1; i < 2; i++) { - for (int j = -1; j < 2; j++) { - - - Block aCurrentBlock = aBaseMetaTileEntity.getBlockOffset(xDir + i, 0, zDir + j); - int aCurrentMeta = (int) aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 0, zDir + j); - if (aCurrentBlock == ModBlocks.blockCasings3Misc && aCurrentMeta == 1) { - aCasingCount++; - } - if ((xDir + i != 0) || (zDir + j != 0)) { - IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, 0, zDir + j); - if (!isValidBlockForStructure(tTileEntity, CASING_TEXTURE_ID, true, aCurrentBlock, aCurrentMeta, ModBlocks.blockCasings3Misc, 1)) { - Logger.INFO("Bottom Layer missing."); - return false; - } - } - } - } - - return aCasingCount >= 10; - } - public boolean checkRecipe(ItemStack aStack) { return checkRecipeGeneric(this.getMaxParallelRecipes(), 100, 5 * this.mLevel); // Will have to clone the logic from parent class to handle heating coil // tiers. @@ -255,7 +260,7 @@ public class GregtechMetaTileEntity_IndustrialAlloySmelter extends GregtechMeta_ // EU discount float tRecipeEUt = (tRecipe.mEUt * aEUPercent) / 100.0f; - int tHeatCapacityDivTiers = mHeatingCapacity / 900; + int tHeatCapacityDivTiers = (int) mHeatingCapacity.getHeat() / 900; float tTotalEUt = 0.0f; int parallelRecipes = 0; @@ -373,5 +378,11 @@ public class GregtechMetaTileEntity_IndustrialAlloySmelter extends GregtechMeta_ } - + public HeatingCoilLevel getCoilLevel() { + return mHeatingCapacity; + } + + public void setCoilLevel(HeatingCoilLevel aCoilLevel) { + mHeatingCapacity = aCoilLevel; + } } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialArcFurnace.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialArcFurnace.java index 4ffea7eb24..bfb210f5a2 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialArcFurnace.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialArcFurnace.java @@ -1,12 +1,16 @@ package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing; +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; import gregtech.api.GregTech_API; import gregtech.api.enums.TAE; import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.*; import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; import gtPlusPlus.api.objects.Logger; @@ -22,6 +26,10 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumChatFormatting; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; + public class GregtechMetaTileEntity_IndustrialArcFurnace extends GregtechMeta_MultiBlockBase { @@ -30,6 +38,8 @@ extends GregtechMeta_MultiBlockBase { public static String mCasingName = "Tempered Arc Furnace Casing"; private boolean mPlasmaMode = false; private int mSize = 0; + private int mCasing; + private IStructureDefinition STRUCTURE_DEFINITION = null; public GregtechMetaTileEntity_IndustrialArcFurnace(final int aID, final String aName, final String aNameRegional) { super(aID, aName, aNameRegional); @@ -52,27 +62,144 @@ extends GregtechMeta_MultiBlockBase { } @Override - public String[] getTooltip() { - + protected GT_Multiblock_Tooltip_Builder createTooltip() { if (mCasingName.toLowerCase().contains(".name")) { mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings4Misc, 3); } + GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType(getMachineType()) + .addInfo("Controller Block for Industrial Arc Furnace") + .addInfo("250% faster than using single block machines of the same voltage") + .addInfo("Processes 8 items per voltage tier") + .addInfo("Max Size required to process Plasma recipes") + .addPollutionAmount(getPollutionPerTick(null) * 20) + .addSeparator() + .addController("Top center") + .addStructureInfo("Size: nx3xn [WxHxL] (Hollow)") + .addStructureInfo("n can be 3, 5 or 7") + .addCasingInfo(mCasingName, 10) + .addInputBus("Any Casing", 1) + .addOutputBus("Any Casing", 1) + .addInputHatch("Any Casing", 1) + .addOutputHatch("Any Casing", 1) + .addEnergyHatch("Any Casing", 1) + .addMaintenanceHatch("Any Casing", 1) + .addMufflerHatch("Any Casing", 1) + .toolTipFinisher("GT++"); + return tt; + } + + @Override + public IStructureDefinition getStructureDefinition() { + if (STRUCTURE_DEFINITION == null) { + STRUCTURE_DEFINITION = StructureDefinition.builder() + .addShape(mName + "3", transpose(new String[][]{ + {"CCC",