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 --- .../tileentities/GTMTE_FluidMultiStorage.java | 46 +++++++++++---------- .../GTMTE_LapotronicSuperCapacitor.java | 48 ++++++++++++---------- .../tileentities/GTMTE_ModularNuclearReactor.java | 4 +- .../common/tileentities/GTMTE_SOFuelCellMK1.java | 41 +++++++++--------- .../common/tileentities/GTMTE_SOFuelCellMK2.java | 42 ++++++++++--------- .../common/tileentities/GTMTE_SpaceElevator.java | 4 +- 6 files changed, 102 insertions(+), 83 deletions(-) (limited to 'src/main/java/common') diff --git a/src/main/java/common/tileentities/GTMTE_FluidMultiStorage.java b/src/main/java/common/tileentities/GTMTE_FluidMultiStorage.java index 894ad12415..496e7d01ff 100644 --- a/src/main/java/common/tileentities/GTMTE_FluidMultiStorage.java +++ b/src/main/java/common/tileentities/GTMTE_FluidMultiStorage.java @@ -9,6 +9,7 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.*; import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import gregtech.api.util.GT_Utility; import kekztech.MultiFluidHandler; import net.minecraft.block.Block; @@ -21,7 +22,6 @@ import net.minecraft.util.EnumChatFormatting; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; import org.lwjgl.input.Keyboard; -import util.MultiBlockTooltipBuilder; import util.Vector3i; import util.Vector3ic; @@ -61,28 +61,32 @@ public class GTMTE_FluidMultiStorage extends GT_MetaTileEntity_MultiBlockBase { @Override public String[] getDescription() { - final MultiBlockTooltipBuilder b = new MultiBlockTooltipBuilder(); - b.addInfo("High-Tech fluid tank that can hold up to 25 different fluids!") - .addInfo("Has 1/25th of the total capacity as capacity for each fluid.") - .addInfo("Right clicking the controller with a screwdriver will turn on excess voiding.") - .addInfo("Fluid storage amount and running cost depends on the storage field blocks used.") - .addSeparator() - .addInfo("Note on hatch locking:") - .addInfo("Use an Integrated Circuit in the GUI slot to limit which fluid is output.") - .addInfo("The index of a stored fluid can be obtained through the Tricorder.") - .addSeparator() - .beginStructureBlock(5, 9, 5) - .addController("Top Center") - .addEnergyHatch("Any top or bottom casing") - .addOtherStructurePart("Inner 3x7x3 solid pillar", "Storage Field Blocks") - .addOtherStructurePart("Outer 5x7x5 glass shell", "IC2 Reinforced Glass") - .addMaintenanceHatch("Any top or bottom casing") - .addIOHatches("Instead of any casing or glass, have to touch storage field.") - .signAndFinalize("Kekzdealer"); + final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType("Fluid Tank") + .addInfo("High-Tech fluid tank that can hold up to 25 different fluids!") + .addInfo("Has 1/25th of the total capacity as capacity for each fluid.") + .addInfo("Right clicking the controller with a screwdriver will turn on excess voiding.") + .addInfo("Fluid storage amount and running cost depends on the storage field blocks used.") + .addSeparator() + .addInfo("Note on hatch locking:") + .addInfo("Use an Integrated Circuit in the GUI slot to limit which fluid is output.") + .addInfo("The index of a stored fluid can be obtained through the Tricorder.") + .addSeparator() + .beginStructureBlock(5, 9, 5) + .addController("Top Center") + .addOtherStructurePart("Storage Field Blocks", "Inner 3x7x3 solid pillar") + .addOtherStructurePart("IC2 Reinforced Glass", "Outer 5x7x5 glass shell") + .addMaintenanceHatch("Any top or bottom casing") + .addEnergyHatch("Any top or bottom casing") + .addInputHatch("Instead of any casing or glass, has to touch storage field block") + .addOutputHatch("Instead of any casing or glass, has to touch storage field block") + .addStructureInfo("You can have a bunch of hatches") + .addOtherStructurePart("Multi I/O Hatches", "Instead of any casing or glass, has to touch storage field block") + .toolTipFinisher("KekzTech"); if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { - return b.getInformation(); + return tt.getInformation(); } else { - return b.getStructureInformation(); + return tt.getStructureInformation(); } } diff --git a/src/main/java/common/tileentities/GTMTE_LapotronicSuperCapacitor.java b/src/main/java/common/tileentities/GTMTE_LapotronicSuperCapacitor.java index fc743a56d3..c28db33487 100644 --- a/src/main/java/common/tileentities/GTMTE_LapotronicSuperCapacitor.java +++ b/src/main/java/common/tileentities/GTMTE_LapotronicSuperCapacitor.java @@ -16,6 +16,7 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Dynam import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import net.minecraft.block.Block; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; @@ -23,7 +24,6 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumChatFormatting; import net.minecraftforge.common.util.ForgeDirection; import org.lwjgl.input.Keyboard; -import util.MultiBlockTooltipBuilder; import util.Vector3i; import util.Vector3ic; @@ -74,29 +74,33 @@ public class GTMTE_LapotronicSuperCapacitor extends GT_MetaTileEntity_MultiBlock @Override public String[] getDescription() { - final MultiBlockTooltipBuilder b = new MultiBlockTooltipBuilder(); - b.addInfo("Power storage structure!") - .addInfo("Looses energy equal to 1% of the total capacity every 24 hours.") - .addInfo("EXCEPTION: Ultimate Capacitors only count as Lapotronic Capacitors (UV) for the") - .addInfo("purpose of passive loss calculation. The full capacity is counted towards the actual power capacity.") - .addSeparator() - .addInfo("Glass shell has to be Tier - 2 of the highest capacitor tier") - .addInfo("UV-Tier glass required for TecTech Laser Hatches") - .addInfo("Modular height of 4 to 18 blocks.") - .addSeparator() - .beginStructureBlock(5, 4, 5) - .addController("Front Bottom Center") - .addDynamoHatch("Instead of any casing") - .addEnergyHatch("Instead of any casing") - .addOtherStructurePart("Lapotronic Capacitor Base", "5x2x5 base (at least 17x)") - .addOtherStructurePart("Lapotronic Capacitor, (Really) Ultimate Capacitor", "Center 3x(1-15)x3 above base (9-135 blocks)") - .addOtherStructurePart("Borosilicate Glass", "41-265x, Encase capacitor pillar") - .addMaintenanceHatch("Instead of any casing") - .signAndFinalize("Kekzdealer"); + final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); + tt.addMachineType("Battery Buffer") + .addInfo("Power storage structure!") + .addInfo("Loses energy equal to 1% of the total capacity every 24 hours.") + .addInfo("EXCEPTION: Ultimate Capacitors only count as Lapotronic Capacitors (UV) for the") + .addInfo("purpose of passive loss calculation. The full capacity is counted towards the actual power capacity.") + .addSeparator() + .addInfo("Glass shell has to be Tier - 2 of the highest capacitor tier") + .addInfo("UV-tier glass required for TecTech Laser Hatches") + .addInfo("Add more or better capacitors to increase capacity") + .addSeparator() + .beginStructureBlock(5, 4, 5) + .addStructureInfo("Modular height of 4-18 blocks.") + .addController("Front center bottom") + .addOtherStructurePart("Lapotronic Super Capacitor Casing", "5x2x5 base (at least 17x)") + .addOtherStructurePart("Lapotronic Capacitor (IV-UV), Ultimate Capacitor (UHV)", "Center 3x(1-15)x3 above base (9-135 blocks)") + .addOtherStructurePart("Borosilicate Glass (any)", "41-265x, Encase capacitor pillar") + .addEnergyHatch("Any casing") + .addDynamoHatch("Any casing") + .addOtherStructurePart("Laser Target/Source Hatches", "Any casing, must be using UV-tier glass") + .addStructureInfo("You can have several I/O Hstches") + .addMaintenanceHatch("Any casing") + .toolTipFinisher("KekzTech"); if(!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { - return b.getInformation(); + return tt.getInformation(); } else { - return b.getStructureInformation(); + return tt.getStructureInformation(); } } diff --git a/src/main/java/common/tileentities/GTMTE_ModularNuclearReactor.java b/src/main/java/common/tileentities/GTMTE_ModularNuclearReactor.java index 5e0b86ed69..531bd9dc89 100644 --- a/src/main/java/common/tileentities/GTMTE_ModularNuclearReactor.java +++ b/src/main/java/common/tileentities/GTMTE_ModularNuclearReactor.java @@ -47,6 +47,8 @@ public class GTMTE_ModularNuclearReactor extends GT_MetaTileEntity_MultiBlockBas @Override public String[] getDescription() { + return new String[]{"Disabled"}; + /* final MultiBlockTooltipBuilder b = new MultiBlockTooltipBuilder(); b.addInfo("Can be built, BUT DOES NOT WORK") .addInfo("Converts fissile material and outputs power or heat") @@ -75,7 +77,7 @@ public class GTMTE_ModularNuclearReactor extends GT_MetaTileEntity_MultiBlockBas return b.getInformation(); } else { return b.getStructureInformation(); - } + }*/ } @Override diff --git a/src/main/java/common/tileentities/GTMTE_SOFuelCellMK1.java b/src/main/java/common/tileentities/GTMTE_SOFuelCellMK1.java index 76536f0e50..afa434895a 100644 --- a/src/main/java/common/tileentities/GTMTE_SOFuelCellMK1.java +++ b/src/main/java/common/tileentities/GTMTE_SOFuelCellMK1.java @@ -17,6 +17,7 @@ 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_ModHandler; +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,6 @@ import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; -import util.MultiBlockTooltipBuilder; import util.Vector3i; import util.Vector3ic; @@ -56,26 +56,29 @@ public class GTMTE_SOFuelCellMK1 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 29,480EU 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("YSZ Ceramic Electrolyte Unit", "3x, Center 1x1x3") - .addOtherStructurePart("Reinforced Glass", "6x, touching the electrolyte units on the horizontal sides") - .addCasingInfo("Clean Stainless Steel 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 29,480EU 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("Clean Stainless Steel Casing", 12) + .addOtherStructurePart("YSZ 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("Steam, any casing") + .toolTipFinisher("KekzTech"); if(!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { - return b.getInformation(); + return tt.getInformation(); } else { - return b.getStructureInformation(); + return tt.getStructureInformation(); } } 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(); } } diff --git a/src/main/java/common/tileentities/GTMTE_SpaceElevator.java b/src/main/java/common/tileentities/GTMTE_SpaceElevator.java index 24d941b39b..9c54bd6c8d 100644 --- a/src/main/java/common/tileentities/GTMTE_SpaceElevator.java +++ b/src/main/java/common/tileentities/GTMTE_SpaceElevator.java @@ -57,6 +57,8 @@ public class GTMTE_SpaceElevator extends GT_MetaTileEntity_MultiBlockBase { @Override public String[] getDescription() { + return new String[]{"Disabled"}; + /* final MultiBlockTooltipBuilder b = new MultiBlockTooltipBuilder(); b.addInfo("Access for your Space Station!") .addInfo("Check out the wiki on my github if you are having trouble with the structure") @@ -77,7 +79,7 @@ public class GTMTE_SpaceElevator extends GT_MetaTileEntity_MultiBlockBase { return b.getInformation(); } else { return b.getStructureInformation(); - } + }*/ } @Override -- cgit