aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPrometheus0000 <prometheus0000000@gmail.com>2020-12-26 03:00:04 -0500
committerGitHub <noreply@github.com>2020-12-26 03:00:04 -0500
commitfff6ea3647e721f944c6f2c5a6fdddedd2728902 (patch)
treeb3357242ffdb85aed9b0895df3fd29b70b35eb33 /src
parentbd62652a0cb26a55da43f05061cf419e748ed5db (diff)
parent89860d7951b9d71775a97257c8fc27e942c03311 (diff)
downloadGT5-Unofficial-fff6ea3647e721f944c6f2c5a6fdddedd2728902.tar.gz
GT5-Unofficial-fff6ea3647e721f944c6f2c5a6fdddedd2728902.tar.bz2
GT5-Unofficial-fff6ea3647e721f944c6f2c5a6fdddedd2728902.zip
Merge pull request #1 from GTNewHorizons/master
update
Diffstat (limited to 'src')
-rw-r--r--src/main/java/common/tileentities/GTMTE_FluidMultiStorage.java49
-rw-r--r--src/main/java/common/tileentities/GTMTE_LapotronicSuperCapacitor.java48
-rw-r--r--src/main/java/common/tileentities/GTMTE_ModularNuclearReactor.java5
-rw-r--r--src/main/java/common/tileentities/GTMTE_SOFuelCellMK1.java41
-rw-r--r--src/main/java/common/tileentities/GTMTE_SOFuelCellMK2.java42
-rw-r--r--src/main/java/common/tileentities/GTMTE_SpaceElevator.java5
-rw-r--r--src/main/java/common/tileentities/GTMTE_TFFTMultiHatch.java13
-rw-r--r--src/main/java/kekztech/MultiFluidHandler.java4
-rw-r--r--src/main/java/util/MultiBlockTooltipBuilder.java179
9 files changed, 122 insertions, 264 deletions
diff --git a/src/main/java/common/tileentities/GTMTE_FluidMultiStorage.java b/src/main/java/common/tileentities/GTMTE_FluidMultiStorage.java
index 894ad12415..709d2c42bb 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,35 @@ 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, false)
+ .addController("Top Center")
+ .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")
+ .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")
+ .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 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..bea7ea2ec5 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. 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("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")
+ .addInfo("Add more or better capacitors to increase capacity")
+ .addSeparator()
+ .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)")
+ .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 Hatches")
+ .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..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 {
@@ -47,6 +46,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 +76,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..57beb6942f 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, false)
+ .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..8bcb7619e5 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, false)
+ .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..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;
@@ -57,6 +56,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 +78,7 @@ public class GTMTE_SpaceElevator extends GT_MetaTileEntity_MultiBlockBase {
return b.getInformation();
} else {
return b.getStructureInformation();
- }
+ }*/
}
@Override
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;
@@ -181,6 +182,18 @@ public class GTMTE_TFFTMultiHatch extends GT_MetaTileEntity_Hatch {
}
@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++)
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<String> iLines;
- private final List<String> 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:<br>
- * -------------------------------
- *
- * @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.<br>
- * Adds a final line with the authors name and information on how to display the structure guidelines.<br>
- * 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;
- }
-}