From 5f50e4a36ec000657b0a1664784acf00275293c6 Mon Sep 17 00:00:00 2001 From: boubou19 Date: Sat, 1 Apr 2023 18:11:43 +0200 Subject: update spotless formatting (#1827) --- .../multi/GT_MetaTileEntity_AssemblyLine.java | 321 ++++-- .../GT_MetaTileEntity_BrickedBlastFurnace.java | 31 +- .../GT_MetaTileEntity_BronzeBlastFurnace.java | 5 +- .../multi/GT_MetaTileEntity_Charcoal_Pit.java | 66 +- .../multi/GT_MetaTileEntity_Cleanroom.java | 111 +- .../GT_MetaTileEntity_ConcreteBackfillerBase.java | 53 +- .../multi/GT_MetaTileEntity_DieselEngine.java | 114 +- .../multi/GT_MetaTileEntity_DistillationTower.java | 213 ++-- .../multi/GT_MetaTileEntity_DrillerBase.java | 120 +- .../GT_MetaTileEntity_ElectricBlastFurnace.java | 174 ++- .../GT_MetaTileEntity_ExtremeDieselEngine.java | 71 +- .../multi/GT_MetaTileEntity_FusionComputer.java | 316 +++--- .../multi/GT_MetaTileEntity_FusionComputer1.java | 40 +- .../multi/GT_MetaTileEntity_FusionComputer2.java | 40 +- .../multi/GT_MetaTileEntity_FusionComputer3.java | 40 +- .../multi/GT_MetaTileEntity_HeatExchanger.java | 181 +++- .../GT_MetaTileEntity_ImplosionCompressor.java | 58 +- .../GT_MetaTileEntity_IntegratedOreFactory.java | 346 ++++-- .../multi/GT_MetaTileEntity_LargeBoiler.java | 130 ++- .../GT_MetaTileEntity_LargeChemicalReactor.java | 155 ++- .../multi/GT_MetaTileEntity_LargeTurbine.java | 68 +- .../multi/GT_MetaTileEntity_LargeTurbine_Gas.java | 41 +- ...GT_MetaTileEntity_LargeTurbine_GasAdvanced.java | 40 +- .../GT_MetaTileEntity_LargeTurbine_HPSteam.java | 45 +- .../GT_MetaTileEntity_LargeTurbine_Plasma.java | 62 +- .../GT_MetaTileEntity_LargeTurbine_Steam.java | 46 +- .../multi/GT_MetaTileEntity_MultiFurnace.java | 122 ++- .../multi/GT_MetaTileEntity_NanoForge.java | 259 +++-- .../multi/GT_MetaTileEntity_OilCracker.java | 191 ++-- .../multi/GT_MetaTileEntity_OilDrillBase.java | 75 +- .../multi/GT_MetaTileEntity_OilDrillInfinite.java | 26 +- .../GT_MetaTileEntity_OreDrillingPlantBase.java | 68 +- .../multi/GT_MetaTileEntity_PCBFactory.java | 1144 +++++++++++++------- .../multi/GT_MetaTileEntity_PlasmaForge.java | 254 +++-- .../GT_MetaTileEntity_PrimitiveBlastFurnace.java | 233 ++-- .../multi/GT_MetaTileEntity_ProcessingArray.java | 147 ++- .../multi/GT_MetaTileEntity_PyrolyseOven.java | 136 ++- .../GT_MetaTileEntity_TranscendentPlasmaMixer.java | 89 +- .../multi/GT_MetaTileEntity_VacuumFreezer.java | 48 +- 39 files changed, 3710 insertions(+), 1969 deletions(-) (limited to 'src/main/java/gregtech/common/tileentities/machines/multi') 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 STRUCTURE_DEFINITION = StructureDefinition - .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 STRUCTURE_DEFINITION = StructureDefinition.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( +