From b846f1dc3a502d157ecf871e2a4a1ff49915f871 Mon Sep 17 00:00:00 2001 From: Jason Mitchell Date: Sat, 28 Jan 2023 18:39:10 -0800 Subject: [ci skip] spotlessApply with the new settings --- .../blocks/tileEntity/ComponentAssemblyLine.java | 677 +++++---------------- .../blocks/tileEntity/CoolantTower.java | 288 ++------- .../blocks/tileEntity/EssentiaHatch.java | 23 +- .../blocks/tileEntity/EssentiaOutputHatch.java | 2 + .../blocks/tileEntity/EssentiaOutputHatch_ME.java | 30 +- .../blocks/tileEntity/ExtremeHeatExchanger.java | 199 +++--- .../blocks/tileEntity/FuelRefineFactory.java | 114 ++-- .../GTMetaTileEntity/DieselGenerator.java | 159 ++--- .../GTMetaTileEntity/NeutronAccelerator.java | 9 +- .../tileEntity/GTMetaTileEntity/NeutronSensor.java | 85 ++- .../tileEntity/GTMetaTileEntity/YOTTAHatch.java | 186 +++--- .../blocks/tileEntity/LargeEssentiaGenerator.java | 180 ++---- .../blocks/tileEntity/LargeEssentiaSmeltery.java | 202 +++--- .../blocks/tileEntity/LargeFusionComputer1.java | 42 +- .../blocks/tileEntity/LargeFusionComputer2.java | 42 +- .../blocks/tileEntity/LargeFusionComputer3.java | 42 +- .../blocks/tileEntity/LargeFusionComputer4.java | 84 +-- .../blocks/tileEntity/LargeFusionComputer5.java | 90 +-- .../blocks/tileEntity/MegaPlasmaTurbine.java | 9 +- .../blocks/tileEntity/MultiNqGenerator.java | 224 ++++--- .../blocks/tileEntity/NeutronActivator.java | 204 ++++--- .../blocks/tileEntity/PreciseAssembler.java | 175 +++--- .../tileEntity/SupercriticalFluidTurbine.java | 64 +- .../tileEntity/UniversalChemicalFuelEngine.java | 143 ++--- .../blocks/tileEntity/YottaFluidTank.java | 328 +++++----- .../base/GT_MetaTileEntity_LargeTurbineBase.java | 228 +++---- .../base/GT_MetaTileEntity_LongPowerUsageBase.java | 85 ++- ...GT_MetaTileEntity_TooltipMultiBlockBase_EM.java | 11 +- .../tileEntity/base/LargeFusionComputer.java | 580 ++++++++---------- .../tileEntity/base/LargeFusionComputerPP.java | 572 ++++++++--------- 30 files changed, 2075 insertions(+), 3002 deletions(-) (limited to 'src/main/java/goodgenerator/blocks/tileEntity') diff --git a/src/main/java/goodgenerator/blocks/tileEntity/ComponentAssemblyLine.java b/src/main/java/goodgenerator/blocks/tileEntity/ComponentAssemblyLine.java index 65f0e23810..991903b130 100644 --- a/src/main/java/goodgenerator/blocks/tileEntity/ComponentAssemblyLine.java +++ b/src/main/java/goodgenerator/blocks/tileEntity/ComponentAssemblyLine.java @@ -4,10 +4,22 @@ import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; import static gregtech.api.enums.GT_HatchElement.*; import static gregtech.api.enums.Textures.BlockIcons.*; +import java.util.stream.Collectors; +import java.util.stream.IntStream; + +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.StatCollector; +import net.minecraftforge.fluids.FluidStack; + +import org.apache.commons.lang3.tuple.Pair; + import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable; import com.gtnewhorizon.structurelib.structure.IStructureDefinition; import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment; import com.gtnewhorizon.structurelib.structure.StructureDefinition; + import goodgenerator.blocks.tileEntity.base.GT_MetaTileEntity_LongPowerUsageBase; import goodgenerator.loader.Loaders; import goodgenerator.util.MyRecipeAdder; @@ -22,14 +34,6 @@ import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_StructureUtility; -import java.util.stream.Collectors; -import java.util.stream.IntStream; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.StatCollector; -import net.minecraftforge.fluids.FluidStack; -import org.apache.commons.lang3.tuple.Pair; public class ComponentAssemblyLine extends GT_MetaTileEntity_LongPowerUsageBase implements ISurvivalConstructable { @@ -37,467 +41,121 @@ public class ComponentAssemblyLine extends GT_MetaTileEntity_LongPowerUsageBase< private int casingTier; private GT_Recipe lastRecipe; protected static final String STRUCTURE_PIECE_MAIN = "main"; - private static final IStructureDefinition STRUCTURE_DEFINITION = - StructureDefinition.builder() - .addShape(STRUCTURE_PIECE_MAIN, new String[][] { - { - " ", - " III ", - " HHI~IHH ", - "HH III HH", - "H H", - "H H", - "H JJJ H", - "H N N H", - "H N N H", - "HHHHHHHHH" - }, - { - " ", - " EHHHHHE ", - "E E", - "H H", - "A A", - "A A", - "A HHH A", - "A A", - "A A", - "MHHHHHHHM" - }, - { - " HBH ", - " EL LE ", - "E E", - "HC CH", - "AC CA", - "AC CA", - "A D D A", - "A HHH A", - "A A", - "MHHHHHHHM" - }, - { - " HBH ", - " EL LE ", - "E E", - "H H", - "A A", - "A A", - "A A", - "A HHH A", - "A A", - "MHHHHHHHM" - }, - { - " BBB ", - " EL LE ", - "E GGDGG E", - "HGG D GGH", - "AG C GA", - "AG GA", - "AG GA", - "AG HHH GA", - "AG GA", - "MHHHHHHHM" - }, - { - " HBH ", - " EL LE ", - "E E", - "H H", - "A A", - "A A", - "A A", - "A HHH A", - "A A", - "MHHHHHHHM" - }, - { - " HBH ", - " EL LE ", - "E E", - "HC CH", - "AC CA", - "AC CA", - "A D D A", - "A HHH A", - "A A", - "MHHHHHHHM" - }, - { - " HBH ", - " EL LE ", - "E E", - "H H", - "A A", - "A A", - "A A", - "A HHH A", - "A A", - "MHHHHHHHM" - }, - { - " BBB ", - " EL LE ", - "E GGDGG E", - "HGG D GGH", - "HG C GH", - "HG GH", - "HG GH", - "HG HHH GH", - "HG GH", - "MHHHHHHHM" - }, - { - " HBH ", - " EL LE ", - "E E", - "H H", - "A A", - "A A", - "A A", - "A HHH A", - "A A", - "MHHHHHHHM" - }, - { - " HBH ", - " EL LE ", - "E E", - "HC CH", - "AC CA", - "AC CA", - "A D D A", - "A HHH A", - "A A", - "MHHHHHHHM" - }, - { - " HBH ", - " EL LE ", - "E E", - "H H", - "A A", - "A A", - "A A", - "A HHH A", - "A A", - "MHHHHHHHM" - }, - { - " BBB ", - " EL LE ", - "E GGDGG E", - "HGG D GGH", - "AG C GA", - "AG GA", - "AG GA", - "AG HHH GA", - "AG GA", - "MHHHHHHHM" - }, - { - " HBH ", - " EL LE ", - "E E", - "H H", - "A A", - "A A", - "A A", - "A HHH A", - "A A", - "MHHHHHHHM" - }, - { - " HBH ", - " EL LE ", - "E E", - "HC CH", - "AC CA", - "AC CA", - "A D D A", - "A HHH A", - "A A", - "MHHHHHHHM" - }, - { - " HBH ", - " EL LE ", - "E E", - "H H", - "A A", - "A A", - "A A", - "A HHH A", - "A A", - "MHHHHHHHM" - }, - { - " BBB ", - " EL LE ", - "E GGDGG E", - "HGG D GGH", - "HG C GH", - "HG GH", - "HG GH", - "HG HHH GH", - "HG GH", - "MHHHHHHHM" - }, - { - " HBH ", - " EL LE ", - "E E", - "H H", - "A A", - "A A", - "A A", - "A HHH A", - "A A", - "MHHHHHHHM" - }, - { - " HBH ", - " EL LE ", - "E E", - "HC CH", - "AC CA", - "AC CA", - "A D D A", - "A HHH A", - "A A", - "MHHHHHHHM" - }, - { - " HBH ", - " EL LE ", - "E E", - "H H", - "A A", - "A A", - "A A", - "A HHH A", - "A A", - "MHHHHHHHM" - }, - { - " BBB ", - " EL LE ", - "E GGDGG E", - "HGG D GGH", - "AG C GA", - "AG GA", - "AG GA", - "AG HHH GA", - "AG GA", - "MHHHHHHHM" - }, - { - " HBH ", - " EL LE ", - "E E", - "H H", - "A A", - "A A", - "A A", - "A HHH A", - "A A", - "MHHHHHHHM" - }, - { - " HBH ", - " EL LE ", - "E E", - "HC CH", - "AC CA", - "AC CA", - "A D D A", - "A HHH A", - "A A", - "MHHHHHHHM" - }, - { - " HBH ", - " EL LE ", - "E E", - "H H", - "A A", - "A A", - "A A", - "A HHH A", - "A A", - "MHHHHHHHM" - }, - { - " BBB ", - " EL LE ", - "E GGDGG E", - "HGG D GGH", - "HG C GH", - "HG GH", - "HG GH", - "HG HHH GH", - "HG GH", - "MHHHHHHHM" - }, - { - " HBH ", - " EL LE ", - "E E", - "H H", - "A A", - "A A", - "A A", - "A HHH A", - "A A", - "MHHHHHHHM" - }, - { - " HBH ", - " EL LE ", - "E E", - "HC CH", - "AC CA", - "AC CA", - "A D D A", - "A HHH A", - "A A", - "MHHHHHHHM" - }, - { - " HBH ", - " EL LE ", - "E E", - "H H", - "A A", - "A A", - "A A", - "A HHH A", - "A A", - "MHHHHHHHM" - }, - { - " BBB ", - " EL LE ", - "E GGDGG E", - "HGG D GGH", - "AG C GA", - "AG GA", - "AG GA", - "AG HHH GA", - "AG GA", - "MHHHHHHHM" - }, - { - " HBH ", - " EL LE ", - "E E", - "H H", - "A A", - "A A", - "A A", - "A HHH A", - "A N N A", - "MHHHHHHHM" - }, - { - " HBH ", - " EL LE ", - "E E", - "HC CH", - "AC CA", - "AC CA", - "A D D A", - "A HHH A", - "A A", - "MHHHHHHHM" - }, - { - " ", - " EHHHHHE ", - "E E", - "H H", - "A A", - "A A", - "A A", - "A HHH A", - "A A", - "MHHHHHHHM" - }, - { - " ", - " ", - " HHHHHHH ", - "HH HH", - "H H", - "H H", - "H H", - "H H", - "H KKK H", - "HHHHHHHHH" - } - }) - .addElement( - 'A', - ofChain( - ofBlockUnlocalizedName("bartworks", "BW_GlasBlocks", 5), - ofBlockUnlocalizedName("bartworks", "BW_GlasBlocks", 13), - ofBlockUnlocalizedName("bartworks", "BW_GlasBlocks", 14), - ofBlockUnlocalizedName("bartworks", "BW_GlasBlocks", 15), - ofBlockUnlocalizedName("bartworks", "BW_GlasBlocks2", 0))) - .addElement('H', ofBlock(GregTech_API.sBlockCasings8, 7)) - .addElement('C', ofBlock(GregTech_API.sBlockCasings2, 5)) - .addElement('D', ofBlock(GregTech_API.sBlockCasings2, 9)) - .addElement('G', ofBlock(GregTech_API.sBlockCasings9, 0)) - .addElement('E', ofBlock(GregTech_API.sBlockCasings9, 1)) - .addElement('F', ofBlock(GregTech_API.sBlockCasings4, 1)) - .addElement( - 'B', - ofBlocksTiered( - (block, meta) -> block == Loaders.componentAssemblylineCasing ? meta : -1, - IntStream.range(0, 14) - .mapToObj(i -> Pair.of(Loaders.componentAssemblylineCasing, i)) - .collect(Collectors.toList()), - -1, - (t, meta) -> t.casingTier = meta, - t -> t.casingTier)) - .addElement( - 'J', - GT_StructureUtility.buildHatchAdder(ComponentAssemblyLine.class) - .atLeast(InputBus) - .dot(1) - .casingIndex(183) - .buildAndChain(GregTech_API.sBlockCasings8, 7)) - .addElement( - 'K', - GT_StructureUtility.buildHatchAdder(ComponentAssemblyLine.class) - .atLeast(OutputBus) - .dot(2) - .casingIndex(183) - .buildAndChain(GregTech_API.sBlockCasings8, 7)) - .addElement( - 'L', - GT_StructureUtility.buildHatchAdder(ComponentAssemblyLine.class) - .atLeast(Energy, ExoticEnergy) - .dot(3) - .casingIndex(183) - .buildAndChain(GregTech_API.sBlockCasings8, 7)) - .addElement( - 'I', - GT_StructureUtility.buildHatchAdder(ComponentAssemblyLine.class) - .atLeast(Maintenance) - .dot(4) - .casingIndex(183) - .buildAndChain(GregTech_API.sBlockCasings8, 7)) - .addElement( - 'M', - GT_StructureUtility.buildHatchAdder(ComponentAssemblyLine.class) - .atLeast(InputHatch) - .dot(5) - .casingIndex(183) - .buildAndChain(GregTech_API.sBlockCasings8, 7)) - .addElement('N', GT_StructureUtility.ofFrame(Materials.TungstenSteel)) - .build(); + private static final IStructureDefinition STRUCTURE_DEFINITION = StructureDefinition + .builder() + .addShape( + STRUCTURE_PIECE_MAIN, + new String[][] { + { " ", " III ", " HHI~IHH ", "HH III HH", "H H", "H H", "H JJJ H", + "H N N H", "H N N H", "HHHHHHHHH" }, + { " ", " EHHHHHE ", "E E", "H H", "A A", "A A", "A HHH A", + "A A", "A A", "MHHHHHHHM" }, + { " HBH ", " EL LE ", "E E", "HC CH", "AC CA", "AC CA", "A D D A", + "A HHH A", "A A", "MHHHHHHHM" }, + { " HBH ", " EL LE ", "E E", "H H", "A A", "A A", "A A", + "A HHH A", "A A", "MHHHHHHHM" }, + { " BBB ", " EL LE ", "E GGDGG E", "HGG D GGH", "AG C GA", "AG GA", "AG GA", + "AG HHH GA", "AG GA", "MHHHHHHHM" }, + { " HBH ", " EL LE ", "E E", "H H", "A A", "A A", "A A", + "A HHH A", "A A", "MHHHHHHHM" }, + { " HBH ", " EL LE ", "E E", "HC CH", "AC CA", "AC CA", "A D D A", + "A HHH A", "A A", "MHHHHHHHM" }, + { " HBH ", " EL LE ", "E E", "H H", "A A", "A A", "A A", + "A HHH A", "A A", "MHHHHHHHM" }, + { " BBB ", " EL LE ", "E GGDGG E", "HGG D GGH", "HG C GH", "HG GH", "HG GH", + "HG HHH GH", "HG GH", "MHHHHHHHM" }, + { " HBH ", " EL LE ", "E E", "H H", "A A", "A A", "A A", + "A HHH A", "A A", "MHHHHHHHM" }, + { " HBH ", " EL LE ", "E E", "HC CH", "AC CA", "AC CA", "A D D A", + "A HHH A", "A A", "MHHHHHHHM" }, + { " HBH ", " EL LE ", "E E", "H H", "A A", "A A", "A A", + "A HHH A", "A A", "MHHHHHHHM" }, + { " BBB ", " EL LE ", "E GGDGG E", "HGG D GGH", "AG C GA", "AG GA", "AG GA", + "AG HHH GA", "AG GA", "MHHHHHHHM" }, + { " HBH ", " EL LE ", "E E", "H H", "A A", "A A", "A A", + "A HHH A", "A A", "MHHHHHHHM" }, + { " HBH ", " EL LE ", "E E", "HC CH", "AC CA", "AC CA", "A D D A", + "A HHH A", "A A", "MHHHHHHHM" }, + { " HBH ", " EL LE ", "E E", "H H", "A A", "A A", "A A", + "A HHH A", "A A", "MHHHHHHHM" }, + { " BBB ", " EL LE ", "E GGDGG E", "HGG D GGH", "HG C GH", "HG GH", "HG GH", + "HG HHH GH", "HG GH", "MHHHHHHHM" }, + { " HBH ", " EL LE ", "E E", "H H", "A A", "A A", "A A", + "A HHH A", "A A", "MHHHHHHHM" }, + { " HBH ", " EL LE ", "E E", "HC CH", "AC CA", "AC CA", "A D D A", + "A HHH A", "A A", "MHHHHHHHM" }, + { " HBH ", " EL LE ", "E E", "H H", "A A", "A A", "A A", + "A HHH A", "A A", "MHHHHHHHM" }, + { " BBB ", " EL LE ", "E GGDGG E", "HGG D GGH", "AG C GA", "AG GA", "AG GA", + "AG HHH GA", "AG GA", "MHHHHHHHM" }, + { " HBH ", " EL LE ", "E E", "H H", "A A", "A A", "A A", + "A HHH A", "A A", "MHHHHHHHM" }, + { " HBH ", " EL LE ", "E E", "HC CH", "AC CA", "AC CA", "A D D A", + "A HHH A", "A A", "MHHHHHHHM" }, + { " HBH ", " EL LE ", "E E", "H H", "A A", "A A", "A A", + "A HHH A", "A A", "MHHHHHHHM" }, + { " BBB ", " EL LE ", "E GGDGG E", "HGG D GGH", "HG C GH", "HG GH", "HG GH", + "HG HHH GH", "HG GH", "MHHHHHHHM" }, + { " HBH ", " EL LE ", "E E", "H H", "A A", "A A", "A A", + "A HHH A", "A A", "MHHHHHHHM" }, + { " HBH ", " EL LE ", "E E", "HC CH", "AC CA", "AC CA", "A D D A", + "A HHH A", "A A", "MHHHHHHHM" }, + { " HBH ", " EL LE ", "E E", "H H", "A A", "A A", "A A", + "A HHH A", "A A", "MHHHHHHHM" }, + { " BBB ", " EL LE ", "E GGDGG E", "HGG D GGH", "AG C GA", "AG GA", "AG GA", + "AG HHH GA", "AG GA", "MHHHHHHHM" }, + { " HBH ", " EL LE ", "E E", "H H", "A A", "A A", "A A", + "A HHH A", "A N N A", "MHHHHHHHM" }, + { " HBH ", " EL LE ", "E E", "HC CH", "AC CA", "AC CA", "A D D A", + "A HHH A", "A A", "MHHHHHHHM" }, + { " ", " EHHHHHE ", "E E", "H H", "A A", "A A", "A A", + "A HHH A", "A A", "MHHHHHHHM" }, + { " ", " ", " HHHHHHH ", "HH HH", "H H", "H H", "H H", + "H H", "H KKK H", "HHHHHHHHH" } }) + .addElement( + 'A', + ofChain( + ofBlockUnlocalizedName("bartworks", "BW_GlasBlocks", 5), + ofBlockUnlocalizedName("bartworks", "BW_GlasBlocks", 13), + ofBlockUnlocalizedName("bartworks", "BW_GlasBlocks", 14), + ofBlockUnlocalizedName("bartworks", "BW_GlasBlocks", 15), + ofBlockUnlocalizedName("bartworks", "BW_GlasBlocks2", 0))) + .addElement('H', ofBlock(GregTech_API.sBlockCasings8, 7)) + .addElement('C', ofBlock(GregTech_API.sBlockCasings2, 5)) + .addElement('D', ofBlock(GregTech_API.sBlockCasings2, 9)) + .addElement('G', ofBlock(GregTech_API.sBlockCasings9, 0)) + .addElement('E', ofBlock(GregTech_API.sBlockCasings9, 1)) + .addElement('F', ofBlock(GregTech_API.sBlockCasings4, 1)) + .addElement( + 'B', + ofBlocksTiered( + (block, meta) -> block == Loaders.componentAssemblylineCasing ? meta : -1, + IntStream.range(0, 14).mapToObj(i -> Pair.of(Loaders.componentAssemblylineCasing, i)) + .collect(Collectors.toList()), + -1, + (t, meta) -> t.casingTier = meta, + t -> t.casingTier)) + .addElement( + 'J', + GT_StructureUtility.buildHatchAdder(ComponentAssemblyLine.class).atLeast(InputBus).dot(1) + .casingIndex(183).buildAndChain(GregTech_API.sBlockCasings8, 7)) + .addElement( + 'K', + GT_StructureUtility.buildHatchAdder(ComponentAssemblyLine.class).atLeast(OutputBus).dot(2) + .casingIndex(183).buildAndChain(GregTech_API.sBlockCasings8, 7)) + .addElement( + 'L', + GT_StructureUtility.buildHatchAdder(ComponentAssemblyLine.class).atLeast(Energy, ExoticEnergy) + .dot(3).casingIndex(183).buildAndChain(GregTech_API.sBlockCasings8, 7)) + .addElement( + 'I', + GT_StructureUtility.buildHatchAdder(ComponentAssemblyLine.class).atLeast(Maintenance).dot(4) + .casingIndex(183).buildAndChain(GregTech_API.sBlockCasings8, 7)) + .addElement( + 'M', + GT_StructureUtility.buildHatchAdder(ComponentAssemblyLine.class).atLeast(InputHatch).dot(5) + .casingIndex(183).buildAndChain(GregTech_API.sBlockCasings8, 7)) + .addElement('N', GT_StructureUtility.ofFrame(Materials.TungstenSteel)).build(); public ComponentAssemblyLine(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); @@ -523,23 +181,33 @@ public class ComponentAssemblyLine extends GT_MetaTileEntity_LongPowerUsageBase< tt.addMachineType("High-Capacity Component Assembler") .addInfo("Controller block for the Component Assembly Line.") .addInfo("Assembles basic components (motors, pumps, etc.) in large batches.") - .addInfo("The " + EnumChatFormatting.BOLD + EnumChatFormatting.YELLOW - + "Special Component Assembly Line Casing" + EnumChatFormatting.RESET + EnumChatFormatting.GRAY) + .addInfo( + "The " + EnumChatFormatting.BOLD + + EnumChatFormatting.YELLOW + + "Special Component Assembly Line Casing" + + EnumChatFormatting.RESET + + EnumChatFormatting.GRAY) .addInfo("limits the recipes the machine can perform. See the NEI pages for details.") - .addInfo("Supports " + EnumChatFormatting.BLUE + "Tec" + EnumChatFormatting.DARK_BLUE + "Tech" - + EnumChatFormatting.GRAY + " laser and multi-amp hatches!") + .addInfo( + "Supports " + EnumChatFormatting.BLUE + + "Tec" + + EnumChatFormatting.DARK_BLUE + + "Tech" + + EnumChatFormatting.GRAY + + " laser and multi-amp hatches!") .addInfo("Supports overclocking beyond MAX!") .addInfo(EnumChatFormatting.ITALIC + "Much more efficient than other competing brands!") .beginStructureBlock(9, 10, 33, false) .addStructureInfo("This structure is too complex! See schematic for details.") .addOtherStructurePart("Borosilicate Glass", "Can be UV tier or higher") - .addInputBus("Start of conveyor belt", 1) - .addOutputBus("End of conveyor belt", 2) - .addEnergyHatch("Second-top layer", 3) - .addMaintenanceHatch("Around the controller", 4) - .addInputHatch("Bottom left and right corners", 5) - .toolTipFinisher(EnumChatFormatting.AQUA + "MadMan310" + EnumChatFormatting.GRAY + " via " - + EnumChatFormatting.GREEN + "Good Generator"); + .addInputBus("Start of conveyor belt", 1).addOutputBus("End of conveyor belt", 2) + .addEnergyHatch("Second-top layer", 3).addMaintenanceHatch("Around the controller", 4) + .addInputHatch("Bottom left and right corners", 5).toolTipFinisher( + EnumChatFormatting.AQUA + "MadMan310" + + EnumChatFormatting.GRAY + + " via " + + EnumChatFormatting.GREEN + + "Good Generator"); return tt; } @@ -551,7 +219,7 @@ public class ComponentAssemblyLine extends GT_MetaTileEntity_LongPowerUsageBase< /** * Changes and adds new information to the default info data for the scanner. - * */ + */ @Override public String[] getInfoData() { String[] origin = super.getInfoData(); @@ -563,41 +231,18 @@ public class ComponentAssemblyLine extends GT_MetaTileEntity_LongPowerUsageBase< } @Override - public ITexture[] getTexture( - IGregTechTileEntity aBaseMetaTileEntity, - byte aSide, - byte aFacing, - byte aColorIndex, - boolean aActive, - boolean aRedstone) { + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, + boolean aActive, boolean aRedstone) { if (aSide == aFacing) { - if (aActive) - return new ITexture[] { - Textures.BlockIcons.getCasingTextureForId(183), - 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(183), - 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[] { Textures.BlockIcons.getCasingTextureForId(183), + 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(183), + 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(183)}; + return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(183) }; } @Override @@ -612,8 +257,8 @@ public class ComponentAssemblyLine extends GT_MetaTileEntity_LongPowerUsageBase< long totalEU = getRealVoltage(); ItemStack[] tItems = getStoredInputs().toArray(new ItemStack[0]); FluidStack[] tFluids = getStoredFluids().toArray(new FluidStack[0]); - this.lastRecipe = - getRecipeMap().findRecipe(getBaseMetaTileEntity(), this.lastRecipe, false, totalEU, tFluids, tItems); + this.lastRecipe = getRecipeMap() + .findRecipe(getBaseMetaTileEntity(), this.lastRecipe, false, totalEU, tFluids, tItems); if (this.lastRecipe == null) return false; if (this.lastRecipe.mSpecialValue > casingTier + 1) return false; if (!this.lastRecipe.isRecipeInputEqual(true, tFluids, tItems)) return false; diff --git a/src/main/java/goodgenerator/blocks/tileEntity/CoolantTower.java b/src/main/java/goodgenerator/blocks/tileEntity/CoolantTower.java index 3cee14c86f..62301ca41f 100644 --- a/src/main/java/goodgenerator/blocks/tileEntity/CoolantTower.java +++ b/src/main/java/goodgenerator/blocks/tileEntity/CoolantTower.java @@ -5,12 +5,17 @@ import static goodgenerator.util.DescTextLocalization.BLUE_PRINT_INFO; import static gregtech.api.enums.Textures.BlockIcons.*; import static gregtech.api.util.GT_StructureUtility.*; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; + import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable; import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable; import com.gtnewhorizon.structurelib.structure.IItemSource; import com.gtnewhorizon.structurelib.structure.IStructureDefinition; import com.gtnewhorizon.structurelib.structure.StructureDefinition; + import goodgenerator.blocks.tileEntity.base.GT_MetaTileEntity_TooltipMultiBlockBase_EM; import goodgenerator.util.DescTextLocalization; import gregtech.api.GregTech_API; @@ -26,9 +31,6 @@ import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import gregtech.api.util.GT_Utility; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; public class CoolantTower extends GT_MetaTileEntity_TooltipMultiBlockBase_EM implements IConstructable, ISurvivalConstructable { @@ -48,186 +50,58 @@ public class CoolantTower extends GT_MetaTileEntity_TooltipMultiBlockBase_EM public IStructureDefinition getStructure_EM() { if (multiDefinition == null) { multiDefinition = StructureDefinition.builder() - .addShape(mName, transpose(new String[][] { - { - " ", - " ", - " BBB ", - " B B ", - " B B ", - " B B ", - " B B ", - " B B ", - " BBB ", - " ", - " " - }, - { - " ", - " ", - " BBB ", - " BBBBB ", - " BB BB ", - " BB BB ", - " BB BB ", - " BBBBB ", - " BBB ", - " ", - " " - }, - { - " ", - " ", - " ", - " BBB ", - " B B ", - " B B ", - " B B ", - " BBB ", - " ", - " ", - " " - }, - { - " ", - " ", - " ", - " BBB ", - " B B ", - " B B ", - " B B ", - " BBB ", - " ", - " ", - " " - }, - { - " ", - " ", - " ", - " BBB ", - " B B ", - " B B ", - " B B ", - " BBB ", - " ", - " ", - " " - }, - { - " ", - " ", - " BBB ", - " BBBBB ", - " BB BB ", - " BB BB ", - " BB BB ", - " BBBBB ", - " BBB ", - " ", - " " - }, - { - " ", - " ", - " BBB ", - " B B ", - " B B ", - " B B ", - " B B ", - " B B ", - " BBB ", - " ", - " " - }, - { - " ", - " ", - " BBB ", - " B B ", - " B B ", - " B B ", - " B B ", - " B B ", - " BBB ", - " ", - " " - }, - { - " ", - " BBB ", - " BBBBB ", - " BB BB ", - " BB BB ", - " BB BB ", - " BB BB ", - " BB BB ", - " BBBBB ", - " BBB ", - " " - }, - { - " ", - " BBB ", - " B B ", - " B B ", - " B B ", - " B B ", - " B B ", - " B B ", - " B B ", - " BBB ", - " " - }, - { - " ", - " BBBBB ", - " BB BB ", - " BB BB ", - " B B ", - " B B ", - " B B ", - " BB BB ", - " BB BB ", - " BBBBB ", - " " - }, - { - " HH~HH ", - " HBBBBBH ", - " HB BH ", - "HB BH", - "HB BH", - "HB BH", - "HB BH", - "HB BH", - " HB BH ", - " HBBBBBH ", - " HHHHH " - }, - { - " CCCCC ", - " C C ", - " C C ", - "C C", - "C C", - "C C", - "C C", - "C C", - " C C ", - " C C ", - " CCCCC " - }, - })) + .addShape( + mName, + transpose( + new String[][] { + { " ", " ", " BBB ", " B B ", " B B ", + " B B ", " B B ", " B B ", " BBB ", + " ", " " }, + { " ", " ", " BBB ", " BBBBB ", " BB BB ", + " BB BB ", " BB BB ", " BBBBB ", " BBB ", + " ", " " }, + { " ", " ", " ", " BBB ", " B B ", + " B B ", " B B ", " BBB ", " ", + " ", " " }, + { " ", " ", " ", " BBB ", " B B ", + " B B ", " B B ", " BBB ", " ", + " ", " " }, + { " ", " ", " ", " BBB ", " B B ", + " B B ", " B B ", " BBB ", " ", + " ", " " }, + { " ", " ", " BBB ", " BBBBB ", " BB BB ", + " BB BB ", " BB BB ", " BBBBB ", " BBB ", + " ", " " }, + { " ", " ", " BBB ", " B B ", " B B ", + " B B ", " B B ", " B B ", " BBB ", + " ", " " }, + { " ", " ", " BBB ", " B B ", " B B ", + " B B ", " B B ", " B B ", " BBB ", + " ", " " }, + { " ", " BBB ", " BBBBB ", " BB BB ", " BB BB ", + " BB BB ", " BB BB ", " BB BB ", " BBBBB ", + " BBB ", " " }, + { " ", " BBB ", " B B ", " B B ", " B B ", + " B B ", " B B ", " B B ", " B B ", + " BBB ", " " }, + { " ", " BBBBB ", " BB BB ", " BB BB ", " B B ", + " B B ", " B B ", " BB BB ", " BB BB ", + " BBBBB ", " " }, + { " HH~HH ", " HBBBBBH ", " HB BH ", "HB BH", "HB BH", + "HB BH", "HB BH", "HB BH", " HB BH ", + " HBBBBBH ", " HHHHH " }, + { " CCCCC ", " C C ", " C C ", "C C", "C C", + "C C", "C C", "C C", " C C ", + " C C ", " CCCCC " }, })) .addElement('B', ofBlockAnyMeta(GregTech_API.sBlockConcretes, 8)) .addElement('C', ofFrame(Materials.TungstenCarbide)) .addElement( 'H', - ofChain(buildHatchAdder(CoolantTower.class) - .atLeast(GT_HatchElement.InputHatch, GT_HatchElement.OutputHatch) - .casingIndex(CASING_INDEX) - .dot(1) - .buildAndChain(ofBlockAnyMeta(GregTech_API.sBlockConcretes, 8)))) + ofChain( + buildHatchAdder(CoolantTower.class) + .atLeast(GT_HatchElement.InputHatch, GT_HatchElement.OutputHatch) + .casingIndex(CASING_INDEX).dot(1) + .buildAndChain(ofBlockAnyMeta(GregTech_API.sBlockConcretes, 8)))) .build(); } return multiDefinition; @@ -266,15 +140,10 @@ public class CoolantTower extends GT_MetaTileEntity_TooltipMultiBlockBase_EM @Override protected GT_Multiblock_Tooltip_Builder createTooltip() { final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); - tt.addMachineType("Coolant Tower") - .addInfo("Controller block for the Coolant Tower.") - .addInfo("Turn Steam back to Distilled Water.") - .addInfo(BLUE_PRINT_INFO) - .addSeparator() - .addController("Mid of the second layer.") - .addInputHatch("Input Hatch", 1) - .addOutputHatch("Output Hatch", 1) - .toolTipFinisher("Good Generator"); + tt.addMachineType("Coolant Tower").addInfo("Controller block for the Coolant Tower.") + .addInfo("Turn Steam back to Distilled Water.").addInfo(BLUE_PRINT_INFO).addSeparator() + .addController("Mid of the second layer.").addInputHatch("Input Hatch", 1) + .addOutputHatch("Output Hatch", 1).toolTipFinisher("Good Generator"); return tt; } @@ -332,41 +201,18 @@ public class CoolantTower extends GT_MetaTileEntity_TooltipMultiBlockBase_EM } @Override - public ITexture[] getTexture( - IGregTechTileEntity aBaseMetaTileEntity, - byte aSide, - byte aFacing, - byte aColorIndex, - boolean aActive, - boolean aRedstone) { + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, + boolean aActive, boolean aRedstone) { if (aSide == aFacing) { - if (aActive) - return new ITexture[] { - casingTexturePages[12][6], - 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[12][6], - 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[12][6], + 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[12][6], + TextureFactory.builder().addIcon(OVERLAY_FRONT_HEAT_EXCHANGER).extFacing().build(), + TextureFactory.builder().addIcon(OVERLAY_FRONT_HEAT_EXCHANGER_GLOW).extFacing().glow().build() }; } - return new ITexture[] {casingTexturePages[12][6]}; + return new ITexture[] { casingTexturePages[12][6] }; } @Override diff --git a/src/main/java/goodgenerator/blocks/tileEntity/EssentiaHatch.java b/src/main/java/goodgenerator/blocks/tileEntity/EssentiaHatch.java index 4c72fff073..f965ff9399 100644 --- a/src/main/java/goodgenerator/blocks/tileEntity/EssentiaHatch.java +++ b/src/main/java/goodgenerator/blocks/tileEntity/EssentiaHatch.java @@ -1,7 +1,7 @@ package goodgenerator.blocks.tileEntity; -import goodgenerator.crossmod.thaumcraft.LargeEssentiaEnergyData; import java.util.ArrayList; + import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.network.NetworkManager; @@ -9,11 +9,13 @@ import net.minecraft.network.Packet; import net.minecraft.network.play.server.S35PacketUpdateTileEntity; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.ForgeDirection; + import thaumcraft.api.ThaumcraftApiHelper; import thaumcraft.api.aspects.Aspect; import thaumcraft.api.aspects.AspectList; import thaumcraft.api.aspects.IAspectContainer; import thaumcraft.api.aspects.IEssentiaTransport; +import goodgenerator.crossmod.thaumcraft.LargeEssentiaEnergyData; public class EssentiaHatch extends TileEntity implements IAspectContainer, IEssentiaTransport { @@ -89,7 +91,11 @@ public class EssentiaHatch extends TileEntity implements IAspectContainer, IEsse TileEntity[] te = new TileEntity[ForgeDirection.VALID_DIRECTIONS.length]; for (int i = 0; i < ForgeDirection.VALID_DIRECTIONS.length; i++) { te[i] = ThaumcraftApiHelper.getConnectableTile( - this.worldObj, this.xCoord, this.yCoord, this.zCoord, ForgeDirection.VALID_DIRECTIONS[i]); + this.worldObj, + this.xCoord, + this.yCoord, + this.zCoord, + ForgeDirection.VALID_DIRECTIONS[i]); if (te[i] != null) { IEssentiaTransport pipe = (IEssentiaTransport) te[i]; if (!pipe.canOutputTo(ForgeDirection.VALID_DIRECTIONS[i])) { @@ -104,13 +110,12 @@ public class EssentiaHatch extends TileEntity implements IAspectContainer, IEsse if (readyInput.equals(mLocked)) { addToContainer(mLocked, pipe.takeEssentia(mLocked, 1, ForgeDirection.VALID_DIRECTIONS[i])); } - if (mLocked == null) - addToContainer( - pipe.getEssentiaType(ForgeDirection.VALID_DIRECTIONS[i]), - pipe.takeEssentia( - pipe.getEssentiaType(ForgeDirection.VALID_DIRECTIONS[i]), - 1, - ForgeDirection.VALID_DIRECTIONS[i])); + if (mLocked == null) addToContainer( + pipe.getEssentiaType(ForgeDirection.VALID_DIRECTIONS[i]), + pipe.takeEssentia( + pipe.getEssentiaType(ForgeDirection.VALID_DIRECTIONS[i]), + 1, + ForgeDirection.VALID_DIRECTIONS[i])); } } } diff --git a/src/main/java/goodgenerator/blocks/tileEntity/EssentiaOutputHatch.java b/src/main/java/goodgenerator/blocks/tileEntity/EssentiaOutputHatch.java index ba87a66af0..93cec4672c 100644 --- a/src/main/java/goodgenerator/blocks/tileEntity/EssentiaOutputHatch.java +++ b/src/main/java/goodgenerator/blocks/tileEntity/EssentiaOutputHatch.java @@ -1,9 +1,11 @@ package goodgenerator.blocks.tileEntity; import java.util.Map; + import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraftforge.common.util.ForgeDirection; + import thaumcraft.api.TileThaumcraft; import thaumcraft.api.aspects.Aspect; import thaumcraft.api.aspects.AspectList; diff --git a/src/main/java/goodgenerator/blocks/tileEntity/EssentiaOutputHatch_ME.java b/src/main/java/goodgenerator/blocks/tileEntity/EssentiaOutputHatch_ME.java index 44a5bea3c6..f86c5a4663 100644 --- a/src/main/java/goodgenerator/blocks/tileEntity/EssentiaOutputHatch_ME.java +++ b/src/main/java/goodgenerator/blocks/tileEntity/EssentiaOutputHatch_ME.java @@ -1,5 +1,12 @@ package goodgenerator.blocks.tileEntity; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.common.util.ForgeDirection; + +import thaumcraft.api.aspects.Aspect; +import thaumcraft.api.aspects.AspectList; +import thaumicenergistics.api.grid.IEssentiaGrid; +import thaumicenergistics.api.grid.IMEEssentiaMonitor; import appeng.api.config.Actionable; import appeng.api.networking.GridFlags; import appeng.api.networking.IGrid; @@ -14,24 +21,17 @@ import appeng.tile.TileEvent; import appeng.tile.events.TileEventType; import cpw.mods.fml.common.Optional; import goodgenerator.util.ItemRefer; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.common.util.ForgeDirection; -import thaumcraft.api.aspects.Aspect; -import thaumcraft.api.aspects.AspectList; -import thaumicenergistics.api.grid.IEssentiaGrid; -import thaumicenergistics.api.grid.IMEEssentiaMonitor; @Optional.InterfaceList( value = { - @Optional.Interface( - iface = "appeng.api.networking.security.IActionHost", - modid = "appliedenergistics2", - striprefs = true), - @Optional.Interface( - iface = "appeng.me.helpers.IGridProxyable", - modid = "appliedenergistics2", - striprefs = true), - }) + @Optional.Interface( + iface = "appeng.api.networking.security.IActionHost", + modid = "appliedenergistics2", + striprefs = true), + @Optional.Interface( + iface = "appeng.me.helpers.IGridProxyable", + modid = "appliedenergistics2", + striprefs = true), }) public class Esse