aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatt <mtthw8198@gmail.com>2021-09-01 21:25:38 -0700
committerMatt <mtthw8198@gmail.com>2021-09-01 21:25:38 -0700
commit528270b9623e848af7417db60b51799d746394e3 (patch)
tree007efac678d382a1f16a182a789d69089c19f126 /src
parent2b9ccc57c92d48dbdda56172f3fdd5e1033ccaa7 (diff)
downloadGT5-Unofficial-528270b9623e848af7417db60b51799d746394e3.tar.gz
GT5-Unofficial-528270b9623e848af7417db60b51799d746394e3.tar.bz2
GT5-Unofficial-528270b9623e848af7417db60b51799d746394e3.zip
I think I did this right
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_annihilation.java64
1 files changed, 51 insertions, 13 deletions
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_annihilation.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_annihilation.java
index 584e28a607..8fbd746fcd 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_annihilation.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_annihilation.java
@@ -1,27 +1,30 @@
package com.github.technus.tectech.thing.metaTileEntity.multi;
-import com.github.technus.tectech.mechanics.constructable.IConstructable;
-import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder;
-import com.github.technus.tectech.mechanics.structure.Structure;
import com.github.technus.tectech.thing.block.QuantumGlassBlock;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_RenderedExtendedFacingTexture;
import com.github.technus.tectech.util.CommonValues;
+import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable;
+import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
+import com.gtnewhorizon.structurelib.structure.StructureDefinition;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import net.minecraft.block.Block;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
-import static com.github.technus.tectech.mechanics.structure.Structure.adders;
import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset;
import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage;
import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT;
+import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sHintCasingsTT;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain;
+import static gregtech.api.util.GT_StructureUtility.ofHatchAdder;
+import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional;
import static net.minecraft.util.StatCollector.translateToLocal;
/**
@@ -31,9 +34,40 @@ public class GT_MetaTileEntity_EM_annihilation extends GT_MetaTileEntity_Multibl
//region variables
private static Textures.BlockIcons.CustomIcon ScreenOFF;
private static Textures.BlockIcons.CustomIcon ScreenON;
+ private static final String[] description = new String[]{
+ EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":",
+ translateToLocal("gt.blockmachines.multimachine.em.annihilation.hint.0"),//1 - Classic Hatches or High Power Casing
+ translateToLocal("gt.blockmachines.multimachine.em.annihilation.hint.1"),//2 - Elemental Hatches or Molecular Casing
+ };
//endregion
//region structure
+ private static final IStructureDefinition<GT_MetaTileEntity_EM_annihilation> STRUCTURE_DEFINITION =
+ StructureDefinition.<GT_MetaTileEntity_EM_annihilation>builder()
+ .addShape("main", new String[][]{
+ {" "," AB BA "," AB BA "," BBB "," A A A ","AA F AA"," A A A "," BBB "," AB BA "," AB BA "," "},
+ {" "," AB BA "," EECEEECEE "," EGGEEEGGE ","ACGGGEGGGCA","AEGGGDGGGEA","ACGGGEGGGCA"," EGGEEEGGE "," EECEEECEE "," AB BA "," "},
+ {" "," B B "," EGGEGEGGE "," G G "," G G "," G G "," G G "," G G "," EGGEGEGGE "," B B "," "},
+ {" AAA ","AA BAB AA","ACGGEGEGGCA"," G G "," G G "," G G "," G G "," G G ","ACGGEGEGGCA","AA BAB AA"," AAA "},
+ {" AHHHA ","BBBBBBBBBBB","BEEEDEDEEEB","BE EB"," G G "," G G "," G G ","BE EB","BEEEDEDEEEB","BBBBBBBBBBB"," AHHHA "},
+ {" AH~HA "," ABBBA "," EGGEEEGGE ","BE EB","AE EA","FD DF","AE EA","BE EB"," EGGEEEGGE "," ABBBA "," AHHHA "},
+ {" AHHHA ","BBBBBBBBBBB","BEEEDEDEEEB","BE EB"," G G "," G G "," G G ","BE EB","BEEEDEDEEEB","BBBBBBBBBBB"," AHHHA "},
+ {" AAA ","AA BAB AA","ACGGEGEGGCA"," G G "," G G "," G G "," G G "," G G ","ACGGEGEGGCA","AA BAB AA"," AAA "},
+ {" "," B B "," EGGEGEGGE "," G G "," G G "," G G "," G G "," G G "," EGGEGEGGE "," B B "," "},
+ {" "," AB BA "," EECEEECEE "," EGGEEEGGE ","ACGGGEGGGCA","AEGGGDGGGEA","ACGGGEGGGCA"," EGGEEEGGE "," EECEEECEE "," AB BA "," "},
+ {" "," AB BA "," AB BA "," BBB "," A A A ","AA F AA"," A A A "," BBB "," AB BA "," AB BA "," "}
+ })
+ .addElement('A', ofBlock(sBlockCasingsTT, 4))
+ .addElement('B', ofBlock(sBlockCasingsTT, 5))
+ .addElement('C', ofBlock(sBlockCasingsTT, 6))
+ .addElement('D', ofBlock(sBlockCasingsTT, 10))
+ .addElement('E', ofBlock(sBlockCasingsTT, 12))
+ .addElement('F', ofHatchAdderOptional(GT_MetaTileEntity_MultiblockBase_EM::addElementalToMachineList, textureOffset + 4, sHintCasingsTT, 0, sBlockCasingsTT, 4))
+ .addElement('G', ofBlock(QuantumGlassBlock.INSTANCE, 0))
+ .addElement('H', ofHatchAdderOptional(GT_MetaTileEntity_EM_annihilation::addClassicToMachineList, textureOffset, sHintCasingsTT, 0, sBlockCasingsTT, 0))
+ .build();
+
+ /*
private static final String[][] shape = new String[][]{
{"\u0002", "D000", "C0 0", "C0 . 0", "C0 0", "D000"},
{"C01A10", "C01A10", "D1A1", "00B101B00", "11111111111", "C01110", "11111111111", "00B101B00", "D1A1", "C01A10", "C01A10",},
@@ -49,17 +83,14 @@ public class GT_MetaTileEntity_EM_annihilation extends GT_MetaTileEntity_Multibl
};
private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT, QuantumGlassBlock.INSTANCE, sBlockCasingsTT};
private static final byte[] blockMeta = new byte[]{4, 5, 12, 6, 0, 10};
- private static final IHatchAdder<GT_MetaTileEntity_EM_annihilation>[] addingMethods = adders(
+ private static final IGT_HatchAdder<GT_MetaTileEntity_EM_annihilation>[] addingMethods = adders(
GT_MetaTileEntity_EM_annihilation::addClassicToMachineList,
GT_MetaTileEntity_EM_annihilation::addElementalToMachineList);
private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 4};
private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT};
private static final byte[] blockMetaFallback = new byte[]{0, 4};
- private static final String[] description = new String[]{
- EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":",
- translateToLocal("gt.blockmachines.multimachine.em.annihilation.hint.0"),//1 - Classic Hatches or High Power Casing
- translateToLocal("gt.blockmachines.multimachine.em.annihilation.hint.1"),//2 - Elemental Hatches or Molecular Casing
- };
+ */
+
//endregion
public GT_MetaTileEntity_EM_annihilation(int aID, String aName, String aNameRegional) {
@@ -77,7 +108,8 @@ public class GT_MetaTileEntity_EM_annihilation extends GT_MetaTileEntity_Multibl
@Override
public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) {
- return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 5, 5, 0);
+ //return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 5, 5, 0);
+ return structureCheck_EM("main", 5, 5, 0);
}
@Override
@@ -107,7 +139,13 @@ public class GT_MetaTileEntity_EM_annihilation extends GT_MetaTileEntity_Multibl
@Override
public void construct(ItemStack stackSize, boolean hintsOnly) {
- Structure.builder(shape, blockType, blockMeta, 5, 5, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly);
+ //Structure.builder(shape, blockType, blockMeta, 5, 5, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly);
+ structureBuild_EM("main", 5, 5, 0, hintsOnly, stackSize);
+ }
+
+ @Override
+ public IStructureDefinition<GT_MetaTileEntity_EM_annihilation> getStructure_EM() {
+ return STRUCTURE_DEFINITION;
}
@Override