aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/common/tileentities/machines/multi
diff options
context:
space:
mode:
authorboubou19 <miisterunknown@gmail.com>2023-04-01 18:11:43 +0200
committerGitHub <noreply@github.com>2023-04-01 18:11:43 +0200
commit5f50e4a36ec000657b0a1664784acf00275293c6 (patch)
tree5ef81441032735438c9fd9c620224ca58e46e537 /src/main/java/gregtech/common/tileentities/machines/multi
parent6b77557e0e87cf5afd9ebd3985323ff1249e615c (diff)
downloadGT5-Unofficial-5f50e4a36ec000657b0a1664784acf00275293c6.tar.gz
GT5-Unofficial-5f50e4a36ec000657b0a1664784acf00275293c6.tar.bz2
GT5-Unofficial-5f50e4a36ec000657b0a1664784acf00275293c6.zip
update spotless formatting (#1827)
Diffstat (limited to 'src/main/java/gregtech/common/tileentities/machines/multi')
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java321
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BrickedBlastFurnace.java31
-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.java66
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java111
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ConcreteBackfillerBase.java53
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DieselEngine.java114
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java213
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DrillerBase.java120
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ElectricBlastFurnace.java174
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ExtremeDieselEngine.java71
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java316
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer1.java40
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer2.java40
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer3.java40
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_HeatExchanger.java181
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java58
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_IntegratedOreFactory.java346
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java130
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java155
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine.java68
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java41
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_GasAdvanced.java40
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java45
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java62
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java46
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java122
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_NanoForge.java259
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilCracker.java191
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrillBase.java75
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrillInfinite.java26
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlantBase.java68
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PCBFactory.java1144
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PlasmaForge.java254
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PrimitiveBlastFurnace.java233
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java147
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java136
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_TranscendentPlasmaMixer.java89
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_VacuumFreezer.java48
39 files changed, 3710 insertions, 1969 deletions
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 0b47b93334..54551473f3 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
@@ -51,59 +51,176 @@ public class GT_MetaTileEntity_AssemblyLine extends
private static final String STRUCTURE_PIECE_FIRST = "first";
private static final String STRUCTURE_PIECE_LATER = "later";
private static final String STRUCTURE_PIECE_LAST = "last";
- private static final IStructureDefinition<GT_MetaTileEntity_AssemblyLine> STRUCTURE_DEFINITION = StructureDefinition
- .<GT_MetaTileEntity_AssemblyLine>builder()
- .addShape(
- STRUCTURE_PIECE_FIRST,
- transpose(
- new String[][] { { " ", "e", " " }, { "~", "l", "G" }, { "g", "m", "g" },
- { "b", "i", "b" }, }))
- .addShape(
- STRUCTURE_PIECE_LATER,
- transpose(
- new String[][] { { " ", "e", " " }, { "d", "l", "d" }, { "g", "m", "g" },
- { "b", "I", "b" }, }))
- .addShape(
- STRUCTURE_PIECE_LAST,
- transpose(
- new String[][] { { " ", "e", " " }, { "d", "l", "d" }, { "g", "m", "g" },
- { "o", "i", "b" }, }))
- .addElement('G', ofBlock(GregTech_API.sBlockCasings3, 10)) // grate machine casing
- .addElement('l', ofBlock(GregTech_API.sBlockCasings2, 9)) // assembler machine casing
- .addElement('m', ofBlock(GregTech_API.sBlockCasings2, 5)) // assembling line casing
- .addElement(
- 'g',
- ofChain(
- ofBlockUnlocalizedName("IC2", "blockAlloyGlass", 0, true),
- ofBlockUnlocalizedName("bartworks", "BW_GlasBlocks", 0, true),
- ofBlockUnlocalizedName("bartworks", "BW_GlasBlocks2", 0, true),
- // warded glass
- ofBlockUnlocalizedName("Thaumcraft", "blockCosmeticOpaque", 2, false)))
- .addElement(
- 'e',
- ofChain(
- Energy.newAny(16, 1, ForgeDirection.UP, ForgeDirection.NORTH, ForgeDirection.SOUTH),
- ofBlock(GregTech_API.sBlockCasings2, 0)))
- .addElement(
- 'd',
- buildHatchAdder(GT_MetaTileEntity_AssemblyLine.class).atLeast(DataHatchElement.DataAccess).dot(2)
- .casingIndex(42).allowOnly(ForgeDirection.NORTH)
- .buildAndChain(GregTech_API.sBlockCasings3, 10))
- .addElement(
- 'b',
- buildHatchAdder(GT_MetaTileEntity_AssemblyLine.class)
- .atLeast(InputHatch, InputHatch, InputHatch, InputHatch, Maintenance).casingIndex(16).dot(3)
- .allowOnly(ForgeDirection.DOWN).buildAndChain(
- ofBlock(GregTech_API.sBlockCasings2, 0),
- ofHatchAdder(GT_MetaTileEntity_AssemblyLine::addOutputToMachineList, 16, 4)))
- .addElement(
- 'I',
- ofChain(
- // all blocks nearby use solid steel casing, so let's use the texture of that
- InputBus.newAny(16, 5, ForgeDirection.DOWN),
- ofHatchAdder(GT_MetaTileEntity_AssemblyLine::addOutputToMachineList, 16, 4)))
- .addElement('i', InputBus.newAny(16, 5, ForgeDirection.DOWN))
- .addElement('o', OutputBus.newAny(16, 4, ForgeDirection.DOWN)).build();
+ private static final IStructureDefinition<GT_MetaTileEntity_AssemblyLine> STRUCTURE_DEFINITION = StructureDefinition.<GT_MetaTileEntity_AssemblyLine>builder()
+ .addShape(
+ STRUCTURE_PIECE_FIRST,
+ transpose(
+ new String[][] {
+ { " ", "e",
+ " " },
+ { "~", "l",
+ "G" },
+ { "g", "m",
+ "g" },
+ { "b", "i",
+ "b" }, }))
+ .addShape(
+ STRUCTURE_PIECE_LATER,
+ transpose(
+ new String[][] {
+ { " ", "e",
+ " " },
+ { "d", "l",
+ "d" },
+ { "g", "m",
+ "g" },
+ { "b", "I",
+ "b" }, }))
+ .addShape(
+ STRUCTURE_PIECE_LAST,
+ transpose(
+ new String[][] {
+ { " ", "e",
+ " " },
+ { "d", "l",
+ "d" },
+ { "g", "m",
+ "g" },
+ { "o", "i",
+ "b" }, }))
+ .addElement(
+ 'G',
+ ofBlock(
+ GregTech_API.sBlockCasings3,
+ 10)) // grate
+ // machine
+ // casing
+ .addElement(
+ 'l',
+ ofBlock(
+ GregTech_API.sBlockCasings2,
+ 9)) // assembler
+ // machine
+ // casing
+ .addElement(
+ 'm',
+ ofBlock(
+ GregTech_API.sBlockCasings2,
+ 5)) // assembling
+ // line
+ // casing
+ .addElement(
+ 'g',
+ ofChain(
+ ofBlockUnlocalizedName(
+ "IC2",
+ "blockAlloyGlass",
+ 0,
+ true),
+ ofBlockUnlocalizedName(
+ "bartworks",
+ "BW_GlasBlocks",
+ 0,
+ true),
+ ofBlockUnlocalizedName(
+ "bartworks",
+ "BW_GlasBlocks2",
+ 0,
+ true),
+ // warded
+ // glass
+ ofBlockUnlocalizedName(
+ "Thaumcraft",
+ "blockCosmeticOpaque",
+ 2,
+ false)))
+ .addElement(
+ 'e',
+ ofChain(
+ Energy.newAny(
+ 16,
+ 1,
+ ForgeDirection.UP,
+ ForgeDirection.NORTH,
+ ForgeDirection.SOUTH),
+ ofBlock(
+ GregTech_API.sBlockCasings2,
+ 0)))
+ .addElement(
+ 'd',
+ buildHatchAdder(
+ GT_MetaTileEntity_AssemblyLine.class).atLeast(
+ DataHatchElement.DataAccess)
+ .dot(
+ 2)
+ .casingIndex(
+ 42)
+ .allowOnly(
+ ForgeDirection.NORTH)
+ .buildAndChain(
+ GregTech_API.sBlockCasings3,
+ 10))
+ .addElement(
+ 'b',
+ buildHatchAdder(
+ GT_MetaTileEntity_AssemblyLine.class).atLeast(
+ InputHatch,
+ InputHatch,
+ InputHatch,
+ InputHatch,
+ Maintenance)
+ .casingIndex(
+ 16)
+ .dot(
+ 3)
+ .allowOnly(
+ ForgeDirection.DOWN)
+ .buildAndChain(
+ ofBlock(
+ GregTech_API.sBlockCasings2,
+ 0),
+ ofHatchAdder(
+ GT_MetaTileEntity_AssemblyLine::addOutputToMachineList,
+ 16,
+ 4)))
+ .addElement(
+ 'I',
+ ofChain(
+ // all
+ // blocks
+ // nearby
+ // use
+ // solid
+ // steel
+ // casing,
+ // so
+ // let's
+ // use
+ // the
+ // texture
+ // of
+ // that
+ InputBus.newAny(
+ 16,
+ 5,
+ ForgeDirection.DOWN),
+ ofHatchAdder(
+ GT_MetaTileEntity_AssemblyLine::addOutputToMachineList,
+ 16,
+ 4)))
+ .addElement(
+ 'i',
+ InputBus.newAny(
+ 16,
+ 5,
+ ForgeDirection.DOWN))
+ .addElement(
+ 'o',
+ OutputBus.newAny(
+ 16,
+ 4,
+ ForgeDirection.DOWN))
+ .build();
public GT_MetaTileEntity_AssemblyLine(int aID, String aName, String aNameRegional) {
super(aID, aName, aNameRegional);
@@ -121,23 +238,28 @@ public class GT_MetaTileEntity_AssemblyLine extends
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
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, 16, 4, 4, 3, 3, false) // ?
- .addStructureInfo("From Bottom to Top, Left to Right")
- .addStructureInfo(
- "Layer 1 - Solid Steel Machine Casing, Input Bus (last can be Output Bus), Solid Steel Machine Casing")
- .addStructureInfo(
- "Layer 2 - Borosilicate Glass(any)/Warded Glass/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")
- .addController("Either Grate on layer 3 of the first slice").addEnergyHatch("Any layer 4 casing", 1)
- .addMaintenanceHatch("Any layer 1 casing", 3).addInputBus("As specified on layer 1", 4, 5)
- .addInputHatch("Any layer 1 casing", 3)
- .addOutputBus("Replaces Input Bus on final slice or on any solid steel casing on layer 1", 4)
- .addOtherStructurePart("Data Access Hatch", "Optional, next to controller", 2)
- .toolTipFinisher("Gregtech");
+ 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, 16, 4, 4, 3, 3, false) // ?
+ .addStructureInfo("From Bottom to Top, Left to Right")
+ .addStructureInfo(
+ "Layer 1 - Solid Steel Machine Casing, Input Bus (last can be Output Bus), Solid Steel Machine Casing")
+ .addStructureInfo(
+ "Layer 2 - Borosilicate Glass(any)/Warded Glass/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")
+ .addController("Either Grate on layer 3 of the first slice")
+ .addEnergyHatch("Any layer 4 casing", 1)
+ .addMaintenanceHatch("Any layer 1 casing", 3)
+ .addInputBus("As specified on layer 1", 4, 5)
+ .addInputHatch("Any layer 1 casing", 3)
+ .addOutputBus("Replaces Input Bus on final slice or on any solid steel casing on layer 1", 4)
+ .addOtherStructurePart("Data Access Hatch", "Optional, next to controller", 2)
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -145,13 +267,26 @@ public class GT_MetaTileEntity_AssemblyLine extends
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
- if (aActive) return new ITexture[] { BlockIcons.casingTexturePages[0][16],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE_GLOW).extFacing().glow()
- .build() };
- return new ITexture[] { BlockIcons.casingTexturePages[0][16],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ASSEMBLY_LINE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_GLOW).extFacing().glow().build() };
+ if (aActive) return new ITexture[] { BlockIcons.casingTexturePages[0][16], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
+ return new ITexture[] { BlockIcons.casingTexturePages[0][16], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_ASSEMBLY_LINE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
}
return new ITexture[] { Textures.BlockIcons.casingTexturePages[0][16] };
}
@@ -185,8 +320,9 @@ public class GT_MetaTileEntity_AssemblyLine extends
boolean foundRecipe = false;
nextDataStick: for (ItemStack tDataStick : tDataStickList) {
- GT_AssemblyLineUtils.LookupResult tLookupResult = GT_AssemblyLineUtils
- .findAssemblyLineRecipeFromDataStick(tDataStick, false);
+ GT_AssemblyLineUtils.LookupResult tLookupResult = GT_AssemblyLineUtils.findAssemblyLineRecipeFromDataStick(
+ tDataStick,
+ false);
if (tLookupResult.getType() == GT_AssemblyLineUtils.LookupResultType.INVALID_STICK) continue;
@@ -244,8 +380,8 @@ public class GT_MetaTileEntity_AssemblyLine extends
continue nextDataStick;
} else {
if (mInputHatches.get(i) instanceof GT_MetaTileEntity_Hatch_MultiInput) {
- GT_MetaTileEntity_Hatch_MultiInput tMultiHatch = (GT_MetaTileEntity_Hatch_MultiInput) mInputHatches
- .get(i);
+ GT_MetaTileEntity_Hatch_MultiInput tMultiHatch = (GT_MetaTileEntity_Hatch_MultiInput) mInputHatches.get(
+ i);
if (!tMultiHatch.hasFluid(tRecipe.mFluidInputs[i])
|| tMultiHatch.getFluidAmount(tRecipe.mFluidInputs[i])
< tRecipe.mFluidInputs[i].amount) {
@@ -295,14 +431,15 @@ public class GT_MetaTileEntity_AssemblyLine extends
GT_FML_LOGGER.info("All checked start consuming inputs");
}
for (int i = 0; i < tStack.length; i++) {
- ItemStack stackInSlot = mInputBusses.get(i).getStackInSlot(0);
+ ItemStack stackInSlot = mInputBusses.get(i)
+ .getStackInSlot(0);
stackInSlot.stackSize -= tStack[i];
}
for (int i = 0; i < tFluids.length; i++) {
if (mInputHatches.get(i) instanceof GT_MetaTileEntity_Hatch_MultiInput) {
- GT_MetaTileEntity_Hatch_MultiInput tMultiHatch = (GT_MetaTileEntity_Hatch_MultiInput) mInputHatches
- .get(i);
+ GT_MetaTileEntity_Hatch_MultiInput tMultiHatch = (GT_MetaTileEntity_Hatch_MultiInput) mInputHatches.get(
+ i);
tMultiHatch.getFluid(tFluidSlot[i]).amount -= tFluids[i];
if (tMultiHatch.getFluid(tFluidSlot[i]).amount <= 0) {
tMultiHatch.setFluid(null, tFluidSlot[i]);
@@ -398,10 +535,18 @@ public class GT_MetaTileEntity_AssemblyLine extends
}
for (GT_MetaTileEntity_Hatch_DataAccess tHatch : mDataAccessHatches) {
if (isValidMetaTileEntity(tHatch)) {
- for (int i = 0; i < tHatch.getBaseMetaTileEntity().getSizeInventory(); i++) {
- if (tHatch.getBaseMetaTileEntity().getStackInSlot(i) != null
- && isCorrectDataItem(tHatch.getBaseMetaTileEntity().getStackInSlot(i), state))
- rList.add(tHatch.getBaseMetaTileEntity().getStackInSlot(i));
+ for (int i = 0; i < tHatch.getBaseMetaTileEntity()
+ .getSizeInventory(); i++) {
+ if (tHatch.getBaseMetaTileEntity()
+ .getStackInSlot(i)
+ != null
+ && isCorrectDataItem(
+ tHatch.getBaseMetaTileEntity()
+ .getStackInSlot(i),
+ state))
+ rList.add(
+ tHatch.getBaseMetaTileEntity()
+ .getStackInSlot(i));
}
}
}
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 5babf4405d..96b4c19b93 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
@@ -23,9 +23,12 @@ public class GT_MetaTileEntity_BrickedBlastFurnace extends GT_MetaTileEntity_Pri
private static final ITexture[] FACING_SIDE = { TextureFactory.of(Textures.BlockIcons.MACHINE_CASING_DENSEBRICKS) };
private static final ITexture[] FACING_FRONT = {
TextureFactory.of(Textures.BlockIcons.MACHINE_CASING_BRICKEDBLASTFURNACE_INACTIVE) };
- private static final ITexture[] FACING_ACTIVE = {
- TextureFactory.of(Textures.BlockIcons.MACHINE_CASING_BRICKEDBLASTFURNACE_ACTIVE), TextureFactory.builder()
- .addIcon(BlockIcons.MACHINE_CASING_BRICKEDBLASTFURNACE_ACTIVE_GLOW).glow().build() };
+ private static final ITexture[] FACING_ACTIVE = { TextureFactory.of(
+ Textures.BlockIcons.MACHINE_CASING_BRICKEDBLASTFURNACE_ACTIVE),
+ TextureFactory.builder()
+ .addIcon(BlockIcons.MACHINE_CASING_BRICKEDBLASTFURNACE_ACTIVE_GLOW)
+ .glow()
+ .build() };
private GT_Multiblock_Tooltip_Builder tooltipBuilder;
public GT_MetaTileEntity_BrickedBlastFurnace(int aID, String aName, String aNameRegional) {
@@ -57,15 +60,19 @@ public class GT_MetaTileEntity_BrickedBlastFurnace extends GT_MetaTileEntity_Pri
protected GT_Multiblock_Tooltip_Builder getTooltip() {
if (tooltipBuilder == null) {
tooltipBuilder = new GT_Multiblock_Tooltip_Builder();
- tooltipBuilder.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(GT_Mod.gregtechproxy.mPollutionPrimitveBlastFurnacePerSecond).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");
+ tooltipBuilder.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(GT_Mod.gregtechproxy.mPollutionPrimitveBlastFurnacePerSecond)
+ .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");
}
return tooltipBuilder;
}
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 8c22ab780f..1710b33513 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
@@ -20,7 +20,10 @@ public class GT_MetaTileEntity_BronzeBlastFurnace extends GT_MetaTileEntity_Prim
private static final ITexture[] FACING_SIDE = { TextureFactory.of(MACHINE_BRONZEPLATEDBRICKS) };
private static final ITexture[] FACING_FRONT = { TextureFactory.of(MACHINE_BRONZEBLASTFURNACE) };
private static final ITexture[] FACING_ACTIVE = { TextureFactory.of(MACHINE_BRONZEBLASTFURNACE_ACTIVE),
- TextureFactory.builder().addIcon(MACHINE_BRONZEBLASTFURNACE_ACTIVE_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(MACHINE_BRONZEBLASTFURNACE_ACTIVE_GLOW)
+ .glow()
+ .build() };
public GT_MetaTileEntity_BronzeBlastFurnace(int aID, String aName, String aNameRegional) {
super(aID, aName, aNameRegional);
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 4f1aec7f4a..8780bdb038 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
@@ -112,13 +112,14 @@ public class GT_MetaTileEntity_Charcoal_Pit extends GT_MetaTileEntity_TooltipMul
if (isWoodLog(
getBaseMetaTileEntity().getBlockOffset(tPos.chunkPosX, tPos.chunkPosY, tPos.chunkPosZ),
getBaseMetaTileEntity().getMetaIDOffset(tPos.chunkPosX, tPos.chunkPosY, tPos.chunkPosZ)))
- getBaseMetaTileEntity().getWorld().setBlock(
- getBaseMetaTileEntity().getXCoord() + tPos.chunkPosX,
- getBaseMetaTileEntity().getYCoord() + tPos.chunkPosY,
- getBaseMetaTileEntity().getZCoord() + tPos.chunkPosZ,
- GregTech_API.sBlockReinforced,
- 4,
- 3);
+ getBaseMetaTileEntity().getWorld()
+ .setBlock(
+ getBaseMetaTileEntity().getXCoord() + tPos.chunkPosX,
+ getBaseMetaTileEntity().getYCoord() + tPos.chunkPosY,
+ getBaseMetaTileEntity().getZCoord() + tPos.chunkPosZ,
+ GregTech_API.sBlockReinforced,
+ 4,
+ 3);
}
running = false;
return false;
@@ -131,7 +132,9 @@ public class GT_MetaTileEntity_Charcoal_Pit extends GT_MetaTileEntity_TooltipMul
private boolean isWoodLog(Block log, int meta) {
for (int id : OreDictionary.getOreIDs(new ItemStack(log, 1, meta))) {
- if (OreDictionary.getOreName(id).equals("logWood")) return true;
+ if (OreDictionary.getOreName(id)
+ .equals("logWood"))
+ return true;
}
String tTool = log.getHarvestTool(meta);
return OrePrefixes.log.contains(new ItemStack(log, 1, meta)) && ("axe".equals(tTool))
@@ -254,15 +257,19 @@ public class GT_MetaTileEntity_Charcoal_Pit extends GT_MetaTileEntity_TooltipMul
protected GT_Multiblock_Tooltip_Builder createTooltip() {
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(getPollutionPerSecond(null)).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");
+ 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(getPollutionPerSecond(null))
+ .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");
return tt;
}
@@ -272,9 +279,15 @@ public class GT_MetaTileEntity_Charcoal_Pit extends GT_MetaTileEntity_TooltipMul
if (aSide == 1) {
if (aActive)
return new ITexture[] { casingTexturePages[0][10], TextureFactory.of(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE_GLOW).glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ROCK_BREAKER_ACTIVE_GLOW)
+ .glow()
+ .build() };
return new ITexture[] { casingTexturePages[0][10], TextureFactory.of(OVERLAY_FRONT_ROCK_BREAKER),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ROCK_BREAKER_GLOW).glow().build(), };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ROCK_BREAKER_GLOW)
+ .glow()
+ .build(), };
}
return new ITexture[] { casingTexturePages[0][10] };
}
@@ -292,12 +305,15 @@ public class GT_MetaTileEntity_Charcoal_Pit extends GT_MetaTileEntity_TooltipMul
if ((aBaseMetaTileEntity.isClientSide()) && (aBaseMetaTileEntity.isActive())) {
new WorldSpawnedEventBuilder.ParticleEventBuilder().setMotion(0D, 0.3D, 0D)
- .setIdentifier(ParticleFX.LARGE_SMOKE)
- .setPosition(
- aBaseMetaTileEntity.getOffsetX((byte) 1, 1) + XSTR_INSTANCE.nextFloat(),
- aBaseMetaTileEntity.getOffsetY((byte) 1, 1),
- aBaseMetaTileEntity.getOffsetZ((byte) 1, 1) + XSTR_INSTANCE.nextFloat())
- .setWorld(getBaseMetaTileEntity().getWorld()).run();
+ .setIdentifier(ParticleFX.LARGE_SMOKE)
+ .setPosition(
+ aBaseMetaTileEntity.getOffsetX((byte) 1, 1)
+ + XSTR_INSTANCE.nextFloat(),
+ aBaseMetaTileEntity.getOffsetY((byte) 1, 1),
+ aBaseMetaTileEntity.getOffsetZ((byte) 1, 1)
+ + XSTR_INSTANCE.nextFloat())
+ .setWorld(getBaseMetaTileEntity().getWorld())
+ .run();
}
}
}
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 fd724c57ea..0d18ce040b 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
@@ -53,25 +53,30 @@ public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_TooltipMultiB
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
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")
- .addInfo("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 proportional to")
- .addInfo("the height of empty space within").addInfo("Make sure your Energy Hatch matches! ?")
- .addInfo("Machines that cause pollution aren't allowed to be put in.").addSeparator()
- .beginVariableStructureBlock(3, 15, 4, 15, 3, 15, true).addController("Top center")
- .addCasingInfoRange("Plascrete", 20, 1007, false)
- .addStructureInfo(GT_Values.cleanroomGlass + "% of the Plascrete can be replaced with Reinforced Glass") // check
- .addStructureInfo("Other material can be used in place of Plascrete. See config for detail") // check
- .addOtherStructurePart("Filter Machine Casing", "Top besides controller and edges")
- .addEnergyHatch("Any casing. Exactly one.") // 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")
- .addStructureInfo("Diodes also count towards 10 Machine Hulls count limit").toolTipFinisher("Gregtech");
+ tt.addMachineType("Cleanroom")
+ .addInfo("Controller block for the Cleanroom")
+ .addInfo("Consumes 40 EU/t when first turned on")
+ .addInfo("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 proportional to")
+ .addInfo("the height of empty space within")
+ .addInfo("Make sure your Energy Hatch matches! ?")
+ .addInfo("Machines that cause pollution aren't allowed to be put in.")
+ .addSeparator()
+ .beginVariableStructureBlock(3, 15, 4, 15, 3, 15, true)
+ .addController("Top center")
+ .addCasingInfoRange("Plascrete", 20, 1007, false)
+ .addStructureInfo(GT_Values.cleanroomGlass + "% of the Plascrete can be replaced with Reinforced Glass") // check
+ .addStructureInfo("Other material can be used in place of Plascrete. See config for detail") // check
+ .addOtherStructurePart("Filter Machine Casing", "Top besides controller and edges")
+ .addEnergyHatch("Any casing. Exactly one.") // 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")
+ .addStructureInfo("Diodes also count towards 10 Machine Hulls count limit")
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -193,8 +198,10 @@ public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_TooltipMultiB
} else if (tBlock == GregTech_API.sBlockReinforced && tMeta == 2) {
mPlascreteCount++;
} else {
- final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity
- .getIGregTechTileEntityOffset(dX, dY, dZ);
+ final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(
+ dX,
+ dY,
+ dZ);
if ((!this.addMaintenanceToMachineList(tTileEntity, 210))
&& (!this.addEnergyInputToMachineList(tTileEntity, 210))) {
if (tBlock instanceof ic2.core.block.BlockIC2Door) {
@@ -318,13 +325,19 @@ public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_TooltipMultiB
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
if (aSide == ForgeDirection.DOWN.ordinal() || aSide == ForgeDirection.UP.ordinal()) {
- return new ITexture[] { TextureFactory.of(BLOCK_PLASCRETE),
- aActive ? TextureFactory.of(
+ return new ITexture[] { TextureFactory.of(BLOCK_PLASCRETE), aActive
+ ? TextureFactory.of(
TextureFactory.of(OVERLAY_TOP_CLEANROOM_ACTIVE),
- TextureFactory.builder().addIcon(OVERLAY_TOP_CLEANROOM_ACTIVE_GLOW).glow().build())
- : TextureFactory.of(
- TextureFactory.of(OVERLAY_TOP_CLEANROOM),
- TextureFactory.builder().addIcon(OVERLAY_TOP_CLEANROOM_GLOW).glow().build()) };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_CLEANROOM_ACTIVE_GLOW)
+ .glow()
+ .build())
+ : TextureFactory.of(
+ TextureFactory.of(OVERLAY_TOP_CLEANROOM),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_TOP_CLEANROOM_GLOW)
+ .glow()
+ .build()) };
}
return new ITexture[] { TextureFactory.of(BLOCK_PLASCRETE) };
}
@@ -412,18 +425,46 @@ public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_TooltipMultiB
public static void loadConfig(Configuration cfg) {
if (!cfg.hasCategory(category)) setDefaultConfigValues(cfg);
- for (ConfigCategory cc : cfg.getCategory(category).getChildren()) {
- final String name = cc.get("Name").getString();
+ for (ConfigCategory cc : cfg.getCategory(category)
+ .getChildren()) {
+ final String name = cc.get("Name")
+ .getString();
if (cc.containsKey("Count")) {
if (cc.containsKey("Meta")) config.put(
- name + ":" + cc.get("Meta").getInt(),
- new ConfigEntry(0, cc.get("Count").getInt(), cc.get("Meta").getInt()));
- else config.put(name, new ConfigEntry(0, cc.get("Count").getInt(), wildcard_meta));
+ name + ":"
+ + cc.get("Meta")
+ .getInt(),
+ new ConfigEntry(
+ 0,
+ cc.get("Count")
+ .getInt(),
+ cc.get("Meta")
+ .getInt()));
+ else config.put(
+ name,
+ new ConfigEntry(
+ 0,
+ cc.get("Count")
+ .getInt(),
+ wildcard_meta));
} else if (cc.containsKey("Percentage")) {
if (cc.containsKey("Meta")) config.put(
- name + ":" + cc.get("Meta").getInt(),
- new ConfigEntry(cc.get("Percentage").getInt(), 0, cc.get("Meta").getInt()));
- else config.put(name, new ConfigEntry(cc.get("Percentage").getInt(), 0, wildcard_meta));
+ name + ":"
+ + cc.get("Meta")
+ .getInt(),
+ new ConfigEntry(
+ cc.get("Percentage")
+ .getInt(),
+ 0,
+ cc.get("Meta")
+ .getInt()));
+ else config.put(
+ name,
+ new ConfigEntry(
+ cc.get("Percentage")
+ .getInt(),
+ 0,
+ wildcard_meta));
}
}
}
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 dd2f54455a..2b902349bc 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
@@ -29,21 +29,28 @@ public abstract class GT_MetaTileEntity_ConcreteBackfillerBase extends GT_MetaTi
}
protected GT_Multiblock_Tooltip_Builder createTooltip(String aStructureName) {
- String casings = getCasingBlockItem().get(0).getDisplayName();
+ String casings = getCasingBlockItem().get(0)
+ .getDisplayName();
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Concrete Backfiller").addInfo("Controller Block for the " + aStructureName)
- .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").addOtherStructurePart(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", 1).addMaintenanceHatch("Any base casing", 1)
- .addInputBus("Mining Pipes, optional, any base casing", 1)
- .addInputHatch("GT Concrete, any base casing", 1)
- .addOutputBus("Mining Pipes, optional, any base casing", 1).toolTipFinisher("Gregtech");
+ tt.addMachineType("Concrete Backfiller")
+ .addInfo("Controller Block for the " + aStructureName)
+ .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")
+ .addOtherStructurePart(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", 1)
+ .addMaintenanceHatch("Any base casing", 1)
+ .addInputBus("Mining Pipes, optional, any base casing", 1)
+ .addInputHatch("GT Concrete, any base casing", 1)
+ .addOutputBus("Mining Pipes, optional, any base casing", 1)
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -103,18 +110,28 @@ public abstract class GT_MetaTileEntity_ConcreteBackfillerBase extends GT_MetaTi
private boolean isRefillableBlock(int aX, int aY, int aZ) {
IGregTechTileEntity aBaseTile = getBaseMetaTileEntity();
- if (!aBaseTile.getBlock(aX, aY, aZ).isAir(aBaseTile.getWorld(), aX, aY, aZ)
- || aBaseTile.getBlock(aX, aY, aZ).getMaterial().isSolid())
+ if (!aBaseTile.getBlock(aX, aY, aZ)
+ .isAir(aBaseTile.getWorld(), aX, aY, aZ)
+ || aBaseTile.getBlock(aX, aY, aZ)
+ .getMaterial()
+ .isSolid())
return false;
- if (!GT_Utility
- .setBlockByFakePlayer(getFakePlayer(aBaseTile), aX, aY, aZ, GregTech_API.sBlockConcretes, 8, true))
+ if (!GT_Utility.setBlockByFakePlayer(
+ getFakePlayer(aBaseTile),
+ aX,
+ aY,
+ aZ,
+ GregTech_API.sBlockConcretes,
+ 8,
+ true))
return false;
return true;
}
private boolean tryRefillBlock(int aX, int aY, int aZ) {
if (!tryConsumeFluid()) return false;
- getBaseMetaTileEntity().getWorld().setBlock(aX, aY, aZ, GregTech_API.sBlockConcretes, 8, 3);
+ getBaseMetaTileEntity().getWorld()
+ .setBlock(aX, aY, aZ, GregTech_API.sBlockConcretes, 8, 3);
return true;
}
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 381df634d2..f445d5fea1 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
@@ -50,23 +50,34 @@ public class GT_MetaTileEntity_DieselEngine extends
@Override
protected IStructureDefinition<GT_MetaTileEntity_DieselEngine> computeValue(Class<?> type) {
- return StructureDefinition.<GT_MetaTileEntity_DieselEngine>builder().addShape(
- STRUCTURE_PIECE_MAIN,
- transpose(
- new String[][] { { "---", "iii", "chc", "chc", "ccc", },
- { "---", "i~i", "hgh", "hgh", "cdc", }, { "---", "iii", "chc", "chc", "ccc", }, }))
- .addElement('i', lazy(t -> ofBlock(t.getIntakeBlock(), t.getIntakeMeta())))
- .addElement('c', lazy(t -> ofBlock(t.getCasingBlock(), t.getCasingMeta())))
- .addElement('g', lazy(t -> ofBlock(t.getGearboxBlock(), t.getGearboxMeta())))
- .addElement('d', lazy(t -> Dynamo.newAny(t.getCasingTextureIndex(), 2)))
- .addElement(
- 'h',
- lazy(
- t -> buildHatchAdder(GT_MetaTileEntity_DieselEngine.class)
- .atLeast(InputHatch, InputHatch, InputHatch, Muffler, Maintenance)
- .casingIndex(t.getCasingTextureIndex()).dot(1)
- .buildAndChain(t.getCasingBlock(), t.getCasingMeta())))
- .build();
+ return StructureDefinition.<GT_MetaTileEntity_DieselEngine>builder()
+ .addShape(
+ STRUCTURE_PIECE_MAIN,
+ transpose(
+ new String[][] { { "---", "iii", "chc", "chc", "ccc", },
+ { "---", "i~i", "hgh", "hgh", "cdc", },
+ { "---", "iii", "chc", "chc", "ccc", }, }))
+ .addElement('i', lazy(t -> ofBlock(t.getIntakeBlock(), t.getIntakeMeta())))
+ .addElement('c', lazy(t -> ofBlock(t.getCasingBlock(), t.getCasingMeta())))
+ .addElement('g', lazy(t -> ofBlock(t.getGearboxBlock(), t.getGearboxMeta())))
+ .addElement('d', lazy(t -> Dynamo.newAny(t.getCasingTextureIndex(), 2)))
+ .addElement(
+ 'h',
+ lazy(
+ t -> buildHatchAdder(
+ GT_MetaTileEntity_DieselEngine.class).atLeast(
+ InputHatch,
+ InputHatch,
+ InputHatch,
+ Muffler,
+ Maintenance)
+ .casingIndex(
+ t.getCasingTextureIndex())
+ .dot(1)
+ .buildAndChain(
+ t.getCasingBlock(),
+ t.getCasingMeta())))
+ .build();
}
};
protected int fuelConsumption = 0;
@@ -85,21 +96,28 @@ public class GT_MetaTileEntity_DieselEngine extends
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
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(getPollutionPerSecond(null)).addSeparator().beginStructureBlock(3, 3, 4, false)
- .addController("Front center").addCasingInfoRange("Stable Titanium Machine Casing", 16, 22, false)
- .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", 2).addMaintenanceHatch("One of the casings next to a Gear Box", 1)
- .addMufflerHatch("Top middle back, above the rear Gear Box", 1)
- .addInputHatch("Diesel Fuel, next to a Gear Box", 1).addInputHatch("Lubricant, next to a Gear Box", 1)
- .addInputHatch("Oxygen, optional, next to a Gear Box", 1).toolTipFinisher("Gregtech");
+ 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(getPollutionPerSecond(null))
+ .addSeparator()
+ .beginStructureBlock(3, 3, 4, false)
+ .addController("Front center")
+ .addCasingInfoRange("Stable Titanium Machine Casing", 16, 22, false)
+ .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", 2)
+ .addMaintenanceHatch("One of the casings next to a Gear Box", 1)
+ .addMufflerHatch("Top middle back, above the rear Gear Box", 1)
+ .addInputHatch("Diesel Fuel, next to a Gear Box", 1)
+ .addInputHatch("Lubricant, next to a Gear Box", 1)
+ .addInputHatch("Oxygen, optional, next to a Gear Box", 1)
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -107,13 +125,25 @@ public class GT_MetaTileEntity_DieselEngine extends
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
- if (aActive) return new ITexture[] { casingTexturePages[0][50],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_DIESEL_ENGINE_ACTIVE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_DIESEL_ENGINE_ACTIVE_GLOW).extFacing().glow()
- .build() };
- return new ITexture[] { casingTexturePages[0][50],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_DIESEL_ENGINE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_DIESEL_ENGINE_GLOW).extFacing().glow().build() };
+ if (aActive) return new ITexture[] { casingTexturePages[0][50], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_DIESEL_ENGINE_ACTIVE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_DIESEL_ENGINE_ACTIVE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
+ return new ITexture[] { casingTexturePages[0][50], TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_DIESEL_ENGINE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_DIESEL_ENGINE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
}
return new ITexture[] { casingTexturePages[0][50] };
}
@@ -318,8 +348,10 @@ public class GT_MetaTileEntity_DieselEngine extends
long maxEnergy = 0;
for (GT_MetaTileEntity_Hatch_Dynamo tHatch : mDynamoHatches) {
if (isValidMetaTileEntity(tHatch)) {
- storedEnergy += tHatch.getBaseMetaTileEntity().getStoredEU();
- maxEnergy += tHatch.getBaseMetaTileEntity().getEUCapacity();
+ storedEnergy += tHatch.getBaseMetaTileEntity()
+ .getStoredEU();
+ maxEnergy += tHatch.getBaseMetaTileEntity()
+ .getEUCapacity();
}
}
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 7302625406..eb5adfbd3c 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
@@ -53,65 +53,104 @@ public class GT_MetaTileEntity_DistillationTower
private static final IStructureDefinition<GT_MetaTileEntity_DistillationTower> STRUCTURE_DEFINITION;
static {
- IHatchElement<GT_MetaTileEntity_DistillationTower> layeredOutputHatch = OutputHatch
- .withCount(GT_MetaTileEntity_DistillationTower::getCurrentLayerOutputHatchCount)
- .withAdder(GT_MetaTileEntity_DistillationTower::addLayerOutputHatch);
+ IHatchElement<GT_MetaTileEntity_DistillationTower> layeredOutputHatch = OutputHatch.withCount(
+ GT_MetaTileEntity_DistillationTower::getCurrentLayerOutputHatchCount)
+ .withAdder(
+ GT_MetaTileEntity_DistillationTower::addLayerOutputHatch);
STRUCTURE_DEFINITION = StructureDefinition.<GT_MetaTileEntity_DistillationTower>builder()
- .addShape(STRUCTURE_PIECE_BASE, transpose(new String[][] { { "b~b", "bbb", "bbb" }, }))
- .addShape(STRUCTURE_PIECE_LAYER, transpose(new String[][] { { "lll", "lcl", "lll" }, }))
- .addShape(STRUCTURE_PIECE_LAYER_HINT, transpose(new String[][] { { "lll", "l-l", "lll" }, }))
- .addShape(STRUCTURE_PIECE_TOP_HINT, transpose(new String[][] { { "LLL", "LLL", "LLL" }, }))
- .addElement(
- 'b',
- ofChain(
- buildHatchAdder(GT_MetaTileEntity_DistillationTower.class)
- .atLeast(Energy, OutputBus, InputHatch, InputBus, Maintenance)
- .casingIndex(CASING_INDEX).dot(1).build(),
- onElementPass(
- GT_MetaTileEntity_DistillationTower::onCasingFound,
- ofBlock(GregTech_API.sBlockCasings4, 1))))
- .addElement(
- 'l',
- ofChain(
- buildHatchAdder(GT_MetaTileEntity_DistillationTower.class).atLeast(layeredOutputHatch)
- .casingIndex(CASING_INDEX).dot(2)
- .disallowOnly(ForgeDirection.UP, ForgeDirection.DOWN).build(),
- ofHatchAdder(
- GT_MetaTileEntity_DistillationTower::addEnergyInputToMachineList,
- CASING_INDEX,
- 2),
- ofHatchAdder(GT_MetaTileEntity_DistillationTower::addLayerOutputHatch, CASING_INDEX, 2),
- ofHatchAdder(
- GT_MetaTileEntity_DistillationTower::addMaintenanceToMachineList,
- CASING_INDEX,
- 2),
- onElementPass(
- GT_MetaTileEntity_DistillationTower::onCasingFound,
- ofBlock(GregTech_API.sBlockCasings4, 1))))
- // hint element only used in top layer
- .addElement(
- 'L',
- buildHatchAdder(GT_MetaTileEntity_DistillationTower.class).atLeast(layeredOutputHatch)
- .casingIndex(CASING_INDEX).dot(2).disallowOnly(ForgeDirection.UP)
- .buildAndChain(GregTech_API.sBlockCasings4, 1))
- .addElement(
- 'c',
- ofChain(
- onElementPass(
- t -> t.onTopLayerFound(false),
- ofHatchAdder(
- GT_MetaTileEntity_DistillationTower::addOutputToMachineList,
- CASING_INDEX,
- 3)),
- onElementPass(
- t -> t.onTopLayerFound(false),
- ofHatchAdder(
- GT_MetaTileEntity_DistillationTower::addMaintenanceToMachineList,
- CASING_INDEX,
- 3)),
- onElementPass(t -> t.onTopLayerFound(true), ofBlock(GregTech_API.sBlockCasings4, 1)),
- isAir()))
- .build();
+ .addShape(
+ STRUCTURE_PIECE_BASE,
+ transpose(new String[][] { { "b~b", "bbb", "bbb" }, }))
+ .addShape(
+ STRUCTURE_PIECE_LAYER,
+ transpose(new String[][] { { "lll", "lcl", "lll" }, }))
+ .addShape(
+ STRUCTURE_PIECE_LAYER_HINT,
+ transpose(new String[][] { { "lll", "l-l", "lll" }, }))
+ .addShape(
+ STRUCTURE_PIECE_TOP_HINT,
+ transpose(new String[][] { { "LLL", "LLL", "LLL" }, }))
+ .addElement(
+ 'b',
+ ofChain(
+ buildHatchAdder(
+ GT_MetaTileEntity_DistillationTower.class).atLeast(
+ Energy,
+ OutputBus,
+ InputHatch,
+ InputBus,
+ Maintenance)
+ .casingIndex(
+ CASING_INDEX)
+ .dot(
+ 1)
+ .build(),
+ onElementPass(
+ GT_MetaTileEntity_DistillationTower::onCasingFound,
+ ofBlock(GregTech_API.sBlockCasings4, 1))))
+ .addElement(
+ 'l',
+ ofChain(
+ buildHatchAdder(
+ GT_MetaTileEntity_DistillationTower.class).atLeast(
+ layeredOutputHatch)
+ .casingIndex(
+ CASING_INDEX)
+ .dot(
+ 2)
+ .disallowOnly(
+ ForgeDirection.UP,
+ ForgeDirection.DOWN)
+ .build(),
+ ofHatchAdder(
+ GT_MetaTileEntity_DistillationTower::addEnergyInputToMachineList,
+ CASING_INDEX,
+ 2),
+ ofHatchAdder(
+ GT_MetaTileEntity_DistillationTower::addLayerOutputHatch,
+ CASING_INDEX,
+ 2),
+ ofHatchAdder(
+ GT_MetaTileEntity_DistillationTower::addMaintenanceToMachineList,
+ CASING_INDEX,
+ 2),
+ onElementPass(
+ GT_MetaTileEntity_DistillationTower::onCasingFound,
+ ofBlock(GregTech_API.sBlockCasings4, 1))))
+ // hint element only used in top layer
+ .addElement(
+ 'L',
+ buildHatchAdder(
+ GT_MetaTileEntity_DistillationTower.class).atLeast(
+ layeredOutputHatch)
+ .casingIndex(
+ CASING_INDEX)
+ .dot(2)
+ .disallowOnly(
+ ForgeDirection.UP)
+ .buildAndChain(
+ GregTech_API.sBlockCasings4,
+ 1))
+ .addElement(
+ 'c',
+ ofChain(
+ onElementPass(
+ t -> t.onTopLayerFound(false),
+ ofHatchAdder(
+ GT_MetaTileEntity_DistillationTower::addOutputToMachineList,
+ CASING_INDEX,
+ 3)),
+ onElementPass(
+ t -> t.onTopLayerFound(false),
+ ofHatchAdder(
+ GT_MetaTileEntity_DistillationTower::addMaintenanceToMachineList,
+ CASING_INDEX,
+ 3)),
+ onElementPass(
+ t -> t.onTopLayerFound(true),
+ ofBlock(GregTech_API.sBlockCasings4, 1)),
+ isAir()))
+ .build();
}
protected final List<List<GT_MetaTileEntity_Hatch_Output>> mOutputHatchesByLayer = new ArrayList<>();
@@ -135,15 +174,20 @@ public class GT_MetaTileEntity_DistillationTower
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
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", 1, 2).addMaintenanceHatch("Any casing", 1, 2, 3)
- .addInputHatch("Any bottom layer casing", 1).addOutputBus("Any bottom layer casing", 1)
- .addOutputHatch("2-11x Output Hatches (At least one per layer except bottom layer)", 2, 3)
- .toolTipFinisher("Gregtech");
+ 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", 1, 2)
+ .addMaintenanceHatch("Any casing", 1, 2, 3)
+ .addInputHatch("Any bottom layer casing", 1)
+ .addOutputBus("Any bottom layer casing", 1)
+ .addOutputHatch("2-11x Output Hatches (At least one per layer except bottom layer)", 2, 3)
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -152,13 +196,25 @@ public class GT_MetaTileEntity_DistillationTower
boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
if (aActive) return new ITexture[] { BlockIcons.getCasingTextureForId(CASING_INDEX),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE_GLOW).extFacing().glow()
- .build() };
- return new ITexture[] { BlockIcons.getCasingTextureForId(CASING_INDEX),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_DISTILLATION_TOWER).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_DISTILLATION_TOWER_GLOW).extFacing().glow()
- .build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
+ return new ITexture[] { BlockIcons.getCasingTextureForId(CASING_INDEX), TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_DISTILLATION_TOWER)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_DISTILLATION_TOWER_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
}
return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(CASING_INDEX) };
}
@@ -254,7 +310,8 @@ public class GT_MetaTileEntity_DistillationTower
protected int getCurrentLayerOutputHatchCount() {
return mOutputHatchesByLayer.size() < mHeight || mHeight <= 0 ? 0
- : mOutputHatchesByLayer.get(mHeight - 1).size();
+ : mOutputHatchesByLayer.get(mHeight - 1)
+ .size();
}
protected boolean addLayerOutputHatch(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
@@ -264,7 +321,8 @@ public class GT_MetaTileEntity_DistillationTower
while (mOutputHatchesByLayer.size() < mHeight) mOutputHatchesByLayer.add(new ArrayList<>());
GT_MetaTileEntity_Hatch_Output tHatch = (GT_MetaTileEntity_Hatch_Output) aTileEntity.getMetaTileEntity();
tHatch.updateTexture(aBaseCasingIndex);
- return mOutputHatchesByLayer.get(mHeight - 1).add(tHatch);
+ return mOutputHatchesByLayer.get(mHeight - 1)
+ .add(tHatch);
}
@Override
@@ -294,7 +352,8 @@ public class GT_MetaTileEntity_DistillationTower
if (!checkPiece(STRUCTURE_PIECE_LAYER, 1, mHeight, 0)) {
return false;
}
- if (mOutputHatchesByLayer.size() < mHeight || mOutputHatchesByLayer.get(mHeight - 1).isEmpty())
+ if (mOutputHatchesByLayer.size() < mHeight || mOutputHatchesByLayer.get(mHeight - 1)
+ .isEmpty())
// layer without output hatch
return false;
if (mTopLayerFound) {
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DrillerBase.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DrillerBase.java
index 55ccfd6230..a0c62ae2a7 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DrillerBase.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DrillerBase.java
@@ -63,29 +63,41 @@ public abstract class GT_MetaTileEntity_DrillerBase
@Override
protected IStructureDefinition<GT_MetaTileEntity_DrillerBase> computeValue(Class<?> type) {
return StructureDefinition.<GT_MetaTileEntity_DrillerBase>builder()
- .addShape(
- STRUCTURE_PIECE_MAIN,
- transpose(
- new String[][] { { " ", " f ", " " }, { " ", " f ", " " },
- { " ", " f ", " " }, { " f ", "fcf", " f " }, { " f ", "fcf", " f " },
- { " f ", "fcf", " f " }, { "b~b", "bbb", "bbb" }, }))
- .addElement('f', lazy(t -> ofFrame(t.getFrameMaterial())))
- .addElement(
- 'c',
- lazy(
- t -> ofBlock(
- t.getCasingBlockItem().getBlock(),
- t.getCasingBlockItem().get(0).getItemDamage())))
- .addElement(
- 'b',
- lazy(
- t -> buildHatchAdder(GT_MetaTileEntity_DrillerBase.class)
- .atLeastList(t.getAllowedHatches())
- .adder(GT_MetaTileEntity_DrillerBase::addToMachineList)
- .casingIndex(t.casingTextureIndex).dot(1).buildAndChain(
- t.getCasingBlockItem().getBlock(),
- t.getCasingBlockItem().get(0).getItemDamage())))
- .build();
+ .addShape(
+ STRUCTURE_PIECE_MAIN,
+ transpose(
+ new String[][] { { " ", " f ", " " }, { " ", " f ", " " },
+ { " ", " f ", " " }, { " f ", "fcf", " f " },
+ { " f ", "fcf", " f " }, { " f ", "fcf", " f " },
+ { "b~b", "bbb", "bbb" }, }))
+ .addElement('f', lazy(t -> ofFrame(t.getFrameMaterial())))
+ .addElement(
+ 'c',
+ lazy(
+ t -> ofBlock(
+ t.getCasingBlockItem()
+ .getBlock(),
+ t.getCasingBlockItem()
+ .get(0)
+ .getItemDamage())))
+ .addElement(
+ 'b',
+ lazy(
+ t -> buildHatchAdder(
+ GT_MetaTileEntity_DrillerBase.class).atLeastList(
+ t.getAllowedHatches())
+ .adder(
+ GT_MetaTileEntity_DrillerBase::addToMachineList)
+ .casingIndex(
+ t.casingTextureIndex)
+ .dot(1)
+ .buildAndChain(
+ t.getCasingBlockItem()
+ .getBlock(),
+ t.getCasingBlockItem()
+ .get(0)
+ .getItemDamage())))
+ .build();
}
};
@@ -126,7 +138,8 @@ public abstract class GT_MetaTileEntity_DrillerBase
private void initFields() {
casingBlock = getCasingBlockItem().getBlock();
- casingMeta = getCasingBlockItem().get(0).getItemDamage();
+ casingMeta = getCasingBlockItem().get(0)
+ .getItemDamage();
int frameId = 4096 + getFrameMaterial().mMetaItemSubID;
frameMeta = GregTech_API.METATILEENTITIES[frameId] != null
? GregTech_API.METATILEENTITIES[frameId].getTileEntityBaseType()
@@ -139,12 +152,26 @@ public abstract class GT_MetaTileEntity_DrillerBase
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
- if (aActive) return new ITexture[] { getCasingTextureForId(casingTextureIndex),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ORE_DRILL_ACTIVE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ORE_DRILL_ACTIVE_GLOW).extFacing().glow().build() };
- return new ITexture[] { getCasingTextureForId(casingTextureIndex),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ORE_DRILL).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ORE_DRILL_GLOW).extFacing().glow().build() };
+ if (aActive) return new ITexture[] { getCasingTextureForId(casingTextureIndex), TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_ORE_DRILL_ACTIVE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ORE_DRILL_ACTIVE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
+ return new ITexture[] { getCasingTextureForId(casingTextureIndex), TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_ORE_DRILL)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ORE_DRILL_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
}
return new ITexture[] { getCasingTextureForId(casingTextureIndex) };
}
@@ -210,9 +237,14 @@ public abstract class GT_MetaTileEntity_DrillerBase
protected boolean tryPickPipe() {
if (yHead == yDrill) return isPickingPipes = false;
if (tryOutputPipe()) {
- if (checkBlockAndMeta(xPipe, yHead + 1, zPipe, miningPipeBlock, W))
- getBaseMetaTileEntity().getWorld().setBlock(xPipe, yHead + 1, zPipe, miningPipeTipBlock);
- getBaseMetaTileEntity().getWorld().setBlockToAir(xPipe, yHead, zPipe);
+ if (checkBlockAndMeta(xPipe, yHead + 1, zPipe, miningPipeBlock, W)) getBaseMetaTileEntity().getWorld()
+ .setBlock(
+ xPipe,
+ yHead + 1,
+ zPipe,
+ miningPipeTipBlock);
+ getBaseMetaTileEntity().getWorld()
+ .setBlockToAir(xPipe, yHead, zPipe);
return isPickingPipes = true;
}
return isPickingPipes = false;
@@ -259,7 +291,8 @@ public abstract class GT_MetaTileEntity_DrillerBase
isSimulating))
return 3;
if (!isSimulating) {
- if (yHead != yDrill) getBaseMetaTileEntity().getWorld().setBlock(xPipe, yHead, zPipe, miningPipeBlock);
+ if (yHead != yDrill) getBaseMetaTileEntity().getWorld()
+ .setBlock(xPipe, yHead, zPipe, miningPipeBlock);
if (b != miningPipeBlock && b != miningPipeTipBlock) getBaseMetaTileEntity().decrStackSize(1, 1);
}
@@ -434,7 +467,8 @@ public abstract class GT_MetaTileEntity_DrillerBase
// is pipe tip OR is controller layer
if (checkBlockAndMeta(xPipe, yHead, zPipe, miningPipeTipBlock, W) || ++yHead == yDrill) return true;
// pipe column is broken - try fix
- getBaseMetaTileEntity().getWorld().setBlock(xPipe, yHead, zPipe, miningPipeTipBlock);
+ getBaseMetaTileEntity().getWorld()
+ .setBlock(xPipe, yHead, zPipe, miningPipeTipBlock);
return true;
}
@@ -534,10 +568,18 @@ public abstract class GT_MetaTileEntity_DrillerBase
}
for (GT_MetaTileEntity_Hatch_DataAccess tHatch : mDataAccessHatches) {
if (isValidMetaTileEntity(tHatch)) {
- for (int i = 0; i < tHatch.getBaseMetaTileEntity().getSizeInventory(); i++) {
- if (tHatch.getBaseMetaTileEntity().getStackInSlot(i) != null
- && isCorrectDataItem(tHatch.getBaseMetaTileEntity().getStackInSlot(i), state))
- rList.add(tHatch.getBaseMetaTileEntity().getStackInSlot(i));
+ for (int i = 0; i < tHatch.getBaseMetaTileEntity()
+ .getSizeInventory(); i++) {
+ if (tHatch.getBaseMetaTileEntity()
+ .getStackInSlot(i)
+ != null
+ && isCorrectDataItem(
+ tHatch.getBaseMetaTileEntity()
+ .getStackInSlot(i),
+ state))
+ rList.add(
+ tHatch.getBaseMetaTileEntity()
+ .getStackInSlot(i));
}
}
}
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 79204817f5..3395ded360 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
@@ -47,31 +47,62 @@ public class GT_MetaTileEntity_ElectricBlastFurnace
protected static final int CASING_INDEX = 11;
protected static final String STRUCTURE_PIECE_MAIN = "main";
- private static final IStructureDefinition<GT_MetaTileEntity_ElectricBlastFurnace> STRUCTURE_DEFINITION = StructureDefinition
- .<GT_MetaTileEntity_ElectricBlastFurnace>builder()
- .addShape(
- STRUCTURE_PIECE_MAIN,
- transpose(
- new String[][] { { "ttt", "tmt", "ttt" }, { "CCC", "C-C", "CCC" }, { "CCC", "C-C", "CCC" },
- { "b~b", "bbb", "bbb" } }))
- .addElement(
- 't',
- buildHatchAdder(GT_MetaTileEntity_ElectricBlastFurnace.class).atLeast(
- OutputHatch.withAdder(GT_MetaTileEntity_ElectricBlastFurnace::addOutputHatchToTopList)
- .withCount(t -> t.mPollutionOutputHatches.size()))
- .casingIndex(CASING_INDEX).dot(1).buildAndChain(GregTech_API.sBlockCasings1, CASING_INDEX))
- .addElement('m', Muffler.newAny(CASING_INDEX, 2))
- .addElement(
- 'C',
- ofCoil(
- GT_MetaTileEntity_ElectricBlastFurnace::setCoilLevel,
- GT_MetaTileEntity_ElectricBlastFurnace::getCoilLevel))
- .addElement(
- 'b',
- buildHatchAdder(GT_MetaTileEntity_ElectricBlastFurnace.class)
- .atLeast(InputHatch, OutputHatch, InputBus, OutputBus, Maintenance, Energy)
- .casingIndex(CASING_INDEX).dot(1).buildAndChain(GregTech_API.sBlockCasings1, CASING_INDEX))
- .build();
+ private static final IStructureDefinition<GT_MetaTileEntity_ElectricBlastFurnace> STRUCTURE_DEFINITION = StructureDefinition.<GT_MetaTileEntity_ElectricBlastFurnace>builder()
+ .addShape(
+ STRUCTURE_PIECE_MAIN,
+ transpose(
+ new String[][] {
+ { "ttt", "tmt",
+ "ttt" },
+ { "CCC", "C-C",
+ "CCC" },
+ { "CCC", "C-C",
+ "CCC" },
+ { "b~b", "bbb",
+ "bbb" } }))
+ .addElement(
+ 't',
+ buildHatchAdder(
+ GT_MetaTileEntity_ElectricBlastFurnace.class).atLeast(
+ OutputHatch.withAdder(
+ GT_MetaTileEntity_ElectricBlastFurnace::addOutputHatchToTopList)
+ .withCount(
+ t -> t.mPollutionOutputHatches.size()))
+ .casingIndex(
+ CASING_INDEX)
+ .dot(
+ 1)
+ .buildAndChain(
+ GregTech_API.sBlockCasings1,
+ CASING_INDEX))
+ .addElement(
+ 'm',
+ Muffler.newAny(
+ CASING_INDEX,
+ 2))
+ .addElement(
+ 'C',
+ ofCoil(
+ GT_MetaTileEntity_ElectricBlastFurnace::setCoilLevel,
+ GT_MetaTileEntity_ElectricBlastFurnace::getCoilLevel))
+ .addElement(
+ 'b',
+ buildHatchAdder(
+ GT_MetaTileEntity_ElectricBlastFurnace.class).atLeast(
+ InputHatch,
+ OutputHatch,
+ InputBus,
+ OutputBus,
+ Maintenance,
+ Energy)
+ .casingIndex(
+ CASING_INDEX)
+ .dot(
+ 1)
+ .buildAndChain(
+ GregTech_API.sBlockCasings1,
+ CASING_INDEX))
+ .build();
public GT_MetaTileEntity_ElectricBlastFurnace(int aID, String aName, String aNameRegional) {
super(aID, aName, aNameRegional);
@@ -89,22 +120,30 @@ public class GT_MetaTileEntity_ElectricBlastFurnace
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
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 reduces power consumption by 5% (multiplicatively)")
- .addInfo("Each 1800K over the min. Heat required grants one perfect overclock")
- .addInfo(
- "For each perfect overclock the EBF will reduce recipe time 4 times (instead of 2) (100% efficiency)")
- .addInfo("Additionally gives +100K for every tier past MV")
- .addPollutionAmount(getPollutionPerSecond(null)).addSeparator().beginStructureBlock(3, 4, 3, true)
- .addController("Front bottom").addCasingInfoRange("Heat Proof Machine Casing", 0, 15, false)
- .addOtherStructurePart("Heating Coils", "Two middle Layers")
- .addEnergyHatch("Any bottom layer casing", 3).addMaintenanceHatch("Any bottom layer casing", 3)
- .addMufflerHatch("Top middle", 2).addInputBus("Any bottom layer casing", 3)
- .addInputHatch("Any bottom layer casing", 3).addOutputBus("Any bottom layer casing", 3)
- .addOutputHatch("Liquid form of fluids, Any bottom layer casing")
- .addOutputHatch("Gas form of fluids, Any top layer casing", 1)
- .addStructureInfo("Recovery amount scales with Muffler Hatch tier").toolTipFinisher("Gregtech");
+ 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 reduces power consumption by 5% (multiplicatively)")
+ .addInfo("Each 1800K over the min. Heat required grants one perfect overclock")
+ .addInfo(
+ "For each perfect overclock the EBF will reduce recipe time 4 times (instead of 2) (100% efficiency)")
+ .addInfo("Additionally gives +100K for every tier past MV")
+ .addPollutionAmount(getPollutionPerSecond(null))
+ .addSeparator()
+ .beginStructureBlock(3, 4, 3, true)
+ .addController("Front bottom")
+ .addCasingInfoRange("Heat Proof Machine Casing", 0, 15, false)
+ .addOtherStructurePart("Heating Coils", "Two middle Layers")
+ .addEnergyHatch("Any bottom layer casing", 3)
+ .addMaintenanceHatch("Any bottom layer casing", 3)
+ .addMufflerHatch("Top middle", 2)
+ .addInputBus("Any bottom layer casing", 3)
+ .addInputHatch("Any bottom layer casing", 3)
+ .addOutputBus("Any bottom layer casing", 3)
+ .addOutputHatch("Liquid form of fluids, Any bottom layer casing")
+ .addOutputHatch("Gas form of fluids, Any top layer casing", 1)
+ .addStructureInfo("Recovery amount scales with Muffler Hatch tier")
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -112,14 +151,26 @@ public class GT_MetaTileEntity_ElectricBlastFurnace
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
- if (aActive) return new ITexture[] { casingTexturePages[0][CASING_INDEX],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE_GLOW).extFacing()
- .glow().build() };
- return new ITexture[] { casingTexturePages[0][CASING_INDEX],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_GLOW).extFacing().glow()
- .build() };
+ if (aActive) return new ITexture[] { casingTexturePages[0][CASING_INDEX], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
+ return new ITexture[] { casingTexturePages[0][CASING_INDEX], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
}
return new ITexture[] { casingTexturePages[0][CASING_INDEX] };
}
@@ -153,9 +204,14 @@ public class GT_MetaTileEntity_ElectricBlastFurnace
tBus.mRecipeMap = getRecipeMap();
if (isValidMetaTileEntity(tBus)) {
- for (int i = tBus.getBaseMetaTileEntity().getSizeInventory() - 1; i >= 0; i--) {
- if (tBus.getBaseMetaTileEntity().getStackInSlot(i) != null) {
- tInputs.add(tBus.getBaseMetaTileEntity().getStackInSlot(i));
+ for (int i = tBus.getBaseMetaTileEntity()
+ .getSizeInventory()
+ - 1; i >= 0; i--) {
+ if (tBus.getBaseMetaTileEntity()
+ .getStackInSlot(i) != null) {
+ tInputs.add(
+ tBus.getBaseMetaTileEntity()
+ .getStackInSlot(i));
}
}
}
@@ -176,8 +232,12 @@ public class GT_MetaTileEntity_ElectricBlastFurnace
long tVoltage = getMaxInputVoltage();
byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
- GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sBlastRecipes
- .findRecipe(getBaseMetaTileEntity(), false, V[tTier], tFluids, tItems);
+ GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sBlastRecipes.findRecipe(
+ getBaseMetaTileEntity(),
+ false,
+ V[tTier],
+ tFluids,
+ tItems);
if (tRecipe == null) return false;
if (this.mHeatingCapacity < tRecipe.mSpecialValue) return false;
@@ -322,8 +382,10 @@ public class GT_MetaTileEntity_ElectricBlastFurnace
long maxEnergy = 0;
for (GT_MetaTileEntity_Hatch_Energy tHatch : mEnergyHatches) {
if (!isValidMetaTileEntity(tHatch)) continue;
- storedEnergy += tHatch.getBaseMetaTileEntity().getStoredEU();
- maxEnergy += tHatch.getBaseMetaTileEntity().getEUCapacity();
+ storedEnergy += tHatch.getBaseMetaTileEntity()
+ .getStoredEU();
+ maxEnergy += tHatch.getBaseMetaTileEntity()
+ .getEUCapacity();
}
return new String[] {
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
index 78e059db2a..e9ed294fc2 100644
--- 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
@@ -37,21 +37,28 @@ public class GT_MetaTileEntity_ExtremeDieselEngine extends GT_MetaTileEntity_Die
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Combustion Generator").addInfo("Controller block for the Extreme Combustion Engine")
- .addInfo("Supply high rating fuel and 8000L of Lubricant per hour to run")
- .addInfo("Supply 40L/s of Liquid Oxygen to boost output (optional)")
- .addInfo("Default: Produces 10900EU/t at 100% fuel efficiency")
- .addInfo("Boosted: Produces 32700EU/t at 150% fuel efficiency")
- .addInfo("You need to wait for it to reach 300% to output full power")
- .addPollutionAmount(getPollutionPerSecond(null)).addSeparator().beginStructureBlock(3, 3, 4, false)
- .addController("Front center").addCasingInfoRange("Robust Tungstensteel Machine Casing", 16, 22, false)
- .addOtherStructurePart("Titanium Gear Box Machine Casing", "Inner 2 blocks")
- .addOtherStructurePart("Extreme Engine Intake Machine Casing", "8x, ring around controller")
- .addStructureInfo("Extreme Engine Intake Casings must not be obstructed in front (only air blocks)")
- .addDynamoHatch("Back center", 2).addMaintenanceHatch("One of the casings next to a Gear Box", 1)
- .addMufflerHatch("Top middle back, above the rear Gear Box", 1)
- .addInputHatch("HOG, next to a Gear Box", 1).addInputHatch("Lubricant, next to a Gear Box", 1)
- .addInputHatch("Liquid Oxygen, optional, next to a Gear Box", 1).toolTipFinisher("Gregtech");
+ tt.addMachineType("Combustion Generator")
+ .addInfo("Controller block for the Extreme Combustion Engine")
+ .addInfo("Supply high rating fuel and 8000L of Lubricant per hour to run")
+ .addInfo("Supply 40L/s of Liquid Oxygen to boost output (optional)")
+ .addInfo("Default: Produces 10900EU/t at 100% fuel efficiency")
+ .addInfo("Boosted: Produces 32700EU/t at 150% fuel efficiency")
+ .addInfo("You need to wait for it to reach 300% to output full power")
+ .addPollutionAmount(getPollutionPerSecond(null))
+ .addSeparator()
+ .beginStructureBlock(3, 3, 4, false)
+ .addController("Front center")
+ .addCasingInfoRange("Robust Tungstensteel Machine Casing", 16, 22, false)
+ .addOtherStructurePart("Titanium Gear Box Machine Casing", "Inner 2 blocks")
+ .addOtherStructurePart("Extreme Engine Intake Machine Casing", "8x, ring around controller")
+ .addStructureInfo("Extreme Engine Intake Casings must not be obstructed in front (only air blocks)")
+ .addDynamoHatch("Back center", 2)
+ .addMaintenanceHatch("One of the casings next to a Gear Box", 1)
+ .addMufflerHatch("Top middle back, above the rear Gear Box", 1)
+ .addInputHatch("HOG, next to a Gear Box", 1)
+ .addInputHatch("Lubricant, next to a Gear Box", 1)
+ .addInputHatch("Liquid Oxygen, optional, next to a Gear Box", 1)
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -64,14 +71,26 @@ public class GT_MetaTileEntity_ExtremeDieselEngine extends GT_MetaTileEntity_Die
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
- if (aActive) return new ITexture[] { casingTexturePages[0][60],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_EXTREME_DIESEL_ENGINE_ACTIVE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_EXTREME_DIESEL_ENGINE_ACTIVE_GLOW).extFacing().glow()
- .build() };
- return new ITexture[] { casingTexturePages[0][60],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_EXTREME_DIESEL_ENGINE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_EXTREME_DIESEL_ENGINE_GLOW).extFacing().glow()
- .build() };
+ if (aActive) return new ITexture[] { casingTexturePages[0][60], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_EXTREME_DIESEL_ENGINE_ACTIVE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_EXTREME_DIESEL_ENGINE_ACTIVE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
+ return new ITexture[] { casingTexturePages[0][60], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_EXTREME_DIESEL_ENGINE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_EXTREME_DIESEL_ENGINE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
}
return new ITexture[] { casingTexturePages[0][60] };
}
@@ -164,8 +183,10 @@ public class GT_MetaTileEntity_ExtremeDieselEngine extends GT_MetaTileEntity_Die
long maxEnergy = 0;
for (GT_MetaTileEntity_Hatch_Dynamo tHatch : mDynamoHatches) {
if (isValidMetaTileEntity(tHatch)) {
- storedEnergy += tHatch.getBaseMetaTileEntity().getStoredEU();
- maxEnergy += tHatch.getBaseMetaTileEntity().getEUCapacity();
+ storedEnergy += tHatch.getBaseMetaTileEntity()
+ .getStoredEU();
+ maxEnergy += tHatch.getBaseMetaTileEntity()
+ .getEUCapacity();
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java
index 34da12c590..869e1b53f8 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java
@@ -66,53 +66,85 @@ public abstract class GT_MetaTileEntity_FusionComputer
@Override
protected IStructureDefinition<GT_MetaTileEntity_FusionComputer> computeValue(Class<?> type) {
- return StructureDefinition.<GT_MetaTileEntity_FusionComputer>builder().addShape(
- STRUCTURE_PIECE_MAIN,
- transpose(
- new String[][] {
- { " ", " ihi ", " hh hh ", " h h ",
- " h h ", " h h ", " i i ", " h h ",
- " i i ", " h h ", " h h ", " h h ",
- " hh hh ", " ihi ", " ", },
- { " xhx ", " hhccchh ", " eccxhxcce ", " eceh hece ",
- " hce ech ", " hch hch ", "xcx xcx", "hch hch",
- "xcx xcx", " hch hch ", " hce ech ", " eceh hece ",
- " eccx~xcce ", " hhccchh ", " xhx ", },
- { " ", " ihi ", " hh hh ", " h h ",
- " h h ", " h h ", " i i ", " h h ",
- " i i ", " h h ", " h h ", " h h ",
- " hh hh ", " ihi ", " ", } }))
- .addElement('c', lazy(t -> ofBlock(t.getFusionCoil(), t.getFusionCoilMeta())))
- .addElement('h', lazy(t -> ofBlock(t.getCasing(), t.getCasingMeta())))
- .addElement(
- 'i',
- lazy(
- t -> buildHatchAdder(GT_MetaTileEntity_FusionComputer.class)
- .atLeast(
- ImmutableMap.of(
- InputHatch.withAdder(
- GT_MetaTileEntity_FusionComputer::addInjector),
- 2))
- .hatchItemFilterAnd(t2 -> filterByMTETier(t2.tier(), Integer.MAX_VALUE))
- .casingIndex(53).dot(1).buildAndChain(t.getCasing(), t.getCasingMeta())))
- .addElement(
- 'e',
- lazy(
- t -> buildHatchAdder(GT_MetaTileEntity_FusionComputer.class).atLeast(
- ImmutableMap.of(
- Energy.withAdder(
- GT_MetaTileEntity_FusionComputer::addEnergyInjector),
- 16))
- .hatchItemFilterAnd(t2 -> filterByMTETier(t2.tier(), Integer.MAX_VALUE))
- .casingIndex(53).dot(2).buildAndChain(t.getCasing(), t.getCasingMeta())))
- .addElement(
- 'x',
- lazy(
- t -> buildHatchAdder(GT_MetaTileEntity_FusionComputer.class).atLeast(
- OutputHatch.withAdder(GT_MetaTileEntity_FusionComputer::addExtractor))
- .hatchItemFilterAnd(t2 -> filterByMTETier(t2.tier(), Integer.MAX_VALUE))
- .casingIndex(53).dot(3).buildAndChain(t.getCasing(), t.getCasingMeta())))
- .build();
+ return StructureDefinition.<GT_MetaTileEntity_FusionComputer>builder()
+ .addShape(
+ STRUCTURE_PIECE_MAIN,
+ transpose(
+ new String[][] { { " ", " ihi ",
+ " hh hh ", " h h ", " h h ",
+ " h h ", " i i ", " h h ",
+ " i i ", " h h ", " h h ",
+ " h h ", " hh hh ", " ihi ",
+ " ", },
+ { " xhx ", " hhccchh ", " eccxhxcce ",
+ " eceh hece ", " hce ech ",
+ " hch hch ", "xcx xcx",
+ "hch hch", "xcx xcx",
+ " hch hch ", " hce ech ",
+ " eceh hece ", " eccx~xcce ",
+ " hhccchh ", " xhx ", },
+ { " ", " ihi ", " hh hh ",
+ " h h ", " h h ",
+ " h h ", " i i ",
+ " h h ", " i i ",
+ " h h ", " h h ",
+ " h h ", " hh hh ",
+ " ihi ", " ", } }))
+ .addElement('c', lazy(t -> ofBlock(t.getFusionCoil(), t.getFusionCoilMeta())))
+ .addElement('h', lazy(t -> ofBlock(t.getCasing(), t.getCasingMeta())))
+ .addElement(
+ 'i',
+ lazy(
+ t -> buildHatchAdder(
+ GT_MetaTileEntity_FusionComputer.class).atLeast(
+ ImmutableMap.of(
+ InputHatch.withAdder(
+ GT_MetaTileEntity_FusionComputer::addInjector),
+ 2))
+ .hatchItemFilterAnd(
+ t2 -> filterByMTETier(
+ t2.tier(),
+ Integer.MAX_VALUE))
+ .casingIndex(53)
+ .dot(1)
+ .buildAndChain(
+ t.getCasing(),
+ t.getCasingMeta())))
+ .addElement(
+ 'e',
+ lazy(
+ t -> buildHatchAdder(
+ GT_MetaTileEntity_FusionComputer.class).atLeast(
+ ImmutableMap.of(
+ Energy.withAdder(
+ GT_MetaTileEntity_FusionComputer::addEnergyInjector),
+ 16))
+ .hatchItemFilterAnd(
+ t2 -> filterByMTETier(
+ t2.tier(),
+ Integer.MAX_VALUE))
+ .casingIndex(53)
+ .dot(2)
+ .buildAndChain(
+ t.getCasing(),
+ t.getCasingMeta())))
+ .addElement(
+ 'x',
+ lazy(
+ t -> buildHatchAdder(
+ GT_MetaTileEntity_FusionComputer.class).atLeast(
+ OutputHatch.withAdder(
+ GT_MetaTileEntity_FusionComputer::addExtractor))
+ .hatchItemFilterAnd(
+ t2 -> filterByMTETier(
+ t2.tier(),
+ Integer.MAX_VALUE))
+ .casingIndex(53)
+ .dot(3)
+ .buildAndChain(
+ t.getCasing(),
+ t.getCasingMeta())))
+ .build();
}
};
public GT_Recipe mLastRecipe;
@@ -122,9 +154,15 @@ public abstract class GT_MetaTileEntity_FusionComputer
Textures.BlockIcons.setCasingTextureForId(
52,
TextureFactory.of(
- TextureFactory.builder().addIcon(MACHINE_CASING_FUSION_GLASS_YELLOW).extFacing().build(),
- TextureFactory.builder().addIcon(MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW).extFacing().glow()
- .build()));
+ TextureFactory.builder()
+ .addIcon(MACHINE_CASING_FUSION_GLASS_YELLOW)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(MACHINE_CASING_FUSION_GLASS_YELLOW_GLOW)
+ .extFacing()
+ .glow()
+ .build()));
}
public GT_MetaTileEntity_FusionComputer(int aID, String aName, String aNameRegional, int tier) {
@@ -172,10 +210,13 @@ public abstract class GT_MetaTileEntity_FusionComputer
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addController("Fusion Reactor").addInfo("Some kind of fusion reactor, maybe").addSeparator()
- .addInfo("Some kind of fusion reactor, maybe")
- .addStructureInfo("Should probably be built similar to other fusions")
- .addStructureInfo("See controller tooltip for details").toolTipFinisher("Gregtech");
+ tt.addController("Fusion Reactor")
+ .addInfo("Some kind of fusion reactor, maybe")
+ .addSeparator()
+ .addInfo("Some kind of fusion reactor, maybe")
+ .addStructureInfo("Should probably be built similar to other fusions")
+ .addStructureInfo("See controller tooltip for details")
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -238,11 +279,16 @@ public abstract class GT_MetaTileEntity_FusionComputer
@Override
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
- if (aSide == aFacing)
- return new ITexture[] { TextureFactory.builder().addIcon(MACHINE_CASING_FUSION_GLASS).extFacing().build(),
- getTextureOverlay() };
+ if (aSide == aFacing) return new ITexture[] { TextureFactory.builder()
+ .addIcon(MACHINE_CASING_FUSION_GLASS)
+ .extFacing()
+ .build(),
+ getTextureOverlay() };
if (aActive) return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(52) };
- return new ITexture[] { TextureFactory.builder().addIcon(MACHINE_CASING_FUSION_GLASS).extFacing().build() };
+ return new ITexture[] { TextureFactory.builder()
+ .addIcon(MACHINE_CASING_FUSION_GLASS)
+ .extFacing()
+ .build() };
}
/**
@@ -290,8 +336,12 @@ public abstract class GT_MetaTileEntity_FusionComputer
FluidStack[] tFluids = tFluidList.toArray(new FluidStack[0]);
GT_Recipe tRecipe;
- tRecipe = GT_Recipe.GT_Recipe_Map.sFusionRecipes
- .findRecipe(this.getBaseMetaTileEntity(), this.mLastRecipe, false, GT_Values.V[tier()], tFluids);
+ tRecipe = GT_Recipe.GT_Recipe_Map.sFusionRecipes.findRecipe(
+ this.getBaseMetaTileEntity(),
+ this.mLastRecipe,
+ false,
+ GT_Values.V[tier()],
+ tFluids);
if (tRecipe == null) {
tRecipe = GT_Recipe.GT_Recipe_Map.sComplexFusionRecipes.findRecipe(
this.getBaseMetaTileEntity(),
@@ -363,8 +413,9 @@ public abstract class GT_MetaTileEntity_FusionComputer
for (GT_MetaTileEntity_Hatch_Energy tHatch : mEnergyHatches)
if (isValidMetaTileEntity(tHatch)) {
long energyToMove = GT_Values.V[tier()] / 16;
- if (aBaseMetaTileEntity.getStoredEU() + energyToMove < maxEUStore() && tHatch
- .getBaseMetaTileEntity().decreaseStoredEnergyUnits(energyToMove, false)) {
+ if (aBaseMetaTileEntity.getStoredEU() + energyToMove < maxEUStore()
+ && tHatch.getBaseMetaTileEntity()
+ .decreaseStoredEnergyUnits(energyToMove, false)) {
aBaseMetaTileEntity.increaseStoredEnergyUnits(energyToMove, true);
}
}
@@ -373,7 +424,8 @@ public abstract class GT_MetaTileEntity_FusionComputer
criticalStopMachine();
}
if (mMaxProgresstime > 0) {
- this.getBaseMetaTileEntity().decreaseStoredEnergyUnits(mEUt, true);
+ this.getBaseMetaTileEntity()
+ .decreaseStoredEnergyUnits(mEUt, true);
if (mMaxProgresstime > 0 && ++mProgresstime >= mMaxProgresstime) {
if (mOutputItems != null)
for (ItemStack tStack : mOutputItems) if (tStack != null) addOutput(tStack);
@@ -390,7 +442,8 @@ public abstract class GT_MetaTileEntity_FusionComputer
try {
GT_Mod.achievements.issueAchivementHatchFluid(
aBaseMetaTileEntity.getWorld()
- .getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()),
+ .getPlayerEntityByName(
+ aBaseMetaTileEntity.getOwnerName()),
mOutputFluids[0]);
} catch (Exception ignored) {}
}
@@ -420,8 +473,8 @@ public abstract class GT_MetaTileEntity_FusionComputer
stopMachine();
}
}
- aBaseMetaTileEntity
- .setErrorDisplayID((aBaseMetaTileEntity.getErrorDisplayID() & ~127) | (mMachine ? 0 : 64));
+ aBaseMetaTileEntity.setErrorDisplayID(
+ (aBaseMetaTileEntity.getErrorDisplayID() & ~127) | (mMachine ? 0 : 64));
aBaseMetaTileEntity.setActive(mMaxProgresstime > 0);
}
}
@@ -534,8 +587,9 @@ public abstract class GT_MetaTileEntity_FusionComputer
@Override
public void addGregTechLogo(ModularWindow.Builder builder) {
builder.widget(
- new DrawableWidget().setDrawable(getGUITextureSet().getGregTechLogo()).setSize(17, 17)
- .setPos(155, 145));
+ new DrawableWidget().setDrawable(getGUITextureSet().getGregTechLogo())
+ .setSize(17, 17)
+ .setPos(155, 145));
}
@Override
@@ -557,59 +611,77 @@ public abstract class GT_MetaTileEntity_FusionComputer
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
builder.widget(
new TextWidget(GT_Utility.trans("138", "Incomplete Structure.")).setDefaultColor(COLOR_TEXT_WHITE.get())
- .setEnabled(widget -> !mMachine).setPos(10, 8))
- .widget(new FakeSyncWidget.BooleanSyncer(() -> mMachine, val -> mMachine = val))
- .widget(
- new TextWidget("Hit with Soft Mallet to (re-)start the Machine if it doesn't start.")
- .setDefaultColor(COLOR_TEXT_WHITE.get()).setTextAlignment(Alignment.Center)
- .setEnabled(
- widget -> getBaseMetaTileEntity().getErrorDisplayID() == 0
- && !getBaseMetaTileEntity().isActive())
- .setPos(-getGUIWidth() / 2, 170).setSize(getGUIWidth() * 2, 9))
- .widget(
- new FakeSyncWidget.IntegerSyncer(
- () -> getBaseMetaTileEntity().getErrorDisplayID(),
- val -> getBaseMetaTileEntity().setErrorDisplayID(val)))
- .widget(
- new FakeSyncWidget.BooleanSyncer(
- () -> getBaseMetaTileEntity().isActive(),
- val -> getBaseMetaTileEntity().setActive(val)))
- .widget(
- new TextWidget("Running perfectly.").setDefaultColor(COLOR_TEXT_WHITE.get())
- .setTextAlignment(Alignment.Center)
- .setEnabled(
- widget -> getBaseMetaTileEntity().getErrorDisplayID() == 0
- && getBaseMetaTileEntity().isActive())
- .setPos(0, 170).setSize(getGUIWidth(), 9))
- .widget(
- new FakeSyncWidget.IntegerSyncer(
- () -> getBaseMetaTileEntity().getErrorDisplayID(),
- val -> getBaseMetaTileEntity().setErrorDisplayID(val)))
- .widget(
- new ProgressBar()
- .setProgress(
- () -> (float) getBaseMetaTileEntity().getStoredEU()
- / getBaseMetaTileEntity().getEUCapacity())
- .setDirection(ProgressBar.Direction.RIGHT)
- .setTexture(GT_UITextures.PROGRESSBAR_STORED_EU, 147).setPos(5, 156).setSize(147, 5))
- .widget(TextWidget.dynamicString(() -> {
- long energy = getBaseMetaTileEntity().getStoredEU();
- if (energy > 160_000_000L && energy < 160_010_000L) {
- energy = 160_000_000L;
- }
- if (energy > 320_000_000L && energy < 320_010_000L) {
- energy = 320_000_000L;
- }
- if (energy > 640_000_000L && energy < 640_010_000L) {
- energy = 640_000_000L;
- }
- if (energy > 5_120_000_000L && energy < 5_120_080_000L) {
- energy = 5_120_000_000L;
- }
- return GT_Utility.formatNumbers(energy) + " EU";
- }).setDefaultColor(COLOR_TEXT_RED.get()).setPos(50, 155)).widget(
- new ButtonWidget().setNEITransferRect(GT_Recipe.GT_Recipe_Map.sFusionRecipes.mNEIName)
- .setBackground(GT_UITextures.BUTTON_STANDARD, GT_UITextures.OVERLAY_BUTTON_NEI)
- .setPos(154, 4).setSize(18, 18));
+ .setEnabled(widget -> !mMachine)
+ .setPos(10, 8))
+ .widget(new FakeSyncWidget.BooleanSyncer(() -> mMachine, val -> mMachine = val))
+ .widget(
+ new TextWidget(
+ "Hit with Soft Mallet to (re-)start the Machine if it doesn't start.").setDefaultColor(
+ COLOR_TEXT_WHITE.get())
+ .setTextAlignment(
+ Alignment.Center)
+ .setEnabled(
+ widget -> getBaseMetaTileEntity().getErrorDisplayID()
+ == 0
+ && !getBaseMetaTileEntity().isActive())
+ .setPos(
+ -getGUIWidth()
+ / 2,
+ 170)
+ .setSize(
+ getGUIWidth()
+ * 2,
+ 9))
+ .widget(
+ new FakeSyncWidget.IntegerSyncer(
+ () -> getBaseMetaTileEntity().getErrorDisplayID(),
+ val -> getBaseMetaTileEntity().setErrorDisplayID(val)))
+ .widget(
+ new FakeSyncWidget.BooleanSyncer(
+ () -> getBaseMetaTileEntity().isActive(),
+ val -> getBaseMetaTileEntity().setActive(val)))
+ .widget(
+ new TextWidget("Running perfectly.").setDefaultColor(COLOR_TEXT_WHITE.get())
+ .setTextAlignment(Alignment.Center)
+ .setEnabled(
+ widget -> getBaseMetaTileEntity().getErrorDisplayID()
+ == 0 && getBaseMetaTileEntity().isActive())
+ .setPos(0, 170)
+ .setSize(getGUIWidth(), 9))
+ .widget(
+ new FakeSyncWidget.IntegerSyncer(
+ () -> getBaseMetaTileEntity().getErrorDisplayID(),
+ val -> getBaseMetaTileEntity().setErrorDisplayID(val)))
+ .widget(
+ new ProgressBar().setProgress(
+ () -> (float) getBaseMetaTileEntity().getStoredEU()
+ / getBaseMetaTileEntity().getEUCapacity())
+ .setDirection(ProgressBar.Direction.RIGHT)
+ .setTexture(GT_UITextures.PROGRESSBAR_STORED_EU, 147)
+ .setPos(5, 156)
+ .setSize(147, 5))
+ .widget(TextWidget.dynamicString(() -> {
+ long energy = getBaseMetaTileEntity().getStoredEU();
+ if (energy > 160_000_000L && energy < 160_010_000L) {
+ energy = 160_000_000L;
+ }
+ if (energy > 320_000_000L && energy < 320_010_000L) {
+ energy = 320_000_000L;
+ }
+ if (energy > 640_000_000L && energy < 640_010_000L) {
+ energy = 640_000_000L;
+ }
+ if (energy > 5_120_000_000L && energy < 5_120_080_000L) {
+ energy = 5_120_000_000L;
+ }
+ return GT_Utility.formatNumbers(energy) + " EU";
+ })
+ .setDefaultColor(COLOR_TEXT_RED.get())
+ .setPos(50, 155))
+ .widget(
+ new ButtonWidget().setNEITransferRect(GT_Recipe.GT_Recipe_Map.sFusionRecipes.mNEIName)
+ .setBackground(GT_UITextures.BUTTON_STANDARD, GT_UITextures.OVERLAY_BUTTON_NEI)
+ .setPos(154, 4)
+ .setSize(18, 18));
}
}
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 7742af798a..382e2c6c6e 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
@@ -16,8 +16,15 @@ import gregtech.common.power.FusionPower;
public class GT_MetaTileEntity_FusionComputer1 extends GT_MetaTileEntity_FusionComputer {
private static final ITexture textureOverlay = TextureFactory.of(
- TextureFactory.builder().addIcon(OVERLAY_FUSION1).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FUSION1_GLOW).extFacing().glow().build());
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FUSION1)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FUSION1_GLOW)
+ .extFacing()
+ .glow()
+ .build());
public GT_MetaTileEntity_FusionComputer1(int aID, String aName, String aNameRegional) {
super(aID, aName, aNameRegional, 6);
@@ -67,18 +74,23 @@ public class GT_MetaTileEntity_FusionComputer1 extends GT_MetaTileEntity_FusionC
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
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")
- .addCasingInfoRange("LuV Machine Casing", 79, 123, false)
- .addStructureInfo("Cover the coils with casing")
- .addOtherStructurePart("Superconducting Coil Block", "Center part of the ring")
- .addEnergyHatch("1-16, Specified casings", 2).addInputHatch("2-16, Specified casings", 1)
- .addOutputHatch("1-16, Specified casings", 3).addStructureInfo("ALL Hatches must be LuV or better")
- .toolTipFinisher("Gregtech");
+ 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")
+ .addCasingInfoRange("LuV Machine Casing", 79, 123, false)
+ .addStructureInfo("Cover the coils with casing")
+ .addOtherStructurePart("Superconducting Coil Block", "Center part of the ring")
+ .addEnergyHatch("1-16, Specified casings", 2)
+ .addInputHatch("2-16, Specified casings", 1)
+ .addOutputHatch("1-16, Specified casings", 3)
+ .addStructureInfo("ALL Hatches must be LuV or better")
+ .toolTipFinisher("Gregtech");
return tt;
}
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 de7a54ae93..5a5e884cb8 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
@@ -16,8 +16,15 @@ import gregtech.common.power.FusionPower;
public class GT_MetaTileEntity_FusionComputer2 extends GT_MetaTileEntity_FusionComputer {
private static final ITexture textureOverlay = TextureFactory.of(
- TextureFactory.builder().addIcon(OVERLAY_FUSION2).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FUSION2_GLOW).extFacing().glow().build());
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FUSION2)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FUSION2_GLOW)
+ .extFacing()
+ .glow()
+ .build());
public GT_MetaTileEntity_FusionComputer2(int aID, String aName, String aNameRegional) {
super(aID, aName, aNameRegional, 7);
@@ -67,18 +74,23 @@ public class GT_MetaTileEntity_FusionComputer2 extends GT_MetaTileEntity_FusionC
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
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("8192EU/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")
- .addCasingInfoRange("Fusion Machine Casing", 79, 123, false)
- .addStructureInfo("Cover the coils with casing")
- .addOtherStructurePart("Fusion Coil Block", "Center part of the ring")
- .addEnergyHatch("1-16, Specified casings", 2).addInputHatch("2-16, Specified casings", 1)
- .addOutputHatch("1-16, Specified casings", 3).addStructureInfo("ALL Hatches must be ZPM or better")
- .toolTipFinisher("Gregtech");
+ tt.addMachineType("Fusion Reactor")
+ .addInfo("It's over 9000!!!")
+ .addInfo("Controller block for the Fusion Reactor Mk II")
+ .addInfo("8192EU/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")
+ .addCasingInfoRange("Fusion Machine Casing", 79, 123, false)
+ .addStructureInfo("Cover the coils with casing")
+ .addOtherStructurePart("Fusion Coil Block", "Center part of the ring")
+ .addEnergyHatch("1-16, Specified casings", 2)
+ .addInputHatch("2-16, Specified casings", 1)
+ .addOutputHatch("1-16, Specified casings", 3)
+ .addStructureInfo("ALL Hatches must be ZPM or better")
+ .toolTipFinisher("Gregtech");
return tt;
}
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 09d8a46c26..2d5c6111fd 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
@@ -16,8 +16,15 @@ import gregtech.common.power.FusionPower;
public class GT_MetaTileEntity_FusionComputer3 extends GT_MetaTileEntity_FusionComputer {
private static final ITexture textureOverlay = TextureFactory.of(
- TextureFactory.builder().addIcon(OVERLAY_FUSION3).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FUSION3_GLOW).extFacing().glow().build());
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FUSION3)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FUSION3_GLOW)
+ .extFacing()
+ .glow()
+ .build());
public GT_MetaTileEntity_FusionComputer3(int aID, String aName, String aNameRegional) {
super(aID, aName, aNameRegional, 8);
@@ -67,18 +74,23 @@ public class GT_MetaTileEntity_FusionComputer3 extends GT_MetaTileEntity_FusionC
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
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("32768EU/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")
- .addCasingInfoRange("Fusion Machine Casing Mk II", 79, 123, false)
- .addStructureInfo("Cover the coils with casing")
- .addOtherStructurePart("Fusion Coil Block", "Center part of the ring")
- .addEnergyHatch("1-16, Specified casings", 2).addInputHatch("2-16, Specified casings", 1)
- .addOutputHatch("1-16, Specified casings", 3).addStructureInfo("ALL Hatches must be UV or better")
- .toolTipFinisher("Gregtech");
+ tt.addMachineType("Fusion Reactor")
+ .addInfo("A SUN DOWN ON EARTH")
+ .addInfo("Controller block for the Fusion Reactor Mk III")
+ .addInfo("32768EU/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")
+ .addCasingInfoRange("Fusion Machine Casing Mk II", 79, 123, false)
+ .addStructureInfo("Cover the coils with casing")
+ .addOtherStructurePart("Fusion Coil Block", "Center part of the ring")
+ .addEnergyHatch("1-16, Specified casings", 2)
+ .addInputHatch("2-16, Specified casings", 1)
+ .addOutputHatch("1-16, Specified casings", 3)
+ .addStructureInfo("ALL Hatches must be UV or better")
+ .toolTipFinisher("Gregtech");
return tt;
}
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 4405044703..ceb901c5ad 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
@@ -42,33 +42,68 @@ public class GT_MetaTileEntity_HeatExchanger extends
private static final int dryHeatMaximum = 2000; // 2000 ticks = 100 seconds
private static final int CASING_INDEX = 50;
private static final String STRUCTURE_PIECE_MAIN = "main";
- private static final IStructureDefinition<GT_MetaTileEntity_HeatExchanger> STRUCTURE_DEFINITION = StructureDefinition
- .<GT_MetaTileEntity_HeatExchanger>builder()
- .addShape(
- STRUCTURE_PIECE_MAIN,
- transpose(
- new String[][] { { "ccc", "cCc", "ccc" }, { "ccc", "cPc", "ccc" }, { "ccc", "cPc", "ccc" },
- { "c~c", "cHc", "ccc" }, }))
- .addElement('P', ofBlock(GregTech_API.sBlockCasings2, 14))
- .addElement(
- 'C',
- OutputHatch.withAdder(GT_MetaTileEntity_HeatExchanger::addColdFluidOutputToMachineList)
- .withCount(t -> isValidMetaTileEntity(t.mOutputColdFluidHatch) ? 1 : 0)
- .newAny(CASING_INDEX, 3))
- .addElement(
- 'H',
- OutputHatch.withAdder(GT_MetaTileEntity_HeatExchanger::addHotFluidInputToMachineList)
- .withCount(t -> isValidMetaTileEntity(t.mInputHotFluidHatch) ? 1 : 0)
- .newAny(CASING_INDEX, 3))
- .addElement(
- 'c',
- buildHatchAdder(GT_MetaTileEntity_HeatExchanger.class)
- .atLeast(InputBus, InputHatch, OutputBus, OutputHatch, Maintenance)
- .casingIndex(CASING_INDEX).dot(1).buildAndChain(
- onElementPass(
- GT_MetaTileEntity_HeatExchanger::onCasingAdded,
- ofBlock(GregTech_API.sBlockCasings4, (byte) 2))))
- .build();
+ private static final IStructureDefinition<GT_MetaTileEntity_HeatExchanger> STRUCTURE_DEFINITION = StructureDefinition.<GT_MetaTileEntity_HeatExchanger>builder()
+ .addShape(
+ STRUCTURE_PIECE_MAIN,
+ transpose(
+ new String[][] {
+ { "ccc", "cCc",
+ "ccc" },
+ { "ccc", "cPc",
+ "ccc" },
+ { "ccc", "cPc",
+ "ccc" },
+ { "c~c", "cHc",
+ "ccc" }, }))
+ .addElement(
+ 'P',
+ ofBlock(
+ GregTech_API.sBlockCasings2,
+ 14))
+ .addElement(
+ 'C',
+ OutputHatch.withAdder(
+ GT_MetaTileEntity_HeatExchanger::addColdFluidOutputToMachineList)
+ .withCount(
+ t -> isValidMetaTileEntity(
+ t.mOutputColdFluidHatch)
+ ? 1
+ : 0)
+ .newAny(
+ CASING_INDEX,
+ 3))
+ .addElement(
+ 'H',
+ OutputHatch.withAdder(
+ GT_MetaTileEntity_HeatExchanger::addHotFluidInputToMachineList)
+ .withCount(
+ t -> isValidMetaTileEntity(
+ t.mInputHotFluidHatch)
+ ? 1
+ : 0)
+ .newAny(
+ CASING_INDEX,
+ 3))
+ .addElement(
+ 'c',
+ buildHatchAdder(
+ GT_MetaTileEntity_HeatExchanger.class).atLeast(
+ InputBus,
+ InputHatch,
+ OutputBus,
+ OutputHatch,
+ Maintenance)
+ .casingIndex(
+ CASING_INDEX)
+ .dot(
+ 1)
+ .buildAndChain(
+ onElementPass(
+ GT_MetaTileEntity_HeatExchanger::onCasingAdded,
+ ofBlock(
+ GregTech_API.sBlockCasings4,
+ (byte) 2))))
+ .build();
public static float penalty_per_config = 0.015f; // penalize 1.5% efficiency per circuitry level (1-25)
private GT_MetaTileEntity_Hatch_Input mInputHotFluidHatch;
@@ -93,17 +128,24 @@ public class GT_MetaTileEntity_HeatExchanger extends
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
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")
- .addCasingInfoRange("Stable Titanium Machine Casing", 20, 32, false)
- .addOtherStructurePart("Titanium Pipe Casing", "Center 2 blocks").addMaintenanceHatch("Any casing", 1)
- .addInputHatch("Hot fluid, bottom center", 2).addInputHatch("Distilled water, any casing", 1)
- .addOutputHatch("Cold fluid, top center", 3).addOutputHatch("Steam/SH Steam, any casing", 1)
- .toolTipFinisher("Gregtech");
+ 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")
+ .addCasingInfoRange("Stable Titanium Machine Casing", 20, 32, false)
+ .addOtherStructurePart("Titanium Pipe Casing", "Center 2 blocks")
+ .addMaintenanceHatch("Any casing", 1)
+ .addInputHatch("Hot fluid, bottom center", 2)
+ .addInputHatch("Distilled water, any casing", 1)
+ .addOutputHatch("Cold fluid, top center", 3)
+ .addOutputHatch("Steam/SH Steam, any casing", 1)
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -125,13 +167,26 @@ public class GT_MetaTileEntity_HeatExchanger extends
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
- if (aActive) return new ITexture[] { casingTexturePages[0][CASING_INDEX],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_HEAT_EXCHANGER_ACTIVE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_HEAT_EXCHANGER_ACTIVE_GLOW).extFacing().glow()
- .build() };
- return new ITexture[] { casingTexturePages[0][CASING_INDEX],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_HEAT_EXCHANGER).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_HEAT_EXCHANGER_GLOW).extFacing().glow().build() };
+ if (aActive) return new ITexture[] { casingTexturePages[0][CASING_INDEX], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_HEAT_EXCHANGER_ACTIVE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_HEAT_EXCHANGER_ACTIVE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
+ return new ITexture[] { casingTexturePages[0][CASING_INDEX], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_HEAT_EXCHANGER)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_HEAT_EXCHANGER_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
}
return new ITexture[] { casingTexturePages[0][CASING_INDEX] };
}
@@ -162,7 +217,8 @@ public class GT_MetaTileEntity_HeatExchanger extends
boolean do_solarSalt = false;
// Do we have an integrated circuit with a valid configuration?
- if (mInventory[1] != null && mInventory[1].getUnlocalizedName().startsWith("gt.integrated_circuit")) {
+ if (mInventory[1] != null && mInventory[1].getUnlocalizedName()
+ .startsWith("gt.integrated_circuit")) {
int circuit_config = mInventory[1].getItemDamage();
if (circuit_config >= 1 && circuit_config <= 25) {
// If so, apply the penalty and reduced threshold.
@@ -177,19 +233,26 @@ public class GT_MetaTileEntity_HeatExchanger extends
steam_output_multiplier /= 5f; // lava is not boosted
superheated_threshold /= 4f; // unchanged
do_lava = true;
- } else if (mInputHotFluidHatch.getFluid().isFluidEqual(FluidRegistry.getFluidStack("ic2hotcoolant", 1))) {
- steam_output_multiplier /= 2f; // was boosted x2 on top of x5 -> total x10 -> nerf with this code back to 5x
- superheated_threshold /= 5f; // 10x smaller since the Hot Things production in reactor is the same.
- do_coolant = true;
- } else if (mInputHotFluidHatch.getFluid().isFluidEqual(FluidRegistry.getFluidStack("molten.solarsalthot", 1))) {
- steam_output_multiplier *= 2.5f; // Solar Salt:Steam value is 5x higher than Hot Coolant's value
- superheated_threshold /= 25f; // Given that, multiplier is 5x higher and threshold is 5x lower
- do_solarSalt = true;
- } else {
- // If we're working with neither, fail out
- superheated_threshold = 0;
- return false;
- }
+ } else if (mInputHotFluidHatch.getFluid()
+ .isFluidEqual(FluidRegistry.getFluidStack("ic2hotcoolant", 1))) {
+ steam_output_multiplier /= 2f; // was boosted x2 on top of x5 -> total x10 ->
+ // nerf with this code back to 5x
+ superheated_threshold /= 5f; // 10x smaller since the Hot Things production in
+ // reactor is the same.
+ do_coolant = true;
+ } else
+ if (mInputHotFluidHatch.getFluid()
+ .isFluidEqual(FluidRegistry.getFluidStack("molten.solarsalthot", 1))) {
+ steam_output_multiplier *= 2.5f; // Solar Salt:Steam value is 5x higher than Hot
+ // Coolant's value
+ superheated_threshold /= 25f; // Given that, multiplier is 5x higher and
+ // threshold is 5x lower
+ do_solarSalt = true;
+ } else {
+ // If we're working with neither, fail out
+ superheated_threshold = 0;
+ return false;
+ }
superheated = fluidAmountToConsume >= superheated_threshold; // set the internal superheated flag if we have
// enough hot fluid. Used in the
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 ca9c31f350..fede7c283d 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
@@ -43,13 +43,21 @@ public class GT_MetaTileEntity_ImplosionCompressor
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
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(getPollutionPerSecond(null)).addSeparator().beginStructureBlock(3, 3, 3, true)
- .addController("Front center").addCasingInfoRange("Solid Steel Machine Casing", 16, 24, false)
- .addStructureInfo("Casings can be replaced with Explosion Warning Signs")
- .addEnergyHatch("Any casing", 1).addMaintenanceHatch("Any casing", 1).addMufflerHatch("Any casing", 1)
- .addInputBus("Any casing", 1).addOutputBus("Any casing", 1).toolTipFinisher("Gregtech");
+ tt.addMachineType("Implosion Compressor")
+ .addInfo("Explosions are fun")
+ .addInfo("Controller block for the Implosion Compressor")
+ .addPollutionAmount(getPollutionPerSecond(null))
+ .addSeparator()
+ .beginStructureBlock(3, 3, 3, true)
+ .addController("Front center")
+ .addCasingInfoRange("Solid Steel Machine Casing", 16, 24, false)
+ .addStructureInfo("Casings can be replaced with Explosion Warning Signs")
+ .addEnergyHatch("Any casing", 1)
+ .addMaintenanceHatch("Any casing", 1)
+ .addMufflerHatch("Any casing", 1)
+ .addInputBus("Any casing", 1)
+ .addOutputBus("Any casing", 1)
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -63,14 +71,26 @@ public class GT_MetaTileEntity_ImplosionCompressor
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
- if (aActive) return new ITexture[] { BlockIcons.casingTexturePages[0][16],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_IMPLOSION_COMPRESSOR_ACTIVE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_IMPLOSION_COMPRESSOR_ACTIVE_GLOW).extFacing().glow()
- .build() };
- return new ITexture[] { BlockIcons.casingTexturePages[0][16],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_IMPLOSION_COMPRESSOR).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_IMPLOSION_COMPRESSOR_GLOW).extFacing().glow()
- .build() };
+ if (aActive) return new ITexture[] { BlockIcons.casingTexturePages[0][16], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_IMPLOSION_COMPRESSOR_ACTIVE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_IMPLOSION_COMPRESSOR_ACTIVE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
+ return new ITexture[] { BlockIcons.casingTexturePages[0][16], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_IMPLOSION_COMPRESSOR)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_IMPLOSION_COMPRESSOR_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
}
return new ITexture[] { Textures.BlockIcons.casingTexturePages[0][16] };
}
@@ -105,8 +125,12 @@ public class GT_MetaTileEntity_ImplosionCompressor
}
ItemStack[] tInputs = tInputList.toArray(new ItemStack[0]);
if (!tInputList.isEmpty()) {
- GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sImplosionRecipes
- .findRecipe(getBaseMetaTileEntity(), false, 9223372036854775807L, null, tInputs);
+ GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sImplosionRecipes.findRecipe(
+ getBaseMetaTileEntity(),
+ false,
+ 9223372036854775807L,
+ null,
+ tInputs);
if ((tRecipe != null) && (tRecipe.isRecipeInputEqual(true, null, tInputs))) {
this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
this.mEfficiencyIncrease = 10000;
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_IntegratedOreFactory.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_IntegratedOreFactory.java
index dc186dadeb..832d376dc6 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_IntegratedOreFactory.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_IntegratedOreFactory.java
@@ -54,65 +54,184 @@ public class GT_MetaTileEntity_IntegratedOreFactory
private static final int CASING_INDEX2 = 49;
private static final int MAX_PARA = 1024;
private static final String STRUCTURE_PIECE_MAIN = "main";
- private static final IStructureDefinition<GT_MetaTileEntity_IntegratedOreFactory> STRUCTURE_DEFINITION = StructureDefinition
- .<GT_MetaTileEntity_IntegratedOreFactory>builder()
- .addShape(
- STRUCTURE_PIECE_MAIN,
- transpose(
- new String[][] {
- { " ", " ", " WWW ", " WWW ", " ",
- " " },
- { " ", " sss ", " sppps", " sppps", " sss ",
- " " },
- { " ", " sss ", " s s", " s s", " sss ",
- " " },
- { " ", " sss ", " sppps", " sppps", " sss ",
- " " },
- { " ", " sss ", " s s", " s s", " sss ",
- " " },
- { " ", " sss ", " sppps", " sppps", " sss ",
- " " },
- { "iiiiii ", "iIIIIiisssi", "iIIIIis s", "iIIIIis s", "iIIIIiisssi",
- "iiiiii " },
- { "iggggi ", "gt t isssi", "g xx sppps", "g xx sppps", "gt t isssi",
- "iggggi " },
- { "iggggi ", "gt t isssi", "g xx s s", "g xx s s", "gt t isssi",
- "iggggi " },
- { "iggggi ", "gt t is~si", "g xx spppO", "g xx spppO", "gt t isssi",
- "iggggi " },
- { "iggggi ", "gt t isssi", "g xx s O", "g xx s O", "gt t isssi",
- "iggggi " },
- { "EEEEEE ", "EEEEEEEEEEE", "EEEEEEEEEEE", "EEEEEEEEEEE", "EEEEEEEEEEE",
- "EEEEEE " } }))
- .addElement('i', ofBlock(GregTech_API.sBlockCasings8, 7))
- .addElement('s', ofBlock(GregTech_API.sBlockCasings4, 1))
- .addElement(
- 'g',
- ofChain(
- ofBlockUnlocalizedName("IC2", "blockAlloyGlass", 0, true),
- ofBlockUnlocalizedName("bartworks", "BW_GlasBlocks", 0, true),
- ofBlockUnlocalizedName("bartworks", "BW_GlasBlocks2", 0, true),
- // warded glass
- ofBlockUnlocalizedName("Thaumcraft", "blockCosmeticOpaque", 2, false)))
- .addElement('x', ofBlock(GregTech_API.sBlockCasings2, 3))
- .addElement('p', ofBlock(GregTech_API.sBlockCasings2, 15)).addElement('t', ofFrame(Materials.TungstenSteel))
- .addElement(
- 'E',
- buildHatchAdder(GT_MetaTileEntity_IntegratedOreFactory.class).atLeast(Energy, Maintenance)
- .casingIndex(CASING_INDEX1).dot(1).buildAndChain(GregTech_API.sBlockCasings8, 7))
- .addElement(
- 'I',
- buildHatchAdder(GT_MetaTileEntity_IntegratedOreFactory.class).atLeast(InputBus)
- .casingIndex(CASING_INDEX1).dot(2).buildAndChain(GregTech_API.sBlockCasings8, 7))
- .addElement(
- 'W',
- buildHatchAdder(GT_MetaTileEntity_IntegratedOreFactory.class).atLeast(InputHatch, Muffler)
- .casingIndex(CASING_INDEX2).dot(3).buildAndChain(GregTech_API.sBlockCasings4, 1))
- .addElement(
- 'O',
- buildHatchAdder(GT_MetaTileEntity_IntegratedOreFactory.class).atLeast(OutputBus, OutputHatch)
- .casingIndex(CASING_INDEX2).dot(4).buildAndChain(GregTech_API.sBlockCasings4, 1))
- .build();
+ private static final IStructureDefinition<GT_MetaTileEntity_IntegratedOreFactory> STRUCTURE_DEFINITION = StructureDefinition.<GT_MetaTileEntity_IntegratedOreFactory>builder()
+ .addShape(
+ STRUCTURE_PIECE_MAIN,
+ transpose(
+ new String[][] {
+ { " ",
+ " ",
+ " WWW ",
+ " WWW ",
+ " ",
+ " " },
+ { " ",
+ " sss ",
+ " sppps",
+ " sppps",
+ " sss ",
+ " " },
+ { " ",
+ " sss ",
+ " s s",
+ " s s",
+ " sss ",
+ " " },
+ { " ",
+ " sss ",
+ " sppps",
+ " sppps",
+ " sss ",
+ " " },
+ { " ",
+ " sss ",
+ " s s",
+ " s s",
+ " sss ",
+ " " },
+ { " ",
+ " sss ",
+ " sppps",
+ " sppps",
+ " sss ",
+ " " },
+ { "iiiiii ",
+ "iIIIIiisssi",
+ "iIIIIis s",
+ "iIIIIis s",
+ "iIIIIiisssi",
+ "iiiiii " },
+ { "iggggi ",
+ "gt t isssi",
+ "g xx sppps",
+ "g xx sppps",
+ "gt t isssi",
+ "iggggi " },
+ { "iggggi ",
+ "gt t isssi",
+ "g xx s s",
+ "g xx s s",
+ "gt t isssi",
+ "iggggi " },
+ { "iggggi ",
+ "gt t is~si",
+ "g xx spppO",
+ "g xx spppO",
+ "gt t isssi",
+ "iggggi " },
+ { "iggggi ",
+ "gt t isssi",
+ "g xx s O",
+ "g xx s O",
+ "gt t isssi",
+ "iggggi " },
+ { "EEEEEE ",
+ "EEEEEEEEEEE",
+ "EEEEEEEEEEE",
+ "EEEEEEEEEEE",
+ "EEEEEEEEEEE",
+ "EEEEEE " } }))
+ .addElement(
+ 'i',
+ ofBlock(
+ GregTech_API.sBlockCasings8,
+ 7))
+ .addElement(
+ 's',
+ ofBlock(
+ GregTech_API.sBlockCasings4,
+ 1))
+ .addElement(
+ 'g',
+ ofChain(
+ ofBlockUnlocalizedName(
+ "IC2",
+ "blockAlloyGlass",
+ 0,
+ true),
+ ofBlockUnlocalizedName(
+ "bartworks",
+ "BW_GlasBlocks",
+ 0,
+ true),
+ ofBlockUnlocalizedName(
+ "bartworks",
+ "BW_GlasBlocks2",
+ 0,
+ true),
+ // warded
+ // glass
+ ofBlockUnlocalizedName(
+ "Thaumcraft",
+ "blockCosmeticOpaque",
+ 2,
+ false)))
+ .addElement(
+ 'x',
+ ofBlock(
+ GregTech_API.sBlockCasings2,
+ 3))
+ .addElement(
+ 'p',
+ ofBlock(
+ GregTech_API.sBlockCasings2,
+ 15))
+ .addElement(
+ 't',
+ ofFrame(
+ Materials.TungstenSteel))
+ .addElement(
+ 'E',
+ buildHatchAdder(
+ GT_MetaTileEntity_IntegratedOreFactory.class).atLeast(
+ Energy,
+ Maintenance)
+ .casingIndex(
+ CASING_INDEX1)
+ .dot(
+ 1)
+ .buildAndChain(
+ GregTech_API.sBlockCasings8,
+ 7))
+ .addElement(
+ 'I',
+ buildHatchAdder(
+ GT_MetaTileEntity_IntegratedOreFactory.class).atLeast(
+ InputBus)
+ .casingIndex(
+ CASING_INDEX1)
+ .dot(
+ 2)
+ .buildAndChain(
+ GregTech_API.sBlockCasings8,
+ 7))
+ .addElement(
+ 'W',
+ buildHatchAdder(
+ GT_MetaTileEntity_IntegratedOreFactory.class).atLeast(
+ InputHatch,
+ Muffler)
+ .casingIndex(
+ CASING_INDEX2)
+ .dot(
+ 3)
+ .buildAndChain(
+ GregTech_API.sBlockCasings4,
+ 1))
+ .addElement(
+ 'O',
+ buildHatchAdder(
+ GT_MetaTileEntity_IntegratedOreFactory.class).atLeast(
+ OutputBus,
+ OutputHatch)
+ .casingIndex(
+ CASING_INDEX2)
+ .dot(
+ 4)
+ .buildAndChain(
+ GregTech_API.sBlockCasings4,
+ 1))
+ .build();
private static final HashSet<Integer> isCrushedOre = new HashSet<>();
private static final HashSet<Integer> isCrushedPureOre = new HashSet<>();
@@ -188,20 +307,31 @@ public class GT_MetaTileEntity_IntegratedOreFactory
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Ore Processor").addInfo("Controller Block for the Integrated Ore Factory")
- .addInfo("It is OP. I mean ore processor.").addInfo("Do all ore procession in one step.")
- .addInfo("Can process up to 1024 ores per time.")
- .addInfo("Every ore costs 30EU/t, 2L lubricant, 200L distilled water.")
- .addInfo("Process time is depend on mode.").addInfo("Use a screwdriver to switch mode.")
- .addInfo("Sneak click with screwdriver to void the stone dusts.").addSeparator()
- .beginStructureBlock(6, 12, 11, false).addController("The third layer")
- .addStructureInfo("128 advanced iridium plated machine casing")
- .addStructureInfo("105 clean stainless steel machine casing").addStructureInfo("48 reinforced glass")
- .addStructureInfo("30 tungstensteel pipe casing").addStructureInfo("16 tungstensteel frame box")
- .addStructureInfo("16 steel gear box casing").addEnergyHatch("Button Casing", 1)
- .addMaintenanceHatch("Button Casing", 1).addInputBus("Input ore/crushed ore", 2)
- .addInputHatch("Input lubricant/distilled water/washing chemicals", 3)
- .addMufflerHatch("Output Pollution", 3).addOutputBus("Output products", 4).toolTipFinisher("Gregtech");
+ tt.addMachineType("Ore Processor")
+ .addInfo("Controller Block for the Integrated Ore Factory")
+ .addInfo("It is OP. I mean ore processor.")
+ .addInfo("Do all ore procession in one step.")
+ .addInfo("Can process up to 1024 ores per time.")
+ .addInfo("Every ore costs 30EU/t, 2L lubricant, 200L distilled water.")
+ .addInfo("Process time is depend on mode.")
+ .addInfo("Use a screwdriver to switch mode.")
+ .addInfo("Sneak click with screwdriver to void the stone dusts.")
+ .addSeparator()
+ .beginStructureBlock(6, 12, 11, false)
+ .addController("The third layer")
+ .addStructureInfo("128 advanced iridium plated machine casing")
+ .addStructureInfo("105 clean stainless steel machine casing")
+ .addStructureInfo("48 reinforced glass")
+ .addStructureInfo("30 tungstensteel pipe casing")
+ .addStructureInfo("16 tungstensteel frame box")
+ .addStructureInfo("16 steel gear box casing")
+ .addEnergyHatch("Button Casing", 1)
+ .addMaintenanceHatch("Button Casing", 1)
+ .addInputBus("Input ore/crushed ore", 2)
+ .addInputHatch("Input lubricant/distilled water/washing chemicals", 3)
+ .addMufflerHatch("Output Pollution", 3)
+ .addOutputBus("Output products", 4)
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -399,8 +529,12 @@ public class GT_MetaTileEntity_IntegratedOreFactory
for (ItemStack aStack : sMidProduct) {
int tID = GT_Utility.stackToInt(aStack);
if (checkTypes(tID, aTables)) {
- GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sMaceratorRecipes
- .findRecipe(getBaseMetaTileEntity(), false, GT_Values.V[15], null, aStack);
+ GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sMaceratorRecipes.findRecipe(
+ getBaseMetaTileEntity(),
+ false,
+ GT_Values.V[15],
+ null,
+ aStack);
if (tRecipe != null) {
tProduct.addAll(getOutputStack(tRecipe, aStack.stackSize));
} else {
@@ -447,8 +581,12 @@ public class GT_MetaTileEntity_IntegratedOreFactory
for (ItemStack aStack : sMidProduct) {
int tID = GT_Utility.stackToInt(aStack);
if (checkTypes(tID, aTables)) {
- GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sThermalCentrifugeRecipes
- .findRecipe(getBaseMetaTileEntity(), false, GT_Values.V[15], null, aStack);
+ GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sThermalCentrifugeRecipes.findRecipe(
+ getBaseMetaTileEntity(),
+ false,
+ GT_Values.V[15],
+ null,
+ aStack);
if (tRecipe != null) {
tProduct.addAll(getOutputStack(tRecipe, aStack.stackSize));
} else {
@@ -469,8 +607,12 @@ public class GT_MetaTileEntity_IntegratedOreFactory
for (ItemStack aStack : sMidProduct) {
int tID = GT_Utility.stackToInt(aStack);
if (checkTypes(tID, aTables)) {
- GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes
- .findRecipe(getBaseMetaTileEntity(), false, GT_Values.V[15], null, aStack);
+ GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.findRecipe(
+ getBaseMetaTileEntity(),
+ false,
+ GT_Values.V[15],
+ null,
+ aStack);
if (tRecipe != null) {
tProduct.addAll(getOutputStack(tRecipe, aStack.stackSize));
} else {
@@ -491,8 +633,12 @@ public class GT_MetaTileEntity_IntegratedOreFactory
for (ItemStack aStack : sMidProduct) {
int tID = GT_Utility.stackToInt(aStack);
if (checkTypes(tID, aTables)) {
- GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sSifterRecipes
- .findRecipe(getBaseMetaTileEntity(), false, GT_Values.V[15], null, aStack);
+ GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sSifterRecipes.findRecipe(
+ getBaseMetaTileEntity(),
+ false,
+ GT_Values.V[15],
+ null,
+ aStack);
if (tRecipe != null) {
tProduct.addAll(getOutputStack(tRecipe, aStack.stackSize));
} else {
@@ -520,7 +666,8 @@ public class GT_MetaTileEntity_IntegratedOreFactory
getStoredFluids().toArray(new FluidStack[0]),
aStack);
if (tRecipe != null && tRecipe.getRepresentativeFluidInput(0) != null) {
- FluidStack tInputFluid = tRecipe.getRepresentativeFluidInput(0).copy();
+ FluidStack tInputFluid = tRecipe.getRepresentativeFluidInput(0)
+ .copy();
int tStored = getFluidAmount(tInputFluid);
int tWashed = Math.min(tStored / tInputFluid.amount, aStack.stackSize);
depleteInput(new FluidStack(tInputFluid.getFluid(), tWashed * tInputFluid.amount));
@@ -569,7 +716,9 @@ public class GT_MetaTileEntity_IntegratedOreFactory
GT_Utility.copyAmountUnsafe(tAmount * aRecipe.getOutput(i).stackSize, aRecipe.getOutput(i)));
}
}
- return tOutput.stream().filter(i -> (i != null && i.stackSize > 0)).collect(Collectors.toList());
+ return tOutput.stream()
+ .filter(i -> (i != null && i.stackSize > 0))
+ .collect(Collectors.toList());
}
private void doCompress(List<ItemStack> aList) {
@@ -655,12 +804,25 @@ public class GT_MetaTileEntity_IntegratedOreFactory
boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
if (aActive) return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(CASING_INDEX2),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_PROCESSING_ARRAY_ACTIVE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_PROCESSING_ARRAY_ACTIVE_GLOW).extFacing().glow()
- .build() };
- return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(CASING_INDEX2),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_PROCESSING_ARRAY).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_PROCESSING_ARRAY_GLOW).extFacing().glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_PROCESSING_ARRAY_ACTIVE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_PROCESSING_ARRAY_ACTIVE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
+ return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(CASING_INDEX2), TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_PROCESSING_ARRAY)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_PROCESSING_ARRAY_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
}
return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(CASING_INDEX2) };
}
@@ -669,13 +831,13 @@ public class GT_MetaTileEntity_IntegratedOreFactory
final EnumChatFormatting AQUA = EnumChatFormatting.AQUA;
final String CRUSH = StatCollector.translateToLocalFormatted("GT5U.machines.oreprocessor.Macerate");
final String WASH = StatCollector.translateToLocalFormatted("GT5U.machines.oreprocessor.Ore_Washer")
- .replace(" ", " " + AQUA);
+ .replace(" ", " " + AQUA);
final String THERMAL = StatCollector.translateToLocalFormatted("GT5U.machines.oreprocessor.Thermal_Centrifuge")
- .replace(" ", " " + AQUA);
+ .replace(" ", " " + AQUA);
final String CENTRIFUGE = StatCollector.translateToLocalFormatted("GT5U.machines.oreprocessor.Centrifuge");
final String SIFTER = StatCollector.translateToLocalFormatted("GT5U.machines.oreprocessor.Sifter");
final String CHEM_WASH = StatCollector.translateToLocalFormatted("GT5U.machines.oreprocessor.Chemical_Bathing")
- .replace(" ", " " + AQUA);
+ .replace(" ", " " + AQUA);
final String ARROW = " " + AQUA + "-> ";
List<String> des = new ArrayList<>();
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 6bd2da57db..d6fdc56854 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
@@ -51,30 +51,47 @@ public abstract class GT_MetaTileEntity_LargeBoiler extends
@Override
protected IStructureDefinition<GT_MetaTileEntity_LargeBoiler> computeValue(Class<?> type) {
- return StructureDefinition.<GT_MetaTileEntity_LargeBoiler>builder().addShape(
- STRUCTURE_PIECE_MAIN,
- transpose(
- new String[][] { { "ccc", "ccc", "ccc" }, { "ccc", "cPc", "ccc" }, { "ccc", "cPc", "ccc" },
- { "ccc", "cPc", "ccc" }, { "f~f", "fff", "fff" }, }))
- .addElement('P', lazy(t -> ofBlock(t.getPipeBlock(), t.getPipeMeta())))
- .addElement(
- 'c',
- lazy(
- t -> buildHatchAdder(GT_MetaTileEntity_LargeBoiler.class).atLeast(OutputHatch)
- .casingIndex(t.getCasingTextureIndex()).dot(2).buildAndChain(
- onElementPass(
- GT_MetaTileEntity_LargeBoiler::onCasingAdded,
- ofBlock(t.getCasingBlock(), t.getCasingMeta())))))
- .addElement(
- 'f',
- lazy(
- t -> buildHatchAdder(GT_MetaTileEntity_LargeBoiler.class)
- .atLeast(Maintenance, InputHatch, InputBus, Muffler)
- .casingIndex(t.getFireboxTextureIndex()).dot(1).buildAndChain(
- onElementPass(
- GT_MetaTileEntity_LargeBoiler::onFireboxAdded,
- ofBlock(t.getFireboxBlock(), t.getFireboxMeta())))))
- .build();
+ return StructureDefinition.<GT_MetaTileEntity_LargeBoiler>builder()
+ .addShape(
+ STRUCTURE_PIECE_MAIN,
+ transpose(
+ new String[][] { { "ccc", "ccc", "ccc" }, { "ccc", "cPc", "ccc" },
+ { "ccc", "cPc", "ccc" }, { "ccc", "cPc", "ccc" },
+ { "f~f", "fff", "fff" }, }))
+ .addElement('P', lazy(t -> ofBlock(t.getPipeBlock(), t.getPipeMeta())))
+ .addElement(
+ 'c',
+ lazy(
+ t -> buildHatchAdder(
+ GT_MetaTileEntity_LargeBoiler.class).atLeast(OutputHatch)
+ .casingIndex(
+ t.getCasingTextureIndex())
+ .dot(2)
+ .buildAndChain(
+ onElementPass(
+ GT_MetaTileEntity_LargeBoiler::onCasingAdded,
+ ofBlock(
+ t.getCasingBlock(),
+ t.getCasingMeta())))))
+ .addElement(
+ 'f',
+ lazy(
+ t -> buildHatchAdder(
+ GT_MetaTileEntity_LargeBoiler.class).atLeast(
+ Maintenance,
+ InputHatch,
+ InputBus,
+ Muffler)
+ .casingIndex(
+ t.getFireboxTextureIndex())
+ .dot(1)
+ .buildAndChain(
+ onElementPass(
+ GT_MetaTileEntity_LargeBoiler::onFireboxAdded,
+ ofBlock(
+ t.getFireboxBlock(),
+ t.getFireboxMeta())))))
+ .build();
}
};
private boolean firstRun = true;
@@ -99,7 +116,8 @@ public abstract class GT_MetaTileEntity_LargeBoiler extends
protected GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Boiler").addInfo("Controller block for the Large " + getCasingMaterial() + " Boiler");
+ tt.addMachineType("Boiler")
+ .addInfo("Controller block for the Large " + getCasingMaterial() + " Boiler");
// Tooltip differs between the boilers that output Superheated Steam (Titanium and Tungstensteel) and the ones
// that do not (Bronze and Steel)
if (isSuperheated()) {
@@ -108,31 +126,37 @@ public abstract class GT_MetaTileEntity_LargeBoiler extends
+ "L of Superheated Steam with 1 Coal at "
+ formatNumbers((getEUt() * 40L) / superToNormalSteam)
+ "L/s") // ?
- .addInfo("A programmed circuit in the main block throttles the boiler (-1000L/s per config)")
- .addInfo("Only some solid fuels are allowed (check the NEI Large Boiler tab for details)")
- .addInfo("If there are any disallowed fuels in the input bus, the boiler won't run!");
+ .addInfo("A programmed circuit in the main block throttles the boiler (-1000L/s per config)")
+ .addInfo("Only some solid fuels are allowed (check the NEI Large Boiler tab for details)")
+ .addInfo("If there are any disallowed fuels in the input bus, the boiler won't run!");
} else {
tt.addInfo(
"Produces " + formatNumbers((getEUt() * 40) * (runtimeBoost(20) / 20f))
+ "L of Steam with 1 Coal at "
+ formatNumbers(getEUt() * 40)
+ "L/s") // ?
- .addInfo("A programmed circuit in the main block throttles the boiler (-1000L/s per config)")
- .addInfo("Solid Fuels with a burn value that is too high or too low will not work");
+ .addInfo("A programmed circuit in the main block throttles the boiler (-1000L/s per config)")
+ .addInfo("Solid Fuels with a burn value that is too high or too low will not work");
}
tt.addInfo(
String.format(
"Diesel fuels have 1/4 efficiency - Takes %s seconds to heat up",
formatNumbers(500.0 / getEfficiencyIncrease()))) // ? check semifluid again
- .addPollutionAmount(getPollutionPerSecond(null)).addSeparator().beginStructureBlock(3, 5, 3, false)
- .addController("Front bottom")
- .addCasingInfoRange(getCasingMaterial() + " " + getCasingBlockType() + " Casing", 24, 31, false) // ?
- .addOtherStructurePart(getCasingMaterial() + " Fire Boxes", "Bottom layer, 3 minimum")
- .addOtherStructurePart(getCasingMaterial() + " Pipe Casing Blocks", "Inner 3 blocks")
- .addMaintenanceHatch("Any firebox", 1).addMufflerHatch("Any firebox", 1)
- .addInputBus("Solid fuel, Any firebox", 1).addInputHatch("Liquid fuel, Any firebox", 1)
- .addStructureInfo("You can use either, or both").addInputHatch("Water, Any firebox", 1)
- .addOutputHatch("Steam, any casing", 2).toolTipFinisher("Gregtech");
+ .addPollutionAmount(getPollutionPerSecond(null))
+ .addSeparator()
+ .beginStructureBlock(3, 5, 3, false)
+ .addController("Front bottom")
+ .addCasingInfoRange(getCasingMaterial() + " " + getCasingBlockType() + " Casing", 24, 31, false) // ?
+ .addOtherStructurePart(getCasingMaterial() + " Fire Boxes", "Bottom layer, 3 minimum")
+ .addOtherStructurePart(getCasingMaterial() + " Pipe Casing Blocks", "Inner 3 blocks")
+ .addMaintenanceHatch("Any firebox", 1)
+ .addMufflerHatch("Any firebox", 1)
+ .addInputBus("Solid fuel, Any firebox", 1)
+ .addInputHatch("Liquid fuel, Any firebox", 1)
+ .addStructureInfo("You can use either, or both")
+ .addInputHatch("Water, Any firebox", 1)
+ .addOutputHatch("Steam, any casing", 2)
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -179,12 +203,25 @@ public abstract class GT_MetaTileEntity_LargeBoiler extends
boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
if (aActive) return new ITexture[] { BlockIcons.getCasingTextureForId(getCasingTextureIndex()),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_LARGE_BOILER_ACTIVE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_LARGE_BOILER_ACTIVE_GLOW).extFacing().glow()
- .build() };
- return new ITexture[] { BlockIcons.getCasingTextureForId(getCasingTextureIndex()),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_LARGE_BOILER).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_LARGE_BOILER_GLOW).extFacing().glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_LARGE_BOILER_ACTIVE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_LARGE_BOILER_ACTIVE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
+ return new ITexture[] { BlockIcons.getCasingTextureForId(getCasingTextureIndex()), TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_LARGE_BOILER)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_LARGE_BOILER_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
}
return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(getCasingTextureIndex()) };
}
@@ -379,7 +416,8 @@ public abstract class GT_MetaTileEntity_LargeBoiler extends
if (mProgresstime > 0 && firstRun) {
firstRun = false;
GT_Mod.achievements.issueAchievement(
- aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()),
+ aBaseMetaTileEntity.getWorld()
+ .getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()),
"extremepressure");
}
super.onPostTick(aBaseMetaTileEntity, aTick);
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 70d9250206..4c717a85a8 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
@@ -43,32 +43,64 @@ public class GT_MetaTileEntity_LargeChemicalReactor
private static final int CASING_INDEX = 176;
private static final String STRUCTURE_PIECE_MAIN = "main";
- private static final IStructureDefinition<GT_MetaTileEntity_LargeChemicalReactor> STRUCTURE_DEFINITION = StructureDefinition
- .<GT_MetaTileEntity_LargeChemicalReactor>builder()
- .addShape(
- STRUCTURE_PIECE_MAIN,
- transpose(
- new String[][] { { "ccc", "cxc", "ccc" }, { "c~c", "xPx", "cxc" },
- { "ccc", "cxc", "ccc" }, }))
- .addElement('P', ofBlock(GregTech_API.sBlockCasings8, 1))
- .addElement(
- 'c',
- buildHatchAdder(GT_MetaTileEntity_LargeChemicalReactor.class)
- .atLeast(InputHatch, OutputHatch, InputBus, OutputBus, Maintenance, Energy)
- .casingIndex(CASING_INDEX).dot(1).buildAndChain(
- onElementPass(
- GT_MetaTileEntity_LargeChemicalReactor::onCasingAdded,
- ofBlock(GregTech_API.sBlockCasings8, 0))))
- .addElement(
- 'x',
- buildHatchAdder(GT_MetaTileEntity_LargeChemicalReactor.class)
- .atLeast(InputHatch, OutputHatch, InputBus, OutputBus, Maintenance, Energy)
- .casingIndex(CASING_INDEX).dot(1).buildAndChain(
- CoilStructureElement.INSTANCE,
- onElementPass(
- GT_MetaTileEntity_LargeChemicalReactor::onCasingAdded,
- ofBlock(GregTech_API.sBlockCasings8, 0))))
- .build();
+ private static final IStructureDefinition<GT_MetaTileEntity_LargeChemicalReactor> STRUCTURE_DEFINITION = StructureDefinition.<GT_MetaTileEntity_LargeChemicalReactor>builder()
+ .addShape(
+ STRUCTURE_PIECE_MAIN,
+ transpose(
+ new String[][] {
+ { "ccc", "cxc",
+ "ccc" },
+ { "c~c", "xPx",
+ "cxc" },
+ { "ccc", "cxc",
+ "ccc" }, }))
+ .addElement(
+ 'P',
+ ofBlock(
+ GregTech_API.sBlockCasings8,
+ 1))
+ .addElement(
+ 'c',
+ buildHatchAdder(
+ GT_MetaTileEntity_LargeChemicalReactor.class).atLeast(
+ InputHatch,
+ OutputHatch,
+ InputBus,
+ OutputBus,
+ Maintenance,
+ Energy)
+ .casingIndex(
+ CASING_INDEX)
+ .dot(
+ 1)
+ .buildAndChain(
+ onElementPass(
+ GT_MetaTileEntity_LargeChemicalReactor::onCasingAdded,
+ ofBlock(
+ GregTech_API.sBlockCasings8,
+ 0))))
+ .addElement(
+ 'x',
+ buildHatchAdder(
+ GT_MetaTileEntity_LargeChemicalReactor.class).atLeast(
+ InputHatch,
+ OutputHatch,
+ InputBus,
+ OutputBus,
+ Maintenance,
+ Energy)
+ .casingIndex(
+ CASING_INDEX)
+ .dot(
+ 1)
+ .buildAndChain(
+ CoilStructureElement.INSTANCE,
+ onElementPass(
+ GT_MetaTileEntity_LargeChemicalReactor::onCasingAdded,
+ ofBlock(
+ GregTech_API.sBlockCasings8,
+ 0))))
+ .build();
private int mCasingAmount;
private int mCoilAmount;
@@ -89,16 +121,24 @@ public class GT_MetaTileEntity_LargeChemicalReactor
@Override
public GT_Multiblock_Tooltip_Builder createTooltip() {
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")
- .addCasingInfoRange("Chemically Inert Machine Casing", 8, 22, false)
- .addOtherStructurePart("PTFE Pipe Machine Casing", "Center")
- .addOtherStructurePart("Heating Coil", "Adjacent to the PTFE Pipe Machine Casing", 1)
- .addEnergyHatch("Any casing", 1, 2).addMaintenanceHatch("Any casing", 1, 2)
- .addInputBus("Any casing", 1, 2).addInputHatch("Any casing", 1, 2).addOutputBus("Any casing", 1, 2)
- .addOutputHatch("Any casing", 1, 2).addStructureInfo("You can have multiple hatches/busses")
- .toolTipFinisher("Gregtech");
+ 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")
+ .addCasingInfoRange("Chemically Inert Machine Casing", 8, 22, false)
+ .addOtherStructurePart("PTFE Pipe Machine Casing", "Center")
+ .addOtherStructurePart("Heating Coil", "Adjacent to the PTFE Pipe Machine Casing", 1)
+ .addEnergyHatch("Any casing", 1, 2)
+ .addMaintenanceHatch("Any casing", 1, 2)
+ .addInputBus("Any casing", 1, 2)
+ .addInputHatch("Any casing", 1, 2)
+ .addOutputBus("Any casing", 1, 2)
+ .addOutputHatch("Any casing", 1, 2)
+ .addStructureInfo("You can have multiple hatches/busses")
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -106,14 +146,26 @@ public class GT_MetaTileEntity_LargeChemicalReactor
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
- if (aActive) return new ITexture[] { casingTexturePages[1][48],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR_ACTIVE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR_ACTIVE_GLOW).extFacing()
- .glow().build() };
- return new ITexture[] { casingTexturePages[1][48],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR_GLOW).extFacing().glow()
- .build() };
+ if (aActive) return new ITexture[] { casingTexturePages[1][48], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR_ACTIVE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR_ACTIVE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
+ return new ITexture[] { casingTexturePages[1][48], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
}
return new ITexture[] { casingTexturePages[1][48] };
}
@@ -159,7 +211,8 @@ public class GT_MetaTileEntity_LargeChemicalReactor
if (mLockedToSingleRecipe) {
// We're locked to a single recipe, but haven't built the recipe checker yet.
// Build the checker on next successful recipe.
- tSingleRecipeCheckBuilder = GT_Single_Recipe_Check.builder(this).setBefore();
+ tSingleRecipeCheckBuilder = GT_Single_Recipe_Check.builder(this)
+ .setBefore();
}
tRecipe = GT_Recipe.GT_Recipe_Map.sMultiblockChemicalRecipes.findRecipe(
@@ -175,7 +228,9 @@ public class GT_MetaTileEntity_LargeChemicalReactor
}
if (mLockedToSingleRecipe) {
- mSingleRecipeCheck = tSingleRecipeCheckBuilder.setAfter().setRecipe(tRecipe).build();
+ mSingleRecipeCheck = tSingleRecipeCheckBuilder.setAfter()
+ .setRecipe(tRecipe)
+ .build();
}
}
@@ -288,8 +343,9 @@ public class GT_MetaTileEntity_LargeChemicalReactor
GT_MetaTileEntity_LargeChemicalReactor gt_metaTileEntity_largeChemicalReactor, World world, int x,
int y, int z, ItemStack trigger, AutoPlaceEnvironment env) {
return BlocksToPlace.create(
- IntStream.range(0, 8).mapToObj(i -> new ItemStack(GregTech_API.sBlockCasings5, 1, i))
- .collect(Collectors.toList()));
+ IntStream.range(0, 8)
+ .mapToObj(i -> new ItemStack(GregTech_API.sBlockCasings5, 1, i))
+ .collect(Collectors.toList()));
}
@Override
@@ -298,7 +354,8 @@ public class GT_MetaTileEntity_LargeChemicalReactor
if (t.mCoilAmount > 0) return PlaceResult.SKIP;
if (check(t, world, x, y, z)) return PlaceResult.SKIP;
if (!StructureLibAPI.isBlockTriviallyReplaceable(world, x, y, z, env.getActor())) return PlaceResult.REJECT;
- ItemStack result = env.getSource().takeOne(ItemStackPredicate.from(GregTech_API.sBlockCasings5), true);
+ ItemStack result = env.getSource()
+ .takeOne(ItemStackPredicate.from(GregTech_API.sBlockCasings5), true);
if (result == null) return PlaceResult.REJECT;
PlaceResult ret = StructureUtility.survivalPlaceBlock(
result,
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine.java
index 1c401a741e..38c3cc9af7 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine.java
@@ -49,24 +49,34 @@ public abstract class GT_MetaTileEntity_LargeTurbine extends
@Override
protected IStructureDefinition<GT_MetaTileEntity_LargeTurbine> computeValue(Class<?> type) {
return StructureDefinition.<GT_MetaTileEntity_LargeTurbine>builder()
- .addShape(
- STRUCTURE_PIECE_MAIN,
- transpose(
- new String[][] { { " ", " ", " ", " ", " ", },
- { " --- ", " ccc ", " hhh ", " hhh ", " hhh ", },
- { " --- ", " c~c ", " h-h ", " h-h ", " hdh ", },
- { " --- ", " ccc ", " hhh ", " hhh ", " hhh ", },
- { " ", " ", " ", " ", " ", }, }))
- .addElement('c', lazy(t -> ofBlock(t.getCasingBlock(), t.getCasingMeta())))
- .addElement('d', lazy(t -> Dynamo.newAny(t.getCasingTextureIndex(), 1)))
- .addElement(
- 'h',
- lazy(
- t -> buildHatchAdder(GT_MetaTileEntity_LargeTurbine.class)
- .atLeast(Maintenance, InputHatch, OutputHatch, OutputBus, InputBus, Muffler)
- .casingIndex(t.getCasingTextureIndex()).dot(2)
- .buildAndChain(t.getCasingBlock(), t.getCasingMeta())))
- .build();
+ .addShape(
+ STRUCTURE_PIECE_MAIN,
+ transpose(
+ new String[][] { { " ", " ", " ", " ", " ", },
+ { " --- ", " ccc ", " hhh ", " hhh ", " hhh ", },
+ { " --- ", " c~c ", " h-h ", " h-h ", " hdh ", },
+ { " --- ", " ccc ", " hhh ", " hhh ", " hhh ", },
+ { " ", " ", " ", " ", " ", }, }))
+ .addElement('c', lazy(t -> ofBlock(t.getCasingBlock(), t.getCasingMeta())))
+ .addElement('d', lazy(t -> Dynamo.newAny(t.getCasingTextureIndex(), 1)))
+ .addElement(
+ 'h',
+ lazy(
+ t -> buildHatchAdder(
+ GT_MetaTileEntity_LargeTurbine.class).atLeast(
+ Maintenance,
+ InputHatch,
+ OutputHatch,
+ OutputBus,
+ InputBus,
+ Muffler)
+ .casingIndex(
+ t.getCasingTextureIndex())
+ .dot(2)
+ .buildAndChain(
+ t.getCasingBlock(),
+ t.getCasingMeta())))
+ .build();
}
};
@@ -167,7 +177,8 @@ public abstract class GT_MetaTileEntity_LargeTurbine extends
aX + tDirection.offsetX,
tY + tDirection.offsetY,
aZ + tDirection.offsetZ));
- tLighting.setupLighting(tBlock, tX, tY, tZ, tFacing).setupColor(tFacing, Dyes._NULL.mRGBa);
+ tLighting.setupLighting(tBlock, tX, tY, tZ, tFacing)
+ .setupColor(tFacing, Dyes._NULL.mRGBa);
GT_RenderUtil.renderBlockIcon(
aRenderer,
tBlock,
@@ -230,15 +241,18 @@ public abstract class GT_MetaTileEntity_LargeTurbine extends
if (baseEff == 0 || optFlow == 0
|| counter >= 512
- || this.getBaseMetaTileEntity().hasWorkJustBeenEnabled()
- || this.getBaseMetaTileEntity().hasInventoryBeenModified()) {
+ || this.getBaseMetaTileEntity()
+ .hasWorkJustBeenEnabled()
+ || this.getBaseMetaTileEntity()
+ .hasInventoryBeenModified()) {
counter = 0;
baseEff = GT_Utility.safeInt(
(long) ((5F + ((GT_MetaGenerated_Tool) aStack.getItem()).getToolCombatDamage(aStack)) * 1000F));
optFlow = GT_Utility.safeInt(
(long) Math.max(
Float.MIN_NORMAL,
- ((GT_MetaGenerated_Tool) aStack.getItem()).getToolStats(aStack).getSpeedMultiplier()
+ ((GT_MetaGenerated_Tool) aStack.getItem()).getToolStats(aStack)
+ .getSpeedMultiplier()
* GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mToolSpeed
* 50));
@@ -368,8 +382,10 @@ public abstract class GT_MetaTileEntity_LargeTurbine extends
long maxEnergy = 0;
for (GT_MetaTileEntity_Hatch_Dynamo tHatch : mDynamoHatches) {
if (isValidMetaTileEntity(tHatch)) {
- storedEnergy += tHatch.getBaseMetaTileEntity().getStoredEU();
- maxEnergy += tHatch.getBaseMetaTileEntity().getEUCapacity();
+ storedEnergy += tHatch.getBaseMetaTileEntity()
+ .getStoredEU();
+ maxEnergy += tHatch.getBaseMetaTileEntity()
+ .getEUCapacity();
}
}
String[] ret = new String[] {
@@ -420,7 +436,9 @@ public abstract class GT_MetaTileEntity_LargeTurbine extends
+ EnumChatFormatting.RESET
+ " %" /* 8 */
};
- if (!this.getClass().getName().contains("Steam"))
+ if (!this.getClass()
+ .getName()
+ .contains("Steam"))
ret[4] = StatCollector.translateToLocal("GT5U.turbine.flow") + ": "
+ EnumChatFormatting.YELLOW
+ GT_Utility.safeInt((long) realOptFlow)
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 99eb312b76..3acf460d3f 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
@@ -32,27 +32,38 @@ public class GT_MetaTileEntity_LargeTurbine_Gas extends GT_MetaTileEntity_LargeT
@Override
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
- return new ITexture[] { MACHINE_CASINGS[1][aColorIndex + 1],
- aFacing == aSide
- ? (aActive ? TextureFactory.builder().addIcon(LARGETURBINE_NEW_ACTIVE5).build()
- : hasTurbine() ? TextureFactory.builder().addIcon(LARGETURBINE_NEW5).build()
- : TextureFactory.builder().addIcon(LARGETURBINE_NEW_EMPTY5).build())
+ return new ITexture[] { MACHINE_CASINGS[1][aColorIndex + 1], aFacing
+ == aSide ? (aActive ? TextureFactory.builder()
+ .addIcon(LARGETURBINE_NEW_ACTIVE5)
+ .build()
+ : hasTurbine() ? TextureFactory.builder()
+ .addIcon(LARGETURBINE_NEW5)
+ .build()
+ : TextureFactory.builder()
+ .addIcon(LARGETURBINE_NEW_EMPTY5)
+ .build())
: casingTexturePages[0][58] };
}
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
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")
- .addInfo("Warning: Will be capped at 8192 EU/t in a future update")
- .addInfo("See the Advanced Large Gas Turbine as the next, uncapped, option")
- // .addInfo("The excess fuel that gets consumed will be voided!")
- .addPollutionAmount(getPollutionPerSecond(null)).addSeparator().beginStructureBlock(3, 3, 4, true)
- .addController("Front center").addCasingInfoRange("Stainless Steel Turbine Casing", 8, 30, false)
- .addDynamoHatch("Back center", 1).addMaintenanceHatch("Side centered", 2)
- .addMufflerHatch("Side centered", 2).addInputHatch("Gas Fuel, Side centered", 2)
- .toolTipFinisher("Gregtech");
+ tt.addMachineType("Gas Turbine")
+ .addInfo("Controller block for the Large Gas Turbine")
+ .addInfo("Needs a Turbine, place inside controller")
+ .addInfo("Warning: Will be capped at 8192 EU/t in a future update")
+ .addInfo("See the Advanced Large Gas Turbine as the next, uncapped, option")
+ // .addInfo("The excess fuel that gets consumed will be voided!")
+ .addPollutionAmount(getPollutionPerSecond(null))
+ .addSeparator()
+ .beginStructureBlock(3, 3, 4, true)
+ .addController("Front center")
+ .addCasingInfoRange("Stainless Steel Turbine Casing", 8, 30, false)
+ .addDynamoHatch("Back center", 1)
+ .addMaintenanceHatch("Side centered", 2)
+ .addMufflerHatch("Side centered", 2)
+ .addInputHatch("Gas Fuel, Side centered", 2)
+ .toolTipFinisher("Gregtech");
return tt;
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_GasAdvanced.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_GasAdvanced.java
index f1a7427463..54787a1914 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_GasAdvanced.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_GasAdvanced.java
@@ -32,26 +32,38 @@ public class GT_MetaTileEntity_LargeTurbine_GasAdvanced extends GT_MetaTileEntit
@Override
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
- return new ITexture[] { MACHINE_CASINGS[1][aColorIndex + 1],
- aFacing == aSide
- ? (aActive ? TextureFactory.builder().addIcon(LARGETURBINE_NEW_ACTIVE5).build()
- : hasTurbine() ? TextureFactory.builder().addIcon(LARGETURBINE_NEW5).build()
- : TextureFactory.builder().addIcon(LARGETURBINE_NEW_EMPTY5).build())
+ return new ITexture[] { MACHINE_CASINGS[1][aColorIndex + 1], aFacing
+ == aSide ? (aActive ? TextureFactory.builder()
+ .addIcon(LARGETURBINE_NEW_ACTIVE5)
+ .build()
+ : hasTurbine() ? TextureFactory.builder()
+ .addIcon(LARGETURBINE_NEW5)
+ .build()
+ : TextureFactory.builder()
+ .addIcon(LARGETURBINE_NEW_EMPTY5)
+ .build())
: casingTexturePages[1][57] };
}
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Gas Turbine").addInfo("Warning: This is an experimental multiblock, subject to changes ")
- .addInfo("Controller block for the Large Advanced Gas Turbine")
- .addInfo("Needs a Turbine, place inside controller").addInfo("Only accepts gases above 800k EU/bucket")
- .addInfo("Has no maximum EU/t output, only depends on the Dynamo Hatch")
- .addPollutionAmount(getPollutionPerSecond(null)).addSeparator().beginStructureBlock(3, 3, 4, true)
- .addController("Front center").addCasingInfoRange("Advanced Gas Turbine Casing", 8, 30, false)
- .addDynamoHatch("Back center", 1).addMaintenanceHatch("Side centered", 2)
- .addMufflerHatch("Side centered", 2).addInputHatch("Gas Fuel, Side centered", 2)
- .toolTipFinisher("Gregtech");
+ tt.addMachineType("Gas Turbine")
+ .addInfo("Warning: This is an experimental multiblock, subject to changes ")
+ .addInfo("Controller block for the Large Advanced Gas Turbine")
+ .addInfo("Needs a Turbine, place inside controller")
+ .addInfo("Only accepts gases above 800k EU/bucket")
+ .addInfo("Has no maximum EU/t output, only depends on the Dynamo Hatch")
+ .addPollutionAmount(getPollutionPerSecond(null))
+ .addSeparator()
+ .beginStructureBlock(3, 3, 4, true)
+ .addController("Front center")
+ .addCasingInfoRange("Advanced Gas Turbine Casing", 8, 30, false)
+ .addDynamoHatch("Back center", 1)
+ .addMaintenanceHatch("Side centered", 2)
+ .addMufflerHatch("Side centered", 2)
+ .addInputHatch("Gas Fuel, Side centered", 2)
+ .toolTipFinisher("Gregtech");
return tt;
}
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 d6e2f16a3d..ef288cf1ec 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
@@ -38,25 +38,37 @@ public class GT_MetaTileEntity_LargeTurbine_HPSteam extends GT_MetaTileEntity_La
@Override
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
- return new ITexture[] { MACHINE_CASINGS[1][aColorIndex + 1],
- aFacing == aSide
- ? (aActive ? TextureFactory.builder().addIcon(LARGETURBINE_NEW_ACTIVE5).build()
- : hasTurbine() ? TextureFactory.builder().addIcon(LARGETURBINE_NEW5).build()
- : TextureFactory.builder().addIcon(LARGETURBINE_NEW_EMPTY5).build())
+ return new ITexture[] { MACHINE_CASINGS[1][aColorIndex + 1], aFacing
+ == aSide ? (aActive ? TextureFactory.builder()
+ .addIcon(LARGETURBINE_NEW_ACTIVE5)
+ .build()
+ : hasTurbine() ? TextureFactory.builder()
+ .addIcon(LARGETURBINE_NEW5)
+ .build()
+ : TextureFactory.builder()
+ .addIcon(LARGETURBINE_NEW_EMPTY5)
+ .build())
: casingTexturePages[0][59] };
}
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
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")
- .addCasingInfoRange("Titanium Turbine Casing", 8, 31, false).addDynamoHatch("Back center", 1)
- .addMaintenanceHatch("Side centered", 2).addInputHatch("Superheated Steam, Side centered", 2)
- .addOutputHatch("Steam, Side centered", 2).toolTipFinisher("Gregtech");
+ 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")
+ .addCasingInfoRange("Titanium Turbine Casing", 8, 31, false)
+ .addDynamoHatch("Back center", 1)
+ .addMaintenanceHatch("Side centered", 2)
+ .addInputHatch("Superheated Steam, Side centered", 2)
+ .addOutputHatch("Steam, Side centered", 2)
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -121,8 +133,11 @@ public class GT_MetaTileEntity_LargeTurbine_HPSteam extends GT_MetaTileEntity_La
if (!achievement) {
try {
GT_Mod.achievements.issueAchievement(
- this.getBaseMetaTileEntity().getWorld()
- .getPlayerEntityByName(this.getBaseMetaTileEntity().getOwnerName()),
+ this.getBaseMetaTileEntity()
+ .getWorld()
+ .getPlayerEntityByName(
+ this.getBaseMetaTileEntity()
+ .getOwnerName()),
"efficientsteam");
} catch (Exception ignored) {}
achievement = true;
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 d778abbc36..22681138ea 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
@@ -38,24 +38,35 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar
@Override
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
- return new ITexture[] { MACHINE_CASINGS[1][aColorIndex + 1],
- aFacing == aSide
- ? (aActive ? TextureFactory.builder().addIcon(LARGETURBINE_NEW_ACTIVE5).build()
- : hasTurbine() ? TextureFactory.builder().addIcon(LARGETURBINE_NEW5).build()
- : TextureFactory.builder().addIcon(LARGETURBINE_NEW_EMPTY5).build())
+ return new ITexture[] { MACHINE_CASINGS[1][aColorIndex + 1], aFacing
+ == aSide ? (aActive ? TextureFactory.builder()
+ .addIcon(LARGETURBINE_NEW_ACTIVE5)
+ .build()
+ : hasTurbine() ? TextureFactory.builder()
+ .addIcon(LARGETURBINE_NEW5)
+ .build()
+ : TextureFactory.builder()
+ .addIcon(LARGETURBINE_NEW_EMPTY5)
+ .build())
: casingTexturePages[0][60] };
}
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
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")
- .addCasingInfoRange("Tungstensteel Turbine Casing", 8, 31, false).addDynamoHatch("Back center", 1)
- .addMaintenanceHatch("Side centered", 2).addInputHatch("Plasma Fluid, Side centered", 2)
- .addOutputHatch("Molten Fluid, optional, Side centered", 2).toolTipFinisher("Gregtech");
+ 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")
+ .addCasingInfoRange("Tungstensteel Turbine Casing", 8, 31, false)
+ .addDynamoHatch("Back center", 1)
+ .addMaintenanceHatch("Side centered", 2)
+ .addInputHatch("Plasma Fluid, Side centered", 2)
+ .addOutputHatch("Molten Fluid, optional, Side centered", 2)
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -103,8 +114,8 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar
FluidStack firstFuelType = new FluidStack(aFluids.get(0), 0); // Identify a SINGLE type of fluid to process.
// Doesn't matter which one. Ignore the rest!
int fuelValue = getFuelValue(firstFuelType);
- actualOptimalFlow = GT_Utility
- .safeInt((long) Math.ceil((double) aOptFlow * flowMultipliers[2] / (double) fuelValue));
+ actualOptimalFlow = GT_Utility.safeInt(
+ (long) Math.ceil((double) aOptFlow * flowMultipliers[2] / (double) fuelValue));
this.realOptFlow = actualOptimalFlow; // For scanner info
// Allowed to use up to 550% optimal flow rate, depending on the value of overflowMultiplier.
@@ -199,17 +210,20 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar
if (!tFluids.isEmpty()) {
if (baseEff == 0 || optFlow == 0
|| counter >= 512
- || this.getBaseMetaTileEntity().hasWorkJustBeenEnabled()
- || this.getBaseMetaTileEntity().hasInventoryBeenModified()) {
+ || this.getBaseMetaTileEntity()
+ .hasWorkJustBeenEnabled()
+ || this.getBaseMetaTileEntity()
+ .hasInventoryBeenModified()) {
counter = 0;
baseEff = GT_Utility.safeInt(
(long) ((5F + ((GT_MetaGenerated_Tool) aStack.getItem()).getToolCombatDamage(aStack)) * 1000F));
optFlow = GT_Utility.safeInt(
(long) Math.max(
Float.MIN_NORMAL,
- ((GT_MetaGenerated_Tool) aStack.getItem()).getToolStats(aStack).getSpeedMultiplier()
- * ((GT_MetaGenerated_Tool) aStack.getItem())
- .getPrimaryMaterial(aStack).mToolSpeed
+ ((GT_MetaGenerated_Tool) aStack.getItem()).getToolStats(aStack)
+ .getSpeedMultiplier()
+ * ((GT_MetaGenerated_Tool) aStack.getItem()).getPrimaryMaterial(
+ aStack).mToolSpeed
* 50));
overflowMultiplier = getOverflowMultiplier(aStack);
@@ -288,8 +302,10 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar
long maxEnergy = 0;
for (GT_MetaTileEntity_Hatch_Dynamo tHatch : mDynamoHatches) {
if (isValidMetaTileEntity(tHatch)) {
- storedEnergy += tHatch.getBaseMetaTileEntity().getStoredEU();
- maxEnergy += tHatch.getBaseMetaTileEntity().getEUCapacity();
+ storedEnergy += tHatch.getBaseMetaTileEntity()
+ .getStoredEU();
+ maxEnergy += tHatch.getBaseMetaTileEntity()
+ .getEUCapacity();
}
}
String[] ret = new String[] {
@@ -340,7 +356,9 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar
+ EnumChatFormatting.RESET
+ " %" /* 8 */
};
- if (!this.getClass().getName().contains("Steam"))
+ if (!this.getClass()
+ .getName()
+ .contains("Steam"))
ret[4] = StatCollector.translateToLocal("GT5U.turbine.flow") + ": "
+ EnumChatFormatting.YELLOW
+ GT_Utility.safeInt((long) realOptFlow)
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 3ccc635d92..1f5c7a5bb6 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
@@ -39,26 +39,37 @@ public class GT_MetaTileEntity_LargeTurbine_Steam extends GT_MetaTileEntity_Larg
@Override
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
- return new ITexture[] { MACHINE_CASINGS[1][aColorIndex + 1],
- aFacing == aSide
- ? (aActive ? TextureFactory.builder().addIcon(LARGETURBINE_NEW_ACTIVE5).build()
- : hasTurbine() ? TextureFactory.builder().addIcon(LARGETURBINE_NEW5).build()
- : TextureFactory.builder().addIcon(LARGETURBINE_NEW_EMPTY5).build())
+ return new ITexture[] { MACHINE_CASINGS[1][aColorIndex + 1], aFacing
+ == aSide ? (aActive ? TextureFactory.builder()
+ .addIcon(LARGETURBINE_NEW_ACTIVE5)
+ .build()
+ : hasTurbine() ? TextureFactory.builder()
+ .addIcon(LARGETURBINE_NEW5)
+ .build()
+ : TextureFactory.builder()
+ .addIcon(LARGETURBINE_NEW_EMPTY5)
+ .build())
: casingTexturePages[0][57] };
}
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
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")
- .addCasingInfoRange("Turbine Casing", 8, 31, false).addDynamoHatch("Back center", 1)
- .addMaintenanceHatch("Side centered", 2).addInputHatch("Steam, Side centered", 2)
- .addOutputHatch("Distilled Water, Side centered", 2).toolTipFinisher("Gregtech");
+ 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")
+ .addCasingInfoRange("Turbine Casing", 8, 31, false)
+ .addDynamoHatch("Back center", 1)
+ .addMaintenanceHatch("Side centered", 2)
+ .addInputHatch("Steam, Side centered", 2)
+ .addOutputHatch("Distilled Water, Side centered", 2)
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -130,8 +141,11 @@ public class GT_MetaTileEntity_LargeTurbine_Steam extends GT_MetaTileEntity_Larg
totalFlow += flow; // track total input used
if (!achievement) {
GT_Mod.achievements.issueAchievement(
- this.getBaseMetaTileEntity().getWorld()
- .getPlayerEntityByName(this.getBaseMetaTileEntity().getOwnerName()),
+ this.getBaseMetaTileEntity()
+ .getWorld()
+ .getPlayerEntityByName(
+ this.getBaseMetaTileEntity()
+ .getOwnerName()),
"muchsteam");
achievement = true;
}
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 95825c9eb0..0d90438020 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
@@ -49,28 +49,50 @@ public class GT_MetaTileEntity_MultiFurnace extends
private static final int CASING_INDEX = 11;
private static final String STRUCTURE_PIECE_MAIN = "main";
- private static final IStructureDefinition<GT_MetaTileEntity_MultiFurnace> STRUCTURE_DEFINITION = StructureDefinition
- .<GT_MetaTileEntity_MultiFurnace>builder()
- .addShape(
- STRUCTURE_PIECE_MAIN,
- transpose(
- new String[][] { { "ccc", "cmc", "ccc" }, { "CCC", "C-C", "CCC" },
- { "b~b", "bbb", "bbb" } }))
- .addElement('c', ofBlock(GregTech_API.sBlockCasings1, CASING_INDEX))
- .addElement('m', Muffler.newAny(CASING_INDEX, 2))
- .addElement(
- 'C',
- GT_StructureUtility.ofCoil(
- GT_MetaTileEntity_MultiFurnace::setCoilLevel,
- GT_MetaTileEntity_MultiFurnace::getCoilLevel))
- .addElement(
- 'b',
- ofChain(
- GT_StructureUtility.<GT_MetaTileEntity_MultiFurnace>buildHatchAdder()
- .atLeast(Maintenance, InputBus, OutputBus, Energy).casingIndex(CASING_INDEX).dot(1)
- .build(),
- ofBlock(GregTech_API.sBlockCasings1, CASING_INDEX)))
- .build();
+ private static final IStructureDefinition<GT_MetaTileEntity_MultiFurnace> STRUCTURE_DEFINITION = StructureDefinition.<GT_MetaTileEntity_MultiFurnace>builder()
+ .addShape(
+ STRUCTURE_PIECE_MAIN,
+ transpose(
+ new String[][] {
+ { "ccc", "cmc",
+ "ccc" },
+ { "CCC", "C-C",
+ "CCC" },
+ { "b~b", "bbb",
+ "bbb" } }))
+ .addElement(
+ 'c',
+ ofBlock(
+ GregTech_API.sBlockCasings1,
+ CASING_INDEX))
+ .addElement(
+ 'm',
+ Muffler.newAny(
+ CASING_INDEX,
+ 2))
+ .addElement(
+ 'C',
+ GT_StructureUtility.ofCoil(
+ GT_MetaTileEntity_MultiFurnace::setCoilLevel,
+ GT_MetaTileEntity_MultiFurnace::getCoilLevel))
+ .addElement(
+ 'b',
+ ofChain(
+ GT_StructureUtility.<GT_MetaTileEntity_MultiFurnace>buildHatchAdder()
+ .atLeast(
+ Maintenance,
+ InputBus,
+ OutputBus,
+ Energy)
+ .casingIndex(
+ CASING_INDEX)
+ .dot(
+ 1)
+ .build(),
+ ofBlock(
+ GregTech_API.sBlockCasings1,
+ CASING_INDEX)))
+ .build();
public GT_MetaTileEntity_MultiFurnace(int aID, String aName, String aNameRegional) {
super(aID, aName, aNameRegional);
@@ -88,13 +110,22 @@ public class GT_MetaTileEntity_MultiFurnace extends
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
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-8192 items at once").addInfo("Items smelted increases with coil tier")
- .addPollutionAmount(getPollutionPerSecond(null)).addSeparator().beginStructureBlock(3, 3, 3, true)
- .addController("Front bottom").addCasingInfoRange("Heat Proof Machine Casing", 8, 14, false)
- .addOtherStructurePart("Heating Coils", "Middle layer").addEnergyHatch("Any bottom casing", 1)
- .addMaintenanceHatch("Any bottom casing", 1).addMufflerHatch("Top Middle", 2)
- .addInputBus("Any bottom casing", 1).addOutputBus("Any bottom casing", 1).toolTipFinisher("Gregtech");
+ tt.addMachineType("Furnace")
+ .addInfo("Controller Block for the Multi Smelter")
+ .addInfo("Smelts up to 8-8192 items at once")
+ .addInfo("Items smelted increases with coil tier")
+ .addPollutionAmount(getPollutionPerSecond(null))
+ .addSeparator()
+ .beginStructureBlock(3, 3, 3, true)
+ .addController("Front bottom")
+ .addCasingInfoRange("Heat Proof Machine Casing", 8, 14, false)
+ .addOtherStructurePart("Heating Coils", "Middle layer")
+ .addEnergyHatch("Any bottom casing", 1)
+ .addMaintenanceHatch("Any bottom casing", 1)
+ .addMufflerHatch("Top Middle", 2)
+ .addInputBus("Any bottom casing", 1)
+ .addOutputBus("Any bottom casing", 1)
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -102,12 +133,25 @@ public class GT_MetaTileEntity_MultiFurnace extends
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
if (aSide != aFacing) return new ITexture[] { casingTexturePages[0][CASING_INDEX] };
- if (aActive) return new ITexture[] { casingTexturePages[0][CASING_INDEX],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_MULTI_SMELTER_ACTIVE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_MULTI_SMELTER_ACTIVE_GLOW).extFacing().glow().build() };
- return new ITexture[] { casingTexturePages[0][CASING_INDEX],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_MULTI_SMELTER).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_MULTI_SMELTER_GLOW).extFacing().glow().build() };
+ if (aActive) return new ITexture[] { casingTexturePages[0][CASING_INDEX], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_MULTI_SMELTER_ACTIVE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_MULTI_SMELTER_ACTIVE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
+ return new ITexture[] { casingTexturePages[0][CASING_INDEX], TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_MULTI_SMELTER)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_MULTI_SMELTER_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
}
@Override
@@ -214,7 +258,7 @@ public class GT_MetaTileEntity_MultiFurnace extends
if (tUsedMeta >= 12 && tUsedMeta <= 14
&& aBaseMetaTileEntity.getBlock(xPos, tY + 1, zPos) == GregTech_API.sBlockCasings1)
aBaseMetaTileEntity.getWorld()
- .setBlock(xPos, tY + 1, zPos, GregTech_API.sBlockCasings5, tUsedMeta - 12, 3);
+ .setBlock(xPos, tY + 1, zPos, GregTech_API.sBlockCasings5, tUsedMeta - 12, 3);
}
}
@@ -227,8 +271,10 @@ public class GT_MetaTileEntity_MultiFurnace extends
long storedEnergy = 0;
long maxEnergy = 0;
for (GT_MetaTileEntity_Hatch_Energy tHatch : mEnergyHatches) if (isValidMetaTileEntity(tHatch)) {
- storedEnergy += tHatch.getBaseMetaTileEntity().getStoredEU();
- maxEnergy += tHatch.getBaseMetaTileEntity().getEUCapacity();
+ storedEnergy += tHatch.getBaseMetaTileEntity()
+ .getStoredEU();
+ maxEnergy += tHatch.getBaseMetaTileEntity()
+ .getEUCapacity();
}
return new String[] {
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_NanoForge.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_NanoForge.java
index 4a872e3833..4887c95930 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_NanoForge.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_NanoForge.java
@@ -51,9 +51,8 @@ public class GT_MetaTileEntity_NanoForge extends
private static final String STRUCTURE_PIECE_MAIN = "main";
private static final String STRUCTURE_PIECE_TIER2 = "tier2";
private static final String STRUCTURE_PIECE_TIER3 = "tier3";
- private static final IStructureDefinition<GT_MetaTileEntity_NanoForge> STRUCTURE_DEFINITION = StructureDefinition
- .<GT_MetaTileEntity_NanoForge>builder()
- // spotless:off
+ private static final IStructureDefinition<GT_MetaTileEntity_NanoForge> STRUCTURE_DEFINITION = StructureDefinition.<GT_MetaTileEntity_NanoForge>builder()
+ // spotless:off
.addShape(STRUCTURE_PIECE_MAIN, transpose(new String[][] {
{" "," "," F "," C "," C "," C "," C "," F "," "," "},
{" "," "," F "," C "," C "," C "," C "," F "," "," "},
@@ -141,15 +140,39 @@ public class GT_MetaTileEntity_NanoForge extends
{" CCCCCC ", "CCCCCCCC", "CCCCCCCC", "CCCCCCCC", "CCCCCCCC", "CCCCCCCC", "CCCCCCCC", " CCCCCC "}
}))
//spotless:on
- .addElement('F', ofFrame(Materials.StellarAlloy)).addElement('C', ofBlock(GregTech_API.sBlockCasings8, 10))
- .addElement('A', ofBlock(GregTech_API.sBlockCasings2, 5))
- .addElement(
- 'B',
- buildHatchAdder(GT_MetaTileEntity_NanoForge.class)
- .atLeast(InputHatch, OutputBus, InputBus, Maintenance, Energy.or(ExoticEnergy)).dot(1)
- .casingIndex(((GT_Block_Casings8) GregTech_API.sBlockCasings8).getTextureIndex(10))
- .buildAndChain(GregTech_API.sBlockCasings8, 10))
- .build();
+ .addElement(
+ 'F',
+ ofFrame(
+ Materials.StellarAlloy))
+ .addElement(
+ 'C',
+ ofBlock(
+ GregTech_API.sBlockCasings8,
+ 10))
+ .addElement(
+ 'A',
+ ofBlock(
+ GregTech_API.sBlockCasings2,
+ 5))
+ .addElement(
+ 'B',
+ buildHatchAdder(
+ GT_MetaTileEntity_NanoForge.class).atLeast(
+ InputHatch,
+ OutputBus,
+ InputBus,
+ Maintenance,
+ Energy.or(
+ ExoticEnergy))
+ .dot(
+ 1)
+ .casingIndex(
+ ((GT_Block_Casings8) GregTech_API.sBlockCasings8).getTextureIndex(
+ 10))
+ .buildAndChain(
+ GregTech_API.sBlockCasings8,
+ 10))
+ .build();
private byte mSpecialTier = 0;
public GT_MetaTileEntity_NanoForge(int aID, String aName, String aNameRegional) {
@@ -187,13 +210,26 @@ public class GT_MetaTileEntity_NanoForge extends
if (aSide == aFacing) {
if (aActive) return new ITexture[] {
BlockIcons.getCasingTextureForId(GT_Utility.getCasingTextureIndex(GregTech_API.sBlockCasings8, 10)),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE_GLOW).extFacing().glow()
- .build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
return new ITexture[] {
BlockIcons.getCasingTextureForId(GT_Utility.getCasingTextureIndex(GregTech_API.sBlockCasings8, 10)),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ASSEMBLY_LINE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_GLOW).extFacing().glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ASSEMBLY_LINE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
}
return new ITexture[] {
BlockIcons.getCasingTextureForId(GT_Utility.getCasingTextureIndex(GregTech_API.sBlockCasings8, 10)) };
@@ -235,8 +271,15 @@ public class GT_MetaTileEntity_NanoForge extends
mOutputItems = null;
mOutputFluids = null;
long tTotalEU = getMaxInputEu();
- GT_Recipe tRecipe = map
- .findRecipe(getBaseMetaTileEntity(), null, false, false, tTotalEU, tFluidInputs, null, tItemInputs);
+ GT_Recipe tRecipe = map.findRecipe(
+ getBaseMetaTileEntity(),
+ null,
+ false,
+ false,
+ tTotalEU,
+ tFluidInputs,
+ null,
+ tItemInputs);
if (tRecipe == null) return false;
@@ -362,100 +405,112 @@ public class GT_MetaTileEntity_NanoForge extends
@Override
public IAlignmentLimits getAlignmentLimits() {
// The nano forge should only be buildable upright
- return IAlignmentLimits.Builder.allowAll().deny(ForgeDirection.DOWN).deny(ForgeDirection.UP)
- .deny(Rotation.UPSIDE_DOWN).deny(Rotation.CLOCKWISE).deny(Rotation.COUNTER_CLOCKWISE).build();
+ return IAlignmentLimits.Builder.allowAll()
+ .deny(ForgeDirection.DOWN)
+ .deny(ForgeDirection.UP)
+ .deny(Rotation.UPSIDE_DOWN)
+ .deny(Rotation.CLOCKWISE)
+ .deny(Rotation.COUNTER_CLOCKWISE)
+ .build();
}
@Override
protected void drawTexts(DynamicPositionedColumn screenElements, SlotWidget inventorySlot) {
super.drawTexts(screenElements, inventorySlot);
screenElements.widget(
- new TextWidget(StatCollector.translateToLocal("GT5U.gui.button.tier") + " " + mSpecialTier)
- .setDefaultColor(COLOR_TEXT_WHITE.get())
- .setEnabled(widget -> getBaseMetaTileEntity().getErrorDisplayID() == 0))
- .widget(
- new FakeSyncWidget.IntegerSyncer(
- () -> (int) mSpecialTier,
- val -> mSpecialTier = (byte) (val % Byte.MAX_VALUE)));
+ new TextWidget(
+ StatCollector.translateToLocal("GT5U.gui.button.tier") + " " + mSpecialTier).setDefaultColor(
+ COLOR_TEXT_WHITE.get())
+ .setEnabled(
+ widget -> getBaseMetaTileEntity().getErrorDisplayID()
+ == 0))
+ .widget(
+ new FakeSyncWidget.IntegerSyncer(
+ () -> (int) mSpecialTier,
+ val -> mSpecialTier = (byte) (val % Byte.MAX_VALUE)));
}
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Nanite Fabricator").addInfo("Controller block for the Nano Forge")
- .addInfo("Requires insane amounts of power to create nanites. Each tier")
- .addInfo("the multi gains a new building next to it. The nanite in the")
- .addInfo("controller slot controls the tier.").addInfo("--------------------------------------------")
- .addInfo("Requires a Carbon Nanite to use tier " + EnumChatFormatting.DARK_PURPLE + 1)
- .addInfo("Requires a Neutronium Nanite to use tier " + EnumChatFormatting.DARK_PURPLE + 2)
- .addInfo("Requires a Transcendent Metal Nanite to use tier " + EnumChatFormatting.DARK_PURPLE + 3)
- .addInfo("--------------------------------------------")
- .addInfo("If a recipe's tier is lower than the tier of the Nano Forge")
- .addInfo("it gains " + EnumChatFormatting.RED + "perfect overclock" + EnumChatFormatting.GRAY + ".")
- .addInfo(AuthorBlueWeabo).addSeparator().beginStructureBlock(30, 38, 13, false)
- .addStructureInfo("Nano Forge Structure is too complex! See schematic for details.")
- .addStructureInfo("--------------------------------------------")
- .addStructureInfo("Tier " + EnumChatFormatting.DARK_PURPLE + 1 + EnumChatFormatting.GRAY)
- .addStructureInfo(
- EnumChatFormatting.GOLD + "527" + EnumChatFormatting.GRAY + " Radiant Naquadah Alloy Casing")
- .addStructureInfo(
- EnumChatFormatting.GOLD + "171" + EnumChatFormatting.GRAY + " Stellar Alloy Frame Box")
- .addStructureInfo("--------------------------------------------")
- .addStructureInfo("Tier " + EnumChatFormatting.DARK_PURPLE + 2 + EnumChatFormatting.GRAY)
- .addStructureInfo(
- EnumChatFormatting.GOLD + "148" + EnumChatFormatting.GRAY + " Radiant Naquadah Alloy Casing")
- .addStructureInfo(EnumChatFormatting.GOLD + "16" + EnumChatFormatting.GRAY + " Assembling Line Casing")
- .addStructureInfo("--------------------------------------------")
- .addStructureInfo("Tier " + EnumChatFormatting.DARK_PURPLE + 3 + EnumChatFormatting.GRAY)
- .addStructureInfo(
- EnumChatFormatting.GOLD + "228" + EnumChatFormatting.GRAY + " Radiant Naquadah Alloy Casing")
- .addStructureInfo(EnumChatFormatting.GOLD + "84" + EnumChatFormatting.GRAY + " Stellar Alloy Frame Box")
- .addStructureInfo(EnumChatFormatting.GOLD + "16" + EnumChatFormatting.GRAY + " Assembling Line Casing")
- .addStructureInfo("--------------------------------------------")
- .addStructureInfo(
- "Requires " + EnumChatFormatting.GOLD
- + "1"
- + EnumChatFormatting.GRAY
- + "-"
- + EnumChatFormatting.GOLD
- + "2"
- + EnumChatFormatting.GRAY
- + " energy hatches or "
- + EnumChatFormatting.GOLD
- + "1"
- + EnumChatFormatting.GRAY
- + " TT energy hatch.")
- .addStructureInfo(
- "Requires " + EnumChatFormatting.GOLD + "1" + EnumChatFormatting.GRAY + " maintenance hatch.")
- .addStructureInfo(
- "Requires " + EnumChatFormatting.GOLD
- + 1
- + EnumChatFormatting.GRAY
- + "+"
- + EnumChatFormatting.GRAY
- + " input hatches.")
- .addStructureInfo(
- "Requires " + EnumChatFormatting.GOLD
- + 0
- + EnumChatFormatting.GRAY
- + "+"
- + EnumChatFormatting.GRAY
- + " output hatches.")
- .addStructureInfo(
- "Requires " + EnumChatFormatting.GOLD
- + 1
- + EnumChatFormatting.GRAY
- + "+"
- + EnumChatFormatting.GRAY
- + " input busses.")
- .addStructureInfo(
- "Requires " + EnumChatFormatting.GOLD
- + 1
- + EnumChatFormatting.GRAY
- + "+"
- + EnumChatFormatting.GRAY
- + " output busses.")
- .addStructureInfo("--------------------------------------------").toolTipFinisher("GregTech");
+ tt.addMachineType("Nanite Fabricator")
+ .addInfo("Controller block for the Nano Forge")
+ .addInfo("Requires insane amounts of power to create nanites. Each tier")
+ .addInfo("the multi gains a new building next to it. The nanite in the")
+ .addInfo("controller slot controls the tier.")
+ .addInfo("--------------------------------------------")
+ .addInfo("Requires a Carbon Nanite to use tier " + EnumChatFormatting.DARK_PURPLE + 1)
+ .addInfo("Requires a Neutronium Nanite to use tier " + EnumChatFormatting.DARK_PURPLE + 2)
+ .addInfo("Requires a Transcendent Metal Nanite to use tier " + EnumChatFormatting.DARK_PURPLE + 3)
+ .addInfo("--------------------------------------------")
+ .addInfo("If a recipe's tier is lower than the tier of the Nano Forge")
+ .addInfo("it gains " + EnumChatFormatting.RED + "perfect overclock" + EnumChatFormatting.GRAY + ".")
+ .addInfo(AuthorBlueWeabo)
+ .addSeparator()
+ .beginStructureBlock(30, 38, 13, false)
+ .addStructureInfo("Nano Forge Structure is too complex! See schematic for details.")
+ .addStructureInfo("--------------------------------------------")
+ .addStructureInfo("Tier " + EnumChatFormatting.DARK_PURPLE + 1 + EnumChatFormatting.GRAY)
+ .addStructureInfo(
+ EnumChatFormatting.GOLD + "527" + EnumChatFormatting.GRAY + " Radiant Naquadah Alloy Casing")
+ .addStructureInfo(EnumChatFormatting.GOLD + "171" + EnumChatFormatting.GRAY + " Stellar Alloy Frame Box")
+ .addStructureInfo("--------------------------------------------")
+ .addStructureInfo("Tier " + EnumChatFormatting.DARK_PURPLE + 2 + EnumChatFormatting.GRAY)
+ .addStructureInfo(
+ EnumChatFormatting.GOLD + "148" + EnumChatFormatting.GRAY + " Radiant Naquadah Alloy Casing")
+ .addStructureInfo(EnumChatFormatting.GOLD + "16" + EnumChatFormatting.GRAY + " Assembling Line Casing")
+ .addStructureInfo("--------------------------------------------")
+ .addStructureInfo("Tier " + EnumChatFormatting.DARK_PURPLE + 3 + EnumChatFormatting.GRAY)
+ .addStructureInfo(
+ EnumChatFormatting.GOLD + "228" + EnumChatFormatting.GRAY + " Radiant Naquadah Alloy Casing")
+ .addStructureInfo(EnumChatFormatting.GOLD + "84" + EnumChatFormatting.GRAY + " Stellar Alloy Frame Box")
+ .addStructureInfo(EnumChatFormatting.GOLD + "16" + EnumChatFormatting.GRAY + " Assembling Line Casing")
+ .addStructureInfo("--------------------------------------------")
+ .addStructureInfo(
+ "Requires " + EnumChatFormatting.GOLD
+ + "1"
+ + EnumChatFormatting.GRAY
+ + "-"
+ + EnumChatFormatting.GOLD
+ + "2"
+ + EnumChatFormatting.GRAY
+ + " energy hatches or "
+ + EnumChatFormatting.GOLD
+ + "1"
+ + EnumChatFormatting.GRAY
+ + " TT energy hatch.")
+ .addStructureInfo(
+ "Requires " + EnumChatFormatting.GOLD + "1" + EnumChatFormatting.GRAY + " maintenance hatch.")
+ .addStructureInfo(
+ "Requires " + EnumChatFormatting.GOLD
+ + 1
+ + EnumChatFormatting.GRAY
+ + "+"
+ + EnumChatFormatting.GRAY
+ + " input hatches.")
+ .addStructureInfo(
+ "Requires " + EnumChatFormatting.GOLD
+ + 0
+ + EnumChatFormatting.GRAY
+ + "+"
+ + EnumChatFormatting.GRAY
+ + " output hatches.")
+ .addStructureInfo(
+ "Requires " + EnumChatFormatting.GOLD
+ + 1
+ + EnumChatFormatting.GRAY
+ + "+"
+ + EnumChatFormatting.GRAY
+ + " input busses.")
+ .addStructureInfo(
+ "Requires " + EnumChatFormatting.GOLD
+ + 1
+ + EnumChatFormatting.GRAY
+ + "+"
+ + EnumChatFormatting.GRAY
+ + " output busses.")
+ .addStructureInfo("--------------------------------------------")
+ .toolTipFinisher("GregTech");
return tt;
}
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 f2be5d276d..c35f387fd1 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
@@ -42,52 +42,82 @@ public class GT_MetaTileEntity_OilCracker extends GT_MetaTileEntity_EnhancedMult
private static final byte CASING_INDEX = 49;
private static final String STRUCTURE_PIECE_MAIN = "main";
- private static final IStructureDefinition<GT_MetaTileEntity_OilCracker> STRUCTURE_DEFINITION = StructureDefinition
- .<GT_MetaTileEntity_OilCracker>builder()
- .addShape(
- STRUCTURE_PIECE_MAIN,
- transpose(
- new String[][] { { "lcmcr", "lcmcr", "lcmcr" }, { "lc~cr", "l---r", "lcmcr" },
- { "lcmcr", "lcmcr", "lcmcr" }, }))
- .addElement(
- 'c',
- ofCoil(GT_MetaTileEntity_OilCracker::setCoilLevel, GT_MetaTileEntity_OilCracker::getCoilLevel))
- .addElement(
- 'l',
- buildHatchAdder(GT_MetaTileEntity_OilCracker.class).atLeast(
- GT_HatchElement.InputHatch
- .withAdder(GT_MetaTileEntity_OilCracker::addLeftHatchToMachineList),
- GT_HatchElement.Energy,
- GT_HatchElement.Maintenance).dot(2).casingIndex(CASING_INDEX).buildAndChain(
- onElementPass(
- GT_MetaTileEntity_OilCracker::onCasingAdded,
- ofBlock(GregTech_API.sBlockCasings4, 1))))
- .addElement(
- 'r',
- buildHatchAdder(GT_MetaTileEntity_OilCracker.class).atLeast(
- GT_HatchElement.OutputHatch
- .withAdder(GT_MetaTileEntity_OilCracker::addRightHatchToMachineList),
- GT_HatchElement.Energy,
- GT_HatchElement.Maintenance).dot(3).casingIndex(CASING_INDEX).buildAndChain(
- onElementPass(
- GT_MetaTileEntity_OilCracker::onCasingAdded,
- ofBlock(GregTech_API.sBlockCasings4, 1))))
- .addElement(
- 'm',
- buildHatchAdder(
- GT_MetaTileEntity_OilCracker.class)
- .atLeast(
- GT_HatchElement.InputHatch
- .withAdder(
- GT_MetaTileEntity_OilCracker::addMiddleInputToMachineList)
- .withCount(t -> t.mMiddleInputHatches.size()),
- GT_HatchElement.Energy,
- GT_HatchElement.Maintenance)
- .dot(1).casingIndex(CASING_INDEX).buildAndChain(
- onElementPass(
- GT_MetaTileEntity_OilCracker::onCasingAdded,
- ofBlock(GregTech_API.sBlockCasings4, 1))))
- .build();
+ private static final IStructureDefinition<GT_MetaTileEntity_OilCracker> STRUCTURE_DEFINITION = StructureDefinition.<GT_MetaTileEntity_OilCracker>builder()
+ .addShape(
+ STRUCTURE_PIECE_MAIN,
+ transpose(
+ new String[][] {
+ { "lcmcr",
+ "lcmcr",
+ "lcmcr" },
+ { "lc~cr",
+ "l---r",
+ "lcmcr" },
+ { "lcmcr",
+ "lcmcr",
+ "lcmcr" }, }))
+ .addElement(
+ 'c',
+ ofCoil(
+ GT_MetaTileEntity_OilCracker::setCoilLevel,
+ GT_MetaTileEntity_OilCracker::getCoilLevel))
+ .addElement(
+ 'l',
+ buildHatchAdder(
+ GT_MetaTileEntity_OilCracker.class).atLeast(
+ GT_HatchElement.InputHatch.withAdder(
+ GT_MetaTileEntity_OilCracker::addLeftHatchToMachineList),
+ GT_HatchElement.Energy,
+ GT_HatchElement.Maintenance)
+ .dot(
+ 2)
+ .casingIndex(
+ CASING_INDEX)
+ .buildAndChain(
+ onElementPass(
+ GT_MetaTileEntity_OilCracker::onCasingAdded,
+ ofBlock(
+ GregTech_API.sBlockCasings4,
+ 1))))
+ .addElement(
+ 'r',
+ buildHatchAdder(
+ GT_MetaTileEntity_OilCracker.class).atLeast(
+ GT_HatchElement.OutputHatch.withAdder(
+ GT_MetaTileEntity_OilCracker::addRightHatchToMachineList),
+ GT_HatchElement.Energy,
+ GT_HatchElement.Maintenance)
+ .dot(
+ 3)
+ .casingIndex(
+ CASING_INDEX)
+ .buildAndChain(
+ onElementPass(
+ GT_MetaTileEntity_OilCracker::onCasingAdded,
+ ofBlock(
+ GregTech_API.sBlockCasings4,
+ 1))))
+ .addElement(
+ 'm',
+ buildHatchAdder(
+ GT_MetaTileEntity_OilCracker.class).atLeast(
+ GT_HatchElement.InputHatch.withAdder(
+ GT_MetaTileEntity_OilCracker::addMiddleInputToMachineList)
+ .withCount(
+ t -> t.mMiddleInputHatches.size()),
+ GT_HatchElement.Energy,
+ GT_HatchElement.Maintenance)
+ .dot(
+ 1)
+ .casingIndex(
+ CASING_INDEX)
+ .buildAndChain(
+ onElementPass(
+ GT_MetaTileEntity_OilCracker::onCasingAdded,
+ ofBlock(
+ GregTech_API.sBlockCasings4,
+ 1))))
+ .build();
private HeatingCoilLevel heatLevel;
protected final List<GT_MetaTileEntity_Hatch_Input> mMiddleInputHatches = new ArrayList<>();
// 0 -> left, 1 -> right, any other -> not found
@@ -106,23 +136,29 @@ public class GT_MetaTileEntity_OilCracker extends GT_MetaTileEntity_EnhancedMult
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
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("Gives different benefits whether it hydro or steam-cracks:")
- .addInfo("Hydro - Consumes 20% less Hydrogen and outputs 25% more cracked fluid")
- .addInfo("Steam - Outputs 50% more cracked fluid")
- .addInfo("(Values compared to cracking in the Chemical Reactor)")
- .addInfo("Place the appropriate circuit in the controller").addSeparator()
- .beginStructureBlock(5, 3, 3, true).addController("Front center")
- .addCasingInfoRange("Clean Stainless Steel Machine Casing", 18, 21, false)
- .addOtherStructurePart("2 Rings of 8 Coils", "Each side of the controller")
- .addInfo("Gets 10% EU/t reduction per coil tier, up to a maximum of 50%")
- .addEnergyHatch("Any casing", 1, 2, 3).addMaintenanceHatch("Any casing", 1, 2, 3)
- .addInputHatch("Steam/Hydrogen ONLY, Any middle ring casing", 1)
- .addInputHatch("Any left/right side casing", 2, 3).addOutputHatch("Any right/left side casing", 2, 3)
- .addStructureInfo("Input/Output Hatches must be on opposite sides!")
- .addStructureHint("GT5U.cracker.io_side").toolTipFinisher("Gregtech");
+ 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("Gives different benefits whether it hydro or steam-cracks:")
+ .addInfo("Hydro - Consumes 20% less Hydrogen and outputs 25% more cracked fluid")
+ .addInfo("Steam - Outputs 50% more cracked fluid")
+ .addInfo("(Values compared to cracking in the Chemical Reactor)")
+ .addInfo("Place the appropriate circuit in the controller")
+ .addSeparator()
+ .beginStructureBlock(5, 3, 3, true)
+ .addController("Front center")
+ .addCasingInfoRange("Clean Stainless Steel Machine Casing", 18, 21, false)
+ .addOtherStructurePart("2 Rings of 8 Coils", "Each side of the controller")
+ .addInfo("Gets 10% EU/t reduction per coil tier, up to a maximum of 50%")
+ .addEnergyHatch("Any casing", 1, 2, 3)
+ .addMaintenanceHatch("Any casing", 1, 2, 3)
+ .addInputHatch("Steam/Hydrogen ONLY, Any middle ring casing", 1)
+ .addInputHatch("Any left/right side casing", 2, 3)
+ .addOutputHatch("Any right/left side casing", 2, 3)
+ .addStructureInfo("Input/Output Hatches must be on opposite sides!")
+ .addStructureHint("GT5U.cracker.io_side")
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -130,13 +166,26 @@ public class GT_MetaTileEntity_OilCracker extends GT_MetaTileEntity_EnhancedMult
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
- if (aActive) return new ITexture[] { casingTexturePages[0][CASING_INDEX],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_OIL_CRACKER_ACTIVE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_OIL_CRACKER_ACTIVE_GLOW).extFacing().glow()
- .build() };
- return new ITexture[] { casingTexturePages[0][CASING_INDEX],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_OIL_CRACKER).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_OIL_CRACKER_GLOW).extFacing().glow().build() };
+ if (aActive) return new ITexture[] { casingTexturePages[0][CASING_INDEX], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_OIL_CRACKER_ACTIVE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_OIL_CRACKER_ACTIVE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
+ return new ITexture[] { casingTexturePages[0][CASING_INDEX], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_OIL_CRACKER)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_OIL_CRACKER_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
}
return new ITexture[] { casingTexturePages[0][CASING_INDEX] };
}
@@ -318,7 +367,7 @@ public class GT_MetaTileEntity_OilCracker extends GT_MetaTileEntity_EnhancedMult
if (aBaseMetaTileEntity.getBlock(xPos, yPos, zPos) != GregTech_API.sBlockCasings1) continue;
aBaseMetaTileEntity.getWorld()
- .setBlock(xPos, yPos, zPos, GregTech_API.sBlockCasings5, tUsedMeta - 12, 3);
+ .setBlock(xPos, yPos, zPos, GregTech_API.sBlockCasings5, tUsedMeta - 12, 3);
}
}
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 fa8619492f..f8eb8c7670 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
@@ -57,12 +57,26 @@ public abstract class GT_MetaTileEntity_OilDrillBase extends GT_MetaTileEntity_D
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
- if (aActive) return new ITexture[] { getCasingTextureForId(casingTextureIndex),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_OIL_DRILL_ACTIVE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_OIL_DRILL_ACTIVE_GLOW).extFacing().glow().build() };
- return new ITexture[] { getCasingTextureForId(casingTextureIndex),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_OIL_DRILL).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_OIL_DRILL_GLOW).extFacing().glow().build() };
+ if (aActive) return new ITexture[] { getCasingTextureForId(casingTextureIndex), TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_OIL_DRILL_ACTIVE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_OIL_DRILL_ACTIVE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
+ return new ITexture[] { getCasingTextureForId(casingTextureIndex), TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_OIL_DRILL)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_OIL_DRILL_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
}
return new ITexture[] { getCasingTextureForId(casingTextureIndex) };
}
@@ -82,24 +96,28 @@ public abstract class GT_MetaTileEntity_OilDrillBase extends GT_MetaTileEntity_D
}
protected GT_Multiblock_Tooltip_Builder createTooltip(String tierSuffix) {
- String casings = getCasingBlockItem().get(0).getDisplayName();
+ String casings = getCasingBlockItem().get(0)
+ .getDisplayName();
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")
- .addOtherStructurePart(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", 1).addMaintenanceHatch("Any base casing", 1)
- .addInputBus("Mining Pipes or Circuits, optional, any base casing", 1)
- .addOutputHatch("Any base casing", 1).toolTipFinisher("Gregtech");
+ .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")
+ .addOtherStructurePart(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", 1)
+ .addMaintenanceHatch("Any base casing", 1)
+ .addInputBus("Mining Pipes or Circuits, optional, any base casing", 1)
+ .addOutputHatch("Any base casing", 1)
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -202,7 +220,9 @@ public abstract class GT_MetaTileEntity_OilDrillBase extends GT_MetaTileEntity_D
if (mOilFieldChunks.isEmpty()) {
Chunk tChunk = getBaseMetaTileEntity().getWorld()
- .getChunkFromBlockCoords(getBaseMetaTileEntity().getXCoord(), getBaseMetaTileEntity().getZCoord());
+ .getChunkFromBlockCoords(
+ getBaseMetaTileEntity().getXCoord(),
+ getBaseMetaTileEntity().getZCoord());
int range = chunkRangeConfig;
int xChunk = Math.floorDiv(tChunk.xPosition, range) * range; // Java was written by idiots. For negative
// values, / returns rounded towards zero.
@@ -223,10 +243,13 @@ public abstract class GT_MetaTileEntity_OilDrillBase extends GT_MetaTileEntity_D
if (debugDriller) {
GT_Log.out.println(" getChunkX = " + (xChunk + i) + " getChunkZ = " + (zChunk + j));
}
- tChunk = getBaseMetaTileEntity().getWorld().getChunkFromChunkCoords(xChunk + i, zChunk + j);
+ tChunk = getBaseMetaTileEntity().getWorld()
+ .getChunkFromChunkCoords(xChunk + i, zChunk + j);
tFluid = undergroundOilReadInformation(tChunk);
if (debugDriller) {
- GT_Log.out.println(" Fluid in chunk = " + tFluid.getFluid().getID());
+ GT_Log.out.println(
+ " Fluid in chunk = " + tFluid.getFluid()
+ .getID());
}
if (tOil.isFluidEqual(tFluid) && tFluid.amount > 0) {
mOilFieldChunks.add(tChunk);
@@ -296,7 +319,9 @@ public abstract class GT_MetaTileEntity_OilDrillBase extends GT_MetaTileEntity_D
+ " "
+ StatCollector.translateToLocal("GT5U.machines.chunks"),
"Drilling fluid: " + EnumChatFormatting.GREEN
- + (mOilId > 0 ? FluidRegistry.getFluid(mOilId).getName() : "None")
+ + (mOilId > 0 ? FluidRegistry.getFluid(mOilId)
+ .getName()
+ : "None")
+ EnumChatFormatting.RESET,
"Drilling flow: " + EnumChatFormatting.GREEN
+ GT_Utility.formatNumbers(
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrillInfinite.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrillInfinite.java
index e54fcbbd28..b92fcfae7f 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrillInfinite.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrillInfinite.java
@@ -23,18 +23,24 @@ public class GT_MetaTileEntity_OilDrillInfinite extends GT_MetaTileEntity_OilDri
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
- String casings = getCasingBlockItem().get(0).getDisplayName();
+ String casings = getCasingBlockItem().get(0)
+ .getDisplayName();
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Pump").addInfo("Controller Block for the Infinite Oil/Gas/Fluid Drilling Rig ")
- .addInfo("Works on " + getRangeInChunks() + "x" + getRangeInChunks() + " chunks").addSeparator()
- .beginStructureBlock(3, 7, 3, false).addController("Front bottom")
- .addOtherStructurePart(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", 1).addMaintenanceHatch("Any base casing", 1)
- .addInputBus("Mining Pipes or Circuits, optional, any base casing", 1)
- .addOutputHatch("Any base casing", 1).toolTipFinisher("Gregtech");
+ tt.addMachineType("Pump")
+ .addInfo("Controller Block for the Infinite Oil/Gas/Fluid Drilling Rig ")
+ .addInfo("Works on " + getRangeInChunks() + "x" + getRangeInChunks() + " chunks")
+ .addSeparator()
+ .beginStructureBlock(3, 7, 3, false)
+ .addController("Front bottom")
+ .addOtherStructurePart(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", 1)
+ .addMaintenanceHatch("Any base casing", 1)
+ .addInputBus("Mining Pipes or Circuits, optional, any base casing", 1)
+ .addOutputHatch("Any base casing", 1)
+ .toolTipFinisher("Gregtech");
return tt;
}
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 46b91ec2cf..c058c8880f 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
@@ -142,7 +142,8 @@ public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTile
z = oreBlockPos.chunkPosZ;
if (GT_Utility.eraseBlockByFakePlayer(getFakePlayer(getBaseMetaTileEntity()), x, y, z, true))
oreBlock = getBaseMetaTileEntity().getBlock(x, y, z);
- oreBlockMetadata = getBaseMetaTileEntity().getWorld().getBlockMetadata(x, y, z);
+ oreBlockMetadata = getBaseMetaTileEntity().getWorld()
+ .getBlockMetadata(x, y, z);
}
if (!tryConsumeDrillingFluid()) {
@@ -160,10 +161,19 @@ public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTile
ItemStack cobble = GT_Utility.getCobbleForOre(oreBlock, metaData);
if (replaceWithCobblestone) {
getBaseMetaTileEntity().getWorld()
- .setBlock(x, y, z, Block.getBlockFromItem(cobble.getItem()), cobble.getItemDamage(), 3);
+ .setBlock(
+ x,
+ y,
+ z,
+ Block.getBlockFromItem(cobble.getItem()),
+ cobble.getItemDamage(),
+ 3);
} else {
getBaseMetaTileEntity().getWorld()
- .setBlockToAir(oreBlockPos.chunkPosX, oreBlockPos.chunkPosY, oreBlockPos.chunkPosZ);
+ .setBlockToAir(
+ oreBlockPos.chunkPosX,
+ oreBlockPos.chunkPosY,
+ oreBlockPos.chunkPosZ);
}
mOutputItems = getOutputByDrops(oreBlockDrops);
}
@@ -250,8 +260,9 @@ public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTile
return false;
}
mCurrentChunk = new ChunkCoordIntPair(nextChunkX, nextChunkZ);
- GT_ChunkManager
- .requestChunkLoad((TileEntity) getBaseMetaTileEntity(), new ChunkCoordIntPair(nextChunkX, nextChunkZ));
+ GT_ChunkManager.requestChunkLoad(
+ (TileEntity) getBaseMetaTileEntity(),
+ new ChunkCoordIntPair(nextChunkX, nextChunkZ));
return true;
}
@@ -286,8 +297,12 @@ public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTile
outputItems.add(multiplyStackSize(currentItem));
return;
}
- GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sMaceratorRecipes
- .findRecipe(getBaseMetaTileEntity(), false, voltage, null, currentItem);
+ GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sMaceratorRecipes.findRecipe(
+ getBaseMetaTileEntity(),
+ false,
+ voltage,
+ null,
+ currentItem);
if (tRecipe == null) {
outputItems.add(currentItem);
return;
@@ -380,26 +395,31 @@ public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTile
protected abstract int getBaseProgressTime();
protected GT_Multiblock_Tooltip_Builder createTooltip(String tierSuffix) {
- String casings = getCasingBlockItem().get(0).getDisplayName();
+ String casings = getCasingBlockItem().get(0)
+ .getDisplayName();
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("Use Wire Cutter to toggle replacing mined blocks with cobblestone")
- .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")
- .addOtherStructurePart(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", 1).addMaintenanceHatch("Any base casing", 1)
- .addInputBus("Mining Pipes, optional, any base casing", 1)
- .addInputHatch("Drilling Fluid, any base casing", 1).addOutputBus("Any base casing", 1)
- .toolTipFinisher("Gregtech");
+ .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("Use Wire Cutter to toggle replacing mined blocks with cobblestone")
+ .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")
+ .addOtherStructurePart(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", 1)
+ .addMaintenanceHatch("Any base casing", 1)
+ .addInputBus("Mining Pipes, optional, any base casing", 1)
+ .addInputHatch("Drilling Fluid, any base casing", 1)
+ .addOutputBus("Any base casing", 1)
+ .toolTipFinisher("Gregtech");
return tt;
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PCBFactory.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PCBFactory.java
index df878d8050..7ad3c1b4bf 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PCBFactory.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PCBFactory.java
@@ -95,12 +95,12 @@ public class GT_MetaTileEntity_PCBFactory extends
private static final int mTier2BitMap = 0b10;
private static final int mTier1BitMap = 0b1;
private static final int COOLANT_CONSUMED_PER_SEC = 10;
- private static final IStructureDefinition<GT_MetaTileEntity_PCBFactory> STRUCTURE_DEFINITION = StructureDefinition
- .<GT_MetaTileEntity_PCBFactory>builder().addShape(
- tier1,
- transpose(
- new String[][] {
- // spotless:off
+ private static final IStructureDefinition<GT_MetaTileEntity_PCBFactory> STRUCTURE_DEFINITION = StructureDefinition.<GT_MetaTileEntity_PCBFactory>builder()
+ .addShape(
+ tier1,
+ transpose(
+ new String[][] {
+ // spotless:off
{" ","E E","E E","EEEEEEE","E E","E E"," "},
{"EEEEEEE","CAAAAAC","CAAAAAC","CCCCCCC","CCCCCCC","CCCCCCC","E E"},
{"EAAAAAE","C-----C","C-----C","C-----C","C-----C","C-----C","ECCCCCE"},
@@ -108,11 +108,12 @@ public class GT_MetaTileEntity_PCBFactory extends
{"EAAAAAE","C-----C","B-FFF-B","B-FFF-B","B-FFF-B","C-----C","EPPPPPE"},
{"ECC~CCE","CDDDDDC","CDDDDDC","CDDDDDC","CDDDDDC","CDDDDDC","EPPPPPE"}
//spotless:on
- })).addShape(
- tier2,
- transpose(
- new String[][] {
- // spotless:off
+ }))
+ .addShape(
+ tier2,
+ transpose(
+ new String[][] {
+ // spotless:off
{" "," "," ","HGGH","HGGH","HGGH","HGGH","HGGH"," "," "," "},
{" "," ","HGGH","GGGG","GGGG","GGGG","GGGG","GGGG","HGGH"," "," "},
{" ","HGGH","GGGG","G G","G G","G G","G G","G G","GGGG","HGGH"," "},
@@ -121,11 +122,12 @@ public class GT_MetaTileEntity_PCBFactory extends
{"HGGH","G G","G G","G G","G G","G G","G G","G G","G G","G G","HGGH"},
{"HGGH","GGGG","GGGG","GGGG","GGGG","GGGG","GGGG","GGGG","GGGG","GGGG","HGGH"}
//spotless:on
- })).addShape(
- tier3,
- transpose(
- new String[][] {
- // spotless:off
+ }))
+ .addShape(
+ tier3,
+ transpose(
+ new String[][] {
+ // spotless:off
{" "," "," "," "," I "," I "," "," "," "," "},
{" "," "," "," I "," I "," I "," I "," "," "," "},
{" "," "," KKK "," KIK "," K K "," K K "," I "," "," "," "},
@@ -149,11 +151,12 @@ public class GT_MetaTileEntity_PCBFactory extends
{" "," III "," I I "," I I "," I I "," I I "," I I "," I I "," III "," "},
{" II~II ","IIJJJII","IJJJJJI","IJJJJJI","IJJJJJI","IJJJJJI","IJJJJJI","IJJJJJI","IIJJJII"," IIIII "}
//spotless:on
- })).addShape(
- bioUpgrade,
- transpose(
- new String[][] {
- // spotless:off
+ }))
+ .addShape(
+ bioUpgrade,
+ transpose(
+ new String[][] {
+ // spotless:off
{" "," "," LLLLLL "," "," "},
{" "," "," L L "," "," "},
{"E E E E"," LLL LLL "," LLL LLL "," LLL LLL ","E E E E"},
@@ -162,12 +165,12 @@ public class GT_MetaTileEntity_PCBFactory extends
{"EAAAE EAAAE","A A A A","A A A A","A A A A","EAAAE EAAAE"},
{"ELLLE ELLLE","LLLLL LLLLL","LLLLL LLLLL","LLLLL LLLLL","ELLLE ELLLE"}
//spotless:on
- }))
- .addShape(
- ocTier1Upgrade,
- transpose(
- new String[][] {
- // spotless:off
+ }))
+ .addShape(
+ ocTier1Upgrade,
+ transpose(
+ new String[][] {
+ // spotless:off
{"EKKKE","K K","K K","K K","EKKKE"},
{"E E"," KKK "," K K "," KKK ","E E"},
{"E E"," NNN "," N N "," NNN ","E E"},
@@ -179,11 +182,12 @@ public class GT_MetaTileEntity_PCBFactory extends
{"ENNNE","NKKKN","NK KN","NKKKN","ENNNE"},
{"EGGGE","GGGGG","GGMGG","GGGGG","EGGGE"}
//spotless:on
- })).addShape(
- ocTier2Upgrade,
- transpose(
- new String[][] {
- // spotless:off
+ }))
+ .addShape(
+ ocTier2Upgrade,
+ transpose(
+ new String[][] {
+ // spotless:off
{"RGGGR","G G","G G","G G","RGGGR"},
{"R R"," GGG "," GTG "," GGG ","R R"},
{"R R"," NNN "," NTN "," NNN ","R R"},
@@ -195,50 +199,172 @@ public class GT_MetaTileEntity_PCBFactory extends
{"RNNNR","NQQQN","NQTQN","NQQQN","RNNNR"},
{"RGGGR","GGGGG","GGSGG","GGGGG","RGGGR"}
//spotless:on
- })).addElement('E', ofFrame(Materials.DamascusSteel))
- .addElement('C', ofBlock(GregTech_API.sBlockCasings8, 11))
- .addElement('D', ofBlock(GregTech_API.sBlockReinforced, 2))
- .addElement(
- 'A',
- ofChain(
- ofBlockUnlocalizedName("IC2", "blockAlloyGlass", 0, true),
- ofBlockUnlocalizedName("bartworks", "BW_GlasBlocks", 0, true),
- ofBlockUnlocalizedName("bartworks", "BW_GlasBlocks2", 0, true),
- // warded glass
- ofBlockUnlocalizedName("Thaumcraft", "blockCosmeticOpaque", 2, false)))
- .addElement('B', ofBlock(GregTech_API.sBlockCasings3, 10)).addElement('F', ofFrame(Materials.VibrantAlloy))
- .addElement(
- 'P',
- buildHatchAdder(GT_MetaTileEntity_PCBFactory.class)
- .atLeast(InputHatch, OutputBus, InputBus, Maintenance, Energy.or(ExoticEnergy)).dot(1)
- .casingIndex(((GT_Block_Casings8) GregTech_API.sBlockCasings8).getTextureIndex(11))
- .buildAndChain(GregTech_API.sBlockCasings8, 11))
- .addElement('H', ofFrame(Materials.Duranium)).addElement('G', ofBlock(GregTech_API.sBlockCasings8, 12))
- .addElement('I', ofBlock(GregTech_API.sBlockCasings8, 13))
- .addElement('K', ofBlock(GregTech_API.sBlockCasings8, 10))
- .addElement(
- 'J',
- buildHatchAdder(GT_MetaTileEntity_PCBFactory.class)
- .atLeast(InputHatch, OutputBus, InputBus, Maintenance, Energy.or(ExoticEnergy)).dot(1)
- .casingIndex(((GT_Block_Casings8) GregTech_API.sBlockCasings8).getTextureIndex(13))
- .buildAndChain(GregTech_API.sBlockCasings8, 13))
- .addElement('L', ofBlock(GregTech_API.sBlockCasings4, 1))
- .addElement(
- 'M',
- buildHatchAdder(GT_MetaTileEntity_PCBFactory.class).hatchClass(GT_MetaTileEntity_Hatch_Input.class)
- .adder(GT_MetaTileEntity_PCBFactory::addCoolantInputToMachineList)
- .casingIndex(GT_Utility.getCasingTextureIndex(GregTech_API.sBlockCasings8, 12)).dot(2)
- .buildAndChain(GregTech_API.sBlockCasings8, 12))
- .addElement('N', ofBlock(GregTech_API.sBlockCasings2, 15))
- .addElement('O', ofBlock(GregTech_API.sBlockCasings8, 4))
- .addElement(
- 'S',
- buildHatchAdder(GT_MetaTileEntity_PCBFactory.class).hatchClass(GT_MetaTileEntity_Hatch_Input.class)
- .adder(GT_MetaTileEntity_PCBFactory::addCoolantInputToMachineList)
- .casingIndex(GT_Utility.getCasingTextureIndex(GregTech_API.sBlockCasings8, 12)).dot(2)
- .buildAndChain(GregTech_API.sBlockCasings8, 12))
- .addElement('R', ofFrame(Materials.Americium)).addElement('Q', ofBlock(GregTech_API.sBlockCasings8, 14))
- .addElement('T', ofBlock(GregTech_API.sBlockCasings1, 15)).build();
+ }))
+ .addElement(
+ 'E',
+ ofFrame(
+ Materials.DamascusSteel))
+ .addElement(
+ 'C',
+ ofBlock(
+ GregTech_API.sBlockCasings8,
+ 11))
+ .addElement(
+ 'D',
+ ofBlock(
+ GregTech_API.sBlockReinforced,
+ 2))
+ .addElement(
+ 'A',
+ ofChain(
+ ofBlockUnlocalizedName(
+ "IC2",
+ "blockAlloyGlass",
+ 0,
+ true),
+ ofBlockUnlocalizedName(
+ "bartworks",
+ "BW_GlasBlocks",
+ 0,
+ true),
+ ofBlockUnlocalizedName(
+ "bartworks",
+ "BW_GlasBlocks2",
+ 0,
+ true),
+ // warded
+ // glass
+ ofBlockUnlocalizedName(
+ "Thaumcraft",
+ "blockCosmeticOpaque",
+ 2,
+ false)))
+ .addElement(
+ 'B',
+ ofBlock(
+ GregTech_API.sBlockCasings3,
+ 10))
+ .addElement(
+ 'F',
+ ofFrame(
+ Materials.VibrantAlloy))
+ .addElement(
+ 'P',
+ buildHatchAdder(
+ GT_MetaTileEntity_PCBFactory.class).atLeast(
+ InputHatch,
+ OutputBus,
+ InputBus,
+ Maintenance,
+ Energy.or(
+ ExoticEnergy))
+ .dot(
+ 1)
+ .casingIndex(
+ ((GT_Block_Casings8) GregTech_API.sBlockCasings8).getTextureIndex(
+ 11))
+ .buildAndChain(
+ GregTech_API.sBlockCasings8,
+ 11))
+ .addElement(
+ 'H',
+ ofFrame(
+ Materials.Duranium))
+ .addElement(
+ 'G',
+ ofBlock(
+ GregTech_API.sBlockCasings8,
+ 12))
+ .addElement(
+ 'I',
+ ofBlock(
+ GregTech_API.sBlockCasings8,
+ 13))
+ .addElement(
+ 'K',
+ ofBlock(
+ GregTech_API.sBlockCasings8,
+ 10))
+ .addElement(
+ 'J',
+ buildHatchAdder(
+ GT_MetaTileEntity_PCBFactory.class).atLeast(
+ InputHatch,
+ OutputBus,
+ InputBus,
+ Maintenance,
+ Energy.or(
+ ExoticEnergy))
+ .dot(
+ 1)
+ .casingIndex(
+ ((GT_Block_Casings8) GregTech_API.sBlockCasings8).getTextureIndex(
+ 13))
+ .buildAndChain(
+ GregTech_API.sBlockCasings8,
+ 13))
+ .addElement(
+ 'L',
+ ofBlock(
+ GregTech_API.sBlockCasings4,
+ 1))
+ .addElement(
+ 'M',
+ buildHatchAdder(
+ GT_MetaTileEntity_PCBFactory.class).hatchClass(
+ GT_MetaTileEntity_Hatch_Input.class)
+ .adder(
+ GT_MetaTileEntity_PCBFactory::addCoolantInputToMachineList)
+ .casingIndex(
+ GT_Utility.getCasingTextureIndex(
+ GregTech_API.sBlockCasings8,
+ 12))
+ .dot(
+ 2)
+ .buildAndChain(
+ GregTech_API.sBlockCasings8,
+ 12))
+ .addElement(
+ 'N',
+ ofBlock(
+ GregTech_API.sBlockCasings2,
+ 15))
+ .addElement(
+ 'O',
+ ofBlock(
+ GregTech_API.sBlockCasings8,
+ 4))
+ .addElement(
+ 'S',
+ buildHatchAdder(
+ GT_MetaTileEntity_PCBFactory.class).hatchClass(
+ GT_MetaTileEntity_Hatch_Input.class)
+ .adder(
+ GT_MetaTileEntity_PCBFactory::addCoolantInputToMachineList)
+ .casingIndex(
+ GT_Utility.getCasingTextureIndex(
+ GregTech_API.sBlockCasings8,
+ 12))
+ .dot(
+ 2)
+ .buildAndChain(
+ GregTech_API.sBlockCasings8,
+ 12))
+ .addElement(
+ 'R',
+ ofFrame(
+ Materials.Americium))
+ .addElement(
+ 'Q',
+ ofBlock(
+ GregTech_API.sBlockCasings8,
+ 14))
+ .addElement(
+ 'T',
+ ofBlock(
+ GregTech_API.sBlockCasings1,
+ 15))
+ .build();
@Override
public void construct(ItemStack stackSize, boolean hintsOnly) {
@@ -374,15 +500,28 @@ public class GT_MetaTileEntity_PCBFactory extends
BlockIcons.getCasingTextureForId(
getTier() < 3 ? GT_Utility.getCasingTextureIndex(GregTech_API.sBlockCasings8, 11)
: GT_Utility.getCasingTextureIndex(GregTech_API.sBlockCasings8, 13)),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE_GLOW).extFacing().glow()
- .build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
return new ITexture[] {
BlockIcons.getCasingTextureForId(
getTier() < 3 ? GT_Utility.getCasingTextureIndex(GregTech_API.sBlockCasings8, 11)
: GT_Utility.getCasingTextureIndex(GregTech_API.sBlockCasings8, 13)),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ASSEMBLY_LINE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_GLOW).extFacing().glow().build() };
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ASSEMBLY_LINE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_ASSEMBLY_LINE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
}
return new ITexture[] { BlockIcons.getCasingTextureForId(
mSetTier < 3 ? ((GT_Block_Casings8) GregTech_API.sBlockCasings8).getTextureIndex(11)
@@ -518,8 +657,15 @@ public class GT_MetaTileEntity_PCBFactory extends
long amps = getMaxInputAmps();
int tier = GT_Utility.getTier(voltage);
- GT_Recipe tRecipe = aMap
- .findRecipe(getBaseMetaTileEntity(), null, true, false, V[tier], aFluidInputs, aStack, aItemInputs);
+ GT_Recipe tRecipe = aMap.findRecipe(
+ getBaseMetaTileEntity(),
+ null,
+ true,
+ false,
+ V[tier],
+ aFluidInputs,
+ aStack,
+ aItemInputs);
if (tRecipe == null) {
return false;
@@ -552,9 +698,14 @@ public class GT_MetaTileEntity_PCBFactory extends
&& ((recipeBitMap & mBioBitMap) == 0 || ((recipeBitMap & mBioBitMap) == mBioBitMap && mBioUpgrade));
if (recipeAllowed) {
- GT_ParallelHelper helper = new GT_ParallelHelper().setRecipe(tRecipe).setItemInputs(aItemInputs)
- .setFluidInputs(aFluidInputs).setMaxParallel(aMaxParallel).setAvailableEUt(getMaxInputEu())
- .setEUtModifier(aExtraPower).enableConsumption().build();
+ GT_ParallelHelper helper = new GT_ParallelHelper().setRecipe(tRecipe)
+ .setItemInputs(aItemInputs)
+ .setFluidInputs(aFluidInputs)
+ .setMaxParallel(aMaxParallel)
+ .setAvailableEUt(getMaxInputEu())
+ .setEUtModifier(aExtraPower)
+ .enableConsumption()
+ .build();
mCurrentParallel = helper.getCurrentParallel();
if (mCurrentParallel > 0) {
@@ -565,8 +716,14 @@ public class GT_MetaTileEntity_PCBFactory extends
if (mOCTier1 || mOCTier2) {
GT_OverclockCalculator calc = new GT_OverclockCalculator().setRecipeEUt(tRecipe.mEUt)
- .setDuration(tRecipe.mDuration).setEUt(voltage).setAmperage(amps)
- .setEUtDiscount(aExtraPower).setSpeedBoost((float) Math.pow(mRoughnessMultiplier, 2));
+ .setDuration(tRecipe.mDuration)
+ .setEUt(voltage)
+ .setAmperage(amps)
+ .setEUtDiscount(aExtraPower)
+ .setSpeedBoost(
+ (float) Math.pow(
+ mRoughnessMultiplier,
+ 2));
if (mOCTier2) {
calc.enablePerfectOC();
}
@@ -849,8 +1006,10 @@ public class GT_MetaTileEntity_PCBFactory extends
long maxEnergy = 0;
for (GT_MetaTileEntity_Hatch tHatch : getExoticAndNormalEnergyHatchList()) {
if (isValidMetaTileEntity(tHatch)) {
- storedEnergy += tHatch.getBaseMetaTileEntity().getStoredEU();
- maxEnergy += tHatch.getBaseMetaTileEntity().getEUCapacity();
+ storedEnergy += tHatch.getBaseMetaTileEntity()
+ .getStoredEU();
+ maxEnergy += tHatch.getBaseMetaTileEntity()
+ .getEUCapacity();
}
}
long voltage = getAverageInputVoltage();
@@ -919,120 +1078,110 @@ public class GT_MetaTileEntity_PCBFactory extends
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Circuit Board Fabricator").addInfo("Controller for the PCB Factory")
- .addInfo(
- EnumChatFormatting.GOLD.toString() + EnumChatFormatting.BOLD
- + "IMPORTANT!"
- + " Check the configuration menu before building.")
- .addInfo("Tier of the machine determines the available recipes.")
- .addInfo("Machine tier (1-3) is set in the controller GUI.")
- .addInfo("The configuration menu can be used to add upgrades.")
- .addInfo("Each tier and upgrade requires additional structures.")
- .addInfo("Power consumption is multiplied by Sqrt(structures).")
- .addInfo("Tier 2 and 3 allow parallel by using extra nanites.")
- .addInfo("Every doubling of nanites adds one parallel.")
- .addInfo("1x->1, 2x->2, 4x->3, 8x->4 with no limit.")
- .addInfo("Recipes require a cooling upgrade to be overclocked.")
- .addInfo("Liquid Cooling uses 10 L/s of distilled water and enables default overclocks.")
- .addInfo("Thermosink uses 10 L/s of Space Coolant and enables perfect overclocks.")
- .addInfo("Trace size can be changed to modify the material usage and machine speed.")
- .addInfo(AuthorBlueWeabo).beginStructureBlock(30, 38, 13, false).addSeparator()
- .addMaintenanceHatch(EnumChatFormatting.GOLD + "1", 1)
- .addEnergyHatch(EnumChatFormatting.GOLD + "1" + EnumChatFormatting.GRAY + "+", 1)
- .addInputBus(EnumChatFormatting.GOLD + "1" + EnumChatFormatting.GRAY + "+", 1)
- .addOutputBus(EnumChatFormatting.GOLD + "1" + EnumChatFormatting.GRAY + "+", 1)
- .addInputHatch(EnumChatFormatting.GOLD + "1" + EnumChatFormatting.GRAY + "+", 1)
- .addStructureInfo(
- "Coolant Hatch (Input Hatch): " + EnumChatFormatting.GOLD
- + "1"
- + EnumChatFormatting.GRAY
- + "Center of the Liquid Cooling/Thermosink")
- .addStructureInfo(
- EnumChatFormatting.BLUE + "Base Multi (Tier "
- + EnumChatFormatting.DARK_PURPLE
- + 1
- + EnumChatFormatting.BLUE
- + "):")
- .addStructureInfo(
- EnumChatFormatting.GOLD + "40" + EnumChatFormatting.GRAY + " Damascus Steel Frame Box")
- .addStructureInfo(EnumChatFormatting.GOLD + "9" + EnumChatFormatting.GRAY + " Vibrant Alloy Frame Box")
- .addStructureInfo(EnumChatFormatting.GOLD + "25" + EnumChatFormatting.GRAY + " Reinforced Glass")
- .addStructureInfo(
- EnumChatFormatting.GOLD + "77"
- + EnumChatFormatting.GRAY
- + " Basic Photolithography Framework Casing")
- .addStructureInfo(EnumChatFormatting.GOLD + "12" + EnumChatFormatting.GRAY + " Grate Machine Casing")
- .addStructureInfo(EnumChatFormatting.GOLD + "25" + EnumChatFormatting.GRAY + " Plascrete Block")
- .addStructureInfo(
- EnumChatFormatting.BLUE + "Tier "
- + EnumChatFormatting.DARK_PURPLE
- + 2
- + EnumChatFormatting.BLUE
- + " (Adds to Tier "
- + EnumChatFormatting.DARK_PURPLE
- + 1
- + EnumChatFormatting.BLUE
- + "):")
- .addStructureInfo(EnumChatFormatting.GOLD + "34" + EnumChatFormatting.GRAY + " Duranium Frame Box")
- .addStructureInfo(
- EnumChatFormatting.GOLD + "158"
- + EnumChatFormatting.GRAY
- + " Reinforced Photolithography Framework Casing")
- .addStructureInfo(
- EnumChatFormatting.BLUE + "Tier "
- + EnumChatFormatting.DARK_PURPLE
- + 3
- + EnumChatFormatting.BLUE
- + ":")
- .addStructureInfo(
- EnumChatFormatting.GOLD + "292"
- + EnumChatFormatting.GRAY
- + " Radiation Proof Photolithography Framework Casing")
- .addStructureInfo(
- EnumChatFormatting.GOLD + "76" + EnumChatFormatting.GRAY + " Radiant Naquadah Alloy Casing")
- .addStructureInfo(EnumChatFormatting.BLUE + "Biochamber Upgrade")
- .addStructureInfo(
- EnumChatFormatting.GOLD + "68"
- + EnumChatFormatting.GRAY
- + " Clean Stainless Steel Machine Casing")
- .addStructureInfo(
- EnumChatFormatting.GOLD + "40" + EnumChatFormatting.GRAY + " Damascus Steel Frame Box")
- .addStructureInfo(EnumChatFormatting.GOLD + "72" + EnumChatFormatting.GRAY + " Reinforced Glass")
- .addStructureInfo(
- EnumChatFormatting.BLUE + "Liquid Cooling Tower (Tier "
- + EnumChatFormatting.DARK_PURPLE
- + 1
- + EnumChatFormatting.BLUE
- + "):")
- .addStructureInfo(
- EnumChatFormatting.GOLD + "40" + EnumChatFormatting.GRAY + " Damascus Steel Frame Box")
- .addStructureInfo(
- EnumChatFormatting.GOLD + "68" + EnumChatFormatting.GRAY + " Radiant Naquadah Alloy Casing")
- .addStructureInfo(
- EnumChatFormatting.GOLD + "12" + EnumChatFormatting.GRAY + " Extreme Engine Intake Casing")
- .addStructureInfo(
- EnumChatFormatting.GOLD + "20" + EnumChatFormatting.GRAY + " Tungstensteel Pipe Casing")
- .addStructureInfo(
- EnumChatFormatting.GOLD + "21"
- + EnumChatFormatting.GRAY
- + " Reinforced Photolithography Framework Casing")
- .addStructureInfo(
- EnumChatFormatting.BLUE + "Thermosink Radiator(Tier "
- + EnumChatFormatting.DARK_PURPLE
- + 2
- + EnumChatFormatting.BLUE
- + "):")
- .addStructureInfo(EnumChatFormatting.GOLD + "40" + EnumChatFormatting.GRAY + " Americium Frame Box")
- .addStructureInfo(
- EnumChatFormatting.GOLD + "41"
- + EnumChatFormatting.GRAY
- + " Reinforced Photolithography Framework Casing")
- .addStructureInfo(
- EnumChatFormatting.GOLD + "8" + EnumChatFormatting.GRAY + " Superconducting Coil Block")
- .addStructureInfo(
- EnumChatFormatting.GOLD + "20" + EnumChatFormatting.GRAY + " Tungstensteel Pipe Casing")
- .addStructureInfo(EnumChatFormatting.GOLD + "48" + EnumChatFormatting.GRAY + " Infinity Cooled Casing")
- .toolTipFinisher("GregTech");
+ tt.addMachineType("Circuit Board Fabricator")
+ .addInfo("Controller for the PCB Factory")
+ .addInfo(
+ EnumChatFormatting.GOLD.toString() + EnumChatFormatting.BOLD
+ + "IMPORTANT!"
+ + " Check the configuration menu before building.")
+ .addInfo("Tier of the machine determines the available recipes.")
+ .addInfo("Machine tier (1-3) is set in the controller GUI.")
+ .addInfo("The configuration menu can be used to add upgrades.")
+ .addInfo("Each tier and upgrade requires additional structures.")
+ .addInfo("Power consumption is multiplied by Sqrt(structures).")
+ .addInfo("Tier 2 and 3 allow parallel by using extra nanites.")
+ .addInfo("Every doubling of nanites adds one parallel.")
+ .addInfo("1x->1, 2x->2, 4x->3, 8x->4 with no limit.")
+ .addInfo("Recipes require a cooling upgrade to be overclocked.")
+ .addInfo("Liquid Cooling uses 10 L/s of distilled water and enables default overclocks.")
+ .addInfo("Thermosink uses 10 L/s of Space Coolant and enables perfect overclocks.")
+ .addInfo("Trace size can be changed to modify the material usage and machine speed.")
+ .addInfo(AuthorBlueWeabo)
+ .beginStructureBlock(30, 38, 13, false)
+ .addSeparator()
+ .addMaintenanceHatch(EnumChatFormatting.GOLD + "1", 1)
+ .addEnergyHatch(EnumChatFormatting.GOLD + "1" + EnumChatFormatting.GRAY + "+", 1)
+ .addInputBus(EnumChatFormatting.GOLD + "1" + EnumChatFormatting.GRAY + "+", 1)
+ .addOutputBus(EnumChatFormatting.GOLD + "1" + EnumChatFormatting.GRAY + "+", 1)
+ .addInputHatch(EnumChatFormatting.GOLD + "1" + EnumChatFormatting.GRAY + "+", 1)
+ .addStructureInfo(
+ "Coolant Hatch (Input Hatch): " + EnumChatFormatting.GOLD
+ + "1"
+ + EnumChatFormatting.GRAY
+ + "Center of the Liquid Cooling/Thermosink")
+ .addStructureInfo(
+ EnumChatFormatting.BLUE + "Base Multi (Tier "
+ + EnumChatFormatting.DARK_PURPLE
+ + 1
+ + EnumChatFormatting.BLUE
+ + "):")
+ .addStructureInfo(EnumChatFormatting.GOLD + "40" + EnumChatFormatting.GRAY + " Damascus Steel Frame Box")
+ .addStructureInfo(EnumChatFormatting.GOLD + "9" + EnumChatFormatting.GRAY + " Vibrant Alloy Frame Box")
+ .addStructureInfo(EnumChatFormatting.GOLD + "25" + EnumChatFormatting.GRAY + " Reinforced Glass")
+ .addStructureInfo(
+ EnumChatFormatting.GOLD + "77" + EnumChatFormatting.GRAY + " Basic Photolithography Framework Casing")
+ .addStructureInfo(EnumChatFormatting.GOLD + "12" + EnumChatFormatting.GRAY + " Grate Machine Casing")
+ .addStructureInfo(EnumChatFormatting.GOLD + "25" + EnumChatFormatting.GRAY + " Plascrete Block")
+ .addStructureInfo(
+ EnumChatFormatting.BLUE + "Tier "
+ + EnumChatFormatting.DARK_PURPLE
+ + 2
+ + EnumChatFormatting.BLUE
+ + " (Adds to Tier "
+ + EnumChatFormatting.DARK_PURPLE
+ + 1
+ + EnumChatFormatting.BLUE
+ + "):")
+ .addStructureInfo(EnumChatFormatting.GOLD + "34" + EnumChatFormatting.GRAY + " Duranium Frame Box")
+ .addStructureInfo(
+ EnumChatFormatting.GOLD + "158"
+ + EnumChatFormatting.GRAY
+ + " Reinforced Photolithography Framework Casing")
+ .addStructureInfo(
+ EnumChatFormatting.BLUE + "Tier "
+ + EnumChatFormatting.DARK_PURPLE
+ + 3
+ + EnumChatFormatting.BLUE
+ + ":")
+ .addStructureInfo(
+ EnumChatFormatting.GOLD + "292"
+ + EnumChatFormatting.GRAY
+ + " Radiation Proof Photolithography Framework Casing")
+ .addStructureInfo(EnumChatFormatting.GOLD + "76" + EnumChatFormatting.GRAY + " Radiant Naquadah Alloy Casing")
+ .addStructureInfo(EnumChatFormatting.BLUE + "Biochamber Upgrade")
+ .addStructureInfo(
+ EnumChatFormatting.GOLD + "68" + EnumChatFormatting.GRAY + " Clean Stainless Steel Machine Casing")
+ .addStructureInfo(EnumChatFormatting.GOLD + "40" + EnumChatFormatting.GRAY + " Damascus Steel Frame Box")
+ .addStructureInfo(EnumChatFormatting.GOLD + "72" + EnumChatFormatting.GRAY + " Reinforced Glass")
+ .addStructureInfo(
+ EnumChatFormatting.BLUE + "Liquid Cooling Tower (Tier "
+ + EnumChatFormatting.DARK_PURPLE
+ + 1
+ + EnumChatFormatting.BLUE
+ + "):")
+ .addStructureInfo(EnumChatFormatting.GOLD + "40" + EnumChatFormatting.GRAY + " Damascus Steel Frame Box")
+ .addStructureInfo(EnumChatFormatting.GOLD + "68" + EnumChatFormatting.GRAY + " Radiant Naquadah Alloy Casing")
+ .addStructureInfo(EnumChatFormatting.GOLD + "12" + EnumChatFormatting.GRAY + " Extreme Engine Intake Casing")
+ .addStructureInfo(EnumChatFormatting.GOLD + "20" + EnumChatFormatting.GRAY + " Tungstensteel Pipe Casing")
+ .addStructureInfo(
+ EnumChatFormatting.GOLD + "21"
+ + EnumChatFormatting.GRAY
+ + " Reinforced Photolithography Framework Casing")
+ .addStructureInfo(
+ EnumChatFormatting.BLUE + "Thermosink Radiator(Tier "
+ + EnumChatFormatting.DARK_PURPLE
+ + 2
+ + EnumChatFormatting.BLUE
+ + "):")
+ .addStructureInfo(EnumChatFormatting.GOLD + "40" + EnumChatFormatting.GRAY + " Americium Frame Box")
+ .addStructureInfo(
+ EnumChatFormatting.GOLD + "41"
+ + EnumChatFormatting.GRAY
+ + " Reinforced Photolithography Framework Casing")
+ .addStructureInfo(EnumChatFormatting.GOLD + "8" + EnumChatFormatting.GRAY + " Superconducting Coil Block")
+ .addStructureInfo(EnumChatFormatting.GOLD + "20" + EnumChatFormatting.GRAY + " Tungstensteel Pipe Casing")
+ .addStructureInfo(EnumChatFormatting.GOLD + "48" + EnumChatFormatting.GRAY + " Infinity Cooled Casing")
+ .toolTipFinisher("GregTech");
return tt;
}
@@ -1124,21 +1273,34 @@ public class GT_MetaTileEntity_PCBFactory extends
buildContext.addSyncedWindow(10, this::createConfigurationWindow);
builder.widget(
new ButtonWidget().setOnClick(
- (clickData, widget) -> { if (!widget.isClient()) widget.getContext().openSyncedWindow(10); })
- .setSize(16, 16).setBackground(() -> {
- List<UITexture> ret = new ArrayList<>();
- ret.add(GT_UITextures.BUTTON_STANDARD);
- ret.add(GT_UITextures.OVERLAY_BUTTON_CYCLIC);
- return ret.toArray(new IDrawable[0]);
- }).addTooltip("Configuration Menu").setPos(174, 130))
- .widget(
- new TextWidget(new Text("Tier")).setTextAlignment(Alignment.Center).setScale(0.91f)
- .setSize(20, 16).setPos(173, 98))
- .widget(
- new TextFieldWidget().setGetterInt(() -> mSetTier).setSetterInt(val -> { mSetTier = val; })
- .setNumbers(1, 3).setTextColor(Color.WHITE.normal).setTextAlignment(Alignment.Center)
- .addTooltip("PCB Factory Tier").setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD)
- .setSize(18, 18).setPos(173, 110));
+ (clickData, widget) -> {
+ if (!widget.isClient()) widget.getContext()
+ .openSyncedWindow(10);
+ })
+ .setSize(16, 16)
+ .setBackground(() -> {
+ List<UITexture> ret = new ArrayList<>();
+ ret.add(GT_UITextures.BUTTON_STANDARD);
+ ret.add(GT_UITextures.OVERLAY_BUTTON_CYCLIC);
+ return ret.toArray(new IDrawable[0]);
+ })
+ .addTooltip("Configuration Menu")
+ .setPos(174, 130))
+ .widget(
+ new TextWidget(new Text("Tier")).setTextAlignment(Alignment.Center)
+ .setScale(0.91f)
+ .setSize(20, 16)
+ .setPos(173, 98))
+ .widget(
+ new TextFieldWidget().setGetterInt(() -> mSetTier)
+ .setSetterInt(val -> { mSetTier = val; })
+ .setNumbers(1, 3)
+ .setTextColor(Color.WHITE.normal)
+ .setTextAlignment(Alignment.Center)
+ .addTooltip("PCB Factory Tier")
+ .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD)
+ .setSize(18, 18)
+ .setPos(173, 110));
}
protected ModularWindow createConfigurationWindow(final EntityPlayer player) {
@@ -1146,192 +1308,364 @@ public class GT_MetaTileEntity_PCBFactory extends
builder.setBackground(GT_UITextures.BACKGROUND_SINGLEBLOCK_DEFAULT);
builder.setGuiTint(getGUIColorization());
builder.widget(
- new DrawableWidget().setDrawable(GT_UITextures.OVERLAY_BUTTON_CYCLIC).setPos(5, 5).setSize(16, 16))
- .widget(new TextWidget("Configuration Menu").setPos(25, 9))
- .widget(ButtonWidget.closeWindowButton(true).setPos(185, 3))
- .widget(
- new DynamicPositionedColumn().setSynced(false)
- .widget(
- new MultiChildWidget()
- .addChild(new CycleButtonWidget().setToggle(() -> mBioUpgrade, val -> {
- mBioUpgrade = val;
- if (!mBioUpgrade) {
- GT_Utility.sendChatToPlayer(
- player,
- GT_Utility
- .trans("339.1", "Biochamber Upgrade Disabled"));
- } else {
- GT_Utility.sendChatToPlayer(
- player,
- GT_Utility.trans("339", "Biochamber Upgrade Enabled"));
- }
- }).setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE)
- .setSize(90, 18).addTooltip(
- "Enables nanites to construct organic circuitry. Required for Bioware and Wetware boards."))
- .addChild(
- new DrawableWidget()
- .setDrawable(GT_UITextures.OVERLAY_BUTTON_CYCLIC)
- .setSize(18, 18))
- .addChild(
- new TextWidget("Biochamber").setTextAlignment(Alignment.Center)
- .setPos(23, 5))
- .setEnabled(widget -> !getBaseMetaTileEntity().isActive()))
- .widget(
- new MultiChildWidget()
- .addChild(new CycleButtonWidget().setToggle(() -> mBioRotate, val -> {
- mBioRotate = val;
- if (!mBioRotate) {
- GT_Utility.sendChatToPlayer(
- player,
- GT_Utility
- .trans("340.1", "Rotated biochamber disabled"));
- } else {
- GT_Utility.sendChatToPlayer(
- player,
- GT_Utility.trans("340", "Rotated biochamber enabled"));
- }
- }).setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE)
- .setSize(90, 18)
- .addTooltip("Rotates the biochamber by 90 degrees."))
- .addChild(
- new DrawableWidget()
- .setDrawable(GT_UITextures.OVERLAY_BUTTON_CYCLIC)
- .setSize(18, 18))
- .addChild(
- new TextWidget("Bio Rotation")
- .setTextAlignment(Alignment.Center).setPos(23, 5))
- .setEnabled(widget -> !getBaseMetaTileEntity().isActive()))
- .widget(
- new MultiChildWidget()
- .addChild(new CycleButtonWidget().setToggle(() -> mOCTier1, val -> {
- mOCTier1 = val;
- if (!mOCTier1) {
- GT_Utility.sendChatToPlayer(
- player,
- GT_Utility.trans("341.1", "Tier 1 cooling disabled"));
- } else {
- GT_Utility.sendChatToPlayer(
- player,
- GT_Utility.trans("341", "Tier 1 cooling enabled"));
- }
- }).setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE)
- .setSize(90, 18).addTooltip(
- "Allows for overclocking. Requires 10 L/s of distilled water. Cooling upgrades are mutually exclusive."))
- .addChild(
- new DrawableWidget()
- .setDrawable(GT_UITextures.OVERLAY_BUTTON_CYCLIC)
- .setSize(18, 18))
- .addChild(
- new TextWidget("Liquid Cooling")
- .setTextAlignment(Alignment.Center).setPos(20, 5))
- .setEnabled(widget -> !getBaseMetaTileEntity().isActive()))
- .widget(
- new MultiChildWidget()
- .addChild(new CycleButtonWidget().setToggle(() -> mOCTier2, val -> {
- mOCTier2 = val;
- if (!mOCTier2) {
- GT_Utility.sendChatToPlayer(
- player,
- GT_Utility.trans("342.1", "Tier 2 cooling disabled"));
- } else {
- GT_Utility.sendChatToPlayer(
- player,
- GT_Utility.trans("342", "Tier 2 cooling enabled"));
- }
- }).setVariableBackground(GT_UITextures.BUTTON_STANDARD_TOGGLE)
- .setSize(90, 18).addTooltip(
- "Enables perfect overclocking by allowing nanites to work with extreme speed and efficiency. Uses 10 L/s of space coolant."))
- .addChild(
- new DrawableWidget()
- .setDrawable(GT_UITextures.OVERLAY_BUTTON_CYCLIC)
- .setSize(18, 18))
- .addChild(
- new TextWidget("Thermosink").setTextAlignment(Alignment.Center)
- .setPos(20, 5))
- .setEnabled(widget -> !getBaseMetaTileEntity().isActive()))
- .widget(
- new TextWidget(new Text("Trace Size")).setSize(90, 18)
- .setEnabled(widget -> !getBaseMetaTileEntity().isActive()).setPos(0, 4))
- .widget(
- new TextFieldWidget()
- .setGetterInt(() -> (int) ((1f / mRoughnessMultiplier) * 100f))
- .setSetterInt(val -> { mRoughnessMultiplier = 100f / val; })
- .setNumbers(50, 200).setTextColor(Color.WHITE.normal)
- .setTextAlignment(Alignment.Center)
- .addTooltip(
- "Set the trace size. Smaller traces allow material savings but take longer to fabricate. Larger traces waste material but are fast. 50-200 μm.")
- .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD).setSize(90, 16))
- .widget(
- new DrawableWidget().setDrawable(GT_UITextures.OVERLAY_BUTTON_CROSS)
- .setSize(18, 18)
- .addTooltip(
- new Text("Can't change configuration when running !")
- .color(Color.RED.dark(3)))
- .setEnabled(widget -> getBaseMetaTileEntity().isActive()))
- .setPos(10, 25))
- .widget(
- new DynamicPositionedColumn().setSynced(false)
- .widget(
- new TextWidget(new Text("Bio Upgrade Offsets")).setSize(72, 18)
- .setEnabled(widget -> !getBaseMetaTileEntity().isActive()))
- .widget(
- new DynamicPositionedRow().setSynced(false).widget(
- new TextFieldWidget().setGetterInt(() -> mBioOffsets[0])
- .setSetterInt(val -> { mBioOffsets[0] = val; })
- .setNumbers(-16, 16).setTextColor(Color.WHITE.normal)
- .setTextAlignment(Alignment.Center).addTooltip("X Offset")
- .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD)
- .setSize(36, 18))
- .widget(
- new TextFieldWidget().setGetterInt(() -> mBioOffsets[1])
- .setSetterInt(val -> { mBioOffsets[1] = val; })
- .setNumbers(-16, 16).setTextColor(Color.WHITE.normal)
- .setTextAlignment(Alignment.Center)
- .addTooltip("Z Offset")
- .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD)
- .setSize(36, 18))
- .setEnabled(widget -> !getBaseMetaTileEntity().isActive()))
- .widget(
- new TextWidget(new Text("Cooler Tier 1 Offsets")).setSize(72, 18)
- .setEnabled(widget -> !getBaseMetaTileEntity().isActive()))
- .widget(
- new DynamicPositionedRow().setSynced(false).widget(
- new TextFieldWidget().setGetterInt(() -> mOCTier1Offsets[0])
- .setSetterInt(val -> { mOCTier1Offsets[0] = val; })
- .setNumbers(-16, 16).setTextColor(Color.WHITE.normal)
- .setTextAlignment(Alignment.Center).addTooltip("X Offset")
- .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD)
- .setSize(36, 18))
- .widget(
- new TextFieldWidget().setGetterInt(() -> mOCTier1Offsets[1])
- .setSetterInt(val -> { mOCTier1Offsets[1] = val; })
- .setNumbers(-16, 16).setTextColor(Color.WHITE.normal)
- .setTextAlignment(Alignment.Center)
- .addTooltip("Z Offset")
- .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD)
- .setSize(36, 18))
- .setEnabled(widget -> !getBaseMetaTileEntity().isActive()))
- .widget(
- new TextWidget(new Text("Cooler Tier 2 Offsets")).setSize(72, 18)
- .setEnabled(widget -> !getBaseMetaTileEntity().isActive()))
- .widget(
- new DynamicPositionedRow().setSynced(false).widget(
- new TextFieldWidget().setGetterInt(() -> mOCTier2Offsets[0])
- .setSetterInt(val -> { mOCTier2Offsets[0] = val; })
- .setNumbers(-16, 16).setTextColor(Color.WHITE.normal)
- .setTextAlignment(Alignment.Center).addTooltip("X Offset")
- .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD)
- .setSize(36, 18))
- .widget(
- new TextFieldWidget().setGetterInt(() -> mOCTier2Offsets[1])
- .setSetterInt(val -> { mOCTier2Offsets[1] = val; })
- .setNumbers(-16, 16).setTextColor(Color.WHITE.normal)
- .setTextAlignment(Alignment.Center)
- .addTooltip("Z Offset")
- .setBackground(GT_UITextures.BACKGROUND_TEXT_FIELD)
- .setSize(36, 18))
- .setEnabled(widget -> !getBaseMetaTileEntity().isActive()))
- .setPos(110, 25));
+ new DrawableWidget().setDrawable(GT_UITextures.OVERLAY_BUTTON_CYCLIC)
+ .setPos(5, 5)
+ .setSize(16, 16))
+ .widget(new TextWidget("Configuration Menu").setPos(25, 9))
+ .widget(
+ ButtonWidget.closeWindowButton(true)
+ .setPos(185, 3))
+ .widget(
+ new DynamicPositionedColumn().setSynced(false)
+ .widget(
+ new MultiChildWidget().addChild(
+ new CycleButtonWidget().setToggle(
+ () -> mBioUpgrade,
+ val -> {
+ mBioUpgrade = val;
+ if (!mBioUpgrade) {
+ GT_Utility.sendChatToPlayer(
+ player,
+ GT_Utility.trans(
+ "339.1",
+ "Biochamber Upgrade Disabled"));
+ } else {
+ GT_Utility.sendChatToPlayer(
+ player,
+ GT_Utility.trans(
+ "339",
+ "Biochamber Upgrade Enabled"));
+ }
+ })
+ .setVariableBackground(
+ GT_UITextures.BUTTON_STANDARD_TOGGLE)
+ .setSize(90, 18)
+ .addTooltip(
+ "Enables nanites to construct organic circuitry. Required for Bioware and Wetware boards."))
+ .addChild(
+ new DrawableWidget().setDrawable(
+ GT_UITextures.OVERLAY_BUTTON_CYCLIC)
+ .setSize(
+ 18,
+ 18))
+ .addChild(
+ new TextWidget(
+ "Biochamber").setTextAlignment(
+ Alignment.Center)
+ .setPos(
+ 23,
+ 5))
+ .setEnabled(
+ widget -> !getBaseMetaTileEntity().isActive()))
+ .widget(
+ new MultiChildWidget().addChild(
+ new CycleButtonWidget().setToggle(
+ () -> mBioRotate,
+ val -> {
+ mBioRotate = val;
+ if (!mBioRotate) {
+ GT_Utility.sendChatToPlayer(
+ player,
+ GT_Utility.trans(
+ "340.1",
+ "Rotated biochamber disabled"));
+ } else {
+ GT_Utility.sendChatToPlayer(
+ player,
+ GT_Utility.trans(
+ "340",
+ "Rotated biochamber enabled"));
+ }
+ })
+ .setVariableBackground(
+ GT_UITextures.BUTTON_STANDARD_TOGGLE)
+ .setSize(90, 18)
+ .addTooltip(
+ "Rotates the biochamber by 90 degrees."))
+ .addChild(
+ new DrawableWidget().setDrawable(
+ GT_UITextures.OVERLAY_BUTTON_CYCLIC)
+ .setSize(
+ 18,
+ 18))
+ .addChild(
+ new TextWidget(
+ "Bio Rotation").setTextAlignment(
+ Alignment.Center)
+ .setPos(
+ 23,
+ 5))
+ .setEnabled(
+ widget -> !getBaseMetaTileEntity().isActive()))
+ .widget(
+ new MultiChildWidget().addChild(
+ new CycleButtonWidget().setToggle(
+ () -> mOCTier1,
+ val -> {
+ mOCTier1 = val;
+ if (!mOCTier1) {
+ GT_Utility.sendChatToPlayer(
+ player,
+ GT_Utility.trans(
+ "341.1",
+ "Tier 1 cooling disabled"));
+ } else {
+ GT_Utility.sendChatToPlayer(
+ player,
+ GT_Utility.trans(
+ "341",
+ "Tier 1 cooling enabled"));
+ }
+ })
+ .setVariableBackground(
+ GT_UITextures.BUTTON_STANDARD_TOGGLE)
+ .setSize(90, 18)
+ .addTooltip(
+ "Allows for overclocking. Requires 10 L/s of distilled water. Cooling upgrades are mutually exclusive."))
+ .addChild(
+ new DrawableWidget().setDrawable(
+ GT_UITextures.OVERLAY_BUTTON_CYCLIC)
+ .setSize(
+ 18,
+ 18))
+ .addChild(
+ new TextWidget(
+ "Liquid Cooling").setTextAlignment(
+ Alignment.Center)
+ .setPos(
+ 20,
+ 5))
+ .setEnabled(
+ widget -> !getBaseMetaTileEntity().isActive()))
+ .widget(
+ new MultiChildWidget().addChild(
+ new CycleButtonWidget().setToggle(
+ () -> mOCTier2,
+ val -> {
+ mOCTier2 = val;
+ if (!mOCTier2) {
+ GT_Utility.sendChatToPlayer(
+ player,
+ GT_Utility.trans(
+ "342.1",
+ "Tier 2 cooling disabled"));
+ } else {
+ GT_Utility.sendChatToPlayer(
+ player,
+ GT_Utility.trans(
+ "342",
+ "Tier 2 cooling enabled"));
+ }
+ })
+ .setVariableBackground(
+ GT_UITextures.BUTTON_STANDARD_TOGGLE)
+ .setSize(90, 18)
+ .addTooltip(
+ "Enables perfect overclocking by allowing nanites to work with extreme speed and efficiency. Uses 10 L/s of space coolant."))
+ .addChild(
+ new DrawableWidget().setDrawable(
+ GT_UITextures.OVERLAY_BUTTON_CYCLIC)
+ .setSize(
+ 18,
+ 18))
+ .addChild(
+ new TextWidget(
+ "Thermosink").setTextAlignment(
+ Alignment.Center)
+ .setPos(
+ 20,
+ 5))
+ .setEnabled(
+ widget -> !getBaseMetaTileEntity().isActive()))
+ .widget(
+ new TextWidget(new Text("Trace Size")).setSize(90, 18)
+ .setEnabled(
+ widget -> !getBaseMetaTileEntity().isActive())
+ .setPos(0, 4))
+ .widget(
+ new TextFieldWidget().setGetterInt(
+ () -> (int) ((1f / mRoughnessMultiplier) * 100f))
+ .setSetterInt(
+ val -> {
+ mRoughnessMultiplier = 100f
+ / val;
+ })
+ .setNumbers(50, 200)
+ .setTextColor(Color.WHITE.normal)
+ .setTextAlignment(Alignment.Center)
+ .addTooltip(
+ "Set the trace size. Smaller traces allow material savings but take longer to fabricate. Larger traces waste material but are fast. 50-200 μm.")
+ .setBackground(
+ GT_UITextures.BACKGROUND_TEXT_FIELD)
+ .setSize(90, 16))
+ .widget(
+ new DrawableWidget().setDrawable(
+ GT_UITextures.OVERLAY_BUTTON_CROSS)
+ .setSize(18, 18)
+ .addTooltip(
+ new Text(
+ "Can't change configuration when running !").color(
+ Color.RED.dark(
+ 3)))
+ .setEnabled(
+ widget -> getBaseMetaTileEntity().isActive()))
+ .setPos(10, 25))
+ .widget(
+ new DynamicPositionedColumn().setSynced(false)
+ .widget(
+ new TextWidget(
+ new Text("Bio Upgrade Offsets")).setSize(72, 18)
+ .setEnabled(
+ widget -> !getBaseMetaTileEntity().isActive()))
+ .widget(
+ new DynamicPositionedRow().setSynced(false)
+ .widget(
+ new TextFieldWidget().setGetterInt(
+ () -> mBioOffsets[0])
+ .setSetterInt(
+ val -> {
+ mBioOffsets[0] = val;
+ })
+ .setNumbers(
+ -16,
+ 16)
+ .setTextColor(
+ Color.WHITE.normal)
+ .setTextAlignment(
+ Alignment.Center)
+ .addTooltip(
+ "X Offset")
+ .setBackground(
+ GT_UITextures.BACKGROUND_TEXT_FIELD)
+ .setSize(
+ 36,
+ 18))
+ .widget(
+ new TextFieldWidget().setGetterInt(
+ () -> mBioOffsets[1])
+ .setSetterInt(
+ val -> {
+ mBioOffsets[1] = val;
+ })
+ .setNumbers(
+ -16,
+ 16)
+ .setTextColor(
+ Color.WHITE.normal)
+ .setTextAlignment(
+ Alignment.Center)
+ .addTooltip(
+ "Z Offset")
+ .setBackground(
+ GT_UITextures.BACKGROUND_TEXT_FIELD)
+ .setSize(
+ 36,
+ 18))
+ .setEnabled(
+ widget -> !getBaseMetaTileEntity().isActive()))
+ .widget(
+ new TextWidget(
+ new Text("Cooler Tier 1 Offsets")).setSize(72, 18)
+ .setEnabled(
+ widget -> !getBaseMetaTileEntity().isActive()))
+ .widget(
+ new DynamicPositionedRow().setSynced(false)
+ .widget(
+ new TextFieldWidget().setGetterInt(
+ () -> mOCTier1Offsets[0])
+ .setSetterInt(
+ val -> {
+ mOCTier1Offsets[0] = val;
+ })
+ .setNumbers(
+ -16,
+ 16)
+ .setTextColor(
+ Color.WHITE.normal)
+ .setTextAlignment(
+ Alignment.Center)
+ .addTooltip(
+ "X Offset")
+ .setBackground(
+ GT_UITextures.BACKGROUND_TEXT_FIELD)
+ .setSize(
+ 36,
+ 18))
+ .widget(
+ new TextFieldWidget().setGetterInt(
+ () -> mOCTier1Offsets[1])
+ .setSetterInt(
+ val -> {
+ mOCTier1Offsets[1] = val;
+ })
+ .setNumbers(
+ -16,
+ 16)
+ .setTextColor(
+ Color.WHITE.normal)
+ .setTextAlignment(
+ Alignment.Center)
+ .addTooltip(
+ "Z Offset")
+ .setBackground(
+ GT_UITextures.BACKGROUND_TEXT_FIELD)
+ .setSize(
+ 36,
+ 18))
+ .setEnabled(
+ widget -> !getBaseMetaTileEntity().isActive()))
+ .widget(
+ new TextWidget(
+ new Text("Cooler Tier 2 Offsets")).setSize(72, 18)
+ .setEnabled(
+ widget -> !getBaseMetaTileEntity().isActive()))
+ .widget(
+ new DynamicPositionedRow().setSynced(false)
+ .widget(
+ new TextFieldWidget().setGetterInt(
+ () -> mOCTier2Offsets[0])
+ .setSetterInt(
+ val -> {
+ mOCTier2Offsets[0] = val;
+ })
+ .setNumbers(
+ -16,
+ 16)
+ .setTextColor(
+ Color.WHITE.normal)
+ .setTextAlignment(
+ Alignment.Center)
+ .addTooltip(
+ "X Offset")
+ .setBackground(
+ GT_UITextures.BACKGROUND_TEXT_FIELD)
+ .setSize(
+ 36,
+ 18))
+ .widget(
+ new TextFieldWidget().setGetterInt(
+ () -> mOCTier2Offsets[1])
+ .setSetterInt(
+ val -> {
+ mOCTier2Offsets[1] = val;
+ })
+ .setNumbers(
+ -16,
+ 16)
+ .setTextColor(
+ Color.WHITE.normal)
+ .setTextAlignment(
+ Alignment.Center)
+ .addTooltip(
+ "Z Offset")
+ .setBackground(
+ GT_UITextures.BACKGROUND_TEXT_FIELD)
+ .setSize(
+ 36,
+ 18))
+ .setEnabled(
+ widget -> !getBaseMetaTileEntity().isActive()))
+ .setPos(110, 25));
return builder.build();
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PlasmaForge.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PlasmaForge.java
index d058bf1f42..25c3b7157e 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PlasmaForge.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PlasmaForge.java
@@ -480,19 +480,44 @@ public class GT_MetaTileEntity_PlasmaForge extends GT_MetaTileEntity_AbstractMul
private boolean isMultiChunkloaded = true;
protected static final String STRUCTURE_PIECE_MAIN = "main";
- private static final IStructureDefinition<GT_MetaTileEntity_PlasmaForge> STRUCTURE_DEFINITION = StructureDefinition
- .<GT_MetaTileEntity_PlasmaForge>builder().addShape(STRUCTURE_PIECE_MAIN, structure_string)
- .addElement(
- 'C',
- ofCoil(GT_MetaTileEntity_PlasmaForge::setCoilLevel, GT_MetaTileEntity_PlasmaForge::getCoilLevel))
- .addElement(
- 'b',
- buildHatchAdder(GT_MetaTileEntity_PlasmaForge.class)
- .atLeast(InputHatch, OutputHatch, InputBus, OutputBus, Energy, ExoticEnergy, Maintenance)
- .casingIndex(DIM_INJECTION_CASING).dot(3)
- .buildAndChain(GregTech_API.sBlockCasings1, DIM_INJECTION_CASING))
- .addElement('N', ofBlock(GregTech_API.sBlockCasings1, DIM_TRANS_CASING))
- .addElement('s', ofBlock(GregTech_API.sBlockCasings1, DIM_BRIDGE_CASING)).build();
+ private static final IStructureDefinition<GT_MetaTileEntity_PlasmaForge> STRUCTURE_DEFINITION = StructureDefinition.<GT_MetaTileEntity_PlasmaForge>builder()
+ .addShape(
+ STRUCTURE_PIECE_MAIN,
+ structure_string)
+ .addElement(
+ 'C',
+ ofCoil(
+ GT_MetaTileEntity_PlasmaForge::setCoilLevel,
+ GT_MetaTileEntity_PlasmaForge::getCoilLevel))
+ .addElement(
+ 'b',
+ buildHatchAdder(
+ GT_MetaTileEntity_PlasmaForge.class).atLeast(
+ InputHatch,
+ OutputHatch,
+ InputBus,
+ OutputBus,
+ Energy,
+ ExoticEnergy,
+ Maintenance)
+ .casingIndex(
+ DIM_INJECTION_CASING)
+ .dot(
+ 3)
+ .buildAndChain(
+ GregTech_API.sBlockCasings1,
+ DIM_INJECTION_CASING))
+ .addElement(
+ 'N',
+ ofBlock(
+ GregTech_API.sBlockCasings1,
+ DIM_TRANS_CASING))
+ .addElement(
+ 's',
+ ofBlock(
+ GregTech_API.sBlockCasings1,
+ DIM_BRIDGE_CASING))
+ .build();
@Override
protected boolean addBottomHatch(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
@@ -517,87 +542,87 @@ public class GT_MetaTileEntity_PlasmaForge extends GT_MetaTileEntity_AbstractMul
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
tt.addInfo("Transcending Dimensional Boundaries.")
- .addInfo(
- "Takes " + EnumChatFormatting.RED
- + GT_Utility.formatNumbers(max_efficiency_time_in_ticks / (3600 * 20))
- + EnumChatFormatting.GRAY
- + " hours of continuous run time to fully breach dimensional")
- .addInfo("boundaries and achieve maximum efficiency. This reduces fuel")
- .addInfo(
- "consumption by up to " + EnumChatFormatting.RED
- + GT_Utility.formatNumbers(100 * maximum_discount)
- + "%"
- + EnumChatFormatting.GRAY
- + ". Supports overclocking beyond MAX voltage.")
- .addInfo(AuthorColen).addSeparator().beginStructureBlock(33, 24, 33, false)
- .addStructureInfo("DTPF Structure is too complex! See schematic for details.")
- .addStructureInfo(
- EnumChatFormatting.GOLD + "2,112" + EnumChatFormatting.GRAY + " Heating coils required.")
- .addStructureInfo(
- EnumChatFormatting.GOLD + "120"
- + EnumChatFormatting.GRAY
- + " Dimensional bridge blocks required.")
- .addStructureInfo(
- EnumChatFormatting.GOLD + "1,270"
- + EnumChatFormatting.GRAY
- + " Dimensional injection casings required.")
- .addStructureInfo(
- EnumChatFormatting.GOLD + "2,121"
- + EnumChatFormatting.GRAY
- + " Dimensionally transcendent casings required.")
- .addStructureInfo("--------------------------------------------")
- .addStructureInfo(
- "Requires " + EnumChatFormatting.GOLD
- + "1"
- + EnumChatFormatting.GRAY
- + "-"
- + EnumChatFormatting.GOLD
- + "2"
- + EnumChatFormatting.GRAY
- + " energy hatches or "
- + EnumChatFormatting.GOLD
- + "1"
- + EnumChatFormatting.GRAY
- + " TT energy hatch.")
- .addStructureInfo(
- "Requires " + EnumChatFormatting.GOLD + "1" + EnumChatFormatting.GRAY + " maintenance hatch.")
- .addStructureInfo(
- "Requires " + EnumChatFormatting.GOLD
- + min_input_hatch
- + EnumChatFormatting.GRAY
- + "-"
- + EnumChatFormatting.GOLD
- + max_input_hatch
- + EnumChatFormatting.GRAY
- + " input hatches.")
- .addStructureInfo(
- "Requires " + EnumChatFormatting.GOLD
- + min_output_hatch
- + EnumChatFormatting.GRAY
- + "-"
- + EnumChatFormatting.GOLD
- + max_output_hatch
- + EnumChatFormatting.GRAY
- + " output hatches.")
- .addStructureInfo(
- "Requires " + EnumChatFormatting.GOLD
- + min_input_bus
- + EnumChatFormatting.GRAY
- + "-"
- + EnumChatFormatting.GOLD
- + max_input_bus
- + EnumChatFormatting.GRAY
- + " input busses.")
- .addStructureInfo(
- "Requires " + EnumChatFormatting.GOLD
- + min_output_bus
- + EnumChatFormatting.GRAY
- + "-"
- + EnumChatFormatting.GOLD
- + max_input_bus
- + EnumChatFormatting.GRAY
- + " output busses.")
- .addStructureInfo("--------------------------------------------").toolTipFinisher("Gregtech");
+ .addInfo(
+ "Takes " + EnumChatFormatting.RED
+ + GT_Utility.formatNumbers(max_efficiency_time_in_ticks / (3600 * 20))
+ + EnumChatFormatting.GRAY
+ + " hours of continuous run time to fully breach dimensional")
+ .addInfo("boundaries and achieve maximum efficiency. This reduces fuel")
+ .addInfo(
+ "consumption by up to " + EnumChatFormatting.RED
+ + GT_Utility.formatNumbers(100 * maximum_discount)
+ + "%"
+ + EnumChatFormatting.GRAY
+ + ". Supports overclocking beyond MAX voltage.")
+ .addInfo(AuthorColen)
+ .addSeparator()
+ .beginStructureBlock(33, 24, 33, false)
+ .addStructureInfo("DTPF Structure is too complex! See schematic for details.")
+ .addStructureInfo(EnumChatFormatting.GOLD + "2,112" + EnumChatFormatting.GRAY + " Heating coils required.")
+ .addStructureInfo(
+ EnumChatFormatting.GOLD + "120" + EnumChatFormatting.GRAY + " Dimensional bridge blocks required.")
+ .addStructureInfo(
+ EnumChatFormatting.GOLD + "1,270"
+ + EnumChatFormatting.GRAY
+ + " Dimensional injection casings required.")
+ .addStructureInfo(
+ EnumChatFormatting.GOLD + "2,121"
+ + EnumChatFormatting.GRAY
+ + " Dimensionally transcendent casings required.")
+ .addStructureInfo("--------------------------------------------")
+ .addStructureInfo(
+ "Requires " + EnumChatFormatting.GOLD
+ + "1"
+ + EnumChatFormatting.GRAY
+ + "-"
+ + EnumChatFormatting.GOLD
+ + "2"
+ + EnumChatFormatting.GRAY
+ + " energy hatches or "
+ + EnumChatFormatting.GOLD
+ + "1"
+ + EnumChatFormatting.GRAY
+ + " TT energy hatch.")
+ .addStructureInfo(
+ "Requires " + EnumChatFormatting.GOLD + "1" + EnumChatFormatting.GRAY + " maintenance hatch.")
+ .addStructureInfo(
+ "Requires " + EnumChatFormatting.GOLD
+ + min_input_hatch
+ + EnumChatFormatting.GRAY
+ + "-"
+ + EnumChatFormatting.GOLD
+ + max_input_hatch
+ + EnumChatFormatting.GRAY
+ + " input hatches.")
+ .addStructureInfo(
+ "Requires " + EnumChatFormatting.GOLD
+ + min_output_hatch
+ + EnumChatFormatting.GRAY
+ + "-"
+ + EnumChatFormatting.GOLD
+ + max_output_hatch
+ + EnumChatFormatting.GRAY
+ + " output hatches.")
+ .addStructureInfo(
+ "Requires " + EnumChatFormatting.GOLD
+ + min_input_bus
+ + EnumChatFormatting.GRAY
+ + "-"
+ + EnumChatFormatting.GOLD
+ + max_input_bus
+ + EnumChatFormatting.GRAY
+ + " input busses.")
+ .addStructureInfo(
+ "Requires " + EnumChatFormatting.GOLD
+ + min_output_bus
+ + EnumChatFormatting.GRAY
+ + "-"
+ + EnumChatFormatting.GOLD
+ + max_input_bus
+ + EnumChatFormatting.GRAY
+ + " output busses.")
+ .addStructureInfo("--------------------------------------------")
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -611,11 +636,20 @@ public class GT_MetaTileEntity_PlasmaForge extends GT_MetaTileEntity_AbstractMul
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
- if (aActive) return new ITexture[] { casingTexturePages[0][DIM_BRIDGE_CASING],
- TextureFactory.builder().addIcon(OVERLAY_DTPF_ON).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FUSION1_GLOW).extFacing().glow().build() };
- return new ITexture[] { casingTexturePages[0][DIM_BRIDGE_CASING],
- TextureFactory.builder().addIcon(OVERLAY_DTPF_OFF).extFacing().build() };
+ if (aActive) return new ITexture[] { casingTexturePages[0][DIM_BRIDGE_CASING], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_DTPF_ON)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FUSION1_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
+ return new ITexture[] { casingTexturePages[0][DIM_BRIDGE_CASING], TextureFactory.builder()
+ .addIcon(OVERLAY_DTPF_OFF)
+ .extFacing()
+ .build() };
}
return new ITexture[] { casingTexturePages[0][DIM_BRIDGE_CASING] };
}
@@ -658,8 +692,12 @@ public class GT_MetaTileEntity_PlasmaForge extends GT_MetaTileEntity_AbstractMul
long tTotalEU = GT_ExoticEnergyInputHelper.getTotalEuMulti(getExoticAndNormalEnergyHatchList());
// Look up recipe. If not found it will return null.
- GT_Recipe tRecipe_0 = GT_Recipe.GT_Recipe_Map.sPlasmaForgeRecipes
- .findRecipe(getBaseMetaTileEntity(), false, tTotalEU, tFluids, tItems);
+ GT_Recipe tRecipe_0 = GT_Recipe.GT_Recipe_Map.sPlasmaForgeRecipes.findRecipe(
+ getBaseMetaTileEntity(),
+ false,
+ tTotalEU,
+ tFluids,
+ tItems);
// Check if recipe found.
if (tRecipe_0 == null) return false;
@@ -808,8 +846,10 @@ public class GT_MetaTileEntity_PlasmaForge extends GT_MetaTileEntity_AbstractMul
for (GT_MetaTileEntity_Hatch tHatch : mExoticEnergyHatches) {
if (isValidMetaTileEntity(tHatch)) {
- storedEnergy += tHatch.getBaseMetaTileEntity().getStoredEU();
- maxEnergy += tHatch.getBaseMetaTileEntity().getEUCapacity();
+ storedEnergy += tHatch.getBaseMetaTileEntity()
+ .getStoredEU();
+ maxEnergy += tHatch.getBaseMetaTileEntity()
+ .getEUCapacity();
}
}
@@ -840,14 +880,14 @@ public class GT_MetaTileEntity_PlasmaForge extends GT_MetaTileEntity_AbstractMul
StatCollector.translateToLocal("GT5U.multiblock.mei") + ": "
+ EnumChatFormatting.YELLOW
+ GT_Utility.formatNumbers(
- GT_ExoticEnergyInputHelper
- .getAverageInputVoltageMulti(getExoticAndNormalEnergyHatchList()))
+ GT_ExoticEnergyInputHelper.getAverageInputVoltageMulti(
+ getExoticAndNormalEnergyHatchList()))
+ EnumChatFormatting.RESET
+ " EU/t(*"
+ EnumChatFormatting.YELLOW
+ GT_Utility.formatNumbers(
- GT_ExoticEnergyInputHelper
- .getMaxWorkingInputAmpsMulti(getExoticAndNormalEnergyHatchList()))
+ GT_ExoticEnergyInputHelper.getMaxWorkingInputAmpsMulti(
+ getExoticAndNormalEnergyHatchList()))
+ EnumChatFormatting.RESET
+ "A) "
+ StatCollector.translateToLocal("GT5U.machines.tier")
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PrimitiveBlastFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PrimitiveBlastFurnace.java
index 67afa63df8..04811bb5d4 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PrimitiveBlastFurnace.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PrimitiveBlastFurnace.java
@@ -52,16 +52,20 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn
@Override
protected IStructureDefinition<GT_MetaTileEntity_PrimitiveBlastFurnace> computeValue(Class<?> type) {
return IStructureDefinition.<GT_MetaTileEntity_PrimitiveBlastFurnace>builder()
- .addShape(
- "main",
- transpose(
- new String[][] { { "ccc", "c-c", "ccc" }, { "ccc", "clc", "ccc" },
- { "c~c", "clc", "ccc" }, { "ccc", "ccc", "ccc" }, }))
- .addElement('c', lazy(t -> ofBlock(t.getCasingBlock(), t.getCasingMetaID())))
- .addElement(
- 'l',
- ofChain(isAir(), ofBlockAnyMeta(Blocks.lava, 1), ofBlockAnyMeta(Blocks.flowing_lava, 1)))
- .build();
+ .addShape(
+ "main",
+ transpose(
+ new String[][] { { "ccc", "c-c", "ccc" },
+ { "ccc", "clc", "ccc" }, { "c~c", "clc", "ccc" },
+ { "ccc", "ccc", "ccc" }, }))
+ .addElement('c', lazy(t -> ofBlock(t.getCasingBlock(), t.getCasingMetaID())))
+ .addElement(
+ 'l',
+ ofChain(
+ isAir(),
+ ofBlockAnyMeta(Blocks.lava, 1),
+ ofBlockAnyMeta(Blocks.flowing_lava, 1)))
+ .build();
}
};
@@ -155,7 +159,8 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn
@Override
public boolean allowCoverOnSide(byte aSide, GT_ItemStack aCoverID) {
- return (GregTech_API.getCoverBehaviorNew(aCoverID.toStack()).isSimpleCover())
+ return (GregTech_API.getCoverBehaviorNew(aCoverID.toStack())
+ .isSimpleCover())
&& (super.allowCoverOnSide(aSide, aCoverID));
}
@@ -201,7 +206,9 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn
@Override
public void setExtendedFacing(ExtendedFacing alignment) {
- getBaseMetaTileEntity().setFrontFacing((byte) alignment.getDirection().ordinal());
+ getBaseMetaTileEntity().setFrontFacing(
+ (byte) alignment.getDirection()
+ .ordinal());
}
@Override
@@ -210,18 +217,19 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn
}
private boolean checkMachine() {
- return STRUCTURE_DEFINITION.get(this.getClass()).check(
- this,
- "main",
- getBaseMetaTileEntity().getWorld(),
- getExtendedFacing(),
- getBaseMetaTileEntity().getXCoord(),
- getBaseMetaTileEntity().getYCoord(),
- getBaseMetaTileEntity().getZCoord(),
- 1,
- 2,
- 0,
- !mMachine);
+ return STRUCTURE_DEFINITION.get(this.getClass())
+ .check(
+ this,
+ "main",
+ getBaseMetaTileEntity().getWorld(),
+ getExtendedFacing(),
+ getBaseMetaTileEntity().getXCoord(),
+ getBaseMetaTileEntity().getYCoord(),
+ getBaseMetaTileEntity().getZCoord(),
+ 1,
+ 2,
+ 0,
+ !mMachine);
}
protected abstract Block getCasingBlock();
@@ -240,12 +248,15 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn
if ((aBaseMetaTileEntity.isClientSide()) && (aBaseMetaTileEntity.isActive())) {
new WorldSpawnedEventBuilder.ParticleEventBuilder().setMotion(0D, 0.3D, 0D)
- .setIdentifier(ParticleFX.LARGE_SMOKE)
- .setPosition(
- lavaX + XSTR_INSTANCE.nextFloat(),
- aBaseMetaTileEntity.getOffsetY(aBaseMetaTileEntity.getBackFacing(), 1),
- lavaZ + XSTR_INSTANCE.nextFloat())
- .setWorld(getBaseMetaTileEntity().getWorld()).run();
+ .setIdentifier(ParticleFX.LARGE_SMOKE)
+ .setPosition(
+ lavaX + XSTR_INSTANCE.nextFloat(),
+ aBaseMetaTileEntity.getOffsetY(
+ aBaseMetaTileEntity.getBackFacing(),
+ 1),
+ lavaZ + XSTR_INSTANCE.nextFloat())
+ .setWorld(getBaseMetaTileEntity().getWorld())
+ .run();
}
if (aBaseMetaTileEntity.isServerSide()) {
if (mUpdated) {
@@ -265,7 +276,7 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn
this.mMaxProgresstime = 0;
GT_Mod.achievements.issueAchievement(
aBaseMetaTileEntity.getWorld()
- .getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()),
+ .getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()),
"steel");
}
} else if (aBaseMetaTileEntity.isAllowedToWork()) {
@@ -282,22 +293,26 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn
final short lavaY = aBaseMetaTileEntity.getYCoord();
if (aBaseMetaTileEntity.isActive()) {
if (aBaseMetaTileEntity.getAir(lavaX, lavaY, lavaZ)) {
- aBaseMetaTileEntity.getWorld().setBlock(lavaX, lavaY, lavaZ, Blocks.lava, 1, 2);
+ aBaseMetaTileEntity.getWorld()
+ .setBlock(lavaX, lavaY, lavaZ, Blocks.lava, 1, 2);
this.mUpdate = 1;
}
if (aBaseMetaTileEntity.getAir(lavaX, lavaY + 1, lavaZ)) {
- aBaseMetaTileEntity.getWorld().setBlock(lavaX, lavaY + 1, lavaZ, Blocks.lava, 1, 2);
+ aBaseMetaTileEntity.getWorld()
+ .setBlock(lavaX, lavaY + 1, lavaZ, Blocks.lava, 1, 2);
this.mUpdate = 1;
}
} else {
Block lowerLava = aBaseMetaTileEntity.getBlock(lavaX, lavaY, lavaZ);
Block upperLava = aBaseMetaTileEntity.getBlock(lavaX, lavaY + 1, lavaZ);
if (lowerLava == Blocks.lava) {
- aBaseMetaTileEntity.getWorld().setBlock(lavaX, lavaY, lavaZ, Blocks.air, 0, 2);
+ aBaseMetaTileEntity.getWorld()
+ .setBlock(lavaX, lavaY, lavaZ, Blocks.air, 0, 2);
this.mUpdate = 1;
}
if (upperLava == Blocks.lava) {
- aBaseMetaTileEntity.getWorld().setBlock(lavaX, lavaY + 1, lavaZ, Blocks.air, 0, 2);
+ aBaseMetaTileEntity.getWorld()
+ .setBlock(lavaX, lavaY + 1, lavaZ, Blocks.air, 0, 2);
this.mUpdate = 1;
}
}
@@ -349,9 +364,13 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn
}
ParticleEventBuilder particleEventBuilder = (new ParticleEventBuilder()).setMotion(0D, 0D, 0D)
- .setPosition(x, y, z).setWorld(getBaseMetaTileEntity().getWorld());
- particleEventBuilder.setIdentifier(ParticleFX.SMOKE).run();
- particleEventBuilder.setIdentifier(ParticleFX.FLAME).run();
+ .setPosition(x, y, z)
+ .setWorld(
+ getBaseMetaTileEntity().getWorld());
+ particleEventBuilder.setIdentifier(ParticleFX.SMOKE)
+ .run();
+ particleEventBuilder.setIdentifier(ParticleFX.FLAME)
+ .run();
}
}
@@ -449,21 +468,22 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn
@Override
public int survivalConstruct(ItemStack stackSize, int elementBudget, ISurvivalBuildEnvironment env) {
if (mMachine) return -1;
- return STRUCTURE_DEFINITION.get(getClass()).survivalBuild(
- this,
- stackSize,
- "main",
- getBaseMetaTileEntity().getWorld(),
- getExtendedFacing(),
- getBaseMetaTileEntity().getXCoord(),
- getBaseMetaTileEntity().getYCoord(),
- getBaseMetaTileEntity().getZCoord(),
- 1,
- 2,
- 0,
- elementBudget,
- env,
- false);
+ return STRUCTURE_DEFINITION.get(getClass())
+ .survivalBuild(
+ this,
+ stackSize,
+ "main",
+ getBaseMetaTileEntity().getWorld(),
+ getExtendedFacing(),
+ getBaseMetaTileEntity().getXCoord(),
+ getBaseMetaTileEntity().getYCoord(),
+ getBaseMetaTileEntity().getZCoord(),
+ 1,
+ 2,
+ 0,
+ elementBudget,
+ env,
+ false);
}
@Override
@@ -473,19 +493,20 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn
@Override
public void construct(ItemStack stackSize, boolean hintsOnly) {
- STRUCTURE_DEFINITION.get(getClass()).buildOrHints(
- this,
- stackSize,
- "main",
- getBaseMetaTileEntity().getWorld(),
- getExtendedFacing(),
- getBaseMetaTileEntity().getXCoord(),
- getBaseMetaTileEntity().getYCoord(),
- getBaseMetaTileEntity().getZCoord(),
- 1,
- 2,
- 0,
- hintsOnly);
+ STRUCTURE_DEFINITION.get(getClass())
+ .buildOrHints(
+ this,
+ stackSize,
+ "main",
+ getBaseMetaTileEntity().getWorld(),
+ getExtendedFacing(),
+ getBaseMetaTileEntity().getXCoord(),
+ getBaseMetaTileEntity().getYCoord(),
+ getBaseMetaTileEntity().getZCoord(),
+ 1,
+ 2,
+ 0,
+ hintsOnly);
}
@Override
@@ -496,39 +517,53 @@ public abstract class GT_MetaTileEntity_PrimitiveBlastFurnace extends MetaTileEn
@Override
public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
builder.widget(
- new SlotWidget(inventoryHandler, 0).setBackground(
- getGUITextureSet().getItemSlot(),
- GT_UITextures.OVERLAY_SLOT_INGOT_STEAM.get(getSteamVariant())).setPos(33, 15))
- .widget(
- new SlotWidget(inventoryHandler, 1).setBackground(
- getGUITextureSet().getItemSlot(),
- GT_UITextures.OVERLAY_SLOT_DUST_STEAM.get(getSteamVariant())).setPos(33, 33))
- .widget(
- new SlotWidget(inventoryHandler, 2).setBackground(
- getGUITextureSet().getItemSlot(),
- GT_UITextures.OVERLAY_SLOT_FURNACE_STEAM.get(getSteamVariant())).setPos(33, 51))
- .widget(
- new SlotWidget(inventoryHandler, 3).setAccess(true, false)
- .setBackground(
- getGUITextureSet().getItemSlot(),
- GT_UITextures.OVERLAY_SLOT_INGOT_STEAM.get(getSteamVariant()))
- .setPos(85, 24))
- .widget(
- new SlotWidget(inventoryHandler, 4).setAccess(true, false)
- .setBackground(
- getGUITextureSet().getItemSlot(),
- GT_UITextures.OVERLAY_SLOT_DUST_STEAM.get(getSteamVariant()))
- .setPos(103, 24))
- .widget(
- new SlotWidget(inventoryHandler, 5).setAccess(true, false)
- .setBackground(
- getGUITextureSet().getItemSlot(),
- GT_UITextures.OVERLAY_SLOT_DUST_STEAM.get(getSteamVariant()))
- .setPos(121, 24))
- .widget(
- new ProgressBar().setTexture(GT_UITextures.PROGRESSBAR_ARROW_2_STEAM.get(getSteamVariant()), 20)
- .setProgress(() -> (float) mProgresstime / mMaxProgresstime)
- .setNEITransferRect(getRecipeMap().mNEIName).setPos(58, 24).setSize(20, 18));
+ new SlotWidget(inventoryHandler, 0)
+ .setBackground(
+ getGUITextureSet().getItemSlot(),
+ GT_UITextures.OVERLAY_SLOT_INGOT_STEAM.get(
+ getSteamVariant()))
+ .setPos(33, 15))
+ .widget(
+ new SlotWidget(inventoryHandler, 1)
+ .setBackground(
+ getGUITextureSet().getItemSlot(),
+ GT_UITextures.OVERLAY_SLOT_DUST_STEAM.get(
+ getSteamVariant()))
+ .setPos(33, 33))
+ .widget(
+ new SlotWidget(inventoryHandler, 2)
+ .setBackground(
+ getGUITextureSet().getItemSlot(),
+ GT_UITextures.OVERLAY_SLOT_FURNACE_STEAM.get(
+ getSteamVariant()))
+ .setPos(33, 51))
+ .widget(
+ new SlotWidget(inventoryHandler, 3).setAccess(true, false)
+ .setBackground(
+ getGUITextureSet().getItemSlot(),
+ GT_UITextures.OVERLAY_SLOT_INGOT_STEAM.get(
+ getSteamVariant()))
+ .setPos(85, 24))
+ .widget(
+ new SlotWidget(inventoryHandler, 4).setAccess(true, false)
+ .setBackground(
+ getGUITextureSet().getItemSlot(),
+ GT_UITextures.OVERLAY_SLOT_DUST_STEAM.get(
+ getSteamVariant()))
+ .setPos(103, 24))
+ .widget(
+ new SlotWidget(inventoryHandler, 5).setAccess(true, false)
+ .setBackground(
+ getGUITextureSet().getItemSlot(),
+ GT_UITextures.OVERLAY_SLOT_DUST_STEAM.get(
+ getSteamVariant()))
+ .setPos(121, 24))
+ .widget(
+ new ProgressBar().setTexture(GT_UITextures.PROGRESSBAR_ARROW_2_STEAM.get(getSteamVariant()), 20)
+ .setProgress(() -> (float) mProgresstime / mMaxProgresstime)
+ .setNEITransferRect(getRecipeMap().mNEIName)
+ .setPos(58, 24)
+ .setSize(20, 18));
}
@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 b988f1f7a5..d50b7debfa 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
@@ -86,18 +86,25 @@ public class GT_MetaTileEntity_ProcessingArray
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
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 you still need to supply power to them all")
- .addInfo("Use a screwdriver to enable separate input busses")
- .addInfo("Use a wire cutter to disable UEV+ downtiering")
- .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")
- .addCasingInfoRange("Robust Tungstensteel Machine Casing", 14, 24, false)
- .addEnergyHatch("Any casing", 1).addMaintenanceHatch("Any casing", 1).addInputBus("Any casing", 1)
- .addInputHatch("Any casing", 1).addOutputBus("Any casing", 1).addOutputHatch("Any casing", 1)
- .toolTipFinisher("Gregtech");
+ 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 you still need to supply power to them all")
+ .addInfo("Use a screwdriver to enable separate input busses")
+ .addInfo("Use a wire cutter to disable UEV+ downtiering")
+ .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")
+ .addCasingInfoRange("Robust Tungstensteel Machine Casing", 14, 24, false)
+ .addEnergyHatch("Any casing", 1)
+ .addMaintenanceHatch("Any casing", 1)
+ .addInputBus("Any casing", 1)
+ .addInputHatch("Any casing", 1)
+ .addOutputBus("Any casing", 1)
+ .addOutputHatch("Any casing", 1)
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -111,13 +118,26 @@ public class GT_MetaTileEntity_ProcessingArray
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
- if (aActive) return new ITexture[] { BlockIcons.casingTexturePages[0][48],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_PROCESSING_ARRAY_ACTIVE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_PROCESSING_ARRAY_ACTIVE_GLOW).extFacing().glow()
- .build() };
- return new ITexture[] { BlockIcons.casingTexturePages[0][48],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_PROCESSING_ARRAY).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_PROCESSING_ARRAY_GLOW).extFacing().glow().build() };
+ if (aActive) return new ITexture[] { BlockIcons.casingTexturePages[0][48], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_PROCESSING_ARRAY_ACTIVE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_PROCESSING_ARRAY_ACTIVE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
+ return new ITexture[] { BlockIcons.casingTexturePages[0][48], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_PROCESSING_ARRAY)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_PROCESSING_ARRAY_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
}
return new ITexture[] { Textures.BlockIcons.casingTexturePages[0][48] };
}
@@ -135,8 +155,10 @@ public class GT_MetaTileEntity_ProcessingArray
@Override
public GT_Recipe_Map getRecipeMap() {
if (isCorrectMachinePart(mInventory[1])) {
- int length = mInventory[1].getUnlocalizedName().length();
- String aMachineName = mInventory[1].getUnlocalizedName().substring(17, length - 8);
+ int length = mInventory[1].getUnlocalizedName()
+ .length();
+ String aMachineName = mInventory[1].getUnlocalizedName()
+ .substring(17, length - 8);
return GT_ProcessingArray_Manager.giveRecipeMap(aMachineName);
}
return null;
@@ -144,7 +166,8 @@ public class GT_MetaTileEntity_ProcessingArray
@Override
public boolean isCorrectMachinePart(ItemStack aStack) {
- return aStack != null && aStack.getUnlocalizedName().startsWith("gt.blockmachines.");
+ return aStack != null && aStack.getUnlocalizedName()
+ .startsWith("gt.blockmachines.");
}
@Override
@@ -166,8 +189,10 @@ public class GT_MetaTileEntity_ProcessingArray
startRecipeProcessing();
boolean result = checkRecipe(mInventory[1]);
if (result) {
- int length = mInventory[1].getUnlocalizedName().length();
- String aMachineName = mInventory[1].getUnlocalizedName().substring(17, length - 8);
+ int length = mInventory[1].getUnlocalizedName()
+ .length();
+ String aMachineName = mInventory[1].getUnlocalizedName()
+ .substring(17, length - 8);
SoundResource sound = GT_ProcessingArray_Manager.getSoundResource(aMachineName);
if (sound != null) {
sendLoopStart((byte) sound.id);
@@ -265,7 +290,7 @@ public class GT_MetaTileEntity_ProcessingArray
// We're locked to a single recipe, but haven't built the recipe checker yet.
// Build the checker on next successful recipe.
tSingleRecipeCheckBuilder = GT_Single_Recipe_Check_Processing_Array.processingArrayBuilder(this)
- .setBefore(tInputs, tFluids);
+ .setBefore(tInputs, tFluids);
}
boolean recipeLocked = false;
@@ -277,8 +302,10 @@ public class GT_MetaTileEntity_ProcessingArray
break;
} else if (mLockedToSingleRecipe && !recipeLocked) {
// We want to lock to a single run of the recipe.
- mSingleRecipeCheck = tSingleRecipeCheckBuilder.setAfter(tInputs, tFluids).setRecipe(tRecipe)
- .setRecipeAmperage(map.mAmperage).build();
+ mSingleRecipeCheck = tSingleRecipeCheckBuilder.setAfter(tInputs, tFluids)
+ .setRecipe(tRecipe)
+ .setRecipeAmperage(map.mAmperage)
+ .build();
recipeLocked = true;
}
}
@@ -324,13 +351,15 @@ public class GT_MetaTileEntity_ProcessingArray
ItemStack[] tOut = new ItemStack[aRecipe.mOutputs.length];
for (int h = 0; h < aRecipe.mOutputs.length; h++) {
if (aRecipe.getOutput(h) != null) {
- tOut[h] = aRecipe.getOutput(h).copy();
+ tOut[h] = aRecipe.getOutput(h)
+ .copy();
tOut[h].stackSize = 0;
}
}
FluidStack[] tFOut = new FluidStack[aRecipe.mFluidOutputs.length];
for (int i = 0; i < aRecipe.mFluidOutputs.length; i++)
- if (aRecipe.getFluidOutput(i) != null) tFOut[i] = aRecipe.getFluidOutput(i).copy();
+ if (aRecipe.getFluidOutput(i) != null) tFOut[i] = aRecipe.getFluidOutput(i)
+ .copy();
for (int f = 0; f < tOut.length; f++) {
if (aRecipe.mOutputs[f] != null && tOut[f] != null) {
for (int g = 0; g < parallel * multiplier; g++) {
@@ -348,9 +377,11 @@ public class GT_MetaTileEntity_ProcessingArray
oNumber++;
}
this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
- this.mOutputItems = Arrays.stream(tOut).filter(Objects::nonNull)
- .flatMap(GT_MetaTileEntity_ProcessingArray::splitOversizedStack).filter(is -> is.stackSize > 0)
- .toArray(ItemStack[]::new);
+ this.mOutputItems = Arrays.stream(tOut)
+ .filter(Objects::nonNull)
+ .flatMap(GT_MetaTileEntity_ProcessingArray::splitOversizedStack)
+ .filter(is -> is.stackSize > 0)
+ .toArray(ItemStack[]::new);
this.mOutputFluids = tFOut;
updateSlots();
return true;
@@ -473,8 +504,15 @@ public class GT_MetaTileEntity_ProcessingArray
@Override
protected List<IHatchElement<? super GT_MetaTileEntity_CubicMultiBlockBase<?>>> getAllowedHatches() {
- return ImmutableList
- .of(InputHatch, OutputHatch, InputBus, OutputBus, Muffler, Maintenance, Energy, ExoticEnergy);
+ return ImmutableList.of(
+ InputHatch,
+ OutputHatch,
+ InputBus,
+ OutputBus,
+ Muffler,
+ Maintenance,
+ Energy,
+ ExoticEnergy);
}
@Override
@@ -494,8 +532,10 @@ public class GT_MetaTileEntity_ProcessingArray
long maxEnergy = 0;
for (GT_MetaTileEntity_Hatch tHatch : mExoticEnergyHatches) {
if (isValidMetaTileEntity(tHatch)) {
- storedEnergy += tHatch.getBaseMetaTileEntity().getStoredEU();
- maxEnergy += tHatch.getBaseMetaTileEntity().getEUCapacity();
+ storedEnergy += tHatch.getBaseMetaTileEntity()
+ .getStoredEU();
+ maxEnergy += tHatch.getBaseMetaTileEntity()
+ .getEUCapacity();
}
}
@@ -536,8 +576,8 @@ public class GT_MetaTileEntity_ProcessingArray
+ ": "
+ EnumChatFormatting.YELLOW
+ VN[GT_Utility.getTier(
- GT_ExoticEnergyInputHelper
- .getMaxInputVoltageMulti(getExoticAndNormalEnergyHatchList()))]
+ GT_ExoticEnergyInputHelper.getMaxInputVoltageMulti(
+ getExoticAndNormalEnergyHatchList()))]
+ EnumChatFormatting.RESET,
StatCollector.translateToLocal("GT5U.multiblock.problems") + ": "
+ EnumChatFormatting.RED
@@ -649,19 +689,22 @@ public class GT_MetaTileEntity_ProcessingArray
super.addUIWidgets(builder, buildContext);
builder.widget(
- new ButtonWidget().setOnClick((clickData, widget) -> downtierUEV = !downtierUEV).setPlayClickSound(true)
- .setBackground(() -> {
- List<UITexture> ret = new ArrayList<>();
- ret.add(GT_UITextures.BUTTON_STANDARD);
- if (downtierUEV) {
- ret.add(GT_UITextures.OVERLAY_BUTTON_DOWN_TIERING_ON);
- } else {
- ret.add(GT_UITextures.OVERLAY_BUTTON_DOWN_TIERING_OFF);
- }
- return ret.toArray(new IDrawable[0]);
- }).setPos(80, 91).setSize(16, 16)
- .addTooltip(StatCollector.translateToLocal("GT5U.gui.button.down_tier"))
- .setTooltipShowUpDelay(TOOLTIP_DELAY))
- .widget(new FakeSyncWidget.BooleanSyncer(() -> downtierUEV, val -> downtierUEV = val));
+ new ButtonWidget().setOnClick((clickData, widget) -> downtierUEV = !downtierUEV)
+ .setPlayClickSound(true)
+ .setBackground(() -> {
+ List<UITexture> ret = new ArrayList<>();
+ ret.add(GT_UITextures.BUTTON_STANDARD);
+ if (downtierUEV) {
+ ret.add(GT_UITextures.OVERLAY_BUTTON_DOWN_TIERING_ON);
+ } else {
+ ret.add(GT_UITextures.OVERLAY_BUTTON_DOWN_TIERING_OFF);
+ }
+ return ret.toArray(new IDrawable[0]);
+ })
+ .setPos(80, 91)
+ .setSize(16, 16)
+ .addTooltip(StatCollector.translateToLocal("GT5U.gui.button.down_tier"))
+ .setTooltipShowUpDelay(TOOLTIP_DELAY))
+ .widget(new FakeSyncWidget.BooleanSyncer(() -> downtierUEV, val -> downtierUEV = val));
}
}
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 a1e85f9b25..2644f9f49e 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
@@ -54,31 +54,49 @@ public class GT_MetaTileEntity_PyrolyseOven extends
: ofBlock(GregTech_API.sBlockCasings1, 0);
return StructureDefinition.<GT_MetaTileEntity_PyrolyseOven>builder()
- .addShape(
- "main",
- transpose(
- new String[][] { { "ccccc", "ctttc", "ctttc", "ctttc", "ccccc" },
- { "ccccc", "c---c", "c---c", "c---c", "ccccc" },
- { "ccccc", "c---c", "c---c", "c---c", "ccccc" },
- { "bb~bb", "bCCCb", "bCCCb", "bCCCb", "bbbbb" }, }))
- .addElement('c', onElementPass(GT_MetaTileEntity_PyrolyseOven::onCasingAdded, tCasingElement))
- .addElement(
- 'C',
- ofCoil(
- GT_MetaTileEntity_PyrolyseOven::setCoilLevel,
- GT_MetaTileEntity_PyrolyseOven::getCoilLevel))
- .addElement(
- 'b',
- buildHatchAdder(GT_MetaTileEntity_PyrolyseOven.class)
- .atLeast(OutputBus, OutputHatch, Energy, Maintenance).casingIndex(CASING_INDEX).dot(1)
- .buildAndChain(
- onElementPass(GT_MetaTileEntity_PyrolyseOven::onCasingAdded, tCasingElement)))
- .addElement(
- 't',
- buildHatchAdder(GT_MetaTileEntity_PyrolyseOven.class).atLeast(InputBus, InputHatch, Muffler)
- .casingIndex(CASING_INDEX).dot(1).buildAndChain(
- onElementPass(GT_MetaTileEntity_PyrolyseOven::onCasingAdded, tCasingElement)))
- .build();
+ .addShape(
+ "main",
+ transpose(
+ new String[][] { { "ccccc", "ctttc", "ctttc", "ctttc", "ccccc" },
+ { "ccccc", "c---c", "c---c", "c---c", "ccccc" },
+ { "ccccc", "c---c", "c---c", "c---c", "ccccc" },
+ { "bb~bb", "bCCCb", "bCCCb", "bCCCb", "bbbbb" }, }))
+ .addElement(
+ 'c',
+ onElementPass(GT_MetaTileEntity_PyrolyseOven::onCasingAdded, tCasingElement))
+ .addElement(
+ 'C',
+ ofCoil(
+ GT_MetaTileEntity_PyrolyseOven::setCoilLevel,
+ GT_MetaTileEntity_PyrolyseOven::getCoilLevel))
+ .addElement(
+ 'b',
+ buildHatchAdder(
+ GT_MetaTileEntity_PyrolyseOven.class).atLeast(
+ OutputBus,
+ OutputHatch,
+ Energy,
+ Maintenance)
+ .casingIndex(CASING_INDEX)
+ .dot(1)
+ .buildAndChain(
+ onElementPass(
+ GT_MetaTileEntity_PyrolyseOven::onCasingAdded,
+ tCasingElement)))
+ .addElement(
+ 't',
+ buildHatchAdder(
+ GT_MetaTileEntity_PyrolyseOven.class).atLeast(
+ InputBus,
+ InputHatch,
+ Muffler)
+ .casingIndex(CASING_INDEX)
+ .dot(1)
+ .buildAndChain(
+ onElementPass(
+ GT_MetaTileEntity_PyrolyseOven::onCasingAdded,
+ tCasingElement)))
+ .build();
}
private int mCasingAmount;
@@ -94,17 +112,26 @@ public class GT_MetaTileEntity_PyrolyseOven extends
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
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%, TPV: 200%, etc.")
- .addInfo("EU/t is not affected by Coil tier").addPollutionAmount(getPollutionPerSecond(null))
- .addSeparator().beginStructureBlock(5, 4, 5, true).addController("Front center")
- .addCasingInfoRange("Pyrolyse Oven Casing", 60, 80, false)
- .addOtherStructurePart("Heating Coils", "Center 3x1x3 of the bottom layer")
- .addEnergyHatch("Any bottom layer casing", 1).addMaintenanceHatch("Any bottom layer casing", 1)
- .addMufflerHatch("Center 3x1x3 area in top layer", 2).addInputBus("Center 3x1x3 area in top layer", 2)
- .addInputHatch("Center 3x1x3 area in top layer", 2).addOutputBus("Any bottom layer casing", 1)
- .addOutputHatch("Any bottom layer casing", 1).toolTipFinisher("Gregtech");
+ 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%, TPV: 200%, etc.")
+ .addInfo("EU/t is not affected by Coil tier")
+ .addPollutionAmount(getPollutionPerSecond(null))
+ .addSeparator()
+ .beginStructureBlock(5, 4, 5, true)
+ .addController("Front center")
+ .addCasingInfoRange("Pyrolyse Oven Casing", 60, 80, false)
+ .addOtherStructurePart("Heating Coils", "Center 3x1x3 of the bottom layer")
+ .addEnergyHatch("Any bottom layer casing", 1)
+ .addMaintenanceHatch("Any bottom layer casing", 1)
+ .addMufflerHatch("Center 3x1x3 area in top layer", 2)
+ .addInputBus("Center 3x1x3 area in top layer", 2)
+ .addInputHatch("Center 3x1x3 area in top layer", 2)
+ .addOutputBus("Any bottom layer casing", 1)
+ .addOutputHatch("Any bottom layer casing", 1)
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -112,13 +139,26 @@ public class GT_MetaTileEntity_PyrolyseOven extends
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
- if (aActive) return new ITexture[] { BlockIcons.casingTexturePages[8][66],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_PYROLYSE_OVEN_ACTIVE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_PYROLYSE_OVEN_ACTIVE_GLOW).extFacing().glow()
- .build() };
- return new ITexture[] { BlockIcons.casingTexturePages[8][66],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_PYROLYSE_OVEN).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_PYROLYSE_OVEN_GLOW).extFacing().glow().build() };
+ if (aActive) return new ITexture[] { BlockIcons.casingTexturePages[8][66], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_PYROLYSE_OVEN_ACTIVE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_PYROLYSE_OVEN_ACTIVE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
+ return new ITexture[] { BlockIcons.casingTexturePages[8][66], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_PYROLYSE_OVEN)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_PYROLYSE_OVEN_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
}
return new ITexture[] { Textures.BlockIcons.casingTexturePages[8][66] };
}
@@ -155,7 +195,8 @@ public class GT_MetaTileEntity_PyrolyseOven extends
if (mLockedToSingleRecipe) {
// We're locked to a single recipe, but haven't built the recipe checker yet.
// Build the checker on next successful recipe.
- tSingleRecipeCheckBuilder = GT_Single_Recipe_Check.builder(this).setBefore();
+ tSingleRecipeCheckBuilder = GT_Single_Recipe_Check.builder(this)
+ .setBefore();
}
tRecipe = GT_Recipe.GT_Recipe_Map.sPyrolyseRecipes.findRecipe(
@@ -168,7 +209,9 @@ public class GT_MetaTileEntity_PyrolyseOven extends
if (tRecipe == null || !tRecipe.isRecipeInputEqual(true, tFluids, tInputs)) return false;
if (mLockedToSingleRecipe) {
- mSingleRecipeCheck = tSingleRecipeCheckBuilder.setAfter().setRecipe(tRecipe).build();
+ mSingleRecipeCheck = tSingleRecipeCheckBuilder.setAfter()
+ .setRecipe(tRecipe)
+ .build();
}
}
@@ -253,7 +296,8 @@ public class GT_MetaTileEntity_PyrolyseOven extends
for (int zPos = tZ - 1; zPos <= tZ + 1; zPos++) {
if (aBaseMetaTileEntity.getBlock(xPos, tY, zPos) == GregTech_API.sBlockCasings1
&& aBaseMetaTileEntity.getMetaID(xPos, tY, zPos) == 13) {
- aBaseMetaTileEntity.getWorld().setBlock(xPos, tY, zPos, GregTech_API.sBlockCasings5, 1, 3);
+ aBaseMetaTileEntity.getWorld()
+ .setBlock(xPos, tY, zPos, GregTech_API.sBlockCasings5, 1, 3);
}
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_TranscendentPlasmaMixer.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_TranscendentPlasmaMixer.java
index 16c417e8de..e60e999e0c 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_TranscendentPlasmaMixer.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_TranscendentPlasmaMixer.java
@@ -43,15 +43,36 @@ public class GT_MetaTileEntity_TranscendentPlasmaMixer
{ " CAC ", " ABA ", " ABA ", " ABA ", " ABA ", " ABA ", " CAC " } };
private static final String STRUCTURE_PIECE_MAIN = "MAIN";
- private static final IStructureDefinition<GT_MetaTileEntity_TranscendentPlasmaMixer> STRUCTURE_DEFINITION = StructureDefinition
- .<GT_MetaTileEntity_TranscendentPlasmaMixer>builder().addShape(STRUCTURE_PIECE_MAIN, structure)
- .addElement(
- 'B',
- buildHatchAdder(GT_MetaTileEntity_TranscendentPlasmaMixer.class)
- .atLeast(InputHatch, OutputHatch, InputBus, Maintenance).casingIndex(DIM_INJECTION_CASING)
- .dot(1).buildAndChain(GregTech_API.sBlockCasings1, DIM_INJECTION_CASING))
- .addElement('A', ofBlock(GregTech_API.sBlockCasings1, DIM_TRANS_CASING))
- .addElement('C', ofBlock(GregTech_API.sBlockCasings1, DIM_BRIDGE_CASING)).build();
+ private static final IStructureDefinition<GT_MetaTileEntity_TranscendentPlasmaMixer> STRUCTURE_DEFINITION = StructureDefinition.<GT_MetaTileEntity_TranscendentPlasmaMixer>builder()
+ .addShape(
+ STRUCTURE_PIECE_MAIN,
+ structure)
+ .addElement(
+ 'B',
+ buildHatchAdder(
+ GT_MetaTileEntity_TranscendentPlasmaMixer.class).atLeast(
+ InputHatch,
+ OutputHatch,
+ InputBus,
+ Maintenance)
+ .casingIndex(
+ DIM_INJECTION_CASING)
+ .dot(
+ 1)
+ .buildAndChain(
+ GregTech_API.sBlockCasings1,
+ DIM_INJECTION_CASING))
+ .addElement(
+ 'A',
+ ofBlock(
+ GregTech_API.sBlockCasings1,
+ DIM_TRANS_CASING))
+ .addElement(
+ 'C',
+ ofBlock(
+ GregTech_API.sBlockCasings1,
+ DIM_BRIDGE_CASING))
+ .build();
private String ownerUUID;
@@ -71,15 +92,20 @@ public class GT_MetaTileEntity_TranscendentPlasmaMixer
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType("Transcendent Mixer").addInfo("Assisting in all your DTPF needs.")
- .addInfo("This multiblock will run in parallel according to the circuit provided to the")
- .addInfo("controller slot. E.g. 3x Circuit #16 = 48x parallel. All inputs will scale,")
- .addInfo("except time. All EU is deducted from wireless EU networks only.").addInfo(AuthorColen)
- .addInfo("Controller slot and circuit slot are separate.").addSeparator()
- .beginStructureBlock(5, 7, 5, false).addStructureInfo(GOLD + "1+ " + GRAY + "Input Hatch")
- .addStructureInfo(GOLD + "1+ " + GRAY + "Output Hatch")
- .addStructureInfo(GOLD + "1+ " + GRAY + "Input Bus")
- .addStructureInfo(GOLD + "1 " + GRAY + "Maintenance Hatch").toolTipFinisher("Gregtech");
+ tt.addMachineType("Transcendent Mixer")
+ .addInfo("Assisting in all your DTPF needs.")
+ .addInfo("This multiblock will run in parallel according to the circuit provided to the")
+ .addInfo("controller slot. E.g. 3x Circuit #16 = 48x parallel. All inputs will scale,")
+ .addInfo("except time. All EU is deducted from wireless EU networks only.")
+ .addInfo(AuthorColen)
+ .addInfo("Controller slot and circuit slot are separate.")
+ .addSeparator()
+ .beginStructureBlock(5, 7, 5, false)
+ .addStructureInfo(GOLD + "1+ " + GRAY + "Input Hatch")
+ .addStructureInfo(GOLD + "1+ " + GRAY + "Output Hatch")
+ .addStructureInfo(GOLD + "1+ " + GRAY + "Input Bus")
+ .addStructureInfo(GOLD + "1 " + GRAY + "Maintenance Hatch")
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -92,11 +118,20 @@ public class GT_MetaTileEntity_TranscendentPlasmaMixer
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
- if (aActive) return new ITexture[] { casingTexturePages[0][DIM_TRANS_CASING],
- TextureFactory.builder().addIcon(OVERLAY_DTPF_ON).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FUSION1_GLOW).extFacing().glow().build() };
- return new ITexture[] { casingTexturePages[0][DIM_TRANS_CASING],
- TextureFactory.builder().addIcon(OVERLAY_DTPF_OFF).extFacing().build() };
+ if (aActive) return new ITexture[] { casingTexturePages[0][DIM_TRANS_CASING], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_DTPF_ON)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FUSION1_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
+ return new ITexture[] { casingTexturePages[0][DIM_TRANS_CASING], TextureFactory.builder()
+ .addIcon(OVERLAY_DTPF_OFF)
+ .extFacing()
+ .build() };
}
return new ITexture[] { casingTexturePages[0][DIM_TRANS_CASING] };
@@ -121,8 +156,12 @@ public class GT_MetaTileEntity_TranscendentPlasmaMixer
boolean processRecipe(ItemStack[] items, FluidStack[] fluids) {
- GT_Recipe originalRecipe = GT_Recipe.GT_Recipe_Map.sTranscendentPlasmaMixerRecipes
- .findRecipe(getBaseMetaTileEntity(), false, Long.MAX_VALUE, fluids, items);
+ GT_Recipe originalRecipe = GT_Recipe.GT_Recipe_Map.sTranscendentPlasmaMixerRecipes.findRecipe(
+ getBaseMetaTileEntity(),
+ false,
+ Long.MAX_VALUE,
+ fluids,
+ items);
if (originalRecipe == null) {
return false;
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 463e00f7cd..eabdd8ee35 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
@@ -41,12 +41,20 @@ public class GT_MetaTileEntity_VacuumFreezer
@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
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").addCasingInfoRange("Frost Proof Machine Casing", 16, 24, false)
- .addEnergyHatch("Any casing", 1).addMaintenanceHatch("Any casing", 1).addInputHatch("Any casing", 1)
- .addOutputHatch("Any casing", 1).addInputBus("Any casing", 1).addOutputBus("Any casing", 1)
- .toolTipFinisher("Gregtech");
+ 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")
+ .addCasingInfoRange("Frost Proof Machine Casing", 16, 24, false)
+ .addEnergyHatch("Any casing", 1)
+ .addMaintenanceHatch("Any casing", 1)
+ .addInputHatch("Any casing", 1)
+ .addOutputHatch("Any casing", 1)
+ .addInputBus("Any casing", 1)
+ .addOutputBus("Any casing", 1)
+ .toolTipFinisher("Gregtech");
return tt;
}
@@ -56,15 +64,27 @@ public class GT_MetaTileEntity_VacuumFreezer
ITexture[] rTexture;
if (aSide == aFacing) {
if (aActive) {
- rTexture = new ITexture[] { casingTexturePages[0][17],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_VACUUM_FREEZER_ACTIVE).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_VACUUM_FREEZER_ACTIVE_GLOW).extFacing().glow()
- .build() };
+ rTexture = new ITexture[] { casingTexturePages[0][17], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_VACUUM_FREEZER_ACTIVE)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_VACUUM_FREEZER_ACTIVE_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
} else {
- rTexture = new ITexture[] { casingTexturePages[0][17],
- TextureFactory.builder().addIcon(OVERLAY_FRONT_VACUUM_FREEZER).extFacing().build(),
- TextureFactory.builder().addIcon(OVERLAY_FRONT_VACUUM_FREEZER_GLOW).extFacing().glow()
- .build() };
+ rTexture = new ITexture[] { casingTexturePages[0][17], TextureFactory.builder()
+ .addIcon(
+ OVERLAY_FRONT_VACUUM_FREEZER)
+ .extFacing()
+ .build(),
+ TextureFactory.builder()
+ .addIcon(OVERLAY_FRONT_VACUUM_FREEZER_GLOW)
+ .extFacing()
+ .glow()
+ .build() };
}
} else {
rTexture = new ITexture[] { casingTexturePages[0][17] };