From e4bd293915ea20359dc228a623c08f7a1055d843 Mon Sep 17 00:00:00 2001 From: moller21 <42100910+moller21@users.noreply.github.com> Date: Mon, 1 Jun 2020 17:02:56 +0200 Subject: Added gui's for the rest of em covers. --- .../assets/gregtech/textures/gui/GuiButtons.png | Bin 9499 -> 9910 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'src/main/resources/assets') diff --git a/src/main/resources/assets/gregtech/textures/gui/GuiButtons.png b/src/main/resources/assets/gregtech/textures/gui/GuiButtons.png index f9b1d69325..54f5230e7a 100644 Binary files a/src/main/resources/assets/gregtech/textures/gui/GuiButtons.png and b/src/main/resources/assets/gregtech/textures/gui/GuiButtons.png differ -- cgit From b3b3ef4f0961fda0eb7e56bf1cf43cabc0e4f8d6 Mon Sep 17 00:00:00 2001 From: DreamMasterXXL Date: Thu, 23 Jul 2020 19:09:07 +0200 Subject: feat(Gregtech) add Raw DD Portal Block Add Raw Poatal Block for DD Infusion recipe --- src/main/java/gregtech/api/enums/ItemList.java | 1 + src/main/java/gregtech/api/enums/Textures.java | 1 + .../gregtech/common/blocks/GT_Block_Reinforced.java | 4 ++++ .../loaders/postload/GT_MachineRecipeLoader.java | 19 +++++++++++++++++++ .../textures/blocks/iconsets/BLOCK_DEEP_DARK_RAW.png | Bin 0 -> 3218 bytes 5 files changed, 25 insertions(+) create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/BLOCK_DEEP_DARK_RAW.png (limited to 'src/main/resources/assets') diff --git a/src/main/java/gregtech/api/enums/ItemList.java b/src/main/java/gregtech/api/enums/ItemList.java index cb6e94f5ba..6f7a0567a1 100644 --- a/src/main/java/gregtech/api/enums/ItemList.java +++ b/src/main/java/gregtech/api/enums/ItemList.java @@ -1474,6 +1474,7 @@ public enum ItemList implements IItemContainer { Block_TungstenSteelReinforced, Block_NaquadahPlate, Block_NeutroniumPlate, + Block_BedrockiumCompressed, Honeycomb, Charcoal_Pile, diff --git a/src/main/java/gregtech/api/enums/Textures.java b/src/main/java/gregtech/api/enums/Textures.java index a813eacd57..7b229550ff 100644 --- a/src/main/java/gregtech/api/enums/Textures.java +++ b/src/main/java/gregtech/api/enums/Textures.java @@ -351,6 +351,7 @@ public class Textures { BLOCK_TITANIUMPREIN, BLOCK_NAQUADAHPREIN, BLOCK_NEUTRONIUMPREIN, + BLOCK_DEEP_DARK_RAW, BLOCK_IRREIN, BLOCK_PLASCRETE, BLOCK_TSREIN, diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java b/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java index 32ce6e78f9..ec31cb212c 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java @@ -55,6 +55,7 @@ public class GT_Block_Reinforced extends GT_Generic_Block { GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".9.name", "Titanium Reinforced Block"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".10.name", "Naquadah Reinforced Block"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".11.name", "Neutronium Reinforced Block"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".12.name", "Raw Deep Dark Portal Block"); ItemList.Block_BronzePlate.set(new ItemStack(this.setHardness(60.0f).setResistance(150.0f), 1, 0)); ItemList.Block_IridiumTungstensteel.set(new ItemStack(this.setHardness(400.0f).setResistance(600.0f), 1, 1)); ItemList.Block_Plascrete.set(new ItemStack(this.setHardness(40.0f).setResistance(100.0f), 1, 2)); @@ -67,6 +68,7 @@ public class GT_Block_Reinforced extends GT_Generic_Block { ItemList.Block_TitaniumPlate.set(new ItemStack(this.setHardness(200.0f).setResistance(300.0f), 1, 9)); ItemList.Block_NaquadahPlate.set(new ItemStack(this.setHardness(500.0f).setResistance(1000.0f), 1, 10)); ItemList.Block_NeutroniumPlate.set(new ItemStack(this.setHardness(750.0f).setResistance(2500.0f), 1, 11)); + ItemList.Block_BedrockiumCompressed.set(new ItemStack(this.setHardness(1500.0f).setResistance(5000.0f), 1, 12)); //GT_ModHandler.addCraftingRecipe(ItemList.Block_BronzePlate.get(1L, new Object[0]),GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"hP ", "PBP", " P ", 'P', OrePrefixes.plate.get(Materials.Bronze), 'B', OrePrefixes.stone.get(Materials.GraniteBlack)}); //GT_ModHandler.addCraftingRecipe(ItemList.Block_BronzePlate.get(1L, new Object[0]),GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"hP ", "PBP", " P ", 'P', OrePrefixes.plate.get(Materials.Bronze), 'B', OrePrefixes.stone.get(Materials.GraniteRed)}); //GT_ModHandler.addCraftingRecipe(ItemList.Block_IridiumTungstensteel.get(1L, new Object[0]),GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"hBP", 'P', OrePrefixes.plate.get(Materials.Iridium), 'B', ItemList.Block_TungstenSteelReinforced.get(1L, new Object[0])}); @@ -116,6 +118,8 @@ public class GT_Block_Reinforced extends GT_Generic_Block { return Textures.BlockIcons.BLOCK_NAQUADAHPREIN.getIcon(); case 11: return Textures.BlockIcons.BLOCK_NEUTRONIUMPREIN.getIcon(); + case 12: + return Textures.BlockIcons.BLOCK_DEEP_DARK_RAW.getIcon(); } } return Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon(); diff --git a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java index cdbe444248..a705c3895d 100644 --- a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java @@ -2752,6 +2752,25 @@ public class GT_MachineRecipeLoader implements Runnable { Materials.ElectrumFlux.getMolten(1152L), }, ItemList.FusionComputer_UV.get(1), 1000, 90000); + GT_Values.RA.addAssemblylineRecipe(GT_ModHandler.getModItem("dreamcraft", "item.HeavyDutyPlateTier8", 1, 0), 576000, new Object[]{ + GT_ModHandler.getModItem("ExtraUtilities", "cobblestone_compressed", 1, 7), + GT_ModHandler.getModItem("IC2", "blockMachine2", 1, 0), + GT_OreDictUnificator.get(OrePrefixes.block, Materials.Infinity, 4L), + new Object[]{OrePrefixes.circuit.get(Materials.Piko), 1}, + new Object[]{OrePrefixes.circuit.get(Materials.Piko), 1}, + new Object[]{OrePrefixes.circuit.get(Materials.Piko), 1}, + new Object[]{OrePrefixes.circuit.get(Materials.Piko), 1}, + GT_ModHandler.getModItem("dreamcraft", "PicoWafer", 32, 0), + ItemList.Robot_Arm_UEV.get(1), + ItemList.Emitter_UEV.get(1), + ItemList.Sensor_UEV.get(1), + ItemList.Field_Generator_UEV.get(1), + }, new FluidStack[]{ + new FluidStack(FluidRegistry.getFluid("oganesson"), 2880), + Materials.Infinity.getMolten(2880L), + Materials.Cheese.getMolten(2880L), + }, ItemList.Block_BedrockiumCompressed.get(1), 10000, 5000000); + if (GregTech_API.sThaumcraftCompat != null) { String tKey = "GT_WOOD_TO_CHARCOAL"; GT_LanguageManager.addStringLocalization(GT_MachineRecipeLoader.aTextTCGTPage + tKey, "You have discovered a way of making charcoal magically instead of using regular ovens for this purpose.

To create charcoal from wood you first need an air-free environment, some vacuus essentia is needed for that, then you need to incinerate the wood using ignis essentia and wait until all the water inside the wood is burned away.

