aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/gregtech')
-rw-r--r--src/main/java/gregtech/GT_Mod.java1
-rw-r--r--src/main/java/gregtech/api/enums/ItemList.java2
-rw-r--r--src/main/java/gregtech/api/enums/Textures.java3
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Item.java2
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java16
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Buffer.java4
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBus.java11
-rw-r--r--src/main/java/gregtech/api/util/GT_Multiblock_Tooltip_Builder.java348
-rw-r--r--src/main/java/gregtech/api/util/GT_Recipe.java1
-rw-r--r--src/main/java/gregtech/api/util/GT_Utility.java104
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Block_Casings8.java6
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_Conveyor.java32
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java42
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BrickedBlastFurnace.java29
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java5
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java31
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java43
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ConcreteBackfiller2.java42
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ConcreteBackfillerBase.java38
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java99
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java35
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java48
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ExtremeDieselEngine.java178
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer1.java33
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer2.java34
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer3.java34
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_HeatExchanger.java37
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java35
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java44
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java41
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java33
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java35
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java32
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java35
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java37
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilCracker.java38
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrillBase.java39
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlantBase.java46
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java39
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java44
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_VacuumFreezer.java30
-rw-r--r--src/main/java/gregtech/loaders/postload/GT_ExtremeDieselFuelLoader.java23
-rw-r--r--src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java6
43 files changed, 1470 insertions, 345 deletions
diff --git a/src/main/java/gregtech/GT_Mod.java b/src/main/java/gregtech/GT_Mod.java
index 27932b98c2..55ee8f3c55 100644
--- a/src/main/java/gregtech/GT_Mod.java
+++ b/src/main/java/gregtech/GT_Mod.java
@@ -936,6 +936,7 @@ public class GT_Mod implements IGT_Mod {
Items.diamond_axe.setMaxDamage(768);
Items.diamond_hoe.setMaxDamage(768);
}
+ new GT_ExtremeDieselFuelLoader().run();
GT_Log.out.println("GT_Mod: Adding buffered Recipes.");
GT_ModHandler.stopBufferingCraftingRecipes();
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/api/metatileentity/implementations/GT_MetaPipeEntity_Item.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Item.java
index 650e9a031e..c73e95e95b 100644
--- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Item.java
+++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Item.java
@@ -270,7 +270,7 @@ public class GT_MetaPipeEntity_Item extends MetaPipeEntity implements IMetaTileE
TileEntity tInventory = getBaseMetaTileEntity().getTileEntityAtSide(aSide);
if (tInventory != null && !(tInventory instanceof BaseMetaPipeEntity)) {
if ((!(tInventory instanceof TileEntityHopper) && !(tInventory instanceof TileEntityDispenser)) || getBaseMetaTileEntity().getMetaIDAtSide(aSide) != GT_Utility.getOppositeSide(aSide)) {
- return GT_Utility.moveOneItemStack(aSender, tInventory, (byte) 6, GT_Utility.getOppositeSide(aSide), null, false, (byte) 64, (byte) 1, (byte) 64, (byte) 1) > 0;
+ return GT_Utility.moveMultipleItemStacks(aSender, tInventory, (byte) 6, GT_Utility.getOppositeSide(aSide), null, false, (byte) 64, (byte) 1, (byte) 64, (byte) 1,1) > 0;
}
}
}
diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java
index 97daa6fc71..2c632c596b 100644
--- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java
+++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java
@@ -32,6 +32,7 @@ import java.util.Arrays;
import static gregtech.api.enums.GT_Values.V;
import static gregtech.api.enums.GT_Values.debugCleanroom;
+import static gregtech.api.util.GT_Utility.moveMultipleItemStacks;
/**
* NEVER INCLUDE THIS FILE IN YOUR MOD!!!
@@ -510,10 +511,17 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B
if (doesAutoOutput() && !isOutputEmpty() && aBaseMetaTileEntity.getFrontFacing() != mMainFacing && (tSucceeded || mOutputBlocked % 300 == 1 || aBaseMetaTileEntity.hasInventoryBeenModified() || aTick % 600 == 0)) {
TileEntity tTileEntity2 = aBaseMetaTileEntity.getTileEntityAtSide(aBaseMetaTileEntity.getFrontFacing());
- for (int i = 0, tCosts = 1; i < mOutputItems.length && tCosts > 0 && aBaseMetaTileEntity.isUniversalEnergyStored(128); i++) {
- tCosts = GT_Utility.moveOneItemStack(aBaseMetaTileEntity, tTileEntity2, aBaseMetaTileEntity.getFrontFacing(), aBaseMetaTileEntity.getBackFacing(), null, false, (byte) 64, (byte) 1, (byte) 64, (byte) 1);
- if (tCosts > 0) aBaseMetaTileEntity.decreaseStoredEnergyUnits(tCosts, true);
- }
+ long tStoredEnergy = aBaseMetaTileEntity.getUniversalEnergyStored();
+ int tMaxStacks = (int)(tStoredEnergy/64l);
+ if (tMaxStacks > mOutputItems.length)
+ tMaxStacks = mOutputItems.length;
+
+ int tCost = moveMultipleItemStacks(aBaseMetaTileEntity, tTileEntity2, aBaseMetaTileEntity.getFrontFacing(), aBaseMetaTileEntity.getBackFacing(), null, false, (byte) 64, (byte) 1, (byte) 64, (byte) 1,tMaxStacks);
+ aBaseMetaTileEntity.decreaseStoredEnergyUnits(tCost, true);
+// for (int i = 0, tCosts = 1; i < mOutputItems.length && tCosts > 0 && aBaseMetaTileEntity.isUniversalEnergyStored(128); i++) {
+// tCosts = GT_Utility.moveOneItemStack(aBaseMetaTileEntity, tTileEntity2, aBaseMetaTileEntity.getFrontFacing(), aBaseMetaTileEntity.getBackFacing(), null, false, (byte) 64, (byte) 1, (byte) 64, (byte) 1);
+// if (tCosts > 0) aBaseMetaTileEntity.decreaseStoredEnergyUnits(tCosts, true);
+// }
}
if (mOutputBlocked != 0) if (isOutputEmpty()) mOutputBlocked = 0;
diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Buffer.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Buffer.java
index 645836a801..7284cd3c01 100644
--- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Buffer.java
+++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Buffer.java
@@ -259,9 +259,9 @@ public abstract class GT_MetaTileEntity_Buffer extends GT_MetaTileEntity_TieredM
protected void moveItems(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) {
int tCost;
if( bStockingMode )
- tCost = GT_Utility.moveOneItemStack(aBaseMetaTileEntity, aBaseMetaTileEntity.getTileEntityAtSide(aBaseMetaTileEntity.getBackFacing()), aBaseMetaTileEntity.getBackFacing(), aBaseMetaTileEntity.getFrontFacing(), null, false, mTargetStackSize == 0 ? 64 : (byte) mTargetStackSize, mTargetStackSize == 0 ? 1 : (byte) mTargetStackSize, (byte) 64, (byte) 1);
+ tCost = GT_Utility.moveMultipleItemStacks(aBaseMetaTileEntity, aBaseMetaTileEntity.getTileEntityAtSide(aBaseMetaTileEntity.getBackFacing()), aBaseMetaTileEntity.getBackFacing(), aBaseMetaTileEntity.getFrontFacing(), null, false, mTargetStackSize == 0 ? 64 : (byte) mTargetStackSize, mTargetStackSize == 0 ? 1 : (byte) mTargetStackSize, (byte) 64, (byte) 1,1);
else
- tCost = GT_Utility.moveOneItemStack(aBaseMetaTileEntity, aBaseMetaTileEntity.getTileEntityAtSide(aBaseMetaTileEntity.getBackFacing()), aBaseMetaTileEntity.getBackFacing(), aBaseMetaTileEntity.getFrontFacing(), null, false, (byte) 64, (byte) 1, mTargetStackSize == 0 ? 64 : (byte) mTargetStackSize, mTargetStackSize == 0 ? 1 : (byte) mTargetStackSize);
+ tCost = GT_Utility.moveMultipleItemStacks(aBaseMetaTileEntity, aBaseMetaTileEntity.getTileEntityAtSide(aBaseMetaTileEntity.getBackFacing()), aBaseMetaTileEntity.getBackFacing(), aBaseMetaTileEntity.getFrontFacing(), null, false, (byte) 64, (byte) 1, mTargetStackSize == 0 ? 64 : (byte) mTargetStackSize, mTargetStackSize == 0 ? 1 : (byte) mTargetStackSize,1);
if (tCost > 0 || aBaseMetaTileEntity.hasInventoryBeenModified()) {
mSuccess = 50;
diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBus.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBus.java
index 6c56ac6a74..1dafbcce5a 100644
--- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBus.java
+++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBus.java
@@ -12,6 +12,8 @@ import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
+import static gregtech.api.util.GT_Utility.*;
+
public class GT_MetaTileEntity_Hatch_OutputBus extends GT_MetaTileEntity_Hatch {
public GT_MetaTileEntity_Hatch_OutputBus(int aID, String aName, String aNameRegional, int aTier) {
super(aID, aName, aNameRegional, aTier, getSlots(aTier), new String[]{"Item Output for Multiblocks",
@@ -112,10 +114,11 @@ public class GT_MetaTileEntity_Hatch_OutputBus extends GT_MetaTileEntity_Hatch {
if (aBaseMetaTileEntity.isServerSide() && aBaseMetaTileEntity.isAllowedToWork() && (aTick&0x7)==0) {
IInventory tTileEntity =aBaseMetaTileEntity.getIInventoryAtSide(aBaseMetaTileEntity.getFrontFacing());
if(tTileEntity!=null){
- for (ItemStack aMInventory : mInventory)
- GT_Utility.moveOneItemStack(aBaseMetaTileEntity, tTileEntity,
- aBaseMetaTileEntity.getFrontFacing(), aBaseMetaTileEntity.getBackFacing(),
- null, false, (byte) 64, (byte) 1, (byte) 64, (byte) 1);
+ moveMultipleItemStacks(aBaseMetaTileEntity,tTileEntity,aBaseMetaTileEntity.getFrontFacing(),aBaseMetaTileEntity.getBackFacing(),null,false,(byte)64,(byte)1,(byte)64,(byte)1,mInventory.length);
+
+// GT_Utility.moveOneItemStack(aBaseMetaTileEntity, tTileEntity,
+// aBaseMetaTileEntity.getFrontFacing(), aBaseMetaTileEntity.getBackFacing(),
+// null, false, (byte) 64, (byte) 1, (byte)( 64 * aBaseMetaTileEntity.getSizeInventory()), (byte) 1);
}
}
}
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..e30fe5d606
--- /dev/null
+++ b/src/main/java/gregtech/api/util/GT_Multiblock_Tooltip_Builder.java
@@ -0,0 +1,348 @@
+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. <br>
+ * Info section order should be:<br>
+ * addMachineType<br>
+ * addInfo, for what it does, special notes, etc.<br>
+ * addSeparator, if you need it<br>
+ * addPollutionAmount<br>
+ * <br>
+ * Structure order should be:<br>
+ * beginStructureBlock<br>
+ * addController<br>
+ * addCasingInfo<br>
+ * addOtherStructurePart, for secondary structure block info (pipes, coils, etc)<br>
+ * addEnergyHatch/addDynamoHatch<br>
+ * addMaintenanceHatch<br>
+ * addMufflerHatch<br>
+ * addInputBus/addInputHatch/addOutputBus/addOutputHatch, in that order<br>
+ * Use addStructureInfo for any comments on nonstandard structure info wherever needed
+ * <br>
+ * toolTipFinisher goes at the very end<br>
+ * <br>
+ * Originally created by kekzdealer
+ */
+public class GT_Multiblock_Tooltip_Builder {
+ 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 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");
+ 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.<br>
+ * 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 + COLON + 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:<br>
+ * -----------------------------------------
+ *
+ * @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.<br>
+ * 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 + COLON + EnumChatFormatting.DARK_PURPLE + pollution + " " + EnumChatFormatting.GRAY + TT_pps);
+ 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.
+ * @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, 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<br>
+ * 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;
+ }
+
+ /**
+ * Add a line of information about the structure:<br>
+ * (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 + COLON + info);
+ return this;
+ }
+
+ /**
+ * Add a line of information about the structure:<br>
+ * (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.<br>
+ * (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 + COLON + info);
+ return this;
+ }
+
+ /**
+ * Add a line of information about the structure:<br>
+ * (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 + COLON + info);
+ return this;
+ }
+
+ /**
+ * Add a line of information about the structure:<br>
+ * (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 + COLON + info);
+ return this;
+ }
+
+ /**
+ * Add a line of information about the structure:<br>
+ * (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 + COLON + info);
+ return this;
+ }
+
+ /**
+ * Add a line of information about the structure:<br>
+ * (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 + COLON + info);
+ return this;
+ }
+
+ /**
+ * Add a line of information about the structure:<br>
+ * (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 + COLON + info);
+ return this;
+ }
+
+ /**
+ * Add a line of information about the structure:<br>
+ * (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 + COLON + info);
+ return this;
+ }
+
+ /**
+ * Add a line of information about the structure:<br>
+ * (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 + COLON + info);
+ return this;
+ }
+
+ /**
+ * Add a line of information about the structure:<br>
+ * (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 + COLON + info);
+ return this;
+ }
+
+ /**
+ * Use this method to add non-standard structural info.<br>
+ * (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.<br>
+ * Adds a final line with the mod name and information on how to display the structure guidelines.<br>
+ * 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 + COLON + EnumChatFormatting.GREEN + mod + EnumChatFormatting.GRAY);
+ 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/api/util/GT_Recipe.java b/src/main/java/gregtech/api/util/GT_Recipe.java
index 82e466257b..bf091695c7 100644
--- a/src/main/java/gregtech/api/util/GT_Recipe.java
+++ b/src/main/java/gregtech/api/util/GT_Recipe.java
@@ -615,6 +615,7 @@ public class GT_Recipe implements Comparable<GT_Recipe> {
public static final GT_Recipe_Map sAmplifiers = new GT_Recipe_Map(new HashSet<>(2), "gt.recipe.uuamplifier", "Amplifabricator", null, RES_PATH_GUI + "basicmachines/Amplifabricator", 1, 0, 1, 0, 1, E, 1, E, true, true);
public static final GT_Recipe_Map sMassFabFakeRecipes = new GT_Recipe_Map(new HashSet<>(2), "gt.recipe.massfab", "Mass Fabrication", null, RES_PATH_GUI + "basicmachines/Massfabricator", 1, 0, 1, 0, 10, E, 1, E, true, true);
public static final GT_Recipe_Map_Fuel sDieselFuels = new GT_Recipe_Map_Fuel(new HashSet<>(20), "gt.recipe.dieselgeneratorfuel", "Combustion Generator Fuels", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 0, 0, 1, "Fuel Value: ", 1000, " EU", true, true);
+ public static final GT_Recipe_Map_Fuel sExtremeDieselFuels = new GT_Recipe_Map_Fuel(new HashSet<>(20), "gt.recipe.extremedieselgeneratorfuel", "Extreme Diesel Engine Fuel", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 0, 0, 1, "Fuel Value: ", 1000, " EU", true, true);
public static final GT_Recipe_Map_Fuel sTurbineFuels = new GT_Recipe_Map_Fuel(new HashSet<>(25), "gt.recipe.gasturbinefuel", "Gas Turbine Fuel", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 0, 0, 1, "Fuel Value: ", 1000, " EU", true, true);
public static final GT_Recipe_Map_Fuel sHotFuels = new GT_Recipe_Map_Fuel(new HashSet<>(10), "gt.recipe.thermalgeneratorfuel", "Thermal Generator Fuels", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 0, 0, 1, "Fuel Value: ", 1000, " EU", true, false);
public static final GT_Recipe_Map_Fuel sDenseLiquidFuels = new GT_Recipe_Map_Fuel(new HashSet<>(15), "gt.recipe.semifluidboilerfuels", "Semifluid Boiler Fuels", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 0, 0, 1, "Fuel Value: ", 1000, " EU", true, true);
diff --git a/src/main/java/gregtech/api/util/GT_Utility.java b/src/main/java/gregtech/api/util/GT_Utility.java
index cf7b86fe94..b06cc1d82a 100644
--- a/src/main/java/gregtech/api/util/GT_Utility.java
+++ b/src/main/java/gregtech/api/util/GT_Utility.java
@@ -523,6 +523,108 @@ public class GT_Utility {
}
/**
+ * moves multiple stacks from Inv-Side to Inv-Side
+ *
+ * @return the Amount of moved Items
+ */
+
+ public static int moveMultipleItemStacks(Object aTileEntity1, Object aTileEntity2, byte aGrabFrom, byte aPutTo, List<ItemStack> aFilter, boolean aInvertFilter, byte aMaxTargetStackSize, byte aMinTargetStackSize, byte aMaxMoveAtOnce, byte aMinMoveAtOnce,int aStackAmount) {
+ if (aTileEntity1 instanceof IInventory)
+ return moveMultipleItemStacks((IInventory) aTileEntity1, aTileEntity2, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce,aStackAmount, true);
+ return 0;
+ }
+
+ public static int moveMultipleItemStacks(IInventory aTileEntity1, Object aTileEntity2, byte aGrabFrom, byte aPutTo, List<ItemStack> aFilter, boolean aInvertFilter, byte aMaxTargetStackSize, byte aMinTargetStackSize, byte aMaxMoveAtOnce, byte aMinMoveAtOnce,int aMaxStackTransfer, boolean aDoCheckChests) {
+ if (aTileEntity1 == null || aMaxTargetStackSize <= 0 || aMinTargetStackSize <= 0 || aMaxMoveAtOnce <= 0 || aMinTargetStackSize > aMaxTargetStackSize || aMinMoveAtOnce > aMaxMoveAtOnce || aMaxStackTransfer == 0)
+ return 0;
+ int tGrabInventorySize = aTileEntity1.getSizeInventory();
+ if (aTileEntity2 instanceof IInventory)
+ {
+ IInventory tPutInventory = (IInventory) aTileEntity2;
+ int tPutInventorySize = tPutInventory.getSizeInventory();
+ int tFirstsValidSlot = 0,tStacksMoved = 0,tTotalItemsMoved = 0;
+ for (int tGrabSlot = 0;tGrabSlot<tGrabInventorySize;tGrabSlot++)
+ {
+ //ItemStack tInventoryStack : mInventory
+ int tMovedItems = 0;
+ do {
+ ItemStack tGrabStack = aTileEntity1.getStackInSlot(tGrabSlot);
+ if (listContainsItem(aFilter, tGrabStack, true, aInvertFilter) &&
+ (tGrabStack.stackSize >= aMinMoveAtOnce && isAllowedToTakeFromSlot(aTileEntity1, tGrabSlot, aGrabFrom, tGrabStack))) {
+ int tStackSize = tGrabStack.stackSize;
+ tMovedItems = 0;
+ for (int tPutSlot = tFirstsValidSlot; tPutSlot < tPutInventorySize; tPutSlot++) {
+ if (isAllowedToPutIntoSlot(tPutInventory, tPutSlot, aPutTo, tGrabStack, (byte) 64)) {
+ int tMoved = moveStackFromSlotAToSlotB(aTileEntity1, tPutInventory, tGrabSlot, tPutSlot, aMaxTargetStackSize, aMinTargetStackSize, (byte) (aMaxMoveAtOnce - tMovedItems), aMinMoveAtOnce);
+ tTotalItemsMoved += tMoved;
+ tMovedItems += tMoved;
+ if (tMovedItems == tStackSize)
+ break;
+ }
+ }
+ if (tMovedItems > 0) {
+ if (++tStacksMoved >= aMaxStackTransfer)
+ return tTotalItemsMoved;
+ }
+ }
+ } while (tGrabInventorySize == 2 && tMovedItems > 0); //to suport draweres and barrels
+ }
+ if (aDoCheckChests && aTileEntity1 instanceof TileEntityChest) {
+ TileEntityChest tTileEntity1 = (TileEntityChest) aTileEntity1;
+ int tAmount = 0;
+ int maxStackTransfer = aMaxStackTransfer - tStacksMoved;
+ if (tTileEntity1.adjacentChestXNeg != null) {
+ tAmount = moveMultipleItemStacks(tTileEntity1.adjacentChestXNeg, aTileEntity2, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce,maxStackTransfer, false);
+ } else if (tTileEntity1.adjacentChestZNeg != null) {
+ tAmount = moveMultipleItemStacks(tTileEntity1.adjacentChestZNeg, aTileEntity2, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce,maxStackTransfer, false);
+ } else if (tTileEntity1.adjacentChestXPos != null) {
+ tAmount = moveMultipleItemStacks(tTileEntity1.adjacentChestXPos, aTileEntity2, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce,maxStackTransfer, false);
+ } else if (tTileEntity1.adjacentChestZPos != null) {
+ tAmount = moveMultipleItemStacks(tTileEntity1.adjacentChestZPos, aTileEntity2, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce,maxStackTransfer, false);
+ }
+ if (tAmount != 0) return tAmount+tTotalItemsMoved;
+ }
+
+ if (aDoCheckChests && aTileEntity2 instanceof TileEntityChest) {
+ TileEntityChest tTileEntity2 = (TileEntityChest) aTileEntity2;
+ if (tTileEntity2.adjacentChestChecked) {
+ int tAmount = 0;
+ int maxStackTransfer = aMaxStackTransfer - tStacksMoved;
+ if (tTileEntity2.adjacentChestXNeg != null) {
+ tAmount = moveMultipleItemStacks(aTileEntity1, tTileEntity2.adjacentChestXNeg, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce,maxStackTransfer, false);
+ } else if (tTileEntity2.adjacentChestZNeg != null) {
+ tAmount = moveMultipleItemStacks(aTileEntity1, tTileEntity2.adjacentChestZNeg, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce,maxStackTransfer, false);
+ } else if (tTileEntity2.adjacentChestXPos != null) {
+ tAmount = moveMultipleItemStacks(aTileEntity1, tTileEntity2.adjacentChestXPos, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce,maxStackTransfer, false);
+ } else if (tTileEntity2.adjacentChestZPos != null) {
+ tAmount = moveMultipleItemStacks(aTileEntity1, tTileEntity2.adjacentChestZPos, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce,maxStackTransfer, false);
+ }
+ if (tAmount != 0) return tAmount+tTotalItemsMoved;
+ }
+ }
+
+ return tTotalItemsMoved;
+
+ }
+ //there should be a function to transfer more then 1 stack in a pipe
+ //ut i dont see any ways to improve it too much work for what it is worth
+ int[] tGrabSlots = new int[tGrabInventorySize];
+ for (int i = 0; i < tGrabInventorySize; i++) {
+ tGrabSlots[i] = i;
+ }
+ int tTotalItemsMoved = 0;
+ for (int i = 0; i < tGrabInventorySize; i++) {
+ int tMoved = moveStackIntoPipe(aTileEntity1, aTileEntity2, tGrabSlots, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce, aDoCheckChests);
+ if (tMoved == 0)
+ return tTotalItemsMoved;
+ else
+ tTotalItemsMoved += tMoved;
+ }
+ return 0;
+ }
+
+
+ /**
* Moves Stack from Inv-Side to Inv-Side.
*
* @return the Amount of moved Items
@@ -539,7 +641,7 @@ public class GT_Utility {
private static byte moveOneItemStack(IInventory aTileEntity1, Object aTileEntity2, byte aGrabFrom, byte aPutTo, List<ItemStack> aFilter, boolean aInvertFilter, byte aMaxTargetStackSize, byte aMinTargetStackSize, byte aMaxMoveAtOnce, byte aMinMoveAtOnce, boolean aDoCheckChests) {
if (aTileEntity1 == null || aMaxTargetStackSize <= 0 || aMinTargetStackSize <= 0 || aMaxMoveAtOnce <= 0 || aMinTargetStackSize > aMaxTargetStackSize || aMinMoveAtOnce > aMaxMoveAtOnce)
return 0;
-
+
int[] tGrabSlots = null;
if (aTileEntity1 instanceof ISidedInventory)
tGrabSlots = ((ISidedInventory) aTileEntity1).getAccessibleSlotsFromSide(aGrabFrom);
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/covers/GT_Cover_Conveyor.java b/src/main/java/gregtech/common/covers/GT_Cover_Conveyor.java
index 303f358a34..aee46b7aab 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_Conveyor.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_Conveyor.java
@@ -14,6 +14,8 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.fluids.Fluid;
+import static gregtech.api.util.GT_Utility.moveMultipleItemStacks;
+
public class GT_Cover_Conveyor extends GT_CoverBehavior {
public final int mTickRate;
private final int mMaxStacks;
@@ -42,19 +44,29 @@ public class GT_Cover_Conveyor extends GT_CoverBehavior {
boolean costsEnergy = ((aCoverVariable % 2 == 0) || (aSide != 1)) && ((aCoverVariable % 2 != 0) || (aSide != 0)) && (aTileEntity.getUniversalEnergyCapacity() >= 128L);
byte moved;
- for(int i=0 ; i < this.mMaxStacks ; i++) {
- // Costs energy but we don't have enough, bail
- if ((costsEnergy && !aTileEntity.isUniversalEnergyStored(256L)))
- break;
- moved = GT_Utility.moveOneItemStack(fromEntity, toEntity, fromSide , toSide, null, false, (byte) 64, (byte) 1, (byte) 64, (byte) 1);
+ if (costsEnergy) {
+ long tStoredEnergy = aTileEntity.getUniversalEnergyStored();
+ int tMaxStacks = (int)(tStoredEnergy/(4*64*this.mMaxStacks));
+ if (tMaxStacks > this.mMaxStacks)
+ tMaxStacks = this.mMaxStacks;
+ int tCost = moveMultipleItemStacks(fromEntity, toEntity, fromSide , toSide, null, false, (byte) 64, (byte) 1, (byte) 64, (byte) 1,tMaxStacks);
+ aTileEntity.decreaseStoredEnergyUnits(4 * tCost, true);
+ } else {
+ moveMultipleItemStacks(fromEntity, toEntity, fromSide , toSide, null, false, (byte) 64, (byte) 1, (byte) 64, (byte) 1,this.mMaxStacks);
+ }
- if(moved == 0)
- break;
- if (costsEnergy)
- aTileEntity.decreaseStoredEnergyUnits(4 * moved, true);
- }
+// for(int i=0 ; i < this.mMaxStacks ; i++) {
+// // Costs energy but we don't have enough, bail
+// if ((costsEnergy && !aTileEntity.isUniversalEnergyStored(256L)))
+// break;
+//
+// moved = GT_Utility.moveOneItemStack(fromEntity, toEntity, fromSide , toSide, null, false, (byte) 64, (byte) 1, (byte) 64, (byte) 1);
+//
+// if(moved == 0)
+// break;
+// }
return aCoverVariable;
}
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..f16c9d2d4f 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) {
@@ -74,10 +89,50 @@ public class GT_MetaTileEntity_DieselEngine extends GT_MetaTileEntity_MultiBlock
return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "LargeDieselEngine.png");
}
+ // can't use getRecipeMap() or else the fluid hatch will reject oxygen
+ protected GT_Recipe.GT_Recipe_Map_Fuel getFuelMap() {
+ return GT_Recipe.GT_Recipe_Map.sDieselFuels;
+ }
+
+ /**
+ * The nominal energy output
+ * This can be further multiplied by {@link #getMaxEfficiency(ItemStack)} when boosted
+ */
+ protected int getNominalOutput() {
+ return 2048;
+ }
+
+ protected Materials getBooster() {
+ return Materials.Oxygen;
+ }
+
+ /**
+ * x times fuel will be consumed when boosted
+ * This will however NOT increase power output
+ * Go tweak {@link #getMaxEfficiency(ItemStack)} and {@link #getNominalOutput()} instead
+ */
+ protected int getBoostFactor() {
+ return 2;
+ }
+
+ /**
+ * x times of additive will be consumed when boosted
+ */
+ protected int getAdditiveFactor() {
+ return 1;
+ }
+
+ /**
+ * Efficiency will increase by this amount every tick
+ */
+ protected int getEfficiencyIncrease() {
+ return 15;
+ }
+
@Override
public boolean checkRecipe(ItemStack aStack) {
ArrayList<FluidStack> tFluids = getStoredFluids();
- Collection<GT_Recipe> tRecipeList = GT_Recipe.GT_Recipe_Map.sDieselFuels.mRecipeList;
+ Collection<GT_Recipe> tRecipeList = getFuelMap().mRecipeList;
if(tFluids.size() > 0 && tRecipeList != null) { //Does input hatch have a diesel fuel?
for (FluidStack hatchFluid1 : tFluids) { //Loops through hatches
@@ -85,21 +140,21 @@ public class GT_MetaTileEntity_DieselEngine extends GT_MetaTileEntity_MultiBlock
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 ? (4096 / aFuel.mSpecialValue) : (2048 / aFuel.mSpecialValue); //Calc fuel consumption
+ fuelConsumption = tLiquid.amount = boostEu ? (getBoostFactor() * getNominalOutput() / aFuel.mSpecialValue) : (getNominalOutput() / aFuel.mSpecialValue); //Calc fuel consumption
if(depleteInput(tLiquid)) { //Deplete that amount
- boostEu = depleteInput(Materials.Oxygen.getGas(2L));
+ boostEu = depleteInput(getBooster().getGas(2L * getAdditiveFactor()));
if(tFluids.contains(Materials.Lubricant.getFluid(1L))) { //Has lubricant?
//Deplete Lubricant. 1000L should = 1 hour of runtime (if baseEU = 2048)
- if(mRuntime % 72 == 0 || mRuntime == 0) depleteInput(Materials.Lubricant.getFluid(boostEu ? 2 : 1));
+ if(mRuntime % 72 == 0 || mRuntime == 0) depleteInput(Materials.Lubricant.getFluid((boostEu ? 2L : 1L) * getAdditiveFactor()));
} else return false;
fuelValue = aFuel.mSpecialValue;
fuelRemaining = hatchFluid1.amount; //Record available fuel
- this.mEUt = mEfficiency < 2000 ? 0 : 2048; //Output 0 if startup is less than 20%
+ this.mEUt = mEfficiency < 2000 ? 0 : getNominalOutput(); //Output 0 if startup is less than 20%
this.mProgresstime = 1;
this.mMaxProgresstime = 1;
- this.mEfficiencyIncrease = 15;
+ this.mEfficiencyIncrease = getEfficiencyIncrease();
return true;
}
}
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_ExtremeDieselEngine.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ExtremeDieselEngine.java
new file mode 100644
index 0000000000..0daaf9cb51
--- /dev/null
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ExtremeDieselEngine.java
@@ -0,0 +1,178 @@
+package gregtech.common.tileentities.machines.multi;
+
+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_Dynamo;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Muffler;
+import gregtech.api.objects.GT_RenderedTexture;
+import gregtech.api.util.GT_Recipe;
+import net.minecraft.block.Block;
+import net.minecraft.entity.player.InventoryPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.EnumChatFormatting;
+import net.minecraft.util.StatCollector;
+
+public class GT_MetaTileEntity_ExtremeDieselEngine extends GT_MetaTileEntity_DieselEngine {
+
+ public GT_MetaTileEntity_ExtremeDieselEngine(int aID, String aName, String aNameRegional) {
+ super(aID, aName, aNameRegional);
+ }
+
+ public GT_MetaTileEntity_ExtremeDieselEngine(String aName) {
+ super(aName);
+ }
+
+ @Override
+ public String[] getDescription() {
+ return new String[]{//change to new format after it's approved
+ "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",
+ "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"};
+ }
+
+ @Override
+ protected GT_Recipe.GT_Recipe_Map_Fuel getFuelMap() {
+ return GT_Recipe.GT_Recipe_Map.sExtremeDieselFuels;
+ }
+
+ @Override
+ 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]};
+ }
+
+ @Override
+ public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
+ return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "LargeExtremeDieselEngine.png");
+ }
+
+ @Override
+ public Block getCasingBlock() {
+ return GregTech_API.sBlockCasings4;
+ }
+
+ @Override
+ public byte getCasingMeta() {
+ return 0;
+ }
+
+ @Override
+ public Block getIntakeBlock() {
+ return GregTech_API.sBlockCasings8;
+ }
+
+ @Override
+ public byte getIntakeMeta() {
+ return 4;
+ }
+
+ @Override
+ public Block getGearboxBlock() {
+ return GregTech_API.sBlockCasings2;
+ }
+
+ @Override
+ public byte getGearboxMeta() {
+ return 4;
+ }
+
+ @Override
+ public byte getCasingTextureIndex() {
+ return 60;
+ }
+
+ @Override
+ public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
+ return new GT_MetaTileEntity_ExtremeDieselEngine(this.mName);
+ }
+
+ @Override
+ protected int getNominalOutput() {
+ return 8192;
+ }
+
+ @Override
+ protected int getBoostFactor() {
+ return 4;
+ }
+
+ @Override
+ protected Materials getBooster() {
+ return Materials.LiquidOxygen;
+ }
+
+ @Override
+ protected int getAdditiveFactor() {
+ return 8;
+ }
+
+ @Override
+ protected int getEfficiencyIncrease() {
+ return 20;
+ }
+
+ @Override
+ public int getMaxEfficiency(ItemStack aStack) {
+ return boostEu ? 40000 : 10000;
+ }
+
+ @Override
+ public int getPollutionPerTick(ItemStack aStack) {
+ return super.getPollutionPerTick(aStack) * 8;
+ }
+
+ @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+" %"
+ };
+ }
+}
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 fad880e5e4..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
@@ -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,30 @@ 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")
+ .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 hatches/busses")
+ .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_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/java/gregtech/loaders/postload/GT_ExtremeDieselFuelLoader.java b/src/main/java/gregtech/loaders/postload/GT_ExtremeDieselFuelLoader.java
new file mode 100644
index 0000000000..dcb76ae17b
--- /dev/null
+++ b/src/main/java/gregtech/loaders/postload/GT_ExtremeDieselFuelLoader.java
@@ -0,0 +1,23 @@
+package gregtech.loaders.postload;
+
+import gregtech.api.enums.Materials;
+import gregtech.api.util.GT_Log;
+import gregtech.api.util.GT_Recipe;
+import gregtech.api.util.GT_Utility;
+import net.minecraftforge.fluids.FluidStack;
+
+public class GT_ExtremeDieselFuelLoader implements Runnable {
+ @Override
+ public void run() {
+ GT_Log.out.println("GT_Mod: Adding extreme diesel fuel.");
+ FluidStack tHOGStack = Materials.GasolinePremium.getFluid(1);
+ for (GT_Recipe tFuel : GT_Recipe.GT_Recipe_Map.sDieselFuels.mRecipeList) {
+ FluidStack tLiquid = GT_Utility.getFluidForFilledItem(tFuel.getRepresentativeInput(0), true);
+ if (tLiquid != null && tHOGStack.isFluidEqual(tLiquid)) {
+ GT_Recipe.GT_Recipe_Map.sExtremeDieselFuels.add(tFuel);
+ return;
+ }
+ }
+ GT_Log.out.println("GT_Mod: No extreme diesel fuel found.");
+ }
+}
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..7132321048 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,14 @@ 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)});
+
+ ItemList.Machine_Multi_ExtremeDieselEngine.set(new GT_MetaTileEntity_ExtremeDieselEngine(2105, "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.