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 +- src/main/java/util/MultiBlockTooltipBuilder.java | 179 --------------------- 7 files changed, 102 insertions(+), 262 deletions(-) delete mode 100644 src/main/java/util/MultiBlockTooltipBuilder.java (limited to 'src/main/java') 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 diff --git a/src/main/java/util/MultiBlockTooltipBuilder.java b/src/main/java/util/MultiBlockTooltipBuilder.java deleted file mode 100644 index c0573667ab..0000000000 --- a/src/main/java/util/MultiBlockTooltipBuilder.java +++ /dev/null @@ -1,179 +0,0 @@ -package util; - -import java.util.LinkedList; -import java.util.List; - -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.StatCollector; - -/** - * Have you ever felt like your tooltips just aren't enterprise enough? Use this! - * - * @author kekzdealer - * - */ -public class MultiBlockTooltipBuilder { - - 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 keywords - private static final String KW_dimensions = StatCollector.translateToLocal("mbdesc.beginStructureBlock.Dimensions"); - private static final String KW_structure = StatCollector.translateToLocal("mbdesc.beginStructureBlock.Structure"); - private static final String KW_controller = StatCollector.translateToLocal("mbdesc.addController.Controller"); - private static final String KW_atleast = StatCollector.translateToLocal("mbdesc.addCasing.atleast"); - private static final String KW_energyhatch = StatCollector.translateToLocal("mbdesc.addEnergyHatch.EnergyHatch"); - private static final String KW_dynamohatch = StatCollector.translateToLocal("mbdesc.addDynamoHatch.DynamoHatch"); - private static final String KW_maintenancehatch = StatCollector.translateToLocal("mbdesc.addMaintenanceHatch.MaintenanceHatch"); - private static final String KW_iohatches = StatCollector.translateToLocal("mbdesc.addIOHatches.IOHatches"); - private static final String KW_inputbus = StatCollector.translateToLocal("mbdesc.addInputBus.InputBus"); - private static final String KW_inputhatch = StatCollector.translateToLocal("mbdesc.addInputHatch.InputHatch"); - private static final String KW_outputbus = StatCollector.translateToLocal("mbdesc.addOutputBus.OutputBus"); - private static final String KW_outputhatch = StatCollector.translateToLocal("mbdesc.addOutputHatch.OutputHatch"); - private static final String KW_hold = StatCollector.translateToLocal("mbdesc.signAndFinalize.Hold"); - private static final String KW_todisplay = StatCollector.translateToLocal("mbdesc.signAndFinalize.todisplay"); - private static final String KW_createdby = StatCollector.translateToLocal("mbdesc.signAndFinalize.createdby"); - - public MultiBlockTooltipBuilder() { - iLines = new LinkedList<>(); - sLines = new LinkedList<>(); - - - } - - /** - * Add a basic line of information about this structure - * - * @param info - * The line to be added. - * @return Instance this method was called on. - */ - public MultiBlockTooltipBuilder addInfo(String info) { - iLines.add(info); - return this; - } - - /** - * Add a separator line like this:
- * ------------------------------- - * - * @return Instance this method was called on. - */ - public MultiBlockTooltipBuilder addSeparator() { - iLines.add("-----------------------------------------"); - 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 MultiBlockTooltipBuilder beginStructureBlock(int w, int h, int l) { - sLines.add(KW_dimensions + COLON + w + "x" + h + "x" + l + " (WxHxL)"); - sLines.add(KW_structure + COLON); - return this; - } - - public MultiBlockTooltipBuilder addController(String info) { - sLines.add(TAB + KW_controller + COLON + info); - return this; - } - - public MultiBlockTooltipBuilder addCasingInfo(String casingName, int minCount) { - sLines.add(TAB + minCount +"x " + casingName + " " + KW_atleast); - return this; - } - - public MultiBlockTooltipBuilder addEnergyHatch(String info) { - sLines.add(TAB + KW_energyhatch + COLON + info); - return this; - } - - public MultiBlockTooltipBuilder addDynamoHatch(String info) { - sLines.add(TAB + KW_dynamohatch + COLON + info); - return this; - } - - public MultiBlockTooltipBuilder addMaintenanceHatch(String info) { - sLines.add(TAB + KW_maintenancehatch + COLON + info); - return this; - } - - public MultiBlockTooltipBuilder addIOHatches(String info) { - sLines.add(TAB + KW_iohatches + COLON + info); - return this; - } - - public MultiBlockTooltipBuilder addInputBus(String info) { - sLines.add(TAB + KW_inputbus + COLON + info); - return this; - } - - public MultiBlockTooltipBuilder addInputHatch(String info) { - sLines.add(TAB + KW_inputhatch + COLON + info); - return this; - } - - public MultiBlockTooltipBuilder addOutputBus(String info) { - sLines.add(TAB + KW_outputbus + COLON + info); - return this; - } - - public MultiBlockTooltipBuilder addOutputHatch(String info) { - sLines.add(TAB + KW_outputhatch + COLON + info); - return this; - } - - /** - * Use this method to add a structural part that isn't covered by the builders capabilities. - * - * @param name - * Name of the hatch or other component. - * @param info - * Positional information. - * @return Instance this method was called on. - */ - public MultiBlockTooltipBuilder addOtherStructurePart(String name, String info) { - sLines.add(TAB + name + COLON + info); - return this; - } - - /** - * Call at the very end.
- * Adds a final line with the authors name and information on how to display the structure guidelines.
- * Ends the building process. - * - * @param author - * Name of the creator of this Machine - */ - public void signAndFinalize(String author) { - iLines.add(KW_hold + " " + EnumChatFormatting.BOLD + "[LSHIFT]" + EnumChatFormatting.RESET + EnumChatFormatting.GRAY + " " + KW_todisplay); - iLines.add(KW_createdby + " " + author); - 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; - } -} -- cgit From 5f6f23ef58fc512800bae6f233cc56d8ccd5d569 Mon Sep 17 00:00:00 2001 From: Prometheus0000000 Date: Thu, 19 Nov 2020 00:04:06 -0500 Subject: Fix --- src/main/java/common/tileentities/GTMTE_ModularNuclearReactor.java | 1 - src/main/java/common/tileentities/GTMTE_SpaceElevator.java | 1 - 2 files changed, 2 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/common/tileentities/GTMTE_ModularNuclearReactor.java b/src/main/java/common/tileentities/GTMTE_ModularNuclearReactor.java index 531bd9dc89..e2dbfb68d7 100644 --- a/src/main/java/common/tileentities/GTMTE_ModularNuclearReactor.java +++ b/src/main/java/common/tileentities/GTMTE_ModularNuclearReactor.java @@ -16,7 +16,6 @@ import net.minecraft.block.Block; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; import net.minecraftforge.common.util.ForgeDirection; -import util.MultiBlockTooltipBuilder; public class GTMTE_ModularNuclearReactor extends GT_MetaTileEntity_MultiBlockBase { diff --git a/src/main/java/common/tileentities/GTMTE_SpaceElevator.java b/src/main/java/common/tileentities/GTMTE_SpaceElevator.java index 9c54bd6c8d..3469528f78 100644 --- a/src/main/java/common/tileentities/GTMTE_SpaceElevator.java +++ b/src/main/java/common/tileentities/GTMTE_SpaceElevator.java @@ -16,7 +16,6 @@ import net.minecraft.tileentity.TileEntity; 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; -- cgit From 063fbf32820ad1571c3f7f88d7e563a3b0f2bba9 Mon Sep 17 00:00:00 2001 From: Prometheus0000000 Date: Thu, 19 Nov 2020 01:01:43 -0500 Subject: More text changes --- src/main/java/common/tileentities/GTMTE_FluidMultiStorage.java | 5 ++++- .../java/common/tileentities/GTMTE_LapotronicSuperCapacitor.java | 8 ++++---- 2 files changed, 8 insertions(+), 5 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/common/tileentities/GTMTE_FluidMultiStorage.java b/src/main/java/common/tileentities/GTMTE_FluidMultiStorage.java index 496e7d01ff..c2315b00fa 100644 --- a/src/main/java/common/tileentities/GTMTE_FluidMultiStorage.java +++ b/src/main/java/common/tileentities/GTMTE_FluidMultiStorage.java @@ -74,7 +74,8 @@ public class GTMTE_FluidMultiStorage extends GT_MetaTileEntity_MultiBlockBase { .addSeparator() .beginStructureBlock(5, 9, 5) .addController("Top Center") - .addOtherStructurePart("Storage Field Blocks", "Inner 3x7x3 solid pillar") + .addCasingInfo("T.F.F.T. Casing", 20) + .addOtherStructurePart("Storage Field Blocks (Tier I-V)", "Inner 3x7x3 solid pillar") .addOtherStructurePart("IC2 Reinforced Glass", "Outer 5x7x5 glass shell") .addMaintenanceHatch("Any top or bottom casing") .addEnergyHatch("Any top or bottom casing") @@ -82,6 +83,8 @@ public class GTMTE_FluidMultiStorage extends GT_MetaTileEntity_MultiBlockBase { .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") + .addStructureInfo("Use MIOH with conduits or fluid storage busses to see all fluids at once. If it's fixed.") + .addStructureInfo("Ask someone else why there's 4 versions, with 2 uncraftable ones") .toolTipFinisher("KekzTech"); if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { return tt.getInformation(); diff --git a/src/main/java/common/tileentities/GTMTE_LapotronicSuperCapacitor.java b/src/main/java/common/tileentities/GTMTE_LapotronicSuperCapacitor.java index c28db33487..11fcc27da7 100644 --- a/src/main/java/common/tileentities/GTMTE_LapotronicSuperCapacitor.java +++ b/src/main/java/common/tileentities/GTMTE_LapotronicSuperCapacitor.java @@ -76,10 +76,10 @@ public class GTMTE_LapotronicSuperCapacitor extends GT_MetaTileEntity_MultiBlock public String[] getDescription() { final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); tt.addMachineType("Battery Buffer") - .addInfo("Power storage structure!") + .addInfo("Power storage structure. Does not charge batteries or tools, however.") .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.") + .addInfo("Exception: Ultimate Capacitors only count as Lapotronic Capacitors (UV) for the") + .addInfo("purposes 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") @@ -94,7 +94,7 @@ public class GTMTE_LapotronicSuperCapacitor extends GT_MetaTileEntity_MultiBlock .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") + .addStructureInfo("You can have several I/O Hatches") .addMaintenanceHatch("Any casing") .toolTipFinisher("KekzTech"); if(!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { -- 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_FluidMultiStorage.java | 2 +- src/main/java/common/tileentities/GTMTE_LapotronicSuperCapacitor.java | 2 +- src/main/java/common/tileentities/GTMTE_SOFuelCellMK1.java | 2 +- src/main/java/common/tileentities/GTMTE_SOFuelCellMK2.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/common/tileentities/GTMTE_FluidMultiStorage.java b/src/main/java/common/tileentities/GTMTE_FluidMultiStorage.java index c2315b00fa..709d2c42bb 100644 --- a/src/main/java/common/tileentities/GTMTE_FluidMultiStorage.java +++ b/src/main/java/common/tileentities/GTMTE_FluidMultiStorage.java @@ -72,7 +72,7 @@ public class GTMTE_FluidMultiStorage extends GT_MetaTileEntity_MultiBlockBase { .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) + .beginStructureBlock(5, 9, 5, false) .addController("Top Center") .addCasingInfo("T.F.F.T. Casing", 20) .addOtherStructurePart("Storage Field Blocks (Tier I-V)", "Inner 3x7x3 solid pillar") diff --git a/src/main/java/common/tileentities/GTMTE_LapotronicSuperCapacitor.java b/src/main/java/common/tileentities/GTMTE_LapotronicSuperCapacitor.java index 11fcc27da7..bea7ea2ec5 100644 --- a/src/main/java/common/tileentities/GTMTE_LapotronicSuperCapacitor.java +++ b/src/main/java/common/tileentities/GTMTE_LapotronicSuperCapacitor.java @@ -85,7 +85,7 @@ public class GTMTE_LapotronicSuperCapacitor extends GT_MetaTileEntity_MultiBlock .addInfo("UV-tier glass required for TecTech Laser Hatches") .addInfo("Add more or better capacitors to increase capacity") .addSeparator() - .beginStructureBlock(5, 4, 5) + .beginStructureBlock(5, 4, 5, false) .addStructureInfo("Modular height of 4-18 blocks.") .addController("Front center bottom") .addOtherStructurePart("Lapotronic Super Capacitor Casing", "5x2x5 base (at least 17x)") diff --git a/src/main/java/common/tileentities/GTMTE_SOFuelCellMK1.java b/src/main/java/common/tileentities/GTMTE_SOFuelCellMK1.java index afa434895a..57beb6942f 100644 --- a/src/main/java/common/tileentities/GTMTE_SOFuelCellMK1.java +++ b/src/main/java/common/tileentities/GTMTE_SOFuelCellMK1.java @@ -64,7 +64,7 @@ public class GTMTE_SOFuelCellMK1 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("Clean Stainless Steel Casing", 12) .addOtherStructurePart("YSZ Ceramic Electrolyte Unit", "3x, Center 1x1x3") 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 bca89a3ed1c9bc4c46d318b316cd82c4837384a7 Mon Sep 17 00:00:00 2001 From: korneel vandamme Date: Tue, 15 Dec 2020 22:58:43 +0100 Subject: fix getTankInfo not geting the fluids --- src/main/java/common/tileentities/GTMTE_TFFTMultiHatch.java | 13 +++++++++++++ src/main/java/kekztech/MultiFluidHandler.java | 4 ++++ 2 files changed, 17 insertions(+) (limited to 'src/main/java') diff --git a/src/main/java/common/tileentities/GTMTE_TFFTMultiHatch.java b/src/main/java/common/tileentities/GTMTE_TFFTMultiHatch.java index c8c987d7dc..408399b677 100644 --- a/src/main/java/common/tileentities/GTMTE_TFFTMultiHatch.java +++ b/src/main/java/common/tileentities/GTMTE_TFFTMultiHatch.java @@ -15,6 +15,7 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidTankInfo; import net.minecraftforge.fluids.IFluidHandler; import java.util.HashMap; @@ -180,6 +181,18 @@ public class GTMTE_TFFTMultiHatch extends GT_MetaTileEntity_Hatch { return null; } + @Override + public FluidTankInfo[] getTankInfo(ForgeDirection from) { + FluidStack[] fluids = mfh.getAllFluids(); + int length = fluids.length; + int maxCapcity = mfh.getCapacity(); + FluidTankInfo[] tankInfo = new FluidTankInfo[length]; + for (int i = 0; i < length; i++) { + tankInfo[i] = new FluidTankInfo(fluids[i],maxCapcity); + } + return tankInfo; + } + @Override public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { return false; diff --git a/src/main/java/kekztech/MultiFluidHandler.java b/src/main/java/kekztech/MultiFluidHandler.java index 2c1eb2af1c..936ecf5042 100644 --- a/src/main/java/kekztech/MultiFluidHandler.java +++ b/src/main/java/kekztech/MultiFluidHandler.java @@ -92,6 +92,10 @@ public class MultiFluidHandler { return fluidSelector; } + public FluidStack[] getAllFluids() { + return fluids; + } + public int getFluidPosistion(FluidStack aFluid) { for (int i = 0; i < fluids.length; i++) -- cgit