This method however doesn't create creosote oil as byproduct."); diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/BLOCK_DEEP_DARK_RAW.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/BLOCK_DEEP_DARK_RAW.png new file mode 100644 index 0000000000..ef3500ab97 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/iconsets/BLOCK_DEEP_DARK_RAW.png differ -- cgit From d103c27eb94de172528806def31fca4fb4d78735 Mon Sep 17 00:00:00 2001 From: DreamMasterXXL Date: Thu, 23 Jul 2020 20:33:53 +0200 Subject: change(gregtech)texture from Raw DD Block --- .../textures/blocks/iconsets/BLOCK_DEEP_DARK_RAW.png | Bin 3218 -> 3302 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'src/main/resources/assets') diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/BLOCK_DEEP_DARK_RAW.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/BLOCK_DEEP_DARK_RAW.png index ef3500ab97..e5cde1022b 100644 Binary files a/src/main/resources/assets/gregtech/textures/blocks/iconsets/BLOCK_DEEP_DARK_RAW.png and b/src/main/resources/assets/gregtech/textures/blocks/iconsets/BLOCK_DEEP_DARK_RAW.png differ -- cgit From f8d4a449dc651a0332bef999e4af85633090caa5 Mon Sep 17 00:00:00 2001 From: DreamMasterXXL Date: Thu, 23 Jul 2020 22:25:39 +0200 Subject: fix(Gregtech)add localizer add missing localizer for assembly line/tt research station --- src/main/resources/assets/gregtech/lang/en_US.lang | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/main/resources/assets') diff --git a/src/main/resources/assets/gregtech/lang/en_US.lang b/src/main/resources/assets/gregtech/lang/en_US.lang index 51b648b308..882c237c5b 100644 --- a/src/main/resources/assets/gregtech/lang/en_US.lang +++ b/src/main/resources/assets/gregtech/lang/en_US.lang @@ -854,6 +854,9 @@ achievement.ic2.itemArmorQuantumBoots.desc=Pickup this item to see the recipe in achievement.item.graviChestPlate=Gravi Chestplate achievement.item.graviChestPlate.desc=Pickup this item to see the recipe in NEI +achievement.gt.blockreinforced.12=Raw Deep Dark Portal Block +achievement.gt.blockreinforced.12.desc=Pickup this item to see the recipe in NEI + for.bees.species.clay=Clay for.bees.species.slimeball=Slimeball for.bees.species.peat=Peat -- cgit From 829ed0bc37fb7bdf7c65548ddd2947b14a014765 Mon Sep 17 00:00:00 2001 From: DreamMasterXXL Date: Sun, 26 Jul 2020 22:44:26 +0200 Subject: fix(gregtech)piston uev fix uev piston texture UEV Electric Piston has 2 pixels miscoloured #6443 https://github.com/GTNewHorizons/GT-New-Horizons-Modpack/issues/6443 --- .../gregtech/textures/items/gt.metaitem.01/649.png | Bin 410 -> 2168 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'src/main/resources/assets') diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/649.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/649.png index 33902261ed..da14e263ec 100644 Binary files a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/649.png and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/649.png differ -- cgit From e7f4bd6623fa49971dbff808f5d5bc5a60b8e323 Mon Sep 17 00:00:00 2001 From: DreamMasterXXL Date: Sun, 26 Jul 2020 22:55:39 +0200 Subject: fix(gregtech)machineparts uev fix uev machineparts texture UEV Electric Piston has 2 pixels miscoloured #6443 https://github.com/GTNewHorizons/GT-New-Horizons-Modpack/issues/6443 --- .../gregtech/textures/items/gt.metaitem.01/595.png | Bin 380 -> 1995 bytes .../gregtech/textures/items/gt.metaitem.01/619.png | Bin 498 -> 2204 bytes .../gregtech/textures/items/gt.metaitem.01/639.png | Bin 366 -> 1888 bytes .../gregtech/textures/items/gt.metaitem.01/659.png | Bin 462 -> 2161 bytes .../gregtech/textures/items/gt.metaitem.01/689.png | Bin 514 -> 2236 bytes .../gregtech/textures/items/gt.metaitem.01/699.png | Bin 474 -> 2223 bytes 6 files changed, 0 insertions(+), 0 deletions(-) (limited to 'src/main/resources/assets') diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/595.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/595.png index 72b0694ac9..d1e8d87970 100644 Binary files a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/595.png and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/595.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/619.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/619.png index a8396ee2c8..9e7f633eeb 100644 Binary files a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/619.png and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/619.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/639.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/639.png index 170df57eba..60ee29468d 100644 Binary files a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/639.png and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/639.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/659.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/659.png index 5e010b144a..ef63027fcf 100644 Binary files a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/659.png and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/659.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/689.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/689.png index 23a5518540..f8a83ab2f5 100644 Binary files a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/689.png and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/689.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/699.png b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/699.png index 4529793d67..7a59b8d4d3 100644 Binary files a/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/699.png and b/src/main/resources/assets/gregtech/textures/items/gt.metaitem.01/699.png differ -- cgit From db4377f681aa81eac1eb310c0eabc35f37c39f3e Mon Sep 17 00:00:00 2001 From: boubou19 Date: Fri, 25 Sep 2020 00:47:45 +0200 Subject: fixed data bank achievement --- src/main/resources/assets/gregtech/lang/en_US.lang | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/main/resources/assets') diff --git a/src/main/resources/assets/gregtech/lang/en_US.lang b/src/main/resources/assets/gregtech/lang/en_US.lang index 882c237c5b..bda0fbff87 100644 --- a/src/main/resources/assets/gregtech/lang/en_US.lang +++ b/src/main/resources/assets/gregtech/lang/en_US.lang @@ -815,6 +815,8 @@ achievement.gt.blockmachines.multimachine.em.emtoessentia=Essentia Dequantizer achievement.gt.blockmachines.multimachine.em.emtoessentia.desc=Pickup this item to see the recipe in NEI achievement.gt.blockmachines.multimachine.em.scanner=Elemental Scanner achievement.gt.blockmachines.multimachine.em.scanner.desc=Pickup this item to see the recipe in NEI +achievement.gt.blockmachines.multimachine.em.scanner=Data Bank +achievement.gt.blockmachines.multimachine.em.databank.desc=Pickup this item to see the recipe in NEI achievement.gt.blockcasingsTT.8=Hollow Casing achievement.gt.blockcasingsTT.8.desc=Pickup this item to see the recipe in NEI achievement.gt.blockcasingsTT.7=Molecular Coil -- cgit From bf7fab5da124f084def8c836dde2eb5eec182c1a Mon Sep 17 00:00:00 2001 From: botn365 <42187820+botn365@users.noreply.github.com> Date: Mon, 12 Oct 2020 20:59:37 +0200 Subject: update lang file --- src/main/resources/assets/gregtech/lang/en_US.lang | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/resources/assets') diff --git a/src/main/resources/assets/gregtech/lang/en_US.lang b/src/main/resources/assets/gregtech/lang/en_US.lang index bda0fbff87..bb76bb3c9c 100644 --- a/src/main/resources/assets/gregtech/lang/en_US.lang +++ b/src/main/resources/assets/gregtech/lang/en_US.lang @@ -41,7 +41,7 @@ GT5U.machines.separatebus=Input busses are separated GT5U.machines.pumpareaset=Pumping area set to GT5U.machines.oilfluidpump=Oil/Fluid Pump GT5U.machines.minermulti=Multiblock Miner - +GT5U.machines.voidoveflow=Void Over Flow @@ -1016,4 +1016,4 @@ gregtech.areaExploratory=Exploratory gregtech.speedUnproductive=Unproductive gregtech.speedAccelerated=Accelerated gregtech.lifeBlink=Blink -gregtech.lifeEon=Eon \ No newline at end of file +gregtech.lifeEon=Eon -- cgit From cf5760685cb16758329f32df8eadfc703ec8abae Mon Sep 17 00:00:00 2001 From: korneel vandamme Date: Tue, 13 Oct 2020 17:31:28 +0200 Subject: better localisation handeling --- .../tileentities/storage/GT_MetaTileEntity_DigitalChestBase.java | 2 +- src/main/resources/assets/gregtech/lang/en_US.lang | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src/main/resources/assets') diff --git a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_DigitalChestBase.java b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_DigitalChestBase.java index 15b6c28f6d..6d97d9011d 100644 --- a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_DigitalChestBase.java +++ b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_DigitalChestBase.java @@ -63,7 +63,7 @@ public abstract class GT_MetaTileEntity_DigitalChestBase extends GT_MetaTileEnti @Override public final void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { mVoidOverflow = !mVoidOverflow; - GT_Utility.sendChatToPlayer(aPlayer, StatCollector.translateToLocal("GT5U.machines.voidoveflow") +" "+mVoidOverflow); + GT_Utility.sendChatToPlayer(aPlayer, StatCollector.translateToLocal(mVoidOverflow ? "GT5U.machines.voidoveflow.enabled" : "GT5U.machines.voidoveflow.disabled")); } @Override diff --git a/src/main/resources/assets/gregtech/lang/en_US.lang b/src/main/resources/assets/gregtech/lang/en_US.lang index bb76bb3c9c..88616c6041 100644 --- a/src/main/resources/assets/gregtech/lang/en_US.lang +++ b/src/main/resources/assets/gregtech/lang/en_US.lang @@ -41,7 +41,8 @@ GT5U.machines.separatebus=Input busses are separated GT5U.machines.pumpareaset=Pumping area set to GT5U.machines.oilfluidpump=Oil/Fluid Pump GT5U.machines.minermulti=Multiblock Miner -GT5U.machines.voidoveflow=Void Over Flow +GT5U.machines.voidoveflow.enabled=Overflow voiding enabled +GT5U.machines.voidoveflow.disabled=Overflow voiding disabled -- cgit From e13b3764e3e452ba14a96f49fdc32a520c7f2085 Mon Sep 17 00:00:00 2001 From: Prometheus0000000 Date: Tue, 3 Nov 2020 03:25:11 -0500 Subject: Added IV HOG only LCE --- src/main/java/gregtech/api/enums/ItemList.java | 2 + src/main/java/gregtech/api/enums/Textures.java | 3 + .../gregtech/common/blocks/GT_Block_Casings8.java | 6 +- .../GT_MetaTileEntity_ExtremeDieselEngine.java | 289 +++++++++++++++++++++ .../preload/GT_Loader_MetaTileEntities.java | 7 +- .../MACHINE_CASING_EXTREME_ENGINE_INTAKE.png | Bin 0 -> 585 bytes .../OVERLAY_FRONT_EXTREME_DIESEL_ENGINE.png | Bin 0 -> 439 bytes .../OVERLAY_FRONT_EXTREME_DIESEL_ENGINE_ACTIVE.png | Bin 0 -> 457 bytes .../gui/multimachines/LargeExtremeDieselEngine.png | Bin 0 -> 1673 bytes 9 files changed, 305 insertions(+), 2 deletions(-) create mode 100644 src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ExtremeDieselEngine.java create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/MACHINE_CASING_EXTREME_ENGINE_INTAKE.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_FRONT_EXTREME_DIESEL_ENGINE.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_FRONT_EXTREME_DIESEL_ENGINE_ACTIVE.png create mode 100644 src/main/resources/assets/gregtech/textures/gui/multimachines/LargeExtremeDieselEngine.png (limited to 'src/main/resources/assets') diff --git a/src/main/java/gregtech/api/enums/ItemList.java b/src/main/java/gregtech/api/enums/ItemList.java index 6f7a0567a1..8830ab50a5 100644 --- a/src/main/java/gregtech/api/enums/ItemList.java +++ b/src/main/java/gregtech/api/enums/ItemList.java @@ -1427,6 +1427,7 @@ public enum ItemList implements IItemContainer { Casing_Turbine2, Casing_Turbine3, Casing_EngineIntake, + Casing_ExtremeEngineIntake, Casing_Coil_Cupronickel, Casing_Coil_Kanthal, @@ -1570,6 +1571,7 @@ public enum ItemList implements IItemContainer { CuringOven, Machine_Multi_Assemblyline, Machine_Multi_DieselEngine, + Machine_Multi_ExtremeDieselEngine, QuantumEye, QuantumStar, Gravistar, diff --git a/src/main/java/gregtech/api/enums/Textures.java b/src/main/java/gregtech/api/enums/Textures.java index 7b229550ff..38001faebb 100644 --- a/src/main/java/gregtech/api/enums/Textures.java +++ b/src/main/java/gregtech/api/enums/Textures.java @@ -267,6 +267,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_CHEMICALLY_INERT, MACHINE_COIL_CUPRONICKEL, @@ -854,6 +855,8 @@ public class Textures { OVERLAY_FRONT_OIL_DRILL, OVERLAY_FRONT_DIESEL_ENGINE_ACTIVE, OVERLAY_FRONT_DIESEL_ENGINE, + OVERLAY_FRONT_EXTREME_DIESEL_ENGINE_ACTIVE, + OVERLAY_FRONT_EXTREME_DIESEL_ENGINE, OVERLAY_FRONT_PYROLYSE_OVEN_ACTIVE, OVERLAY_FRONT_PYROLYSE_OVEN, diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings8.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings8.java index 8d2c976b1b..0f3aac4518 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Casings8.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings8.java @@ -15,18 +15,20 @@ public class GT_Block_Casings8 //WATCH OUT FOR TEXTURE ID's public GT_Block_Casings8() { super(GT_Item_Casings8.class, "gt.blockcasings8", GT_Material_Casings.INSTANCE); - for (int i = 0; i < 4; i = (i + 1)) { + for (int i = 0; i < 5; i = (i + 1)) { Textures.BlockIcons.casingTexturePages[1][i+48] = new GT_CopiedBlockTexture(this, 6, i); } GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "Chemically Inert Machine Casing"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "PTFE Pipe Casing"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".2.name", "Mining Neutronium Casing"); GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".3.name", "Mining Black Plutonium Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".4.name", "Extreme Engine Intake Casing"); ItemList.Casing_Chemically_Inert.set(new ItemStack(this, 1, 0)); ItemList.Casing_Pipe_Polytetrafluoroethylene.set(new ItemStack(this, 1, 1)); ItemList.Casing_MiningNeutronium.set(new ItemStack(this, 1, 2)); ItemList.Casing_MiningBlackPlutonium.set(new ItemStack(this, 1, 3)); + ItemList.Casing_ExtremeEngineIntake.set(new ItemStack(this, 1, 4)); } @Override @@ -41,6 +43,8 @@ public class GT_Block_Casings8 return Textures.BlockIcons.MACHINE_CASING_MINING_NEUTRONIUM.getIcon(); case 3: return Textures.BlockIcons.MACHINE_CASING_MINING_BLACKPLUTONIUM.getIcon(); + case 4: + return Textures.BlockIcons.MACHINE_CASING_EXTREME_ENGINE_INTAKE.getIcon();//changed color in a terrible way } return Textures.BlockIcons.MACHINE_CASING_ROBUST_TUNGSTENSTEEL.getIcon(); } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ExtremeDieselEngine.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ExtremeDieselEngine.java new file mode 100644 index 0000000000..f38f0a1de2 --- /dev/null +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ExtremeDieselEngine.java @@ -0,0 +1,289 @@ +package gregtech.common.tileentities.machines.multi; + +import java.util.ArrayList; +import java.util.Collection; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.Materials; +import gregtech.api.enums.Textures; +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; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Dynamo; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Muffler; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; +import net.minecraft.block.Block; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.StatCollector; +import net.minecraftforge.fluids.FluidStack; + +public class GT_MetaTileEntity_ExtremeDieselEngine extends GT_MetaTileEntity_MultiBlockBase { + protected int fuelConsumption = 0; + protected int fuelValue = 0; + protected int fuelRemaining = 0; + protected boolean boostEu = false; + + public GT_MetaTileEntity_ExtremeDieselEngine(int aID, String aName, String aNameRegional) { + super(aID, aName, aNameRegional); + } + + public GT_MetaTileEntity_ExtremeDieselEngine(String aName) { + super(aName); + } + + public String[] getDescription() { + return new String[]{ + "Controller Block for the Extreme Combustion Engine", + "Size(WxHxD): 3x3x4, Controller (front centered)", + "3x3x4 of Robust Tungstensteel Machine Casing (hollow, Min 16!)", + "2x Titanium Gear Box Machine Casing inside the Hollow Casing",//todo + "8x Extreme Engine Intake Casing (around controller)", + "2x Input Hatch (HOG/Lubricant) (one of the Casings next to a Gear Box)", + "1x Input Hatch (Optional, for Liquid Oxygen) (one of the Casings next to a Gear Box)", + "1x Maintenance Hatch (one of the Casings next to a Gear Box)", + "1x Muffler Hatch (top middle back, above the rear Gear Box)", + "1x Dynamo Hatch (back centered)", + "Engine Intake Casings must not be obstructed in front (only air blocks)", + "Supply High Octane Gasoline and 8000L of Lubricant per hour to run.", + "Supply 320L of Liquid Oxygen per second to boost output (optional).", + "Default: Produces 8192EU/t at 100% efficiency", + "Boosted: Produces 32768EU/t at 400% efficiency", + "Causes " + 20 * getPollutionPerTick(null) + " Pollution per second"}; + } + + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + if (aSide == aFacing) { + return new ITexture[]{Textures.BlockIcons.casingTexturePages[0][60], new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_EXTREME_DIESEL_ENGINE_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_EXTREME_DIESEL_ENGINE)}; + } + return new ITexture[]{Textures.BlockIcons.casingTexturePages[0][60]};//controller texture? where do I find this? Copied plasma turbine + } + + @Override + public boolean isCorrectMachinePart(ItemStack aStack) { + return getMaxEfficiency(aStack) > 0; + } + + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "LargeExtremeDieselEngine.png");//change + } + + @Override + public boolean checkRecipe(ItemStack aStack) { + ArrayList tFluids = getStoredFluids(); + Collection tRecipeList = GT_Recipe.GT_Recipe_Map.sDieselFuels.mRecipeList; + + if(tFluids.contains(Materials.GasolinePremium.getFluid(4L))) { //Does input hatch contain HOG? + for (FluidStack hatchFluid1 : tFluids) { //Loops through hatches + for(GT_Recipe aFuel : tRecipeList) { //Loops through diesel fuel recipes dd. Can't remove because I suck at coding + FluidStack tLiquid; + + if ((tLiquid = GT_Utility.getFluidForFilledItem(aFuel.getRepresentativeInput(0), true)) != null) { //Create fluidstack from current recipe + if (hatchFluid1.isFluidEqual(tLiquid)) { //Has a diesel fluid + fuelConsumption = tLiquid.amount = boostEu ? (8192 / aFuel.mSpecialValue) : (2048 / aFuel.mSpecialValue); //Calc fuel consumption + if(depleteInput(tLiquid)) { //Deplete that amount ^Doesn't give bonus to fuel usage anymore + boostEu = depleteInput(Materials.LiquidOxygen.getGas(16L));//x8, and LOX instead + + if(tFluids.contains(Materials.Lubricant.getFluid(8L))) { //Has lubricant? + //Deplete Lubricant. 8000L should = 1 hour of runtime (if baseEU = 8192) + if(mRuntime % 72 == 0 || mRuntime == 0) depleteInput(Materials.Lubricant.getFluid(boostEu ? 16 : 8));//x8 + } else return false; + + fuelValue = aFuel.mSpecialValue; + fuelRemaining = hatchFluid1.amount; //Record available fuel + this.mEUt = mEfficiency < 2000 ? 0 : 8192; //Output 0 if startup is less than 20% + this.mProgresstime = 1; //will output 8192 normally, 32768 boosted + this.mMaxProgresstime = 1; + this.mEfficiencyIncrease = 15; + return true; + } + } + } + } + } + } + this.mEUt = 0; + this.mEfficiency = 0; + return false; + } + + @Override + public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + byte tSide = getBaseMetaTileEntity().getBackFacing(); + int tX = getBaseMetaTileEntity().getXCoord(); + int tY = getBaseMetaTileEntity().getYCoord(); + int tZ = getBaseMetaTileEntity().getZCoord(); + + if(getBaseMetaTileEntity().getBlockAtSideAndDistance(tSide, 1) != getGearboxBlock() && getBaseMetaTileEntity().getBlockAtSideAndDistance(tSide, 2) != getGearboxBlock()) { + return false; + } + if(getBaseMetaTileEntity().getMetaIDAtSideAndDistance(tSide, 1) != getGearboxMeta() && getBaseMetaTileEntity().getMetaIDAtSideAndDistance(tSide, 2) != getGearboxMeta()) { + return false; + } + for (byte i = -1; i < 2; i = (byte) (i + 1)) { + for (byte j = -1; j < 2; j = (byte) (j + 1)) { + if ((i != 0) || (j != 0)) { + for (byte k = 0; k < 4; k = (byte) (k + 1)) { + + final int fX = tX - (tSide == 5 ? 1 : tSide == 4 ? -1 : i), + fZ = tZ - (tSide == 2 ? -1 : tSide == 3 ? 1 : i), + aY = tY + j, + aX = tX + (tSide == 5 ? k : tSide == 4 ? -k : i), + aZ = tZ + (tSide == 2 ? -k : tSide == 3 ? k : i); + + final Block frontAir = getBaseMetaTileEntity().getBlock(fX, aY, fZ); + final String frontAirName = frontAir.getUnlocalizedName(); + if(!(getBaseMetaTileEntity().getAir(fX, aY, fZ) || frontAirName.equalsIgnoreCase("tile.air") || frontAirName.equalsIgnoreCase("tile.railcraft.residual.heat"))) { + return false; //Fail if vent blocks are obstructed + } + + if (((i == 0) || (j == 0)) && ((k == 1) || (k == 2))) { + if (getBaseMetaTileEntity().getBlock(aX, aY, aZ) == getCasingBlock() && getBaseMetaTileEntity().getMetaID(aX, aY, aZ) == getCasingMeta()) { + // Do nothing + } else if (!addMufflerToMachineList(getBaseMetaTileEntity().getIGregTechTileEntity(tX + (tSide == 5 ? 2 : tSide == 4 ? -2 : 0), tY + 1, tZ + (tSide == 3 ? 2 : tSide == 2 ? -2 : 0)), getCasingTextureIndex())) { + return false; //Fail if no muffler top middle back + } else if (!addToMachineList(getBaseMetaTileEntity().getIGregTechTileEntity(aX, aY, aZ))) { + return false; + } + } else if (k == 0) { + if(!(getBaseMetaTileEntity().getBlock(aX, aY, aZ) == getIntakeBlock() && getBaseMetaTileEntity().getMetaID(aX, aY, aZ) == getIntakeMeta())) { + return false; + } + } else if (getBaseMetaTileEntity().getBlock(aX, aY, aZ) == getCasingBlock() && getBaseMetaTileEntity().getMetaID(aX, aY, aZ) == getCasingMeta()) { + // Do nothing + } else { + return false; + } + } + } + } + } + this.mDynamoHatches.clear(); + IGregTechTileEntity tTileEntity = getBaseMetaTileEntity().getIGregTechTileEntityAtSideAndDistance(getBaseMetaTileEntity().getBackFacing(), 3); + if ((tTileEntity != null) && (tTileEntity.getMetaTileEntity() != null)) { + if ((tTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_Hatch_Dynamo)) { + this.mDynamoHatches.add((GT_MetaTileEntity_Hatch_Dynamo) tTileEntity.getMetaTileEntity()); + ((GT_MetaTileEntity_Hatch) tTileEntity.getMetaTileEntity()).updateTexture(getCasingTextureIndex()); + } else { + return false; + } + } + return true; + } + + public Block getCasingBlock() {//changed to RTSMC + return GregTech_API.sBlockCasings4; + } + + public byte getCasingMeta() {//same + return 0; + } + + public Block getIntakeBlock() { + return GregTech_API.sBlockCasings8;//added new + } + + public byte getIntakeMeta() {//same + return 4; + } + + public Block getGearboxBlock() { + return GregTech_API.sBlockCasings2; + } + + public byte getGearboxMeta() { + return 4; + } + + public byte getCasingTextureIndex() {//should be what hatches/busses change to? + return 60; + } + + private boolean addToMachineList(IGregTechTileEntity tTileEntity) { + return ((addMaintenanceToMachineList(tTileEntity, getCasingTextureIndex())) || (addInputToMachineList(tTileEntity, getCasingTextureIndex())) || (addOutputToMachineList(tTileEntity, getCasingTextureIndex())) || (addMufflerToMachineList(tTileEntity, getCasingTextureIndex()))); + } + + @Override + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_ExtremeDieselEngine(this.mName); + } + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + super.saveNBTData(aNBT); + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + super.loadNBTData(aNBT); + } + + @Override + public int getDamageToComponent(ItemStack aStack) { + return 1; + } + + public int getMaxEfficiency(ItemStack aStack) { + return boostEu ? 40000 : 10000;//4x output if boosted instead of x3 + } + + @Override + public int getPollutionPerTick(ItemStack aStack) { + return 192;//x8 + } + + @Override + public boolean explodesOnComponentBreak(ItemStack aStack) { + return true; + } + + @Override + public String[] getInfoData() { + int mPollutionReduction=0; + for (GT_MetaTileEntity_Hatch_Muffler tHatch : mMufflerHatches) { + if (isValidMetaTileEntity(tHatch)) { + mPollutionReduction=Math.max(tHatch.calculatePollutionReduction(100),mPollutionReduction); + } + } + + long storedEnergy=0; + long maxEnergy=0; + for(GT_MetaTileEntity_Hatch_Dynamo tHatch : mDynamoHatches) { + if (isValidMetaTileEntity(tHatch)) { + storedEnergy+=tHatch.getBaseMetaTileEntity().getStoredEU(); + maxEnergy+=tHatch.getBaseMetaTileEntity().getEUCapacity(); + } + } + + + return new String[]{ + EnumChatFormatting.BLUE+"Extreme Diesel Engine"+EnumChatFormatting.RESET, + StatCollector.translateToLocal("GT5U.multiblock.energy")+": " + + EnumChatFormatting.GREEN + Long.toString(storedEnergy) + EnumChatFormatting.RESET +" EU / "+ + EnumChatFormatting.YELLOW + Long.toString(maxEnergy) + EnumChatFormatting.RESET +" EU", + getIdealStatus() == getRepairStatus() ? + EnumChatFormatting.GREEN+StatCollector.translateToLocal("GT5U.turbine.maintenance.false")+EnumChatFormatting.RESET : + EnumChatFormatting.RED+StatCollector.translateToLocal("GT5U.turbine.maintenance.true")+EnumChatFormatting.RESET, + StatCollector.translateToLocal("GT5U.engine.output")+": " +EnumChatFormatting.RED+(-mEUt*mEfficiency/10000)+EnumChatFormatting.RESET+" EU/t", + StatCollector.translateToLocal("GT5U.engine.consumption")+": " +EnumChatFormatting.YELLOW+fuelConsumption+EnumChatFormatting.RESET+" L/t", + StatCollector.translateToLocal("GT5U.engine.value")+": " +EnumChatFormatting.YELLOW+fuelValue+EnumChatFormatting.RESET+" EU/L", + StatCollector.translateToLocal("GT5U.turbine.fuel")+": " +EnumChatFormatting.GOLD+fuelRemaining+EnumChatFormatting.RESET+" L", + StatCollector.translateToLocal("GT5U.engine.efficiency")+": " +EnumChatFormatting.YELLOW+(mEfficiency/100F)+EnumChatFormatting.YELLOW+" %", + StatCollector.translateToLocal("GT5U.multiblock.pollution")+": " + EnumChatFormatting.GREEN + mPollutionReduction+ EnumChatFormatting.RESET+" %" + + }; + } + + @Override + public boolean isGivingInformation() { + return true; + } + +} diff --git a/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java b/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java index 21746cb215..ef66fcd1d1 100644 --- a/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java +++ b/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java @@ -1253,10 +1253,15 @@ public class GT_Loader_MetaTileEntities implements Runnable {//TODO CHECK CIRCUI ItemList.Machine_Multi_Assemblyline.set(new GT_MetaTileEntity_AssemblyLine(1170, "multimachine.assemblyline", "Assembling Line").getStackForm(1L)); GT_ModHandler.addCraftingRecipe(ItemList.Machine_Multi_Assemblyline.get(1L), bitsd, new Object[]{aTextWireCoil, "EME", aTextWireCoil, 'M', ItemList.Hull_IV, 'W', ItemList.Casing_Assembler, 'E', OrePrefixes.circuit.get(Materials.Elite), 'C', ItemList.Robot_Arm_IV}); - + ItemList.Machine_Multi_DieselEngine.set(new GT_MetaTileEntity_DieselEngine(1171, "multimachine.dieselengine", "Combustion Engine").getStackForm(1L)); GT_ModHandler.addCraftingRecipe(ItemList.Machine_Multi_DieselEngine.get(1L), bitsd, new Object[]{"PCP", "EME", "GWG", 'M', ItemList.Hull_EV, 'P', ItemList.Electric_Piston_EV, 'E', ItemList.Electric_Motor_EV, 'C', OrePrefixes.circuit.get(Materials.Elite), 'W', OrePrefixes.cableGt01.get(Materials.TungstenSteel), 'G', OrePrefixes.gearGt.get(Materials.Titanium)}); GT_ModHandler.addCraftingRecipe(ItemList.Casing_EngineIntake.get(1L), bitsd, new Object[]{"PhP", "RFR", aTextPlateWrench, 'R', OrePrefixes.pipeMedium.get(Materials.Titanium), 'F', ItemList.Casing_StableTitanium, 'P', OrePrefixes.rotor.get(Materials.Titanium)}); + + //add recipe here, also # is meta (for controller at least). How do I find the next open #? + ItemList.Machine_Multi_ExtremeDieselEngine.set(new GT_MetaTileEntity_ExtremeDieselEngine(5000, "multimachine.extremedieselengine", "Extreme Combustion Engine").getStackForm(1L)); + GT_ModHandler.addCraftingRecipe(ItemList.Machine_Multi_ExtremeDieselEngine.get(1L), bitsd, new Object[]{"PCP", "EME", "GWG", 'M', ItemList.Hull_IV, 'P', ItemList.Electric_Piston_IV, 'E', ItemList.Electric_Motor_IV, 'C', OrePrefixes.circuit.get(Materials.Master), 'W', OrePrefixes.cableGt01.get(Materials.HSSG), 'G', OrePrefixes.gearGt.get(Materials.TungstenSteel)}); + GT_ModHandler.addCraftingRecipe(ItemList.Casing_ExtremeEngineIntake.get(1L), bitsd, new Object[]{"PhP", "RFR", aTextPlateWrench, 'R', OrePrefixes.pipeMedium.get(Materials.TungstenSteel), 'F', ItemList.Casing_RobustTungstenSteel, 'P', OrePrefixes.rotor.get(Materials.TungstenSteel)}); ItemList.Machine_Multi_Cleanroom.set(new GT_MetaTileEntity_Cleanroom(1172, "multimachine.cleanroom", "Cleanroom Controller").getStackForm(1)); //If Cleanroom is enabled, add a recipe, else hide from NEI. diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/MACHINE_CASING_EXTREME_ENGINE_INTAKE.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/MACHINE_CASING_EXTREME_ENGINE_INTAKE.png new file mode 100644 index 0000000000..b9f96fbceb Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/iconsets/MACHINE_CASING_EXTREME_ENGINE_INTAKE.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_FRONT_EXTREME_DIESEL_ENGINE.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_FRONT_EXTREME_DIESEL_ENGINE.png new file mode 100644 index 0000000000..bc1dd3f5f0 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_FRONT_EXTREME_DIESEL_ENGINE.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_FRONT_EXTREME_DIESEL_ENGINE_ACTIVE.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_FRONT_EXTREME_DIESEL_ENGINE_ACTIVE.png new file mode 100644 index 0000000000..b57178136f Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/blocks/iconsets/OVERLAY_FRONT_EXTREME_DIESEL_ENGINE_ACTIVE.png differ diff --git a/src/main/resources/assets/gregtech/textures/gui/multimachines/LargeExtremeDieselEngine.png b/src/main/resources/assets/gregtech/textures/gui/multimachines/LargeExtremeDieselEngine.png new file mode 100644 index 0000000000..cfe27fccf1 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/gui/multimachines/LargeExtremeDieselEngine.png differ -- cgit From 26fa46e05a12d507b484c86935574a078b58164b Mon Sep 17 00:00:00 2001 From: Prometheus0000000 Date: Wed, 18 Nov 2020 22:12:43 -0500 Subject: Add new method of displaying MB tooltips. LCR as example for now --- .../api/util/GT_Multiblock_Tooltip_Builder.java | 309 +++++++++++++++++++++ .../GT_MetaTileEntity_LargeChemicalReactor.java | 40 ++- src/main/resources/assets/gregtech/lang/en_US.lang | 21 ++ 3 files changed, 356 insertions(+), 14 deletions(-) create mode 100644 src/main/java/gregtech/api/util/GT_Multiblock_Tooltip_Builder.java (limited to 'src/main/resources/assets') diff --git a/src/main/java/gregtech/api/util/GT_Multiblock_Tooltip_Builder.java b/src/main/java/gregtech/api/util/GT_Multiblock_Tooltip_Builder.java new file mode 100644 index 0000000000..c8914c0b7d --- /dev/null +++ b/src/main/java/gregtech/api/util/GT_Multiblock_Tooltip_Builder.java @@ -0,0 +1,309 @@ +package gregtech.api.util; + +import java.util.LinkedList; +import java.util.List; + +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.StatCollector; + +/** + * This makes it easier to build multi tooltips, with a standardized format.
+ * Info section order should be:
+ * addMachineType
+ * addInfo, for what it does, special notes, etc.
+ * addSeparator, if you need it
+ * addPollutionAmount
+ *
+ * Structure order should be:
+ * beginStructureBlock
+ * addController
+ * addCasingInfo
+ * addOtherStructurePart, for secondary structure block info (pipes, coils, etc)
+ * addEnergyHatch/addDynamoHatch
+ * addMaintenanceHatch
+ * addMufflerHatch
+ * addInputBus/addInputHatch/addOutputBus/addOutputHatch, in that order
+ * Use addStructureInfo for any comments on nonstandard structure info wherever needed + *
+ * toolTipFinisher
+ *
+ * Originally created by kekzdealer + */ +public class GT_Multiblock_Tooltip_Builder { + private static final String TAB = " "; + private static final String COLON = ": "; + + private final List iLines; + private final List sLines; + + private String[] iArray; + private String[] sArray; + + //Localized tooltips + private static final String TT_machineType = StatCollector.translateToLocal("GT5U.MBTT.MachineType"); + private static final String TT_dimensions = StatCollector.translateToLocal("GT5U.MBTT.Dimensions"); + private static final String TT_structure = StatCollector.translateToLocal("GT5U.MBTT.Structure"); + private static final String TT_controller = StatCollector.translateToLocal("GT5U.MBTT.Controller"); + private static final String TT_minimum = StatCollector.translateToLocal("GT5U.MBTT.Minimum"); + private static final String TT_maintenancehatch = StatCollector.translateToLocal("GT5U.MBTT.MaintenanceHatch"); + private static final String TT_energyhatch = StatCollector.translateToLocal("GT5U.MBTT.EnergyHatch"); + private static final String TT_dynamohatch = StatCollector.translateToLocal("GT5U.MBTT.DynamoHatch"); + private static final String TT_mufflerhatch = StatCollector.translateToLocal("GT5U.MBTT.MufflerHatch"); + private static final String TT_inputbus = StatCollector.translateToLocal("GT5U.MBTT.InputBus"); + private static final String TT_inputhatch = StatCollector.translateToLocal("GT5U.MBTT.InputHatch"); + private static final String TT_outputbus = StatCollector.translateToLocal("GT5U.MBTT.OutputBus"); + private static final String TT_outputhatch = StatCollector.translateToLocal("GT5U.MBTT.OutputHatch"); + private static final String TT_causes = StatCollector.translateToLocal("GT5U.MBTT.Causes"); + private static final String TT_pps = StatCollector.translateToLocal("GT5U.MBTT.PPS"); + private static final String TT_hold = StatCollector.translateToLocal("GT5U.MBTT.Hold"); + private static final String TT_todisplay = StatCollector.translateToLocal("GT5U.MBTT.Display"); + private static final String TT_mod = StatCollector.translateToLocal("GT5U.MBTT.Mod"); + + public GT_Multiblock_Tooltip_Builder() { + iLines = new LinkedList<>(); + sLines = new LinkedList<>(); + } + + /** + * Add a line telling you what the machine type is. Usually, this will be the name of a SB version.
+ * Machine Type: machine + * + * @param machine + * Name of the machine type + * + * @return Instance this method was called on. + */ + public GT_Multiblock_Tooltip_Builder addMachineType(String machine) { + iLines.add(TT_machineType + EnumChatFormatting.YELLOW + machine + EnumChatFormatting.RESET); + return this; + } + + /** + * Add a basic line of information about this structure + * + * @param info + * The line to be added. + * @return Instance this method was called on. + */ + public GT_Multiblock_Tooltip_Builder addInfo(String info) { + iLines.add(info); + return this; + } + + /** + * Add a separator line like this:
+ * ----------------------------------------- + * + * @return Instance this method was called on. + */ + public GT_Multiblock_Tooltip_Builder addSeparator() { + iLines.add("-----------------------------------------"); + return this; + } + + /** + * Add a line telling you what the machine type is. Usually, this will be the name of a SB version.
+ * Machine Type: machine + * + * @param machine + * Name of the machine type + * + * @return Instance this method was called on. + */ + public GT_Multiblock_Tooltip_Builder addPollutionAmount(int pollution) { + iLines.add(TT_causes + " " + EnumChatFormatting.DARK_PURPLE + pollution + " " + TT_pps + EnumChatFormatting.RESET); + return this; + } + + /** + * Begin adding structural information by adding a line about the structure's dimensions + * and then inserting a "Structure:" line. + * + * @param w + * Structure width. + * @param h + * Structure height. + * @param l + * Structure depth/length. + * @return Instance this method was called on. + */ + public GT_Multiblock_Tooltip_Builder beginStructureBlock(int w, int h, int l) { + sLines.add(TT_dimensions + w + "x" + h + "x" + l + " (WxHxL)"); + sLines.add(TT_structure); + return this; + } + + /** + * Add a line of information about the structure:
+ * (indent)Controller: info + * @param info + * Positional information. + * @return Instance this method was called on. + */ + public GT_Multiblock_Tooltip_Builder addController(String info) { + sLines.add(TAB + TT_controller + info); + return this; + } + + /** + * Add a line of information about the structure:
+ * (indent)minCountx casingName (minimum) + * @param casingName + * Name of the Casing. + * @param minCount + * Minimum needed for valid structure check. + * @return Instance this method was called on. + */ + public GT_Multiblock_Tooltip_Builder addCasingInfo(String casingName, int minCount) { + sLines.add(TAB + minCount +"x " + casingName + " " + TT_minimum); + return this; + } + + /** + * Use this method to add a structural part that isn't covered by the other methods.
+ * (indent)name: info + * @param name + * Name of the hatch or other component. + * @param info + * Positional information. + * @return Instance this method was called on. + */ + public GT_Multiblock_Tooltip_Builder addOtherStructurePart(String name, String info) { + sLines.add(TAB + name + info); + return this; + } + + /** + * Add a line of information about the structure:
+ * (indent)Maintenance Hatch: info + * @param info + * Positional information. + * @return Instance this method was called on. + */ + public GT_Multiblock_Tooltip_Builder addMaintenanceHatch(String info) { + sLines.add(TAB + TT_maintenancehatch + info); + return this; + } + + /** + * Add a line of information about the structure:
+ * (indent)Muffler Hatch: info + * @param info + * Location where the hatch goes + * @return Instance this method was called on. + */ + public GT_Multiblock_Tooltip_Builder addMufflerHatch(String info) { + sLines.add(TAB + TT_mufflerhatch + info); + return this; + } + + /** + * Add a line of information about the structure:
+ * (indent)Energy Hatch: info + * @param info + * Positional information. + * @return Instance this method was called on. + */ + public GT_Multiblock_Tooltip_Builder addEnergyHatch(String info) { + sLines.add(TAB + TT_energyhatch + info); + return this; + } + + /** + * Add a line of information about the structure:
+ * (indent)Dynamo Hatch: info + * @param info + * Positional information. + * @return Instance this method was called on. + */ + public GT_Multiblock_Tooltip_Builder addDynamoHatch(String info) { + sLines.add(TAB + TT_dynamohatch + info); + return this; + } + + /** + * Add a line of information about the structure:
+ * (indent)Input Bus: info + * @param info + * Location where the bus goes + * @return Instance this method was called on. + */ + public GT_Multiblock_Tooltip_Builder addInputBus(String info) { + sLines.add(TAB + TT_inputbus + info); + return this; + } + + /** + * Add a line of information about the structure:
+ * (indent)Input Hatch: info + * @param info + * Location where the hatch goes + * @return Instance this method was called on. + */ + public GT_Multiblock_Tooltip_Builder addInputHatch(String info) { + sLines.add(TAB + TT_inputhatch + info); + return this; + } + + /** + * Add a line of information about the structure:
+ * (indent)Output Bus: info + * @param info + * Location where the bus goes + * @return Instance this method was called on. + */ + public GT_Multiblock_Tooltip_Builder addOutputBus(String info) { + sLines.add(TAB + TT_outputbus + info); + return this; + } + + /** + * Add a line of information about the structure:
+ * (indent)Output Hatch: info + * @param info + * Location where the bus goes + * @return Instance this method was called on. + */ + public GT_Multiblock_Tooltip_Builder addOutputHatch(String info) { + sLines.add(TAB + TT_outputhatch + info); + return this; + } + + /** + * Use this method to add non-standard structural info.
+ * (indent)info + * @param info + * The line to be added. + * @return Instance this method was called on. + */ + public GT_Multiblock_Tooltip_Builder addStructureInfo(String info) { + sLines.add(TAB + info); + return this; + } + + /** + * Call at the very end.
+ * Adds a final line with the mod name and information on how to display the structure guidelines.
+ * Ends the building process. + * + * @param mod + * Name of the mod that adds this multiblock machine + */ + public void toolTipFinisher(String mod) { + iLines.add(TT_hold + " " + EnumChatFormatting.BOLD + "[LSHIFT]" + EnumChatFormatting.RESET + EnumChatFormatting.GRAY + " " + TT_todisplay); + iLines.add(TT_mod + " " + EnumChatFormatting.GREEN + mod + EnumChatFormatting.RESET); + iArray = new String[iLines.size()]; + sArray = new String[sLines.size()]; + iLines.toArray(iArray); + sLines.toArray(sArray); + } + + public String[] getInformation() { + return iArray; + } + + public String[] getStructureInformation() { + return sArray; + } + +} diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java index fad880e5e4..c5f1852629 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java @@ -8,6 +8,7 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; 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 net.minecraft.block.Block; @@ -18,6 +19,8 @@ import net.minecraftforge.fluids.FluidStack; import java.util.ArrayList; +import org.lwjgl.input.Keyboard; + public class GT_MetaTileEntity_LargeChemicalReactor extends GT_MetaTileEntity_MultiBlockBase { private final int CASING_INDEX = 176; @@ -37,20 +40,29 @@ public class GT_MetaTileEntity_LargeChemicalReactor extends GT_MetaTileEntity_Mu @Override public String[] getDescription() { - return new String[] { - "Controller block for the Large Chemical Reactor", - "Has the same recipes as the Chemical Reactor", - "Does not lose efficiency when overclocked", - "Accepts fluids instead of fluid cells", - "Size(WxHxD): 3x3x3", - "3x3x3 of Chemically Inert Machine Casings (hollow, min 8!)", - "Controller (Front centered)", - "1x PTFE Pipe Machine Casing (inside the hollow casings)", - "1x Cupronickel Coil Block (next to PTFE Pipe Machine Casing)", - "1x Input Bus/Hatch (Any inert casing)", - "1x Output Bus/Hatch (Any inert casing)", - "1x Maintenance Hatch (Any inert casing)", - "1x Energy Hatch (Any inert casing)"}; + final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType("Chemical Reactor") + .addInfo("Controller block for the Large Chemical Reactor") + .addInfo("Does not lose efficiency when overclocked") + .addInfo("Accepts fluids instead of fluid cells") + .beginStructureBlock(3, 3, 3) + .addController("Front centered") + .addCasingInfo("Chemically Inert Machine Casings", 8) + .addOtherStructurePart("PTFE Pipe Machine Casing", "Center") + .addOtherStructurePart("Cupronickel Coil Block", "Adjacent to the PTFE Pipe Machine Casing") + .addEnergyHatch("Any Casing") + .addMaintenanceHatch("Any Casing") + .addInputBus("Any Casing") + .addInputHatch("Any Casing") + .addOutputBus("Any Casing") + .addOutputHatch("Any Casing") + .addStructureInfo("You can have multiple I/O hatches/busses") + .toolTipFinisher("Gregtech"); + if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { + return tt.getInformation(); + } else { + return tt.getStructureInformation(); + } } @Override diff --git a/src/main/resources/assets/gregtech/lang/en_US.lang b/src/main/resources/assets/gregtech/lang/en_US.lang index 88616c6041..53970634f9 100644 --- a/src/main/resources/assets/gregtech/lang/en_US.lang +++ b/src/main/resources/assets/gregtech/lang/en_US.lang @@ -1,3 +1,24 @@ +# Multiblock Tooltip Builder Keywords +# Context can be found in the class gregtech.api.util.GT_Multiblock_Tooltip_Builder +GT5U.MBTT.MachineType=Machine Type: +GT5U.MBTT.Dimensions=Dimensions: +GT5U.MBTT.Structure=Structure: +GT5U.MBTT.Controller=Controller: +GT5U.MBTT.Minimum=(minimum) +GT5U.MBTT.MaintenanceHatch=Maintenance Hatch: +GT5U.MBTT.MufflerHatch=Muffler Hatch: +GT5U.MBTT.EnergyHatch=Energy Hatch: +GT5U.MBTT.DynamoHatch=Dynamo Hatch: +GT5U.MBTT.InputBus=Input Bus/ses: +GT5U.MBTT.InputHatch=Input Hatch/es: +GT5U.MBTT.OutputBus=Output Bus/ses: +GT5U.MBTT.OutputHatch=Output Hatch/es: +GT5U.MBTT.Causes=Causes: +GT5U.MBTT.PPS=pollution per second +GT5U.MBTT.Hold=Hold +GT5U.MBTT.Display=to display structure guidelines +GT5U.MBTT.Mod=Added by + GT5U.turbine.running.true=Turbine running GT5U.turbine.running.false=Turbine stopped GT5U.turbine.maintenance.false=No Maintainance issues -- cgit From 9d13d05f76fb34c5827959acb802b519531d3289 Mon Sep 17 00:00:00 2001 From: Prometheus0000000 Date: Thu, 19 Nov 2020 23:28:05 -0500 Subject: Change all the multi tooltips over. Also changed tooltip class a bit --- .../api/util/GT_Multiblock_Tooltip_Builder.java | 75 ++++++++++++++++------ .../multi/GT_MetaTileEntity_AssemblyLine.java | 42 ++++++++---- .../GT_MetaTileEntity_BrickedBlastFurnace.java | 29 +++++++-- .../GT_MetaTileEntity_BronzeBlastFurnace.java | 5 +- .../multi/GT_MetaTileEntity_Charcoal_Pit.java | 31 ++++++--- .../multi/GT_MetaTileEntity_Cleanroom.java | 43 ++++++++----- .../GT_MetaTileEntity_ConcreteBackfiller2.java | 42 ++++++++---- .../GT_MetaTileEntity_ConcreteBackfillerBase.java | 38 ++++++++--- .../multi/GT_MetaTileEntity_DieselEngine.java | 47 +++++++++----- .../multi/GT_MetaTileEntity_DistillationTower.java | 35 ++++++---- .../GT_MetaTileEntity_ElectricBlastFurnace.java | 48 +++++++++----- .../multi/GT_MetaTileEntity_FusionComputer1.java | 33 ++++++++-- .../multi/GT_MetaTileEntity_FusionComputer2.java | 34 +++++++--- .../multi/GT_MetaTileEntity_FusionComputer3.java | 34 +++++++--- .../multi/GT_MetaTileEntity_HeatExchanger.java | 37 ++++++++--- .../GT_MetaTileEntity_ImplosionCompressor.java | 35 ++++++---- .../multi/GT_MetaTileEntity_LargeBoiler.java | 44 ++++++++----- .../GT_MetaTileEntity_LargeChemicalReactor.java | 21 +++--- .../multi/GT_MetaTileEntity_LargeTurbine_Gas.java | 33 ++++++---- .../GT_MetaTileEntity_LargeTurbine_HPSteam.java | 35 ++++++---- .../GT_MetaTileEntity_LargeTurbine_Plasma.java | 32 ++++++--- .../GT_MetaTileEntity_LargeTurbine_Steam.java | 35 ++++++---- .../multi/GT_MetaTileEntity_MultiFurnace.java | 37 +++++++---- .../multi/GT_MetaTileEntity_OilCracker.java | 38 +++++++---- .../multi/GT_MetaTileEntity_OilDrillBase.java | 39 +++++++---- .../GT_MetaTileEntity_OreDrillingPlantBase.java | 46 ++++++++----- .../multi/GT_MetaTileEntity_ProcessingArray.java | 39 +++++++---- .../multi/GT_MetaTileEntity_PyrolyseOven.java | 44 ++++++++----- .../multi/GT_MetaTileEntity_VacuumFreezer.java | 30 ++++++--- src/main/resources/assets/gregtech/lang/en_US.lang | 27 ++++---- 30 files changed, 766 insertions(+), 342 deletions(-) (limited to 'src/main/resources/assets') diff --git a/src/main/java/gregtech/api/util/GT_Multiblock_Tooltip_Builder.java b/src/main/java/gregtech/api/util/GT_Multiblock_Tooltip_Builder.java index c8914c0b7d..e30fe5d606 100644 --- a/src/main/java/gregtech/api/util/GT_Multiblock_Tooltip_Builder.java +++ b/src/main/java/gregtech/api/util/GT_Multiblock_Tooltip_Builder.java @@ -25,7 +25,7 @@ import net.minecraft.util.StatCollector; * addInputBus/addInputHatch/addOutputBus/addOutputHatch, in that order
* Use addStructureInfo for any comments on nonstandard structure info wherever needed *
- * toolTipFinisher
+ * toolTipFinisher goes at the very end
*
* Originally created by kekzdealer */ @@ -42,6 +42,7 @@ public class GT_Multiblock_Tooltip_Builder { //Localized tooltips private static final String TT_machineType = StatCollector.translateToLocal("GT5U.MBTT.MachineType"); private static final String TT_dimensions = StatCollector.translateToLocal("GT5U.MBTT.Dimensions"); + private static final String TT_hollow = StatCollector.translateToLocal("GT5U.MBTT.Hollow"); private static final String TT_structure = StatCollector.translateToLocal("GT5U.MBTT.Structure"); private static final String TT_controller = StatCollector.translateToLocal("GT5U.MBTT.Controller"); private static final String TT_minimum = StatCollector.translateToLocal("GT5U.MBTT.Minimum"); @@ -74,7 +75,7 @@ public class GT_Multiblock_Tooltip_Builder { * @return Instance this method was called on. */ public GT_Multiblock_Tooltip_Builder addMachineType(String machine) { - iLines.add(TT_machineType + EnumChatFormatting.YELLOW + machine + EnumChatFormatting.RESET); + iLines.add(TT_machineType + COLON + EnumChatFormatting.YELLOW + machine + EnumChatFormatting.RESET); return this; } @@ -111,7 +112,7 @@ public class GT_Multiblock_Tooltip_Builder { * @return Instance this method was called on. */ public GT_Multiblock_Tooltip_Builder addPollutionAmount(int pollution) { - iLines.add(TT_causes + " " + EnumChatFormatting.DARK_PURPLE + pollution + " " + TT_pps + EnumChatFormatting.RESET); + iLines.add(TT_causes + COLON + EnumChatFormatting.DARK_PURPLE + pollution + " " + EnumChatFormatting.GRAY + TT_pps); return this; } @@ -125,12 +126,50 @@ public class GT_Multiblock_Tooltip_Builder { * Structure height. * @param l * Structure depth/length. + * @param hollow + * T/F, adds a (hollow) comment if true * @return Instance this method was called on. */ - public GT_Multiblock_Tooltip_Builder beginStructureBlock(int w, int h, int l) { - sLines.add(TT_dimensions + w + "x" + h + "x" + l + " (WxHxL)"); - sLines.add(TT_structure); - return this; + public GT_Multiblock_Tooltip_Builder beginStructureBlock(int w, int h, int l, boolean hollow) { + if (hollow) { + sLines.add(TT_dimensions + COLON + w + "x" + h + "x" + l + " (WxHxL) " + TT_hollow); + } + else { + sLines.add(TT_dimensions + COLON + w + "x" + h + "x" + l + " (WxHxL)"); + } + sLines.add(TT_structure + COLON); + return this; + } + + /** + * Begin adding structural information by adding a line about the structure's dimensions
+ * and then inserting a "Structure:" line. Variable version displays min and max + * + * @param wmin + * Structure min width. + * @param wmax + * Structure max width. + * @param hmin + * Structure min height. + * @param hmax + * Structure max height. + * @param lmin + * Structure min depth/length. + * @param lmax + * Structure max depth/length. + * @param hollow + * T/F, adds a (hollow) comment if true + * @return Instance this method was called on. + */ + public GT_Multiblock_Tooltip_Builder beginVariableStructureBlock(int wmin, int wmax, int hmin, int hmax, int lmin, int lmax, boolean hollow) { + if (hollow) { + sLines.add(TT_dimensions + COLON + wmin + "-" + wmax + "x" + hmin + "-" + hmax + "x" + lmin + "-" + lmax + " (WxHxL) " + TT_hollow); + } + else { + sLines.add(TT_dimensions + COLON + wmin + "-" + wmax + "x" + hmin + "-" + hmax + "x" + lmin + "-" + lmax + " (WxHxL)"); + } + sLines.add(TT_structure + COLON); + return this; } /** @@ -141,7 +180,7 @@ public class GT_Multiblock_Tooltip_Builder { * @return Instance this method was called on. */ public GT_Multiblock_Tooltip_Builder addController(String info) { - sLines.add(TAB + TT_controller + info); + sLines.add(TAB + TT_controller + COLON + info); return this; } @@ -169,7 +208,7 @@ public class GT_Multiblock_Tooltip_Builder { * @return Instance this method was called on. */ public GT_Multiblock_Tooltip_Builder addOtherStructurePart(String name, String info) { - sLines.add(TAB + name + info); + sLines.add(TAB + name + COLON + info); return this; } @@ -181,7 +220,7 @@ public class GT_Multiblock_Tooltip_Builder { * @return Instance this method was called on. */ public GT_Multiblock_Tooltip_Builder addMaintenanceHatch(String info) { - sLines.add(TAB + TT_maintenancehatch + info); + sLines.add(TAB + TT_maintenancehatch + COLON + info); return this; } @@ -193,7 +232,7 @@ public class GT_Multiblock_Tooltip_Builder { * @return Instance this method was called on. */ public GT_Multiblock_Tooltip_Builder addMufflerHatch(String info) { - sLines.add(TAB + TT_mufflerhatch + info); + sLines.add(TAB + TT_mufflerhatch + COLON + info); return this; } @@ -205,7 +244,7 @@ public class GT_Multiblock_Tooltip_Builder { * @return Instance this method was called on. */ public GT_Multiblock_Tooltip_Builder addEnergyHatch(String info) { - sLines.add(TAB + TT_energyhatch + info); + sLines.add(TAB + TT_energyhatch + COLON + info); return this; } @@ -217,7 +256,7 @@ public class GT_Multiblock_Tooltip_Builder { * @return Instance this method was called on. */ public GT_Multiblock_Tooltip_Builder addDynamoHatch(String info) { - sLines.add(TAB + TT_dynamohatch + info); + sLines.add(TAB + TT_dynamohatch + COLON + info); return this; } @@ -229,7 +268,7 @@ public class GT_Multiblock_Tooltip_Builder { * @return Instance this method was called on. */ public GT_Multiblock_Tooltip_Builder addInputBus(String info) { - sLines.add(TAB + TT_inputbus + info); + sLines.add(TAB + TT_inputbus + COLON + info); return this; } @@ -241,7 +280,7 @@ public class GT_Multiblock_Tooltip_Builder { * @return Instance this method was called on. */ public GT_Multiblock_Tooltip_Builder addInputHatch(String info) { - sLines.add(TAB + TT_inputhatch + info); + sLines.add(TAB + TT_inputhatch + COLON + info); return this; } @@ -253,7 +292,7 @@ public class GT_Multiblock_Tooltip_Builder { * @return Instance this method was called on. */ public GT_Multiblock_Tooltip_Builder addOutputBus(String info) { - sLines.add(TAB + TT_outputbus + info); + sLines.add(TAB + TT_outputbus + COLON + info); return this; } @@ -265,7 +304,7 @@ public class GT_Multiblock_Tooltip_Builder { * @return Instance this method was called on. */ public GT_Multiblock_Tooltip_Builder addOutputHatch(String info) { - sLines.add(TAB + TT_outputhatch + info); + sLines.add(TAB + TT_outputhatch + COLON + info); return this; } @@ -291,7 +330,7 @@ public class GT_Multiblock_Tooltip_Builder { */ public void toolTipFinisher(String mod) { iLines.add(TT_hold + " " + EnumChatFormatting.BOLD + "[LSHIFT]" + EnumChatFormatting.RESET + EnumChatFormatting.GRAY + " " + TT_todisplay); - iLines.add(TT_mod + " " + EnumChatFormatting.GREEN + mod + EnumChatFormatting.RESET); + iLines.add(TT_mod + COLON + EnumChatFormatting.GREEN + mod + EnumChatFormatting.GRAY); iArray = new String[iLines.size()]; sArray = new String[sLines.size()]; iLines.toArray(iArray); diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java index 67ce33f104..c90df2a7a7 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java @@ -2,6 +2,8 @@ package gregtech.common.tileentities.machines.multi; import java.util.ArrayList; +import org.lwjgl.input.Keyboard; + import gregtech.api.GregTech_API; import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; @@ -14,6 +16,7 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_DataAccess; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; 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 net.minecraft.entity.player.InventoryPlayer; @@ -42,17 +45,34 @@ public class GT_MetaTileEntity_AssemblyLine } public String[] getDescription() { - return new String[]{"Assembling Line", - "Size: 3x(5-16)x4, variable length", - "From Bottom to Top, Left to Right", - "Layer 1 - Solid Steel Machine Casing, Input Bus (last is Output Bus), Solid Steel Machine Casing", - " - Casings can be replaced by Maint or Input Hatch", - "Layer 2 - Reinforced Glass, Assembling Line Casing, Reinforced Glass", - "Layer 3 - Grate Machine Casing, Assembler Machine Casing, Grate Machine Casing", - "Layer 4 - Empty, Solid Steel Machine Casing, Empty - Casing can be replaced by Energy Hatch", - "Up to 16 repeating slices, First replaces 1 Grate with Assembly Line,", - "Last has Output Bus instead of Input Bus", - "Optional - Replace 1x Grate with Data Access Hatch next to the Controller"}; + final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType("Assembling Line") + .addInfo("Controller block for the Assembling Line") + .addInfo("Used to make complex machine parts (LuV+)") + .addInfo("Does not make Assembler items") + .addSeparator() + .beginVariableStructureBlock(5, 15, 4, 4, 3, 3, false)//? + .addStructureInfo("From Bottom to Top, Left to Right") + .addStructureInfo("Layer 1 - Solid Steel Machine Casing, Input Bus (last is Output Bus), Solid Steel Machine Casing") + .addStructureInfo("Layer 2 - Reinforced Glass, Assembling Line Casing, Reinforced Glass") + .addStructureInfo("Layer 3 - Grate Machine Casing, Assembler Machine Casing, Grate Machine Casing") + .addStructureInfo("Layer 4 - Empty, Solid Steel Machine Casing, Empty") + .addStructureInfo("Up to 16 repeating slices, each one allows for 1 more item in recipes, aside from the last") + .addStructureInfo("Optional - Replace 1x Grate with (Advanced) Data Access Hatch next to the Controller") + .addStructureInfo("Optional - Replace 1x Grate with (Advanced) Data Access Hatch next to the Controller")//TT + + .addController("Either Grate on layer 3 of the first slice") + .addEnergyHatch("Any layer 4 casing") + .addMaintenanceHatch("Any layer 1 casing") + .addInputBus("As specified on layer 1") + .addInputHatch("Any layer 1 casing") + .addOutputBus("Replaces Input Bus on final slice") + .toolTipFinisher("Gregtech"); + if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { + return tt.getInformation(); + } else { + return tt.getStructureInformation(); + } } public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BrickedBlastFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BrickedBlastFurnace.java index 95b45e2cc4..eb1ce1348f 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BrickedBlastFurnace.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BrickedBlastFurnace.java @@ -1,11 +1,14 @@ package gregtech.common.tileentities.machines.multi; +import org.lwjgl.input.Keyboard; + import gregtech.api.GregTech_API; import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import net.minecraft.block.Block; public class GT_MetaTileEntity_BrickedBlastFurnace extends GT_MetaTileEntity_PrimitiveBlastFurnace{ @@ -26,13 +29,25 @@ public class GT_MetaTileEntity_BrickedBlastFurnace extends GT_MetaTileEntity_Pri } public String[] getDescription() { - return new String[]{ - "Controller Block for the Bricked Blast Furnace", - "Controller has to be placed in the (front) center of the second layer", - "Useable for Steel and general Pyrometallurgy", - "Size(WxHxD): 3x4x3 (Hollow, with opening on top)", - "Built from 32 Firebricks", - "Causes 200 Pollution per second"}; + final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType("Blast Furnace") + .addInfo("Controller Block for the Bricked Blast Furnace") + .addInfo("Usable for Steel and general Pyrometallurgy") + .addInfo("Has a useful interface, unlike other gregtech multis") + .addPollutionAmount(200) + .addSeparator() + .beginStructureBlock(3, 4, 3, true) + .addController("Front center") + .addOtherStructurePart("Firebricks", "Everything except the controller") + .addStructureInfo("The top block is also empty") + .addStructureInfo("You can share the walls of GT multis, so") + .addStructureInfo("each additional one costs less, up to 4") + .toolTipFinisher("Gregtech"); + if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { + return tt.getInformation(); + } else { + return tt.getStructureInformation(); + } } public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java index 0ca5b79d68..af388a790d 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java @@ -27,12 +27,13 @@ public class GT_MetaTileEntity_BronzeBlastFurnace } public String[] getDescription() { - return new String[]{ + return new String[]{"Disabled"}; + /*return new String[]{ "Controller Block for the Bronze Blast Furnace", "Useable for Steel and general Pyrometallurgy", "Size(WxHxD): 3x4x3 (Hollow, with opening on top)", "Built from 32 Bronze Plated Bricks", - "Causes 200 Pollution per second"}; + "Causes 200 Pollution per second"};*/ } public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java index 8be3b10f54..8459f5e84b 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java @@ -2,6 +2,8 @@ package gregtech.common.tileentities.machines.multi; import java.util.ArrayList; +import org.lwjgl.input.Keyboard; + import gregtech.api.GregTech_API; import gregtech.api.enums.OrePrefixes; import gregtech.api.enums.Textures; @@ -10,6 +12,7 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import gregtech.api.util.GT_Recipe; import gregtech.common.GT_Pollution; import net.minecraft.block.Block; @@ -38,15 +41,25 @@ public class GT_MetaTileEntity_Charcoal_Pit extends GT_MetaTileEntity_MultiBlock } public String[] getDescription() { - return new String[]{ - "Controller for the Charcoal Pit", - "Converts Logs into Brittle Charcoal blocks", - "Max Size(WxHxD): 11x6x11, Controller (Top layer, centered)", - "11x1x11 of Bricks (Bottom layer only)", - "11x5x11 of Logs (Above bottom Brick layer)", - "Only grass/dirt can touch Log blocks", - "No air between logs allowed", - "Causes 100 Pollution per second"}; + final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType("Charcoal Pile Igniter") + .addInfo("Controller for the Charcoal Pit") + .addInfo("Converts Logs into Brittle Charcoal blocks") + .addInfo("Will automatically start when valid") + .addPollutionAmount(100) + .addSeparator() + .beginVariableStructureBlock(3, 11, 3, 6, 3, 11, false) + .addStructureInfo("Can be up to 11x6x11 in size, shape doesn't matter") + .addOtherStructurePart("Bricks", "Bottom layer, under all wood logs") + .addOtherStructurePart("Dirt/Grass", "All logs must be covered by these, the controller, or bricks") + .addOtherStructurePart("Wood Logs", "Inside the previously mentioned blocks") + .addStructureInfo("No air between logs allowed") + .toolTipFinisher("Gregtech"); + if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { + return tt.getInformation(); + } else { + return tt.getStructureInformation(); + } } public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java index 21a407f6e2..606c63110f 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java @@ -12,6 +12,7 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicHull; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_Log; +import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import gregtech.api.util.GT_Recipe; import net.minecraft.block.Block; import net.minecraft.entity.player.InventoryPlayer; @@ -20,6 +21,8 @@ import net.minecraft.tileentity.TileEntity; import static gregtech.api.enums.GT_Values.debugCleanroom; +import org.lwjgl.input.Keyboard; + public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_MultiBlockBase { private int mHeight = -1; @@ -38,21 +41,31 @@ public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_MultiBlockBas @Override public String[] getDescription() { - return new String[]{ - "Controller Block for the Cleanroom", - "Min(WxHxD): 3x4x3 (Hollow), Max(WxHxD): 15x15x15 (Hollow)", - "Controller (Top center)", - "Top besides contoller and edges: Filter Machine Casing", - "1 Reinforced Door (keep closed for 100% efficency)", - "1x LV or 1x MV Energy Hatch, 1x Maintainance Hatch", - "Up to 10 Machine Hull Item & Energy transfer through walls", - "Remaining Blocks: Plascrete, 20 min", - GT_Values.cleanroomGlass+"% of the Plascrete can be Reinforced Glass (min 20 Plascrete still apply)", - "Consumes 40 EU/t when first turned on and 4 EU/t once at 100% efficiency when not overclocked", - "An energy hatch accepts up to 2A, so you can use 2A LV or 1A MV", - "2 LV batteries + 1 LV generator or 1 MV generator", - "Time required to reach full efficiency is propotional to the height of empty space within.", - "Make sure your Energy Hatch matches!"}; + final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType("Cleanroom") + .addInfo("Controller block for the Cleanroom") + .addInfo("Consumes 40 EU/t when first turned on and 4 EU/t once at 100% efficiency when not overclocked")//? + .addInfo("An energy hatch accepts up to 2A, so you can use 2A LV or 1A MV") + .addInfo("2 LV batteries + 1 LV generator or 1 MV generator")//? + .addInfo("Time required to reach full efficiency is propotional to the height of empty space within") + .addInfo("Make sure your Energy Hatch matches! ?") + .addSeparator() + .beginVariableStructureBlock(3, 15, 4, 15, 3, 15, true) + .addController("Top center") + .addCasingInfo("Plascrete", 20) + .addStructureInfo(GT_Values.cleanroomGlass+"% of the Plascrete can be replaced with Reinforced Glass")//check + .addOtherStructurePart("Filter Machine Casing", "Top besides controller and edges") + .addEnergyHatch("LV or MV, any casing")//check + .addMaintenanceHatch("Any casing") + .addStructureInfo("1x Reinforced Door (keep closed or efficiency will reduce)") + .addStructureInfo("Up to 10 Machine Hulls for Item & Energy transfer through walls") + .addStructureInfo("You can also use Diodes for more power") + .toolTipFinisher("Gregtech"); + if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { + return tt.getInformation(); + } else { + return tt.getStructureInformation(); + } } @Override diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ConcreteBackfiller2.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ConcreteBackfiller2.java index 0a68bd7b03..ed6c028243 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ConcreteBackfiller2.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ConcreteBackfiller2.java @@ -4,9 +4,12 @@ import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import static gregtech.api.enums.GT_Values.VN; +import org.lwjgl.input.Keyboard; + public class GT_MetaTileEntity_ConcreteBackfiller2 extends GT_MetaTileEntity_ConcreteBackfillerBase { public GT_MetaTileEntity_ConcreteBackfiller2(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); @@ -19,18 +22,33 @@ public class GT_MetaTileEntity_ConcreteBackfiller2 extends GT_MetaTileEntity_Con @Override public String[] getDescription() { String casings = getCasingBlockItem().get(0).getDisplayName(); - return new String[]{ - "Controller Block for the Advanced Concrete Backfiller", - "Size(WxHxD): 3x7x3", "Controller (Front middle at bottom)", - "3x1x3 Base of " + casings, - "1x3x1 " + casings + " pillar (Center of base)", - "1x3x1 " + getFrameMaterial().mName + " Frame Boxes (Each pillar side and on top)", - "1x Input Hatch (One of base casings)", - "1x Maintenance Hatch (One of base casings)", - "1x " + VN[getMinTier()] + "+ Energy Hatch (Any bottom layer casing)", - "Put Programmed Circuits into Data Access to config radius", - "Radius = (total config value)x2 blocks", - "Default 64, Maximum 128",}; + + final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType("Concrete Backfiller") + .addInfo("Controller Block for the Advanced Concrete Backfiller") + .addInfo("Will fill in areas below it with light concrete. This goes through walls") + .addInfo("Use it to remove any spawning locations beneath your base to reduce lag") + .addInfo("Will pull back the pipes after it finishes that layer") + .addInfo("Put Programmed Circuits into a Data Access Hatch to config radius. Buggy") + .addInfo("Radius = (total config value)x2 blocks. Default 64, Maximum 128")//broken + .addSeparator() + .beginStructureBlock(3, 7, 3, false) + .addController("Front bottom") + .addStructureInfo(casings + " form the 3x1x3 Base") + .addOtherStructurePart(casings, " 1x3x1 pillar above the center of the base (2 minimum total)") + .addOtherStructurePart(getFrameMaterial().mName + " Frame Boxes", "Each pillar's side and 1x3x1 on top") + .addEnergyHatch(VN[getMinTier()] + "+, Any base casing") + .addMaintenanceHatch("Any base casing") + .addStructureInfo("Data Access Hatch: Any base casing") + .addInputBus("Mining Pipes, optional, any base casing") + .addInputHatch("GT Concrete, any base casing") + .addOutputBus("Mining Pipes, optional, any base casing") + .toolTipFinisher("Gregtech"); + if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { + return tt.getInformation(); + } else { + return tt.getStructureInformation(); + } } @Override diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ConcreteBackfillerBase.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ConcreteBackfillerBase.java index a70b5d76b8..a65f4d0e86 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ConcreteBackfillerBase.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ConcreteBackfillerBase.java @@ -4,12 +4,15 @@ import gregtech.api.GregTech_API; import gregtech.api.enums.Materials; import gregtech.api.gui.GT_GUIContainer_MultiMachine; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import gregtech.api.util.GT_Utility; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; import static gregtech.api.enums.GT_Values.VN; +import org.lwjgl.input.Keyboard; + public abstract class GT_MetaTileEntity_ConcreteBackfillerBase extends GT_MetaTileEntity_DrillerBase { private int mLastXOff = 0, mLastZOff = 0; @@ -24,16 +27,31 @@ public abstract class GT_MetaTileEntity_ConcreteBackfillerBase extends GT_MetaTi protected String[] getDescriptionInternal(String tierSuffix) { String casings = getCasingBlockItem().get(0).getDisplayName(); - return new String[]{ - "Controller Block for the Concrete Backfiller " + (tierSuffix != null ? tierSuffix : ""), - "Size(WxHxD): 3x7x3", "Controller (Front middle at bottom)", - "3x1x3 Base of " + casings, - "1x3x1 " + casings + " pillar (Center of base)", - "1x3x1 " + getFrameMaterial().mName + " Frame Boxes (Each pillar side and on top)", - "1x Input Hatch (One of base casings)", - "1x Maintenance Hatch (One of base casings)", - "1x " + VN[getMinTier()] + "+ Energy Hatch (Any bottom layer casing)", - "Radius is " + getRadius() + " blocks"}; + + final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType("Concrete Backfiller") + .addInfo("Controller Block for the Concrete Backfiller " + (tierSuffix != null ? tierSuffix : ""))//Unused? + .addInfo("Will fill in areas below it with light concrete. This goes through walls") + .addInfo("Use it to remove any spawning locations beneath your base to reduce lag") + .addInfo("Will pull back the pipes after it finishes that layer") + .addInfo("Radius is " + getRadius() + " blocks") + .addSeparator() + .beginStructureBlock(3, 7, 3, false) + .addController("Front bottom") + .addStructureInfo(casings + " form the 3x1x3 Base") + .addOtherStructurePart(casings, " 1x3x1 pillar above the center of the base (2 minimum total)") + .addOtherStructurePart(getFrameMaterial().mName + " Frame Boxes", "Each pillar's side and 1x3x1 on top") + .addEnergyHatch(VN[getMinTier()] + "+, Any base casing") + .addMaintenanceHatch("Any base casing") + .addInputBus("Mining Pipes, optional, any base casing") + .addInputHatch("GT Concrete, any base casing") + .addOutputBus("Mining Pipes, optional, any base casing") + .toolTipFinisher("Gregtech"); + if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { + return tt.getInformation(); + } else { + return tt.getStructureInformation(); + } } @Override diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java index c37a5a9976..36e607ce93 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java @@ -3,6 +3,8 @@ package gregtech.common.tileentities.machines.multi; import java.util.ArrayList; import java.util.Collection; +import org.lwjgl.input.Keyboard; + import gregtech.api.GregTech_API; import gregtech.api.enums.Materials; import gregtech.api.enums.Textures; @@ -15,6 +17,7 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Dynam import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Muffler; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; 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 net.minecraft.block.Block; @@ -40,22 +43,34 @@ public class GT_MetaTileEntity_DieselEngine extends GT_MetaTileEntity_MultiBlock } public String[] getDescription() { - return new String[]{ - "Controller Block for the Large Combustion Engine", - "Size(WxHxD): 3x3x4, Controller (front centered)", - "3x3x4 of Stable Titanium Machine Casing (hollow, Min 16!)", - "2x Titanium Gear Box Machine Casing inside the Hollow Casing", - "8x Engine Intake Machine Casing (around controller)", - "2x Input Hatch (Fuel/Lubricant) (one of the Casings next to a Gear Box)", - "1x Maintenance Hatch (one of the Casings next to a Gear Box)", - "1x Muffler Hatch (top middle back, next to the rear Gear Box)", - "1x Dynamo Hatch (back centered)", - "Engine Intake Casings must not be obstructed in front (only air blocks)", - "Supply Flammable Fuels and 1000L of Lubricant per hour to run.", - "Supply 40L of Oxygen per second to boost output (optional).", - "Default: Produces 2048EU/t at 100% efficiency", - "Boosted: Produces 6144EU/t at 150% efficiency", - "Causes " + 20 * getPollutionPerTick(null) + " Pollution per second"}; + final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType("Combustion Generator") + .addInfo("Controller block for the Large Combustion Engine") + .addInfo("Supply Diesel Fuels and 1000L of Lubricant per hour to run") + .addInfo("Supply 40L/s of Oxygen to boost output (optional)") + .addInfo("Default: Produces 2048EU/t at 100% fuel efficiency") + .addInfo("Boosted: Produces 6144EU/t at 150% fuel efficiency") + .addInfo("You need to wait for it to reach 300% to output full power") + .addPollutionAmount(20 * getPollutionPerTick(null)) + .addSeparator() + .beginStructureBlock(3, 3, 4, false) + .addController("Front center") + .addCasingInfo("Stable Titanium Machine Casing", 16) + .addOtherStructurePart("Titanium Gear Box Machine Casing", "Inner 2 blocks") + .addOtherStructurePart("Engine Intake Machine Casing", "8x, ring around controller") + .addStructureInfo("Engine Intake Casings must not be obstructed in front (only air blocks)") + .addDynamoHatch("Back center") + .addMaintenanceHatch("One of the casings next to a Gear Box") + .addMufflerHatch("Top middle back, above the rear Gear Box") + .addInputHatch("Diesel Fuel, next to a Gear Box") + .addInputHatch("Lubricant, next to a Gear Box") + .addInputHatch("Oxygen, optional, next to a Gear Box") + .toolTipFinisher("Gregtech"); + if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { + return tt.getInformation(); + } else { + return tt.getStructureInformation(); + } } public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java index 45ba3c97f5..12ab91d876 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java @@ -10,6 +10,7 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Outpu import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; 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 net.minecraft.block.Block; @@ -20,6 +21,8 @@ import net.minecraftforge.fluids.FluidStack; import java.util.ArrayList; +import org.lwjgl.input.Keyboard; + public class GT_MetaTileEntity_DistillationTower extends GT_MetaTileEntity_MultiBlockBase { private static final int CASING_INDEX = 49; @@ -38,18 +41,26 @@ public class GT_MetaTileEntity_DistillationTower } public String[] getDescription() { - return new String[]{ - "Controller Block for the Distillation Tower", - "Size(WxHxD): 3xhx3 (Hollow), with h ranging from 3 to 12", - "Controller (Front bottom)", - "1x Input Hatch (Any bottom layer casing)", - "2-11x Output Hatch (One per layer except bottom layer)", - "1x Output Bus (Any bottom layer casing)", - "1x Maintenance Hatch (Any casing)", - "1x Energy Hatch (Any casing)", - "Fluids are only put out at the correct height", - "The correct height equals the slot number in the NEI recipe", - "Clean Stainless Steel Machine Casings for the rest (7 x h - 5 at least!)"}; + final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType("Distillery") + .addInfo("Controller block for the Distillation Tower") + .addInfo("Fluids are only put out at the correct height") + .addInfo("The correct height equals the slot number in the NEI recipe") + .addSeparator() + .beginVariableStructureBlock(3, 3, 3, 12, 3, 3, true) + .addController("Front bottom") + .addOtherStructurePart("Clean Stainless Steel Machine Casing", "7 x h - 5 (minimum)") + .addEnergyHatch("Any casing") + .addMaintenanceHatch("Any casing") + .addInputHatch("Any bottom layer casing") + .addOutputBus("Any bottom layer casing") + .addOutputHatch("2-11x Output Hatches (One per layer except bottom layer)") + .toolTipFinisher("Gregtech"); + if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { + return tt.getInformation(); + } else { + return tt.getStructureInformation(); + } } public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { 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 df3dea34fa..061db80ece 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 @@ -5,6 +5,8 @@ import static gregtech.api.enums.GT_Values.VN; import java.util.ArrayList; +import org.lwjgl.input.Keyboard; + import gregtech.api.GregTech_API; import gregtech.api.enums.Materials; import gregtech.api.enums.Textures; @@ -18,6 +20,7 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Outpu import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; 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 net.minecraft.entity.player.InventoryPlayer; @@ -47,22 +50,35 @@ public class GT_MetaTileEntity_ElectricBlastFurnace } public String[] getDescription() { - return new String[]{ - "Controller Block for the Blast Furnace", - "Size(WxHxD): 3x4x3 (Hollow), Controller (Front middle bottom)", - "16x Heating Coils (Two middle Layers, hollow)", - "1x Input Hatch/Bus (Any bottom layer casing)", - "1x Output Hatch/Bus (Any bottom layer casing)", - "1x Energy Hatch (Any bottom layer casing)", - "1x Maintenance Hatch (Any bottom layer casing)", - "1x Muffler Hatch (Top middle)", - "1x Output Hatch to recover CO2/CO/SO2 (optional, any top layer casing),", - " Recovery scales with Muffler Hatch tier", - "Heat Proof Machine Casings for the rest", - "Each 900K over the min. Heat Capacity multiplies eu/t by 0.95", - "Each 1800K over the min. Heat Capacity allows for one upgraded overclock", - "Upgraded overclocks reduce recipe time to 25% and increase EU/t to 400%", - "Causes " + 20 * getPollutionPerTick(null) + " Pollution per second"}; + final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType("Blast Furnace") + .addInfo("Controller block for the Electric Blast Furnace") + .addInfo("You can use some fluids to reduce recipe time. Place the circuit in the Input Bus") + .addInfo("Each 900K over the min. Heat required multiplies EU/t by 0.95") + .addInfo("Each 1800K over the min. Heat required allows for one upgraded overclock instead of normal") + .addInfo("Upgraded overclocks reduce recipe time to 25% (instead of 50%) and increase EU/t to 400%") + .addInfo("Additionally gives +100K for every tier past MV") + .addPollutionAmount(20 * getPollutionPerTick(null)) + .addSeparator() + .beginStructureBlock(3, 4, 3, true) + .addController("Front bottom") + .addCasingInfo("Heat Proof Machine Casing", 0) + .addOtherStructurePart("Heating Coils (any tier)", "Two middle Layers") + .addEnergyHatch("Any bottom layer casing") + .addMaintenanceHatch("Any bottom layer casing") + .addMufflerHatch("Top middle") + .addInputBus("Any bottom layer casing") + .addInputHatch("Any bottom layer casing") + .addOutputBus("Any bottom layer casing") + .addOutputHatch("Gasses, Any top layer casing") + .addStructureInfo("Recovery amount scales with Muffler Hatch tier") + .addOutputHatch("Platline fluids, Any bottom layer casing") + .toolTipFinisher("Gregtech"); + if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { + return tt.getInformation(); + } else { + return tt.getStructureInformation(); + } } public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer1.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer1.java index 77290441cd..9da832c81a 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer1.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer1.java @@ -1,10 +1,13 @@ package gregtech.common.tileentities.machines.multi; +import org.lwjgl.input.Keyboard; + import gregtech.api.GregTech_API; import gregtech.api.enums.Textures; import gregtech.api.interfaces.IIconContainer; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import net.minecraft.block.Block; public class GT_MetaTileEntity_FusionComputer1 extends GT_MetaTileEntity_FusionComputer { @@ -48,13 +51,29 @@ public class GT_MetaTileEntity_FusionComputer1 extends GT_MetaTileEntity_FusionC } public String[] getDescription() { - return new String[]{ - "It's over 9000!!!", - "LuV Machine Casings around Superconducting Coil Blocks", - "2-16 Input Hatches", "1-16 Output Hatches", - "1-16 Energy Hatches", - "All Hatches must be LuV or better", - "2048EU/t and 10mio EU Cap per Energy Hatch"}; + final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType("Fusion Reactor") + .addInfo("It's over 9000!!!") + .addInfo("Controller block for the Fusion Reactor Mk I") + .addInfo("2048EU/t and 10M EU capacity per Energy Hatch") + .addInfo("If the recipe has a startup cost greater than the") + .addInfo("number of energy hatches * cap, you can't do it") + .addSeparator() + .beginStructureBlock(15, 3, 15, false) + .addController("See diagram when placed") + .addCasingInfo("LuV Machine Casing", 79) + .addStructureInfo("Cover the coils with casing") + .addOtherStructurePart("Superconducting Coil Block", "Center part of the ring") + .addEnergyHatch("1-16, Specified casings") + .addInputHatch("2-16, Specified casings") + .addOutputHatch("1-16, Specified casings") + .addStructureInfo("ALL Hatches must be LuV or better") + .toolTipFinisher("Gregtech"); + if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { + return tt.getInformation(); + } else { + return tt.getStructureInformation(); + } } @Override diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer2.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer2.java index c091d637bc..7a363f8f6f 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer2.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer2.java @@ -1,10 +1,13 @@ package gregtech.common.tileentities.machines.multi; +import org.lwjgl.input.Keyboard; + import gregtech.api.GregTech_API; import gregtech.api.enums.Textures; import gregtech.api.interfaces.IIconContainer; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import net.minecraft.block.Block; public class GT_MetaTileEntity_FusionComputer2 extends GT_MetaTileEntity_FusionComputer { @@ -48,14 +51,29 @@ public class GT_MetaTileEntity_FusionComputer2 extends GT_MetaTileEntity_FusionC } public String[] getDescription() { - return new String[]{ - "It's over 9000!!!", - "Fusion Machine Casings around Fusion Coil Blocks", - "2-16 Input Hatches", - "1-16 Output Hatches", - "1-16 Energy Hatches", - "All Hatches must be ZPMV or better", - "4096EU/t and 20mio EU Cap per Energy Hatch"}; + final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType("Fusion Reactor") + .addInfo("It's over 9000!!!") + .addInfo("Controller block for the Fusion Reactor Mk II") + .addInfo("4096EU/t and 20M EU capacity per Energy Hatch") + .addInfo("If the recipe has a startup cost greater than the") + .addInfo("number of energy hatches * cap, you can't do it") + .addSeparator() + .beginStructureBlock(15, 3, 15, false) + .addController("See diagram when placed") + .addCasingInfo("Fusion Machine Casing", 79) + .addStructureInfo("Cover the coils with casing") + .addOtherStructurePart("Fusion Coil Block", "Center part of the ring") + .addEnergyHatch("1-16, Specified casings") + .addInputHatch("2-16, Specified casings") + .addOutputHatch("1-16, Specified casings") + .addStructureInfo("ALL Hatches must be ZPM or better") + .toolTipFinisher("Gregtech"); + if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { + return tt.getInformation(); + } else { + return tt.getStructureInformation(); + } } @Override diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer3.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer3.java index bc50b5ee5f..a575427791 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer3.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer3.java @@ -1,10 +1,13 @@ package gregtech.common.tileentities.machines.multi; +import org.lwjgl.input.Keyboard; + import gregtech.api.GregTech_API; import gregtech.api.enums.Textures; import gregtech.api.interfaces.IIconContainer; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import net.minecraft.block.Block; public class GT_MetaTileEntity_FusionComputer3 extends GT_MetaTileEntity_FusionComputer { @@ -48,14 +51,29 @@ public class GT_MetaTileEntity_FusionComputer3 extends GT_MetaTileEntity_FusionC } public String[] getDescription() { - return new String[]{ - "A SUN DOWN ON EARTH", - "Fusion Machine Casings MK II around Fusion Coil Blocks", - "2-16 Input Hatches", - "1-16 Output Hatches", - "1-16 Energy Hatches", - "All Hatches must be UV or better", - "8192EU/t and 40mio EU Cap per Energy Hatch"}; + final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType("Fusion Reactor") + .addInfo("A SUN DOWN ON EARTH") + .addInfo("Controller block for the Fusion Reactor Mk III") + .addInfo("8192EU/t and 40M EU capacity per Energy Hatch") + .addInfo("If the recipe has a startup cost greater than the") + .addInfo("number of energy hatches * cap, you can't do it") + .addSeparator() + .beginStructureBlock(15, 3, 15, false) + .addController("See diagram when placed") + .addCasingInfo("Fusion Machine Casing Mk II", 79) + .addStructureInfo("Cover the coils with casing") + .addOtherStructurePart("Fusion Coil Block", "Center part of the ring") + .addEnergyHatch("1-16, Specified casings") + .addInputHatch("2-16, Specified casings") + .addOutputHatch("1-16, Specified casings") + .addStructureInfo("ALL Hatches must be UV or better") + .toolTipFinisher("Gregtech"); + if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { + return tt.getInformation(); + } else { + return tt.getStructureInformation(); + } } @Override diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_HeatExchanger.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_HeatExchanger.java index 4dcd9121a8..dfa58c6407 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_HeatExchanger.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_HeatExchanger.java @@ -1,5 +1,7 @@ package gregtech.common.tileentities.machines.multi; +import org.lwjgl.input.Keyboard; + import gregtech.api.GregTech_API; import gregtech.api.enums.Textures; import gregtech.api.gui.GT_GUIContainer_MultiMachine; @@ -13,6 +15,7 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockB import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_Log; import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import net.minecraft.block.Block; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; @@ -41,16 +44,30 @@ public class GT_MetaTileEntity_HeatExchanger extends GT_MetaTileEntity_MultiBloc } public String[] getDescription() { - return new String[]{ - "Controller Block for the Heat Exchanger", - "Size(WxHxD): 3x4x3, Controller (Front middle at bottom)", - "3x3x4 of Stable Titanium Machine Casings (hollow, Min 20!)", - "2x Titanium Pipe Casing (Inside the Hollow Machine Casings)", - "1x Distillated Water Input (Any casing)", - "1x Steam Output (Any casing)", - "1x Hot Fluid Input (Bottom center)", - "1x Cold Fluid Output (Top Center)", - "1x Maintenance Hatch (Any casing)"}; + final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType("Heat Exchanger") + .addInfo("Controller Block for the Large Heat Exchanger") + .addInfo("More complicated than a Fusion Reactor. Seriously") + .addInfo("Inputs are Hot Coolant or Lava") + .addInfo("Outputs Coolant or Pahoehoe Lava and SH Steam/Steam") + .addInfo("Read the wiki article to understand how it works") + .addInfo("Then go to the Discord to understand the wiki") + .addSeparator() + .beginStructureBlock(3, 4, 3, false) + .addController("Front bottom") + .addCasingInfo("Stable Titanium Machine Casing", 20) + .addOtherStructurePart("Titanium Pipe Casing", "Center 2 blocks") + .addMaintenanceHatch("Any casing") + .addInputHatch("Hot fluid, bottom center") + .addInputHatch("Distilled water, any casing") + .addOutputHatch("Cold fluid, top center") + .addOutputHatch("Steam/SH Steam, any casing") + .toolTipFinisher("Gregtech"); + if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { + return tt.getInformation(); + } else { + return tt.getStructureInformation(); + } } @Override diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java index edce80fdf4..9e002badbf 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java @@ -8,6 +8,7 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; 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 net.minecraft.block.Block; @@ -17,6 +18,8 @@ import net.minecraftforge.common.util.ForgeDirection; import java.util.ArrayList; +import org.lwjgl.input.Keyboard; + public class GT_MetaTileEntity_ImplosionCompressor extends GT_MetaTileEntity_MultiBlockBase { public GT_MetaTileEntity_ImplosionCompressor(int aID, String aName, String aNameRegional) { @@ -32,17 +35,27 @@ public class GT_MetaTileEntity_ImplosionCompressor } public String[] getDescription() { - return new String[]{ - "Controller Block for the Implosion Compressor", - "Size(WxHxD): 3x3x3 (Hollow), Controller (Front centered)", - "1x Input Bus (Any casing)", - "1x Output Bus (Any casing)", - "1x Maintenance Hatch (Any casing)", - "1x Muffler Hatch (Any casing)", - "1x Energy Hatch (Any casing)", - "Solid Steel Machine Casings for the rest (16 at least!)", - "Casings can be replaced with Explosion Warning Signs", - "Causes " + 20 * getPollutionPerTick(null) + " Pollution per second"}; + final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType("Implosion Compressor") + .addInfo("Explosions are fun") + .addInfo("Controller block for the Implosion Compressor") + .addPollutionAmount(20 * getPollutionPerTick(null)) + .addSeparator() + .beginStructureBlock(3, 3, 3, true) + .addController("Front center") + .addCasingInfo("Solid Steel Machine Casing", 16) + .addStructureInfo("Casings can be replaced with Explosion Warning Signs") + .addEnergyHatch("Any casing") + .addMaintenanceHatch("Any casing") + .addMufflerHatch("Any casing") + .addInputBus("Any casing") + .addOutputBus("Any casing") + .toolTipFinisher("Gregtech"); + if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { + return tt.getInformation(); + } else { + return tt.getStructureInformation(); + } } public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java index 0781397ecc..551abdf38a 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java @@ -18,6 +18,8 @@ import net.minecraftforge.fluids.FluidStack; import java.util.ArrayList; +import org.lwjgl.input.Keyboard; + public abstract class GT_MetaTileEntity_LargeBoiler extends GT_MetaTileEntity_MultiBlockBase { private boolean firstRun = true; @@ -35,22 +37,32 @@ public abstract class GT_MetaTileEntity_LargeBoiler } public String[] getDescription() { - return new String[]{ - "Controller Block for the Large Boiler", - "Produces " + (getEUt() * 40) * (runtimeBoost(20) / 20f) + "L of Steam with 1 Coal at " + getEUt() * 40 + "L/s", - "A programmed circuit in the main block throttles the boiler (-1000L/s per config)", - "Size(WxHxD): 3x5x3, Controller (Front middle in Fireboxes)", - "3x1x3 of "+getCasingMaterial()+" Fire Boxes (Bottom layer, Min 3)", - "3x4x3 of "+getCasingMaterial()+" " +getCasingBlockType()+ " Casings (Above Fireboxes, hollow, Min 24!)", - "3 "+getCasingMaterial()+" Pipe Casing Blocks (Inside the Hollow Casing)", - "1x Input Fuel Hatch/Bus (Any Firebox)", - "1x Input Water Hatch (Any Firebox)", - "1x Output Hatch (Any Casing)", - "1x Maintenance Hatch (Any Firebox)", - "1x Muffler Hatch (Any Firebox)", - String.format("Diesel fuels have 1/4 efficiency - Takes %.2f seconds to heat up", 500.0 / getEfficiencyIncrease()), - "Causes up to " + 20 * getPollutionPerTick(null) + " Pollution per second" -}; + final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType("Boiler") + .addInfo("Controller block for the Large " + getCasingMaterial() + " Boiler") + .addInfo("Produces " + (getEUt() * 40) * (runtimeBoost(20) / 20f) + "L of Steam with 1 Coal at " + getEUt() * 40 + "L/s")//? + .addInfo("A programmed circuit in the main block throttles the boiler (-1000L/s per config)") + .addInfo(String.format("Diesel fuels have 1/4 efficiency - Takes %.2f seconds to heat up", 500.0 / getEfficiencyIncrease()))//? check semifluid again + .addPollutionAmount(20 * getPollutionPerTick(null)) + .addSeparator() + .beginStructureBlock(3, 5, 3, false) + .addController("Front bottom") + .addCasingInfo(getCasingMaterial() + " " + getCasingBlockType() + " Casing", 24)//? + .addOtherStructurePart(getCasingMaterial() + " Fire Boxes", "Bottom layer, 3 minimum") + .addOtherStructurePart(getCasingMaterial() + " Pipe Casing Blocks", "Inner 3 blocks") + .addMaintenanceHatch("Any firebox") + .addMufflerHatch("Any firebox") + .addInputBus("Solid fuel, Any firebox") + .addInputHatch("Liquid fuel, Any firebox") + .addStructureInfo("You can use either, or both") + .addInputHatch("Water, Any firebox") + .addOutputHatch("Steam, any casing") + .toolTipFinisher("Gregtech"); + if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { + return tt.getInformation(); + } else { + return tt.getStructureInformation(); + } } public abstract String getCasingMaterial(); diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java index c5f1852629..d462b9a36d 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java @@ -45,18 +45,19 @@ public class GT_MetaTileEntity_LargeChemicalReactor extends GT_MetaTileEntity_Mu .addInfo("Controller block for the Large Chemical Reactor") .addInfo("Does not lose efficiency when overclocked") .addInfo("Accepts fluids instead of fluid cells") - .beginStructureBlock(3, 3, 3) - .addController("Front centered") - .addCasingInfo("Chemically Inert Machine Casings", 8) + .addSeparator() + .beginStructureBlock(3, 3, 3, false) + .addController("Front center") + .addCasingInfo("Chemically Inert Machine Casing", 8) .addOtherStructurePart("PTFE Pipe Machine Casing", "Center") .addOtherStructurePart("Cupronickel Coil Block", "Adjacent to the PTFE Pipe Machine Casing") - .addEnergyHatch("Any Casing") - .addMaintenanceHatch("Any Casing") - .addInputBus("Any Casing") - .addInputHatch("Any Casing") - .addOutputBus("Any Casing") - .addOutputHatch("Any Casing") - .addStructureInfo("You can have multiple I/O hatches/busses") + .addEnergyHatch("Any casing") + .addMaintenanceHatch("Any casing") + .addInputBus("Any casing") + .addInputHatch("Any casing") + .addOutputBus("Any casing") + .addOutputHatch("Any casing") + .addStructureInfo("You can have multiple hatches/busses") .toolTipFinisher("Gregtech"); if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { return tt.getInformation(); diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java index 4bd44ef80c..6c482db6e7 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java @@ -3,12 +3,15 @@ package gregtech.common.tileentities.machines.multi; import java.util.ArrayList; import java.util.Collection; +import org.lwjgl.input.Keyboard; + import gregtech.api.GregTech_API; 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.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Recipe.GT_Recipe_Map; import gregtech.api.util.GT_Utility; @@ -31,18 +34,26 @@ public class GT_MetaTileEntity_LargeTurbine_Gas extends GT_MetaTileEntity_LargeT return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][aColorIndex + 1], aFacing == aSide ? aActive ? new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_SS_ACTIVE5) : new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_SS5) : Textures.BlockIcons.casingTexturePages[0][58]}; } - public String[] getDescription() { - return new String[]{ - "Controller Block for the Large Gas Turbine", - "Size(WxHxD): 3x3x4 (Hollow), Controller (Front centered)", - "1x Gas Input Hatch (Side centered)", - "1x Maintenance Hatch (Side centered)", - "1x Muffler Hatch (Side centered)", - "1x Dynamo Hatch (Back centered)", - "Stainless Steel Turbine Casings for the rest (24 at least!)", - "Needs a Turbine Item (Inside controller GUI)", - "Produces " + getPollutionPerTick(null)*20 + " pollution per second"}; + final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType("Gas Turbine") + .addInfo("Controller block for the Large Gas Turbine") + .addInfo("Needs a Turbine, place inside controller") + .addPollutionAmount(20 * getPollutionPerTick(null)) + .addSeparator() + .beginStructureBlock(3, 3, 4, true) + .addController("Front center") + .addCasingInfo("Stainless Steel Turbine Casing", 24) + .addDynamoHatch("Back center") + .addMaintenanceHatch("Side centered") + .addMufflerHatch("Side centered") + .addInputHatch("Gas Fuel, Side centered") + .toolTipFinisher("Gregtech"); + if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { + return tt.getInformation(); + } else { + return tt.getStructureInformation(); + } } public int getFuelValue(FluidStack aLiquid) { diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java index c6f6e36c44..2355b89fa8 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java @@ -4,6 +4,8 @@ import static gregtech.api.objects.XSTR.XSTR_INSTANCE; import java.util.ArrayList; +import org.lwjgl.input.Keyboard; + import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.enums.Textures; @@ -12,6 +14,7 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; 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_Utility; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; @@ -38,17 +41,27 @@ public class GT_MetaTileEntity_LargeTurbine_HPSteam extends GT_MetaTileEntity_La } public String[] getDescription() { - return new String[]{ - "Controller Block for the Large High Pressure Steam Turbine", - "Size(WxHxD): 3x3x4 (Hollow), Controller (Front centered)", - "1x Superheated Steam Input Hatch (Side centered)", - "1x Maintenance Hatch (Side centered)", - "1x Dynamo Hatch (Back centered)", - "1x Output Hatch for Steam (Side centered)", - "Titanium Turbine Casings for the rest (24 at least!)", - "Needs a Turbine Item (Inside controller GUI)", - "Output depending on Rotor and fitting", - "Use screwdriver to adjust fitting of turbine"}; + final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType("Steam Turbine") + .addInfo("Controller block for the Large High Pressure Steam Turbine") + .addInfo("Needs a Turbine, place inside controller") + .addInfo("Outputs Steam as well as producing power") + .addInfo("Power output depends on turbine and fitting") + .addInfo("Use screwdriver to adjust fitting of turbine") + .addSeparator() + .beginStructureBlock(3, 3, 4, true) + .addController("Front center") + .addCasingInfo("Titanium Turbine Casing", 24) + .addDynamoHatch("Back center") + .addMaintenanceHatch("Side centered") + .addInputHatch("Superheated Steam, Side centered") + .addOutputHatch("Steam, Side centered") + .toolTipFinisher("Gregtech"); + if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { + return tt.getInformation(); + } else { + return tt.getStructureInformation(); + } } @Override diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java index be62ff2d97..bb5134097a 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java @@ -3,6 +3,8 @@ package gregtech.common.tileentities.machines.multi; import java.util.ArrayList; import java.util.Collection; +import org.lwjgl.input.Keyboard; + import gregtech.api.GregTech_API; import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; @@ -10,6 +12,7 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.items.GT_MetaGenerated_Tool; 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_Recipe.GT_Recipe_Map; import gregtech.api.util.GT_Utility; @@ -33,17 +36,26 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][aColorIndex + 1], aFacing == aSide ? aActive ? new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_TU_ACTIVE5) : new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_TU5) : Textures.BlockIcons.casingTexturePages[0][60]}; } - public String[] getDescription() { - return new String[]{ - "Controller Block for the Large Plasma Generator", - "Size(WxHxD): 3x3x4 (Hollow), Controller (Front centered)", - "1x Plasma Input Hatch (Side centered)", - "1x Maintenance Hatch (Side centered)", - "1x Output Hatch (Side centered, optional)", - "1x Dynamo Hatch (Back centered)", - "Tungstensteel Turbine Casings for the rest (24 at least!)", - "Needs a Turbine Item (Inside controller GUI)"}; + final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType("Plasma Turbine") + .addInfo("Controller block for the Large Plasma Generator") + .addInfo("Needs a Turbine, place inside controller") + .addInfo("Use your Fusion Reactor to produce the Plasma") + .addSeparator() + .beginStructureBlock(3, 3, 4, true) + .addController("Front center") + .addCasingInfo("Tungstensteel Turbine Casing", 24) + .addDynamoHatch("Back center") + .addMaintenanceHatch("Side centered") + .addInputHatch("Plasma Fluid, Side centered") + .addOutputHatch("Molten Fluid, optional, Side centered") + .toolTipFinisher("Gregtech"); + if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { + return tt.getInformation(); + } else { + return tt.getStructureInformation(); + } } public int getFuelValue(FluidStack aLiquid) { diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java index 2943f6f946..20bcbf10d0 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java @@ -4,6 +4,8 @@ import static gregtech.api.objects.XSTR.XSTR_INSTANCE; import java.util.ArrayList; +import org.lwjgl.input.Keyboard; + import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.enums.Textures; @@ -12,6 +14,7 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; 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_Utility; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; @@ -40,17 +43,27 @@ public class GT_MetaTileEntity_LargeTurbine_Steam extends GT_MetaTileEntity_Larg } public String[] getDescription() { - return new String[]{ - "Controller Block for the Large Steam Turbine", - "Size(WxHxD): 3x3x4 (Hollow), Controller (Front centered)", - "1x Steam Input Hatch (Side centered)", - "1x Maintenance Hatch (Side centered)", - "1x Dynamo Hatch (Back centered)", - "1x Output Hatch for Distilled Water (Side centered)", - "Turbine Casings for the rest (24 at least!)", - "Needs a Turbine Item (Inside controller GUI)", - "Output depending on Rotor and fitting", - "Use screwdriver to adjust fitting of turbine"}; + final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType("Steam Turbine") + .addInfo("Controller block for the Large Steam Turbine") + .addInfo("Needs a Turbine, place inside controller") + .addInfo("Outputs Distilled Water as well as producing power") + .addInfo("Power output depends on turbine and fitting") + .addInfo("Use screwdriver to adjust fitting of turbine") + .addSeparator() + .beginStructureBlock(3, 3, 4, true) + .addController("Front center") + .addCasingInfo("Turbine Casing", 24) + .addDynamoHatch("Back center") + .addMaintenanceHatch("Side centered") + .addInputHatch("Steam, Side centered") + .addOutputHatch("Distilled Water, Side centered") + .toolTipFinisher("Gregtech"); + if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { + return tt.getInformation(); + } else { + return tt.getStructureInformation(); + } } @Override diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java index cdc68702d2..5eca30def1 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java @@ -4,6 +4,8 @@ import static gregtech.api.enums.GT_Values.VN; import java.util.ArrayList; +import org.lwjgl.input.Keyboard; + import gregtech.api.GregTech_API; import gregtech.api.enums.Textures; import gregtech.api.gui.GT_GUIContainer_MultiMachine; @@ -15,6 +17,7 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Muffl import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; 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 net.minecraft.entity.player.InventoryPlayer; @@ -41,18 +44,28 @@ public class GT_MetaTileEntity_MultiFurnace } public String[] getDescription() { - return new String[]{ - "Controller Block for the Multi Smelter", - "Smelts up to 8-128 Items at once", - "Size(WxHxD): 3x3x3 (Hollow), Controller (Front middle at bottom)", - "8x Heating Coils (Middle layer, hollow)", - "1x Input Bus (One of bottom)", - "1x Output Bus (One of bottom)", - "1x Maintenance Hatch (One of bottom)", - "1x Muffler Hatch (Top middle)", - "1x Energy Hatch (One of bottom)", - "Heat Proof Machine Casings for the rest", - "Causes " + 20 * getPollutionPerTick(null) + " Pollution per second"}; + final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType("Furnace") + .addInfo("Controller Block for the Multi Smelter") + .addInfo("Smelts up to 8-128 items at once") + .addInfo("Items smelted increases with coil tier") + .addPollutionAmount(20 * getPollutionPerTick(null)) + .addSeparator() + .beginStructureBlock(3, 3, 3, true) + .addController("Front bottom") + .addCasingInfo("Heat Proof Machine Casing", 8) + .addOtherStructurePart("Heating Coils (any tier)", "Middle layer") + .addEnergyHatch("Any bottom casing") + .addMaintenanceHatch("Any bottom casing") + .addMufflerHatch("Top Middle") + .addInputBus("Any bottom casing") + .addOutputBus("Any bottom casing") + .toolTipFinisher("Gregtech"); + if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { + return tt.getInformation(); + } else { + return tt.getStructureInformation(); + } } public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilCracker.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilCracker.java index 9519d901d7..e4ad65e4a4 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilCracker.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilCracker.java @@ -11,6 +11,7 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; 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 net.minecraft.entity.player.InventoryPlayer; @@ -20,6 +21,8 @@ import net.minecraftforge.fluids.FluidStack; import java.util.ArrayList; +import org.lwjgl.input.Keyboard; + public class GT_MetaTileEntity_OilCracker extends GT_MetaTileEntity_MultiBlockBase { private ForgeDirection orientation; private int controllerX, controllerZ; @@ -33,18 +36,29 @@ public class GT_MetaTileEntity_OilCracker extends GT_MetaTileEntity_MultiBlockBa } public String[] getDescription() { - return new String[]{ - "Controller Block for the Oil Cracking Unit", - "Thermally cracks heavy hydrocarbons into lighter fractions", - "Size(WxHxD): 5x3x3 (Hollow), Controller (Front center)", - "Ring of 8 Cupronickel Coils (Each side of Controller)", - "1x Hydrocarbon Input Bus/Hatch (Any left/right side casing)", - "1x Steam/Hydrogen Input Hatch (Any middle ring casing)", - "1x Cracked Hydrocarbon Output Hatch (Any left/right side casing)", - "1x Maintenance Hatch (Any casing)", - "1x Energy Hatch (Any casing)", - "Clean Stainless Steel Machine Casings for the rest (18 at least!)", - "Input/Output Hatches must be on opposite sides"}; + final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType("Cracker") + .addInfo("Controller block for the Oil Cracking Unit") + .addInfo("Thermally cracks heavy hydrocarbons into lighter fractions") + .addInfo("More efficient than the Chemical Reactor") + .addInfo("Place the appropriate circuit in the controller") + .addSeparator() + .beginStructureBlock(5, 3, 3, true) + .addController("Front center") + .addCasingInfo("Clean Stainless Steel Machine Casing", 18) + .addOtherStructurePart("2 Rings of 8 Cupronickel Coils", "Each side of the controller") + .addEnergyHatch("Any casing") + .addMaintenanceHatch("Any casing") + .addInputHatch("Steam/Hydrogen, Any middle ring casing") + .addInputHatch("Any left/right side casing") + .addOutputHatch("Any left/right side casing") + .addStructureInfo("Input/Output Hatches must be on opposite sides!") + .toolTipFinisher("Gregtech"); + if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { + return tt.getInformation(); + } else { + return tt.getStructureInformation(); + } } public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrillBase.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrillBase.java index 76f8e7f87f..a7a7023d34 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrillBase.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrillBase.java @@ -3,6 +3,7 @@ package gregtech.common.tileentities.machines.multi; import gregtech.api.gui.GT_GUIContainer_MultiMachine; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.util.GT_Log; +import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import gregtech.api.util.GT_Utility; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; @@ -16,6 +17,8 @@ import net.minecraftforge.fluids.FluidStack; import java.util.ArrayList; +import org.lwjgl.input.Keyboard; + import static gregtech.api.enums.GT_Values.VN; import static gregtech.api.enums.GT_Values.debugDriller; import static gregtech.common.GT_UndergroundOil.undergroundOil; @@ -55,18 +58,30 @@ public abstract class GT_MetaTileEntity_OilDrillBase extends GT_MetaTileEntity_D protected String[] getDescriptionInternal(String tierSuffix) { String casings = getCasingBlockItem().get(0).getDisplayName(); - return new String[]{ - "Controller Block for the Oil/Gas/Fluid Drilling Rig " + (tierSuffix != null ? tierSuffix : ""), - "Size(WxHxD): 3x7x3", "Controller (Front middle at bottom)", - "3x1x3 Base of " + casings, - "1x3x1 " + casings + " pillar (Center of base)", - "1x3x1 " + getFrameMaterial().mName + " Frame Boxes (Each pillar side and on top)", - "1x Output Hatch (One of base casings)", - "1x Maintenance Hatch (One of base casings)", - "1x " + VN[getMinTier()] + "+ Energy Hatch (Any bottom layer casing)", - "Working on " + getRangeInChunks() + "x" + getRangeInChunks() + " chunks", - "Use Screwdriver to configure range", - "Use Programmed Circuits to ignore near exhausted oil field"}; + + final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType("Pump") + .addInfo("Controller Block for the Oil/Gas/Fluid Drilling Rig " + (tierSuffix != null ? tierSuffix : "")) + .addInfo("Works on " + getRangeInChunks() + "x" + getRangeInChunks() + " chunks") + .addInfo("Use a Screwdriver to configure range") + .addInfo("Use Programmed Circuits to ignore near exhausted oil field") + .addInfo("If total circuit # is greater than output amount it will halt. If it worked right.")//doesn't work + .addSeparator() + .beginStructureBlock(3, 7, 3, false) + .addController("Front bottom") + .addStructureInfo(casings + " form the 3x1x3 Base") + .addOtherStructurePart(casings, " 1x3x1 pillar above the center of the base (2 minimum total)") + .addOtherStructurePart(getFrameMaterial().mName + " Frame Boxes", "Each pillar's side and 1x3x1 on top") + .addEnergyHatch(VN[getMinTier()] + "+, Any base casing") + .addMaintenanceHatch("Any base casing") + .addInputBus("Mining Pipes or Circuits, optional, any base casing") + .addOutputHatch("Any base casing") + .toolTipFinisher("Gregtech"); + if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { + return tt.getInformation(); + } else { + return tt.getStructureInformation(); + } } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlantBase.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlantBase.java index 5ead0bf896..2e367e63e8 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlantBase.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlantBase.java @@ -8,6 +8,7 @@ import gregtech.api.interfaces.IChunkLoader; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.objects.GT_ChunkManager; import gregtech.api.objects.ItemData; +import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; @@ -32,6 +33,8 @@ import java.util.Collection; import java.util.Collections; import java.util.HashSet; +import org.lwjgl.input.Keyboard; + import static gregtech.api.enums.GT_Values.VN; public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTileEntity_DrillerBase implements IChunkLoader { @@ -335,22 +338,33 @@ public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTile protected String[] getDescriptionInternal(String tierSuffix) { String casings = getCasingBlockItem().get(0).getDisplayName(); - return new String[]{ - "Controller Block for the Ore Drilling Plant " + (tierSuffix != null ? tierSuffix : ""), - "Size(WxHxD): 3x7x3, Controller (Front middle bottom)", - "3x1x3 Base of " + casings, - "1x3x1 " + casings + " pillar (Center of base)", - "1x3x1 " + getFrameMaterial().mName + " Frame Boxes (Each pillar side and on top)", - "1x Input Hatch for drilling fluid (Any bottom layer casing)", - "1x Input Bus for mining pipes (Any bottom layer casing; not necessary)", - "1x Output Bus (Any bottom layer casing)", - "1x Maintenance Hatch (Any bottom layer casing)", - "1x " + VN[getMinTier()] + "+ Energy Hatch (Any bottom layer casing)", - "Use Screwdriver to configure block radius", - "Use Soldering iron to turn off chunk mode", - "Maximum radius is " + (getRadiusInChunks() << 4) + " blocks", - "In chunk mode working area center is the chunk corner nearest to the drill", - "Fortune bonus of " + (mTier + 3)}; + + final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType("Miner") + .addInfo("Controller Block for the Ore Drilling Plant " + (tierSuffix != null ? tierSuffix : "")) + .addInfo("Use a Screwdriver to configure block radius") + .addInfo("Maximum radius is " + (getRadiusInChunks() << 4) + " blocks") + .addInfo("Use Soldering iron to turn off chunk mode") + .addInfo("In chunk mode, working area center is the chunk corner nearest to the drill") + .addInfo("Gives ~3x as much crushed ore vs normal processing") + .addInfo("Fortune bonus of " + (mTier + 3) + ". Only works on small ores") + .addSeparator() + .beginStructureBlock(3, 7, 3, false) + .addController("Front bottom") + .addStructureInfo(casings + " form the 3x1x3 Base") + .addOtherStructurePart(casings, " 1x3x1 pillar above the center of the base (2 minimum total)") + .addOtherStructurePart(getFrameMaterial().mName + " Frame Boxes", "Each pillar's side and 1x3x1 on top") + .addEnergyHatch(VN[getMinTier()] + "+, Any base casing") + .addMaintenanceHatch("Any base casing") + .addInputBus("Mining Pipes, optional, any base casing") + .addInputHatch("Drilling Fluid, any base casing") + .addOutputBus("Any base casing") + .toolTipFinisher("Gregtech"); + if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { + return tt.getInformation(); + } else { + return tt.getStructureInformation(); + } } @Override diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java index 850908104b..2496d02a42 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java @@ -12,6 +12,7 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_InputBus; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import gregtech.api.util.GT_ProcessingArray_Manager; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Recipe.GT_Recipe_Map; @@ -25,6 +26,7 @@ import net.minecraft.util.StatCollector; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; import org.apache.commons.lang3.ArrayUtils; +import org.lwjgl.input.Keyboard; import java.util.ArrayList; import java.util.Arrays; @@ -54,18 +56,31 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_MultiBl } public String[] getDescription() { - return new String[]{ - "Controller Block for the Processing Array", - "Runs supplied machines as if placed in the world", - "Size(WxHxD): 3x3x3 (Hollow), Controller (Front centered)", - "1x Input Hatch/Bus (Any casing)", - "1x Output Hatch/Bus (Any casing)", - "1x Maintenance Hatch (Any casing)", - "1x Energy Hatch (Any casing)", - "Robust Tungstensteel Machine Casings for the rest (14 at least!)", - "Place up to 64 Single Block GT Machines into the Controller Inventory", - "Use screwdriver to enable separate input busses", - "Maximal overclockedness of machines inside: Tier 9"}; + final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType("Processing Array") + .addInfo("Runs supplied machines as if placed in the world") + .addInfo("Place up to 64 singleblock GT machines into the controller") + .addInfo("Note that tou still need to supply power to them all") + .addInfo("Use a screwdriver to enable separate input busses") + .addInfo("Maximal overclockedness of machines inside: Tier 9") + .addInfo("Doesn't work on certain machines, deal with it") + .addInfo("Use it if you hate GT++, or want even more speed later on") + .addSeparator() + .beginStructureBlock(3, 3, 3, true) + .addController("Front center") + .addCasingInfo("Robust Tungstensteel Machine Casing", 14) + .addEnergyHatch("Any casing") + .addMaintenanceHatch("Any casing") + .addInputBus("Any casing") + .addInputHatch("Any casing") + .addOutputBus("Any casing") + .addOutputHatch("Any casing") + .toolTipFinisher("Gregtech"); + if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { + return tt.getInformation(); + } else { + return tt.getStructureInformation(); + } } public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java index eee88dfb21..1d9b360338 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java @@ -10,6 +10,7 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; 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 gregtech.loaders.oreprocessing.ProcessingLog; @@ -23,6 +24,8 @@ import net.minecraftforge.oredict.OreDictionary; import java.util.ArrayList; import java.util.Arrays; +import org.lwjgl.input.Keyboard; + public class GT_MetaTileEntity_PyrolyseOven extends GT_MetaTileEntity_MultiBlockBase { private int coilMetaID; @@ -38,21 +41,32 @@ public class GT_MetaTileEntity_PyrolyseOven extends GT_MetaTileEntity_MultiBlock } public String[] getDescription() { - return new String[]{ - "Controller Block for the Pyrolyse Oven", - "Industrial Charcoal producer and Oil from Plants", - "Size(WxHxD): 5x4x5, Controller (Bottom center)", - "3x1x3 of Heating Coils (At the center of the bottom layer)", - "1x Input Hatch/Bus (Centered 3x1x3 area in Top layer)", - "1x Output Hatch/Bus (Any bottom layer casing)", - "1x Maintenance Hatch (Any bottom layer casing)", - "1x Muffler Hatch (Centered 3x1x3 area in Top layer)", - "1x Energy Hatch (Any bottom layer casing)", - "Pyrolyse Oven Casings for the rest (60 at least!)", - "Processing speed scales linearly with Coil tier:", - "CuNi: 50%, FeAlCr: 100%, Ni4Cr: 150%, Fe50CW: 200%, etc.", - "EU/t is not affected by Coil tier", - "Causes " + 20 * getPollutionPerTick(null) + " Pollution per second"}; + final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType("Coke Oven") + .addInfo("Controller block for the Pyrolyse Oven") + .addInfo("Industrial Charcoal producer") + .addInfo("Processing speed scales linearly with Coil tier:") + .addInfo("CuNi: 50%, FeAlCr: 100%, Ni4Cr: 150%, Fe50CW: 200%, etc.") + .addInfo("EU/t is not affected by Coil tier") + .addPollutionAmount(20 * getPollutionPerTick(null)) + .addSeparator() + .beginStructureBlock(5, 4, 5, true) + .addController("Front center") + .addCasingInfo("Pyrolyse Oven Casing", 60) + .addOtherStructurePart("Heating Coils (any tier)", "Center 3x1x3 of the bottom layer") + .addEnergyHatch("Any bottom layer casing") + .addMaintenanceHatch("Any bottom layer casing") + .addMufflerHatch("Center 3x1x3 area in top layer") + .addInputBus("Center 3x1x3 area in top layer") + .addInputHatch("Center 3x1x3 area in top layer") + .addOutputBus("Any bottom layer casing") + .addOutputHatch("Any bottom layer casing") + .toolTipFinisher("Gregtech"); + if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { + return tt.getInformation(); + } else { + return tt.getStructureInformation(); + } } public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_VacuumFreezer.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_VacuumFreezer.java index 834b97aa9d..bf4b1e9db7 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_VacuumFreezer.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_VacuumFreezer.java @@ -8,6 +8,7 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; 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 net.minecraft.entity.player.InventoryPlayer; @@ -16,6 +17,8 @@ import net.minecraftforge.common.util.ForgeDirection; import java.util.ArrayList; +import org.lwjgl.input.Keyboard; + public class GT_MetaTileEntity_VacuumFreezer extends GT_MetaTileEntity_MultiBlockBase { public GT_MetaTileEntity_VacuumFreezer(int aID, String aName, String aNameRegional) { @@ -31,15 +34,24 @@ public class GT_MetaTileEntity_VacuumFreezer } public String[] getDescription() { - return new String[]{ - "Controller Block for the Vacuum Freezer", - "Super cools hot ingots and cells", - "Size(WxHxD): 3x3x3 (Hollow), Controller (Front centered)", - "1x Input Bus (Any casing)", - "1x Output Bus (Any casing)", - "1x Maintenance Hatch (Any casing)", - "1x Energy Hatch (Any casing)", - "Frost Proof Machine Casings for the rest (16 at least!)"}; + final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType("Vacuum Freezer") + .addInfo("Controller Block for the Vacuum Freezer") + .addInfo("Cools hot ingots and cells") + .addSeparator() + .beginStructureBlock(3, 3, 3, true) + .addController("Front center") + .addCasingInfo("Frost Proof Machine Casing", 16) + .addEnergyHatch("Any casing") + .addMaintenanceHatch("Any casing") + .addInputBus("Any casing") + .addOutputBus("Any casing") + .toolTipFinisher("Gregtech"); + if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { + return tt.getInformation(); + } else { + return tt.getStructureInformation(); + } } public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { diff --git a/src/main/resources/assets/gregtech/lang/en_US.lang b/src/main/resources/assets/gregtech/lang/en_US.lang index 53970634f9..c3c5a574af 100644 --- a/src/main/resources/assets/gregtech/lang/en_US.lang +++ b/src/main/resources/assets/gregtech/lang/en_US.lang @@ -1,19 +1,20 @@ # Multiblock Tooltip Builder Keywords # Context can be found in the class gregtech.api.util.GT_Multiblock_Tooltip_Builder -GT5U.MBTT.MachineType=Machine Type: -GT5U.MBTT.Dimensions=Dimensions: -GT5U.MBTT.Structure=Structure: -GT5U.MBTT.Controller=Controller: +GT5U.MBTT.MachineType=Machine Type +GT5U.MBTT.Dimensions=Dimensions +GT5U.MBTT.Hollow=(Hollow) +GT5U.MBTT.Structure=Structure +GT5U.MBTT.Controller=Controller GT5U.MBTT.Minimum=(minimum) -GT5U.MBTT.MaintenanceHatch=Maintenance Hatch: -GT5U.MBTT.MufflerHatch=Muffler Hatch: -GT5U.MBTT.EnergyHatch=Energy Hatch: -GT5U.MBTT.DynamoHatch=Dynamo Hatch: -GT5U.MBTT.InputBus=Input Bus/ses: -GT5U.MBTT.InputHatch=Input Hatch/es: -GT5U.MBTT.OutputBus=Output Bus/ses: -GT5U.MBTT.OutputHatch=Output Hatch/es: -GT5U.MBTT.Causes=Causes: +GT5U.MBTT.MaintenanceHatch=Maintenance Hatch +GT5U.MBTT.MufflerHatch=Muffler Hatch +GT5U.MBTT.EnergyHatch=Energy Hatch +GT5U.MBTT.DynamoHatch=Dynamo Hatch +GT5U.MBTT.InputBus=Input Bus +GT5U.MBTT.InputHatch=Input Hatch +GT5U.MBTT.OutputBus=Output Bus +GT5U.MBTT.OutputHatch=Output Hatch +GT5U.MBTT.Causes=Causes GT5U.MBTT.PPS=pollution per second GT5U.MBTT.Hold=Hold GT5U.MBTT.Display=to display structure guidelines -- cgit From 6d1888b6ab07d810c2620f831d5ac0e12139e69d Mon Sep 17 00:00:00 2001 From: DreamMasterXXL Date: Fri, 20 Nov 2020 10:36:53 +0100 Subject: fix(GT)change Color of the Extreme Casings bump version --- build.properties | 2 +- .../iconsets/MACHINE_CASING_EXTREME_ENGINE_INTAKE.png | Bin 585 -> 3234 bytes 2 files changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/resources/assets') diff --git a/build.properties b/build.properties index 85d8779c47..aa8d853ec8 100644 --- a/build.properties +++ b/build.properties @@ -1,6 +1,6 @@ minecraft.version=1.7.10 forge.version=10.13.4.1614-1.7.10 -gt.version=5.09.33.56 +gt.version=5.09.33.57 ae2.version=rv3-beta-22 applecore.version=1.7.10-1.2.1+107.59407 diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/MACHINE_CASING_EXTREME_ENGINE_INTAKE.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/MACHINE_CASING_EXTREME_ENGINE_INTAKE.png index b9f96fbceb..7e0c770504 100644 Binary files a/src/main/resources/assets/gregtech/textures/blocks/iconsets/MACHINE_CASING_EXTREME_ENGINE_INTAKE.png and b/src/main/resources/assets/gregtech/textures/blocks/iconsets/MACHINE_CASING_EXTREME_ENGINE_INTAKE.png differ -- cgit From 248eceff829e1101037c245734520b2ebaa254b7 Mon Sep 17 00:00:00 2001 From: DreamMasterXXL Date: Fri, 20 Nov 2020 11:31:32 +0100 Subject: change(GT)Texture change Intank texture changed Titanum Gearbox changed --- .../blocks/iconsets/MACHINE_CASING_ENGINE_INTAKE.png | Bin 610 -> 3463 bytes .../iconsets/MACHINE_CASING_EXTREME_ENGINE_INTAKE.png | Bin 3234 -> 3418 bytes .../iconsets/MACHINE_CASING_GEARBOX_TITANIUM.png | Bin 684 -> 3324 bytes 3 files changed, 0 insertions(+), 0 deletions(-) (limited to 'src/main/resources/assets') diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/MACHINE_CASING_ENGINE_INTAKE.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/MACHINE_CASING_ENGINE_INTAKE.png index bb2f520e30..ad24535fe7 100644 Binary files a/src/main/resources/assets/gregtech/textures/blocks/iconsets/MACHINE_CASING_ENGINE_INTAKE.png and b/src/main/resources/assets/gregtech/textures/blocks/iconsets/MACHINE_CASING_ENGINE_INTAKE.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/MACHINE_CASING_EXTREME_ENGINE_INTAKE.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/MACHINE_CASING_EXTREME_ENGINE_INTAKE.png index 7e0c770504..2e72f13642 100644 Binary files a/src/main/resources/assets/gregtech/textures/blocks/iconsets/MACHINE_CASING_EXTREME_ENGINE_INTAKE.png and b/src/main/resources/assets/gregtech/textures/blocks/iconsets/MACHINE_CASING_EXTREME_ENGINE_INTAKE.png differ diff --git a/src/main/resources/assets/gregtech/textures/blocks/iconsets/MACHINE_CASING_GEARBOX_TITANIUM.png b/src/main/resources/assets/gregtech/textures/blocks/iconsets/MACHINE_CASING_GEARBOX_TITANIUM.png index fc305ea675..d680025de6 100644 Binary files a/src/main/resources/assets/gregtech/textures/blocks/iconsets/MACHINE_CASING_GEARBOX_TITANIUM.png and b/src/main/resources/assets/gregtech/textures/blocks/iconsets/MACHINE_CASING_GEARBOX_TITANIUM.png differ -- cgit From 5b1f943957d3ded24f5c0f371f43d6f62f3864f0 Mon Sep 17 00:00:00 2001 From: Léa Gris Date: Fri, 27 Nov 2020 01:26:01 +0100 Subject: feat(gregtech): visual programmed circuit (#355) * feat(gregtech): visual programmed circuit Add: Feature a configuration display for the programmed circuit (integrated circuit). Address feature request https://github.com/GTNewHorizons/GT-New-Horizons-Modpack/issues/6993 * fix(bug): potential out of bound index --- .../gregtech/common/items/GT_IntegratedCircuit_Item.java | 14 ++++++++++++++ .../gregtech/textures/items/gt.integrated_circuit/0.png | Bin 0 -> 614 bytes .../gregtech/textures/items/gt.integrated_circuit/1.png | Bin 0 -> 602 bytes .../gregtech/textures/items/gt.integrated_circuit/10.png | Bin 0 -> 624 bytes .../gregtech/textures/items/gt.integrated_circuit/11.png | Bin 0 -> 612 bytes .../gregtech/textures/items/gt.integrated_circuit/12.png | Bin 0 -> 626 bytes .../gregtech/textures/items/gt.integrated_circuit/13.png | Bin 0 -> 625 bytes .../gregtech/textures/items/gt.integrated_circuit/14.png | Bin 0 -> 615 bytes .../gregtech/textures/items/gt.integrated_circuit/15.png | Bin 0 -> 622 bytes .../gregtech/textures/items/gt.integrated_circuit/16.png | Bin 0 -> 624 bytes .../gregtech/textures/items/gt.integrated_circuit/17.png | Bin 0 -> 615 bytes .../gregtech/textures/items/gt.integrated_circuit/18.png | Bin 0 -> 625 bytes .../gregtech/textures/items/gt.integrated_circuit/19.png | Bin 0 -> 624 bytes .../gregtech/textures/items/gt.integrated_circuit/2.png | Bin 0 -> 613 bytes .../gregtech/textures/items/gt.integrated_circuit/20.png | Bin 0 -> 623 bytes .../gregtech/textures/items/gt.integrated_circuit/21.png | Bin 0 -> 619 bytes .../gregtech/textures/items/gt.integrated_circuit/22.png | Bin 0 -> 623 bytes .../gregtech/textures/items/gt.integrated_circuit/23.png | Bin 0 -> 620 bytes .../gregtech/textures/items/gt.integrated_circuit/24.png | Bin 0 -> 624 bytes .../gregtech/textures/items/gt.integrated_circuit/3.png | Bin 0 -> 609 bytes .../gregtech/textures/items/gt.integrated_circuit/4.png | Bin 0 -> 610 bytes .../gregtech/textures/items/gt.integrated_circuit/5.png | Bin 0 -> 610 bytes .../gregtech/textures/items/gt.integrated_circuit/6.png | Bin 0 -> 613 bytes .../gregtech/textures/items/gt.integrated_circuit/7.png | Bin 0 -> 602 bytes .../gregtech/textures/items/gt.integrated_circuit/8.png | Bin 0 -> 614 bytes .../gregtech/textures/items/gt.integrated_circuit/9.png | Bin 0 -> 610 bytes 26 files changed, 14 insertions(+) create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/0.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/1.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/10.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/11.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/12.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/13.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/14.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/15.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/16.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/17.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/18.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/19.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/2.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/20.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/21.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/22.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/23.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/24.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/3.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/4.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/5.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/6.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/7.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/8.png create mode 100644 src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/9.png (limited to 'src/main/resources/assets') diff --git a/src/main/java/gregtech/common/items/GT_IntegratedCircuit_Item.java b/src/main/java/gregtech/common/items/GT_IntegratedCircuit_Item.java index 92eb3af4d2..ee69c90be1 100644 --- a/src/main/java/gregtech/common/items/GT_IntegratedCircuit_Item.java +++ b/src/main/java/gregtech/common/items/GT_IntegratedCircuit_Item.java @@ -7,6 +7,7 @@ import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.items.GT_Generic_Item; +import gregtech.api.util.GT_Config; import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_Log; import gregtech.api.util.GT_ModHandler; @@ -15,13 +16,17 @@ import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import java.lang.reflect.Array; import java.util.List; import static gregtech.GT_Mod.GT_FML_LOGGER; +import static gregtech.api.enums.GT_Values.RES_PATH_ITEM; public class GT_IntegratedCircuit_Item extends GT_Generic_Item { private final static String aTextEmptyRow = " "; + protected IIcon[] mIconDamage = new IIcon[25]; public GT_IntegratedCircuit_Item() { super("integrated_circuit", "Programmed Circuit", ""); setHasSubtypes(true); @@ -93,9 +98,13 @@ public class GT_IntegratedCircuit_Item extends GT_Generic_Item { aList.add(new ItemStack(this, 1, 0)); } + @Override @SideOnly(Side.CLIENT) public void registerIcons(IIconRegister aIconRegister) { super.registerIcons(aIconRegister); + for (int i=0; i < mIconDamage.length; i++) { + mIconDamage[i] = aIconRegister.registerIcon(RES_PATH_ITEM + (GT_Config.troll ? "troll" : getUnlocalizedName() + "/" + i)); + } if (GregTech_API.sPostloadFinished) { GT_Log.out.println("GT_Mod: Starting Item Icon Load Phase"); GT_FML_LOGGER.info("GT_Mod: Starting Item Icon Load Phase"); @@ -109,4 +118,9 @@ public class GT_IntegratedCircuit_Item extends GT_Generic_Item { GT_FML_LOGGER.info("GT_Mod: Finished Item Icon Load Phase"); } } + + @Override + public IIcon getIconFromDamage(int damage) { + return (damage < mIconDamage.length ? mIconDamage[damage] : mIcon); + } } diff --git a/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/0.png b/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/0.png new file mode 100644 index 0000000000..e35727ec34 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/0.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/1.png b/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/1.png new file mode 100644 index 0000000000..d2b07c8a6c Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/1.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/10.png b/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/10.png new file mode 100644 index 0000000000..d3648dbd35 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/10.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/11.png b/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/11.png new file mode 100644 index 0000000000..ccf9f81399 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/11.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/12.png b/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/12.png new file mode 100644 index 0000000000..3150356e16 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/12.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/13.png b/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/13.png new file mode 100644 index 0000000000..0f5d3c1ca5 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/13.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/14.png b/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/14.png new file mode 100644 index 0000000000..8109357533 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/14.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/15.png b/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/15.png new file mode 100644 index 0000000000..1bc89f80b2 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/15.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/16.png b/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/16.png new file mode 100644 index 0000000000..4cf2f0d825 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/16.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/17.png b/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/17.png new file mode 100644 index 0000000000..3ac05fd824 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/17.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/18.png b/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/18.png new file mode 100644 index 0000000000..b668f379cf Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/18.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/19.png b/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/19.png new file mode 100644 index 0000000000..d13a9415cd Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/19.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/2.png b/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/2.png new file mode 100644 index 0000000000..b31f73a4f7 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/2.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/20.png b/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/20.png new file mode 100644 index 0000000000..5858bc43b8 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/20.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/21.png b/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/21.png new file mode 100644 index 0000000000..e7d903a404 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/21.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/22.png b/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/22.png new file mode 100644 index 0000000000..45d56bb2e7 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/22.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/23.png b/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/23.png new file mode 100644 index 0000000000..5d2a8f638a Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/23.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/24.png b/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/24.png new file mode 100644 index 0000000000..78f30e2299 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/24.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/3.png b/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/3.png new file mode 100644 index 0000000000..996887e4ef Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/3.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/4.png b/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/4.png new file mode 100644 index 0000000000..0ef50ef775 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/4.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/5.png b/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/5.png new file mode 100644 index 0000000000..2b67a655f5 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/5.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/6.png b/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/6.png new file mode 100644 index 0000000000..a30a06a13c Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/6.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/7.png b/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/7.png new file mode 100644 index 0000000000..e5dfc35674 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/7.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/8.png b/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/8.png new file mode 100644 index 0000000000..0ed9386325 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/8.png differ diff --git a/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/9.png b/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/9.png new file mode 100644 index 0000000000..97398ff800 Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/items/gt.integrated_circuit/9.png differ -- cgit From d66962ed18b3f8d15889ce0b5545427311b24f94 Mon Sep 17 00:00:00 2001 From: botn365 <42187820+botn365@users.noreply.github.com> Date: Thu, 10 Dec 2020 12:45:04 +0100 Subject: add the option to disable input filter (#365) --- .../implementations/GT_MetaTileEntity_Hatch_InputBus.java | 9 ++++++++- src/main/resources/assets/gregtech/lang/en_US.lang | 3 ++- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'src/main/resources/assets') diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBus.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBus.java index dfac210915..f2f76dca4f 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBus.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBus.java @@ -13,10 +13,12 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.StatCollector; public class GT_MetaTileEntity_Hatch_InputBus extends GT_MetaTileEntity_Hatch { public GT_Recipe_Map mRecipeMap = null; public boolean disableSort; + public boolean disableFilter = false; public GT_MetaTileEntity_Hatch_InputBus(int aID, String aName, String aNameRegional, int aTier) { super(aID, aName, aNameRegional, aTier, getSlots(aTier), new String[]{ @@ -136,12 +138,14 @@ public class GT_MetaTileEntity_Hatch_InputBus extends GT_MetaTileEntity_Hatch { public void saveNBTData(NBTTagCompound aNBT) { super.saveNBTData(aNBT); aNBT.setBoolean("disableSort", disableSort); + aNBT.setBoolean("disableFilter", disableFilter); } @Override public void loadNBTData(NBTTagCompound aNBT) { super.loadNBTData(aNBT); disableSort = aNBT.getBoolean("disableSort"); + disableFilter = aNBT.getBoolean("disableFilter"); } @Override @@ -151,6 +155,9 @@ public class GT_MetaTileEntity_Hatch_InputBus extends GT_MetaTileEntity_Hatch { if (aPlayer.isSneaking()) { disableSort = !disableSort; GT_Utility.sendChatToPlayer(aPlayer, trans("200", "Sort mode: " + (disableSort ? "Disabled" : "Enabled"))); + } else { + disableFilter = !disableFilter; + GT_Utility.sendChatToPlayer(aPlayer, StatCollector.translateToLocal("GT5U.hatch.disableFilter."+disableFilter)); } } @@ -165,6 +172,6 @@ public class GT_MetaTileEntity_Hatch_InputBus extends GT_MetaTileEntity_Hatch { @Override public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return aSide == getBaseMetaTileEntity().getFrontFacing() && (mRecipeMap == null || mRecipeMap.containsInput(aStack)); + return aSide == getBaseMetaTileEntity().getFrontFacing() && (mRecipeMap == null || disableFilter || mRecipeMap.containsInput(aStack)); } } diff --git a/src/main/resources/assets/gregtech/lang/en_US.lang b/src/main/resources/assets/gregtech/lang/en_US.lang index c3c5a574af..158d108278 100644 --- a/src/main/resources/assets/gregtech/lang/en_US.lang +++ b/src/main/resources/assets/gregtech/lang/en_US.lang @@ -66,7 +66,8 @@ GT5U.machines.minermulti=Multiblock Miner GT5U.machines.voidoveflow.enabled=Overflow voiding enabled GT5U.machines.voidoveflow.disabled=Overflow voiding disabled - +GT5U.hatch.disableFilter.true=Input Filter Off +GT5U.hatch.disableFilter.false=Input Filter On GT5U.multiblock.pollution=Pollution reduced to GT5U.multiblock.energy=Stored Energy -- cgit