diff options
author | Quetz4l <aizektro@gmail.com> | 2023-05-14 18:59:48 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-14 17:59:48 +0200 |
commit | 4fc648aba6e9ed7d3cade45ea77bf9c3eb2b927e (patch) | |
tree | 12a79efcc2a255d746770727b6c2842b781045de /src/main | |
parent | b36546ce00bcf5c6ab5325ff1034692e7b5b0f41 (diff) | |
download | GT5-Unofficial-4fc648aba6e9ed7d3cade45ea77bf9c3eb2b927e.tar.gz GT5-Unofficial-4fc648aba6e9ed7d3cade45ea77bf9c3eb2b927e.tar.bz2 GT5-Unofficial-4fc648aba6e9ed7d3cade45ea77bf9c3eb2b927e.zip |
glasses for structure (#1986)
* glasses for structure
* new Api for glasses
* changed glass requirements
* fix api desc
* sa
Diffstat (limited to 'src/main')
5 files changed, 42 insertions, 67 deletions
diff --git a/src/main/java/gregtech/api/multitileentity/multiblock/casing/Glasses.java b/src/main/java/gregtech/api/multitileentity/multiblock/casing/Glasses.java new file mode 100644 index 0000000000..6aae4c2ab0 --- /dev/null +++ b/src/main/java/gregtech/api/multitileentity/multiblock/casing/Glasses.java @@ -0,0 +1,30 @@ +package gregtech.api.multitileentity.multiblock.casing; + +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlockUnlocalizedName; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain; +import static gregtech.api.enums.Mods.*; + +import com.gtnewhorizon.structurelib.structure.IStructureElementChain; + +public class Glasses { + + /** support all Bart, Botania, Ic2, Thaumcraft glasses for multiblock structure **/ + public static <T> IStructureElementChain<T> chainAllGlasses() { + return ofChain( + // IndustrialCraft2 glass + ofBlockUnlocalizedName(IndustrialCraft2.ID, "blockAlloyGlass", 0, true), + + // Botania glass + ofBlockUnlocalizedName(Botania.ID, "manaGlass", 0, false), + ofBlockUnlocalizedName(Botania.ID, "elfGlass", 0, false), + ofBlockUnlocalizedName(Botania.ID, "hourglass", 0, false), + + // BartWorks glass + ofBlockUnlocalizedName(BartWorks.ID, "BW_GlasBlocks", 0, true), + ofBlockUnlocalizedName(BartWorks.ID, "BW_GlasBlocks2", 0, true), + + // warded glass + ofBlockUnlocalizedName(Thaumcraft.ID, "blockCosmeticOpaque", 2, false)); + } + +} 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 c92a33e5d5..e673b6af30 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 @@ -3,9 +3,6 @@ package gregtech.common.tileentities.machines.multi; import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; import static gregtech.GT_Mod.GT_FML_LOGGER; import static gregtech.api.enums.GT_HatchElement.*; -import static gregtech.api.enums.Mods.BartWorks; -import static gregtech.api.enums.Mods.IndustrialCraft2; -import static gregtech.api.enums.Mods.Thaumcraft; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ASSEMBLY_LINE; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE_GLOW; @@ -41,6 +38,7 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_DataAccess; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_InputBus; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_MultiInput; +import gregtech.api.multitileentity.multiblock.casing.Glasses; import gregtech.api.render.TextureFactory; import gregtech.api.util.*; import gregtech.api.util.GT_Recipe.GT_Recipe_AssemblyLine; @@ -65,24 +63,10 @@ public class GT_MetaTileEntity_AssemblyLine .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(IndustrialCraft2.ID, "blockAlloyGlass", 0, true), - ofBlockUnlocalizedName(BartWorks.ID, "BW_GlasBlocks", 0, true), - ofBlockUnlocalizedName(BartWorks.ID, "BW_GlasBlocks2", 0, true), - // warded - // glass - ofBlockUnlocalizedName(Thaumcraft.ID, "blockCosmeticOpaque", 2, false))) + .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', Glasses.chainAllGlasses()) .addElement( 'e', ofChain( @@ -108,20 +92,7 @@ public class GT_MetaTileEntity_AssemblyLine .addElement( 'I', ofChain( - // all - // blocks - // nearby - // use - // solid - // steel - // casing, - // so - // let's - // use - // the - // texture - // of - // that + // 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)) 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 f7a69ad872..c8ae955688 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 @@ -2,9 +2,6 @@ package gregtech.common.tileentities.machines.multi; import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; import static gregtech.api.enums.GT_HatchElement.*; -import static gregtech.api.enums.Mods.BartWorks; -import static gregtech.api.enums.Mods.IndustrialCraft2; -import static gregtech.api.enums.Mods.Thaumcraft; import static gregtech.api.enums.Textures.BlockIcons.*; import static gregtech.api.util.GT_StructureUtility.buildHatchAdder; import static gregtech.api.util.GT_StructureUtility.ofFrame; @@ -41,6 +38,7 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_EnhancedMul import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Muffler; +import gregtech.api.multitileentity.multiblock.casing.Glasses; import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Multiblock_Tooltip_Builder; @@ -76,15 +74,7 @@ public class GT_MetaTileEntity_IntegratedOreFactory extends { "EEEEEE ", "EEEEEEEEEEE", "EEEEEEEEEEE", "EEEEEEEEEEE", "EEEEEEEEEEE", "EEEEEE " } })) .addElement('i', ofBlock(GregTech_API.sBlockCasings8, 7)) .addElement('s', ofBlock(GregTech_API.sBlockCasings4, 1)) - .addElement( - 'g', - ofChain( - ofBlockUnlocalizedName(IndustrialCraft2.ID, "blockAlloyGlass", 0, true), - ofBlockUnlocalizedName(BartWorks.ID, "BW_GlasBlocks", 0, true), - ofBlockUnlocalizedName(BartWorks.ID, "BW_GlasBlocks2", 0, true), - // warded - // glass - ofBlockUnlocalizedName(Thaumcraft.ID, "blockCosmeticOpaque", 2, false))) + .addElement('g', Glasses.chainAllGlasses()) .addElement('x', ofBlock(GregTech_API.sBlockCasings2, 3)) .addElement('p', ofBlock(GregTech_API.sBlockCasings2, 15)) .addElement('t', ofFrame(Materials.TungstenSteel)) 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 719cbc0f63..bdfa9dbda9 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 @@ -3,9 +3,6 @@ package gregtech.common.tileentities.machines.multi; import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; import static gregtech.api.enums.GT_HatchElement.*; import static gregtech.api.enums.GT_Values.*; -import static gregtech.api.enums.Mods.BartWorks; -import static gregtech.api.enums.Mods.IndustrialCraft2; -import static gregtech.api.enums.Mods.Thaumcraft; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ASSEMBLY_LINE; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE_GLOW; @@ -64,6 +61,7 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_InputBus; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Muffler; +import gregtech.api.multitileentity.multiblock.casing.Glasses; import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Multiblock_Tooltip_Builder; @@ -207,15 +205,7 @@ public class GT_MetaTileEntity_PCBFactory extends .addElement('E', ofFrame(Materials.DamascusSteel)) .addElement('C', ofBlock(GregTech_API.sBlockCasings8, 11)) .addElement('D', ofBlock(GregTech_API.sBlockReinforced, 2)) - .addElement( - 'A', - ofChain( - ofBlockUnlocalizedName(IndustrialCraft2.ID, "blockAlloyGlass", 0, true), - ofBlockUnlocalizedName(BartWorks.ID, "BW_GlasBlocks", 0, true), - ofBlockUnlocalizedName(BartWorks.ID, "BW_GlasBlocks2", 0, true), - // warded - // glass - ofBlockUnlocalizedName(Thaumcraft.ID, "blockCosmeticOpaque", 2, false))) + .addElement('A', Glasses.chainAllGlasses()) .addElement('B', ofBlock(GregTech_API.sBlockCasings3, 10)) .addElement('F', ofFrame(Materials.VibrantAlloy)) .addElement( diff --git a/src/main/java/gregtech/common/tileentities/machines/multiblock/AdvChemicalReactor.java b/src/main/java/gregtech/common/tileentities/machines/multiblock/AdvChemicalReactor.java index ca8cc6332b..acf7be1923 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multiblock/AdvChemicalReactor.java +++ b/src/main/java/gregtech/common/tileentities/machines/multiblock/AdvChemicalReactor.java @@ -2,7 +2,6 @@ package gregtech.common.tileentities.machines.multiblock; import static com.google.common.primitives.Ints.saturatedCast; import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; -import static gregtech.api.enums.Mods.*; import static gregtech.api.multitileentity.multiblock.base.MultiBlockPart.*; import java.util.ArrayList; @@ -40,6 +39,7 @@ import gregtech.api.gui.modularui.GT_UITextures; import gregtech.api.logic.ComplexParallelProcessingLogic; import gregtech.api.multitileentity.enums.GT_MultiTileCasing; import gregtech.api.multitileentity.multiblock.base.ComplexParallelController; +import gregtech.api.multitileentity.multiblock.casing.Glasses; import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_StructureUtility; @@ -218,13 +218,7 @@ public class AdvChemicalReactor extends ComplexParallelController<AdvChemicalRea .addElement( 'W', GT_StructureUtility.ofCoil(AdvChemicalReactor::setCoilTier, AdvChemicalReactor::getCoilTier)) - .addElement( - 'G', - ofChain( - ofBlockUnlocalizedName(IndustrialCraft2.ID, "blockAlloyGlass", 0, true), - ofBlockUnlocalizedName(BartWorks.ID, "BW_GlasBlocks", 0, true), - ofBlockUnlocalizedName(BartWorks.ID, "BW_GlasBlocks2", 0, true), - ofBlockUnlocalizedName(Thaumcraft.ID, "blockCosmeticOpaque", 2, false))) + .addElement('G', Glasses.chainAllGlasses()) .build(); } return STRUCTURE_DEFINITION; |