aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt <mtthw8198@gmail.com>2021-09-09 12:41:03 -0700
committerMatt <mtthw8198@gmail.com>2021-09-09 12:41:03 -0700
commit55e0ee4122188d3c2b5425a1a2456963e678060a (patch)
treee34c565b87497196a1909527746af9715a89fba3
parent86b3f5847d19226c4f704666dcb1770410b5fcb1 (diff)
downloadGT5-Unofficial-55e0ee4122188d3c2b5425a1a2456963e678060a.tar.gz
GT5-Unofficial-55e0ee4122188d3c2b5425a1a2456963e678060a.tar.bz2
GT5-Unofficial-55e0ee4122188d3c2b5425a1a2456963e678060a.zip
I think I did this right
-rw-r--r--src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaDequantizer.java72
1 files changed, 53 insertions, 19 deletions
diff --git a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaDequantizer.java b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaDequantizer.java
index 87e2660e01..51a5ba66cd 100644
--- a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaDequantizer.java
+++ b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaDequantizer.java
@@ -9,13 +9,17 @@ 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.casing.TT_Container_Casings;
+import com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_EM_dequantizer;
import com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_EM_quantizer;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM;
import com.github.technus.tectech.util.CommonValues;
+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.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.util.IGT_HatchAdder;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.item.ItemStack;
@@ -29,7 +33,10 @@ 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.TT_Container_Casings.sBlockCasingsTT;
import static com.github.technus.tectech.util.CommonValues.V;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock;
import static gregtech.api.enums.GT_Values.E;
+import static gregtech.api.util.GT_StructureUtility.ofHatchAdder;
+import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional;
import static net.minecraft.util.StatCollector.translateToLocal;
/**
@@ -38,29 +45,49 @@ import static net.minecraft.util.StatCollector.translateToLocal;
public class GT_MetaTileEntity_EM_essentiaDequantizer extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable {
//region structure
//use multi A energy inputs, use less power the longer it runs
- private static final String[][] shape = new String[][]{
- {" ", " . ", " ",},
- {"0A0", E, "0A0",},
- {"121", "232", "121",},
- {"\"\"\"", "\"2\"", "\"\"\"",},
- {"202", "0!0", "202",},
- };
- private static final Block[] blockType = new Block[]{QuantumGlassBlock.INSTANCE, sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT};
- private static final byte[] blockMeta = new byte[]{0, 0, 4, 8};
- private static final IHatchAdder<GT_MetaTileEntity_EM_essentiaDequantizer>[] addingMethods = adders(
- GT_MetaTileEntity_EM_essentiaDequantizer::addClassicToMachineList,
- GT_MetaTileEntity_EM_essentiaDequantizer::addElementalInputToMachineList,
- GT_MetaTileEntity_EM_essentiaDequantizer::addElementalMufflerToMachineList);
- private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 4, textureOffset + 4};
- private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT};
- private static final byte[] blockMetaFallback = new byte[]{0, 4, 4};
private static final String[] description = new String[]{
EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":",
translateToLocal("gt.blockmachines.multimachine.em.emtoessentia.hint.0"),//1 - Classic Hatches or High Power Casing
translateToLocal("gt.blockmachines.multimachine.em.emtoessentia.hint.1"),//2 - Elemental Input Hatch
- translateToLocal("gt.blockmachines.multimachine.em.emtoessentia.hint.2"),//3 - Elemental Overflow Hatches or Elemental Casing
+ translateToLocal("gt.blockmachines.multimachine.em.emtoessentia.hint.2"),//3 - Elemental Overflow Hatches or Molecular Casing
translateToLocal("gt.blockmachines.multimachine.em.emtoessentia.hint.3"),//General - Some sort of Essentia Storage
};
+
+ private static final IStructureDefinition<GT_MetaTileEntity_EM_essentiaDequantizer> STRUCTURE_DEFINITION =
+ StructureDefinition.<GT_MetaTileEntity_EM_essentiaDequantizer>builder()
+ .addShape("main", new String[][]{
+ {"DDD", "DHD", "DDD"},
+ {"E E", " ", "E E"},
+ {"ABA", "BCB", "ABA"},
+ {"FFF", "FBF", "FFF"},
+ {"BEB", "EGE", "BEB"}
+ })
+ .addElement('A', ofBlock(sBlockCasingsTT, 0))
+ .addElement('B', ofBlock(sBlockCasingsTT, 4))
+ .addElement('C', ofBlock(sBlockCasingsTT, 8))
+ .addElement('D', ofHatchAdderOptional(GT_MetaTileEntity_EM_essentiaDequantizer::addClassicToMachineList, textureOffset, 1, sBlockCasingsTT, 0))
+ .addElement('E', ofBlock(QuantumGlassBlock.INSTANCE, 0))
+ .addElement('F', ofHatchAdderOptional(GT_MetaTileEntity_EM_essentiaDequantizer::addElementalMufflerToMachineList, textureOffset + 4, 3, sBlockCasingsTT, 4))
+ .addElement('G', ofHatchAdder(GT_MetaTileEntity_EM_essentiaDequantizer::addElementalInputToMachineList, textureOffset + 4, 2))
+ .build();
+
+// private static final String[][] shape = new String[][]{
+// {" ", " . ", " ",},
+// {"0A0", E, "0A0",},
+// {"121", "232", "121",},
+// {"\"\"\"", "\"2\"", "\"\"\"",},
+// {"202", "0!0", "202",},
+// };
+// private static final Block[] blockType = new Block[]{QuantumGlassBlock.INSTANCE, sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT};
+// private static final byte[] blockMeta = new byte[]{0, 0, 4, 8};
+// private static final IGT_HatchAdder<GT_MetaTileEntity_EM_essentiaDequantizer>[] addingMethods = adders(
+// GT_MetaTileEntity_EM_essentiaDequantizer::addClassicToMachineList,
+// GT_MetaTileEntity_EM_essentiaDequantizer::addElementalInputToMachineList,
+// GT_MetaTileEntity_EM_essentiaDequantizer::addElementalMufflerToMachineList);
+// private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 4, textureOffset + 4};
+// private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT};
+// private static final byte[] blockMetaFallback = new byte[]{0, 4, 4};
+
//endregion
public GT_MetaTileEntity_EM_essentiaDequantizer(int aID, String aName, String aNameRegional) {
@@ -78,7 +105,8 @@ public class GT_MetaTileEntity_EM_essentiaDequantizer extends GT_MetaTileEntity_
@Override
public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) {
- return essentiaContainerCompat.check(this) && structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 1, 0);
+ //return essentiaContainerCompat.check(this) && structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 1, 0);
+ return essentiaContainerCompat.check(this) && structureCheck_EM("main", 1, 1, 0);
}
@Override
@@ -140,7 +168,13 @@ public class GT_MetaTileEntity_EM_essentiaDequantizer extends GT_MetaTileEntity_
iGregTechTileEntity.getWorld().setBlock(iGregTechTileEntity.getXCoord() + xDir, iGregTechTileEntity.getYCoord() + yDir, iGregTechTileEntity.getZCoord() + zDir, TT_Container_Casings.sHintCasingsTT, 12, 2);
}
}
- Structure.builder(shape, blockType, blockMeta, 1, 1, 0, iGregTechTileEntity, getExtendedFacing(), hintsOnly);
+ //Structure.builder(shape, blockType, blockMeta, 1, 1, 0, iGregTechTileEntity, getExtendedFacing(), hintsOnly);
+ structureBuild_EM("main", 1, 1, 0, hintsOnly, stackSize);
+ }
+
+ @Override
+ public IStructureDefinition<GT_MetaTileEntity_EM_essentiaDequantizer> getStructure_EM() {
+ return STRUCTURE_DEFINITION;
}
@Override