From 0f96c7c2199c2616836c8785d57ae63bb740d1f4 Mon Sep 17 00:00:00 2001 From: Prometheus0000000 Date: Thu, 19 Nov 2020 00:00:47 -0500 Subject: Change multi tooltips to rely on GT for it instead --- .../common/tileentities/GTMTE_SOFuelCellMK2.java | 42 ++++++++++++---------- 1 file changed, 23 insertions(+), 19 deletions(-) (limited to 'src/main/java/common/tileentities/GTMTE_SOFuelCellMK2.java') diff --git a/src/main/java/common/tileentities/GTMTE_SOFuelCellMK2.java b/src/main/java/common/tileentities/GTMTE_SOFuelCellMK2.java index fb3fb7e9c7..ed61cb50a6 100644 --- a/src/main/java/common/tileentities/GTMTE_SOFuelCellMK2.java +++ b/src/main/java/common/tileentities/GTMTE_SOFuelCellMK2.java @@ -16,6 +16,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.api.util.GT_Recipe.GT_Recipe_Map; @@ -25,7 +26,7 @@ import net.minecraft.item.ItemStack; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; -import util.MultiBlockTooltipBuilder; + import util.Vector3i; import util.Vector3ic; @@ -56,26 +57,29 @@ public class GTMTE_SOFuelCellMK2 extends GT_MetaTileEntity_MultiBlockBase { @Override public String[] getDescription() { - final MultiBlockTooltipBuilder b = new MultiBlockTooltipBuilder(); - b.addInfo("Oxidizes gas fuels to generate electricity without polluting the environment") - .addInfo("Consumes 442,200EU worth of fuel with up to 97% efficiency each second") - .addInfo("Steam production requires the SOFC to heat up completely first") - .addInfo("Outputs " + EU_PER_TICK + "EU/t and " + STEAM_PER_SEC + "L/s Steam") - .addInfo("Additionally requires " + OXYGEN_PER_SEC + "L/s Oxygen gas") - .addSeparator() - .beginStructureBlock(3, 3, 5) - .addController("Front Center") - .addDynamoHatch("Back Center") - .addOtherStructurePart("GDC Ceramic Electrolyte Unit", "3x, Center 1x1x3") - .addOtherStructurePart("Reinforced Glass", "6x, touching the electrolyte units on the horizontal sides") - .addCasingInfo("Robust Tungstensteel Machine Casing", 12) - .addMaintenanceHatch("Instead of any casing") - .addIOHatches("Instead of any casing") - .signAndFinalize("Kekzdealer"); + final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType("Gas Turbine") + .addInfo("Oxidizes gas fuels to generate electricity without polluting the environment") + .addInfo("Consumes 442,200EU worth of fuel with up to 97% efficiency each second") + .addInfo("Steam production requires the SOFC to heat up completely first") + .addInfo("Outputs " + EU_PER_TICK + "EU/t and " + STEAM_PER_SEC + "L/s Steam") + .addInfo("Additionally, requires " + OXYGEN_PER_SEC + "L/s Oxygen gas") + .addSeparator() + .beginStructureBlock(3, 3, 5) + .addController("Front center") + .addCasingInfo("Robust Tungstensteel Machine Casing", 12) + .addOtherStructurePart("GDC Ceramic Electrolyte Unit", "3x, Center 1x1x3") + .addOtherStructurePart("Reinforced Glass", "6x, touching the electrolyte units on the horizontal sides") + .addDynamoHatch("Back center") + .addMaintenanceHatch("Any casing") + .addInputHatch("Fuel, any casing") + .addInputHatch("Oxygen, any casing") + .addOutputHatch("Superheated Steam, any casing") + .toolTipFinisher("KekzTech"); if(!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { - return b.getInformation(); + return tt.getInformation(); } else { - return b.getStructureInformation(); + return tt.getStructureInformation(); } } -- cgit From f1accbe5e740c60dc3a303e02ab497b3c9a5fadc Mon Sep 17 00:00:00 2001 From: Prometheus0000000 Date: Thu, 19 Nov 2020 23:21:19 -0500 Subject: Fixed build since I changed the name a little --- src/main/java/common/tileentities/GTMTE_SOFuelCellMK2.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/common/tileentities/GTMTE_SOFuelCellMK2.java') diff --git a/src/main/java/common/tileentities/GTMTE_SOFuelCellMK2.java b/src/main/java/common/tileentities/GTMTE_SOFuelCellMK2.java index ed61cb50a6..8bcb7619e5 100644 --- a/src/main/java/common/tileentities/GTMTE_SOFuelCellMK2.java +++ b/src/main/java/common/tileentities/GTMTE_SOFuelCellMK2.java @@ -65,7 +65,7 @@ public class GTMTE_SOFuelCellMK2 extends GT_MetaTileEntity_MultiBlockBase { .addInfo("Outputs " + EU_PER_TICK + "EU/t and " + STEAM_PER_SEC + "L/s Steam") .addInfo("Additionally, requires " + OXYGEN_PER_SEC + "L/s Oxygen gas") .addSeparator() - .beginStructureBlock(3, 3, 5) + .beginStructureBlock(3, 3, 5, false) .addController("Front center") .addCasingInfo("Robust Tungstensteel Machine Casing", 12) .addOtherStructurePart("GDC Ceramic Electrolyte Unit", "3x, Center 1x1x3") -- cgit From b5138167786059aeac3c6af875bbc9beaaca8eab Mon Sep 17 00:00:00 2001 From: Léa Gris Date: Sat, 22 May 2021 21:34:43 +0200 Subject: fix(texture): remove use of deprecated CASING_BLOCKS --- src/main/java/common/tileentities/GTMTE_SOFuelCellMK2.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java/common/tileentities/GTMTE_SOFuelCellMK2.java') diff --git a/src/main/java/common/tileentities/GTMTE_SOFuelCellMK2.java b/src/main/java/common/tileentities/GTMTE_SOFuelCellMK2.java index 8bcb7619e5..a015887350 100644 --- a/src/main/java/common/tileentities/GTMTE_SOFuelCellMK2.java +++ b/src/main/java/common/tileentities/GTMTE_SOFuelCellMK2.java @@ -87,11 +87,11 @@ public class GTMTE_SOFuelCellMK2 extends GT_MetaTileEntity_MultiBlockBase { public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { return aSide == aFacing - ? new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[CASING_TEXTURE_ID], + ? new ITexture[]{Textures.BlockIcons.getCasingTextureForId(CASING_TEXTURE_ID), new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_HEAT_EXCHANGER_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_HEAT_EXCHANGER)} - : new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[CASING_TEXTURE_ID]}; + : new ITexture[]{Textures.BlockIcons.getCasingTextureForId(CASING_TEXTURE_ID)}; } public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { -- cgit