diff options
author | Lyfts <127234178+Lyfts@users.noreply.github.com> | 2024-01-20 20:54:09 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-20 20:54:09 +0100 |
commit | 341d354d99e726289a3f0396fc6caade3063ddc5 (patch) | |
tree | 8ad3fecbefcf26b406ee66a6f3ee1eb01f3048b3 /src | |
parent | 2efc2847782be8ae6939e083062254933440e26a (diff) | |
download | GT5-Unofficial-341d354d99e726289a3f0396fc6caade3063ddc5.tar.gz GT5-Unofficial-341d354d99e726289a3f0396fc6caade3063ddc5.tar.bz2 GT5-Unofficial-341d354d99e726289a3f0396fc6caade3063ddc5.zip |
Fix NEI preview (#84)
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/com/elisis/gtnhlanth/common/tileentity/Digester.java | 25 | ||||
-rw-r--r-- | src/main/java/com/elisis/gtnhlanth/common/tileentity/DissolutionTank.java | 23 |
2 files changed, 25 insertions, 23 deletions
diff --git a/src/main/java/com/elisis/gtnhlanth/common/tileentity/Digester.java b/src/main/java/com/elisis/gtnhlanth/common/tileentity/Digester.java index afa8165afb..3af649987b 100644 --- a/src/main/java/com/elisis/gtnhlanth/common/tileentity/Digester.java +++ b/src/main/java/com/elisis/gtnhlanth/common/tileentity/Digester.java @@ -2,15 +2,21 @@ package com.elisis.gtnhlanth.common.tileentity; import static com.elisis.gtnhlanth.util.DescTextLocalization.BLUEPRINT_INFO; import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain; import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; +import static gregtech.api.enums.GT_HatchElement.Energy; +import static gregtech.api.enums.GT_HatchElement.InputBus; +import static gregtech.api.enums.GT_HatchElement.InputHatch; +import static gregtech.api.enums.GT_HatchElement.Maintenance; +import static gregtech.api.enums.GT_HatchElement.Muffler; +import static gregtech.api.enums.GT_HatchElement.OutputBus; +import static gregtech.api.enums.GT_HatchElement.OutputHatch; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_OIL_CRACKER; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_OIL_CRACKER_ACTIVE; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_OIL_CRACKER_ACTIVE_GLOW; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_OIL_CRACKER_GLOW; import static gregtech.api.enums.Textures.BlockIcons.casingTexturePages; +import static gregtech.api.util.GT_StructureUtility.buildHatchAdder; import static gregtech.api.util.GT_StructureUtility.ofCoil; -import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; import java.util.ArrayList; @@ -20,7 +26,6 @@ import net.minecraftforge.fluids.FluidStack; import com.elisis.gtnhlanth.api.recipe.LanthanidesRecipeMaps; import com.elisis.gtnhlanth.util.DescTextLocalization; -import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable; import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable; import com.gtnewhorizon.structurelib.structure.IStructureDefinition; import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment; @@ -37,8 +42,7 @@ import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import gregtech.api.util.GT_Recipe; -public class Digester extends GT_MetaTileEntity_EnhancedMultiBlockBase<Digester> - implements IConstructable, ISurvivalConstructable { +public class Digester extends GT_MetaTileEntity_EnhancedMultiBlockBase<Digester> implements ISurvivalConstructable { protected int casingAmount = 0; protected int height = 0; @@ -52,15 +56,12 @@ public class Digester extends GT_MetaTileEntity_EnhancedMultiBlockBase<Digester> { " ttt ", " t---t ", "t-----t", "t-----t", "t-----t", " t---t ", " ttt " }, { " tccct ", "tc---ct", "c-----c", "c-----c", "c-----c", "tc---ct", " tccct " }, { " tt~tt ", "thhhhht", "thsssht", "thsssht", "thsssht", "thhhhht", " ttttt " }, })) + .addElement( 't', - ofChain( - ofHatchAdder(Digester::addInputToMachineList, 47, 1), - ofHatchAdder(Digester::addOutputToMachineList, 47, 1), - ofHatchAdder(Digester::addEnergyInputToMachineList, 47, 1), - ofHatchAdder(Digester::addMaintenanceToMachineList, 47, 1), - ofHatchAdder(Digester::addMufflerToMachineList, 47, 1), - ofBlock(GregTech_API.sBlockCasings4, 0))) + buildHatchAdder(Digester.class) + .atLeast(InputHatch, OutputHatch, InputBus, OutputBus, Maintenance, Energy, Muffler) + .casingIndex(47).dot(1).buildAndChain(GregTech_API.sBlockCasings4, 0)) .addElement('h', ofBlock(GregTech_API.sBlockCasings1, 11)) .addElement('s', ofBlock(GregTech_API.sBlockCasings4, 1)) .addElement('c', ofCoil(Digester::setCoilLevel, Digester::getCoilLevel)).build(); diff --git a/src/main/java/com/elisis/gtnhlanth/common/tileentity/DissolutionTank.java b/src/main/java/com/elisis/gtnhlanth/common/tileentity/DissolutionTank.java index d2d4bc9ead..152a69b240 100644 --- a/src/main/java/com/elisis/gtnhlanth/common/tileentity/DissolutionTank.java +++ b/src/main/java/com/elisis/gtnhlanth/common/tileentity/DissolutionTank.java @@ -3,14 +3,20 @@ package com.elisis.gtnhlanth.common.tileentity; import static com.elisis.gtnhlanth.util.DescTextLocalization.BLUEPRINT_INFO; import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlockAdder; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain; import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; +import static gregtech.api.enums.GT_HatchElement.Energy; +import static gregtech.api.enums.GT_HatchElement.InputBus; +import static gregtech.api.enums.GT_HatchElement.InputHatch; +import static gregtech.api.enums.GT_HatchElement.Maintenance; +import static gregtech.api.enums.GT_HatchElement.Muffler; +import static gregtech.api.enums.GT_HatchElement.OutputBus; +import static gregtech.api.enums.GT_HatchElement.OutputHatch; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_OIL_CRACKER; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_OIL_CRACKER_ACTIVE; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_OIL_CRACKER_ACTIVE_GLOW; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_OIL_CRACKER_GLOW; import static gregtech.api.enums.Textures.BlockIcons.casingTexturePages; -import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; +import static gregtech.api.util.GT_StructureUtility.buildHatchAdder; import java.util.List; @@ -22,7 +28,6 @@ import net.minecraftforge.fluids.FluidStack; import com.elisis.gtnhlanth.api.recipe.LanthanidesRecipeMaps; import com.elisis.gtnhlanth.util.DescTextLocalization; import com.github.bartimaeusnek.bartworks.common.loaders.ItemRegistry; -import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable; import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable; import com.gtnewhorizon.structurelib.structure.IStructureDefinition; import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment; @@ -40,7 +45,7 @@ import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import gregtech.api.util.GT_Recipe; public class DissolutionTank extends GT_MetaTileEntity_EnhancedMultiBlockBase<DissolutionTank> - implements IConstructable, ISurvivalConstructable, ISecondaryDescribable { + implements ISurvivalConstructable, ISecondaryDescribable { private final IStructureDefinition<DissolutionTank> multiDefinition = StructureDefinition.<DissolutionTank>builder() .addShape( @@ -53,13 +58,9 @@ public class DissolutionTank extends GT_MetaTileEntity_EnhancedMultiBlockBase<Di { "s s", " ", " ", " ", "s s" } })) .addElement( 's', - ofChain( - ofHatchAdder(DissolutionTank::addInputToMachineList, 49, 1), - ofHatchAdder(DissolutionTank::addOutputToMachineList, 49, 1), - ofHatchAdder(DissolutionTank::addEnergyInputToMachineList, 49, 1), - ofHatchAdder(DissolutionTank::addMaintenanceToMachineList, 49, 1), - ofHatchAdder(DissolutionTank::addMufflerToMachineList, 49, 1), - ofBlock(GregTech_API.sBlockCasings4, 1))) + buildHatchAdder(DissolutionTank.class) + .atLeast(InputHatch, OutputHatch, InputBus, OutputBus, Maintenance, Energy, Muffler) + .casingIndex(49).dot(1).buildAndChain(GregTech_API.sBlockCasings4, 1)) .addElement('h', ofBlock(GregTech_API.sBlockCasings1, 11)) .addElement('g', ofBlockAdder(DissolutionTank::addGlass, ItemRegistry.bw_glasses[0], 1)).build(); |