aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbasdxz <tudurap.com@gmail.com>2021-09-16 21:37:06 +0100
committerGitHub <noreply@github.com>2021-09-16 21:37:06 +0100
commitea067c617766b9f004b6e566e89ce3352a7c1bbb (patch)
tree12f372338ba5260e1e369d305c916cbdea26075d
parent5fc2d0d29543776ae0ae35898d8b47896b770911 (diff)
parent08b8723025ea530d929cfad738e659b13d7f2f91 (diff)
downloadGT5-Unofficial-ea067c617766b9f004b6e566e89ce3352a7c1bbb.tar.gz
GT5-Unofficial-ea067c617766b9f004b6e566e89ce3352a7c1bbb.tar.bz2
GT5-Unofficial-ea067c617766b9f004b6e566e89ce3352a7c1bbb.zip
Merge pull request #1 from GTMEGA/StructureLib
Structure lib
-rw-r--r--build.gradle.kts1
-rw-r--r--src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaDequantizer.java58
-rw-r--r--src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java57
-rw-r--r--src/main/java/com/github/technus/tectech/entity/fx/BlockHint.java1
-rw-r--r--src/main/java/com/github/technus/tectech/entity/fx/WeightlessParticleFX.java1
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/alignment/AlignmentLimits.java1
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/alignment/AlignmentMessage.java1
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/alignment/AlignmentUtility.java1
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/alignment/IAlignment.java1
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/alignment/IAlignmentLimits.java1
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/alignment/IAlignmentProvider.java1
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/alignment/IntegerAxisSwap.java1
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/Direction.java1
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/ExtendedFacing.java1
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/Flip.java1
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/Rotation.java1
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/constructable/ConstructableUtility.java1
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/constructable/IConstructable.java1
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/constructable/IMultiblockInfoContainer.java1
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/dataTransport/DataPacket.java2
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/dataTransport/QuantumDataPacket.java2
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/spark/ThaumSpark.java3
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/structure/IBlockPosConsumer.java1
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/structure/ICustomBlockSetting.java1
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/structure/IStructureDefinition.java1
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElement.java1
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElementChain.java1
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElementCheckOnly.java1
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElementDeferred.java1
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElementNoPlacement.java1
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/structure/IStructureNavigate.java1
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/structure/Structure.java7
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/structure/StructureDefinition.java1
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/structure/StructureUtility.java1
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/structure/adders/IBlockAdder.java1
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/structure/adders/IHatchAdder.java1
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/structure/adders/ITileAdder.java1
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/tesla/ITeslaConnectableSimple.java2
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/tesla/TeslaCoverConnection.java7
-rw-r--r--src/main/java/com/github/technus/tectech/thing/item/ConstructableTriggerItem.java1
-rw-r--r--src/main/java/com/github/technus/tectech/thing/item/FrontRotationTriggerItem.java1
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_annihilation.java71
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_bhg.java183
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_collider.java73
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java88
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_crafting.java60
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dataBank.java46
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_decay.java56
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dequantizer.java53
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_infuser.java46
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_junction.java68
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_quantizer.java51
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java66
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_scanner.java67
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_stabilizer.java53
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java50
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_transformer.java9
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_wormhole.java64
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_microwave.java49
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_proccessingStack.java36
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java93
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java52
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/render/TT_RenderedExtendedFacingTexture.java4
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/GT_MetaTileEntity_EM_machine.java52
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_DebugStructureWriter.java34
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_TeslaCoil.java6
-rw-r--r--src/main/java/com/github/technus/tectech/util/Vec3Impl.java1
67 files changed, 912 insertions, 690 deletions
diff --git a/build.gradle.kts b/build.gradle.kts
index 864d19e399..093699983e 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -169,6 +169,7 @@ dependencies {
//Hard Dependencies
compile("net.industrial-craft:industrialcraft-2:$ic2Version:dev")
+ compile("com.github.GTNewHorizons:StructureLib:1.0.6:deobf")
compile("com.github.GTNewHorizons:GT5-Unofficial:$gt5uVersion:dev"){
exclude("net.industrial-craft", "industrialcraft-2")
}
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..8e8aee4795 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
@@ -2,21 +2,20 @@ package com.github.technus.tectech.compatibility.thaumcraft.thing.metaTileEntity
import com.github.technus.tectech.TecTech;
import com.github.technus.tectech.compatibility.thaumcraft.elementalMatter.definitions.ePrimalAspectDefinition;
-import com.github.technus.tectech.mechanics.constructable.IConstructable;
import com.github.technus.tectech.mechanics.elementalMatter.core.cElementalInstanceStackMap;
import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.cElementalInstanceStack;
-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_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.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.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
@@ -25,11 +24,12 @@ import net.minecraft.util.ResourceLocation;
import net.minecraftforge.common.util.ForgeDirection;
import static com.github.technus.tectech.compatibility.thaumcraft.thing.metaTileEntity.multi.EssentiaCompat.essentiaContainerCompat;
-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 gregtech.api.enums.GT_Values.E;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock;
+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 +38,32 @@ 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", "D~D", "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();
+
//endregion
public GT_MetaTileEntity_EM_essentiaDequantizer(int aID, String aName, String aNameRegional) {
@@ -78,7 +81,7 @@ 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("main", 1, 1, 0);
}
@Override
@@ -140,7 +143,12 @@ 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);
+ structureBuild_EM("main", 1, 1, 0, hintsOnly, stackSize);
+ }
+
+ @Override
+ public IStructureDefinition<GT_MetaTileEntity_EM_essentiaDequantizer> getStructure_EM() {
+ return STRUCTURE_DEFINITION;
}
@Override
diff --git a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java
index a716420e81..1e23408a0b 100644
--- a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java
+++ b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java
@@ -2,21 +2,20 @@ package com.github.technus.tectech.compatibility.thaumcraft.thing.metaTileEntity
import com.github.technus.tectech.TecTech;
import com.github.technus.tectech.compatibility.thaumcraft.elementalMatter.definitions.ePrimalAspectDefinition;
-import com.github.technus.tectech.mechanics.constructable.IConstructable;
import com.github.technus.tectech.mechanics.elementalMatter.core.cElementalInstanceStackMap;
import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.cElementalInstanceStack;
-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_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.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.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
@@ -25,11 +24,12 @@ import net.minecraft.util.ResourceLocation;
import net.minecraftforge.common.util.ForgeDirection;
import static com.github.technus.tectech.compatibility.thaumcraft.thing.metaTileEntity.multi.EssentiaCompat.essentiaContainerCompat;
-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 gregtech.api.enums.GT_Values.E;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock;
+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 +38,31 @@ import static net.minecraft.util.StatCollector.translateToLocal;
public class GT_MetaTileEntity_EM_essentiaQuantizer 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",},
- {"\"\"\"", "\"1\"", "\"\"\"",},
- {"010", "1!1", "010",},
- };
- private static final Block[] blockType = new Block[]{QuantumGlassBlock.INSTANCE, sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT};
- private static final byte[] blockMeta = new byte[]{0, 4, 0, 8};
- private static final IHatchAdder<GT_MetaTileEntity_EM_essentiaQuantizer>[] addingMethods = adders(
- GT_MetaTileEntity_EM_essentiaQuantizer::addClassicToMachineList,
- GT_MetaTileEntity_EM_essentiaQuantizer::addElementalOutputToMachineList,
- GT_MetaTileEntity_EM_essentiaQuantizer::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.essentiatoem.hint.0"),//1 - Classic Hatches or High Power Casing
translateToLocal("gt.blockmachines.multimachine.em.essentiatoem.hint.1"),//2 - Elemental Output Hatch
- translateToLocal("gt.blockmachines.multimachine.em.essentiatoem.hint.2"),//3 - Elemental Overflow Hatches or Elemental Casing
+ translateToLocal("gt.blockmachines.multimachine.em.essentiatoem.hint.2"),//3 - Elemental Overflow Hatches or Molecular Casing
translateToLocal("gt.blockmachines.multimachine.em.essentiatoem.hint.3"),//General - Some sort of Essentia Storage
};
+
+ private static final IStructureDefinition<GT_MetaTileEntity_EM_essentiaQuantizer> STRUCTURE_DEFINITION =
+ StructureDefinition.<GT_MetaTileEntity_EM_essentiaQuantizer>builder()
+ .addShape("main", new String[][]{
+ {"FFF", "F~F", "FFF"},
+ {"E E", " ", "E E"},
+ {"BAB", "ACA", "BAB"},
+ {"DDD", "DBD", "DDD"},
+ {"EBE", "BGB", "EBE"}
+ })
+ .addElement('A', ofBlock(sBlockCasingsTT, 0))
+ .addElement('B', ofBlock(sBlockCasingsTT, 4))
+ .addElement('C', ofBlock(sBlockCasingsTT, 8))
+ .addElement('D', ofHatchAdderOptional(GT_MetaTileEntity_EM_essentiaQuantizer::addElementalMufflerToMachineList, textureOffset + 4, 3, sBlockCasingsTT, 4))
+ .addElement('E', ofBlock(QuantumGlassBlock.INSTANCE, 0))
+ .addElement('F', ofHatchAdderOptional(GT_MetaTileEntity_EM_essentiaQuantizer::addClassicToMachineList, textureOffset, 1, sBlockCasingsTT, 0))
+ .addElement('G', ofHatchAdder(GT_MetaTileEntity_EM_essentiaQuantizer::addElementalOutputToMachineList, textureOffset + 4, 2))
+ .build();
//endregion
public GT_MetaTileEntity_EM_essentiaQuantizer(int aID, String aName, String aNameRegional) {
@@ -78,7 +80,7 @@ public class GT_MetaTileEntity_EM_essentiaQuantizer extends GT_MetaTileEntity_Mu
@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("main", 1, 1, 0);
}
@Override
@@ -144,7 +146,12 @@ public class GT_MetaTileEntity_EM_essentiaQuantizer extends GT_MetaTileEntity_Mu
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);
+ structureBuild_EM("main", 1, 1, 0, hintsOnly, stackSize);
+ }
+
+ @Override
+ public IStructureDefinition<GT_MetaTileEntity_EM_essentiaQuantizer> getStructure_EM() {
+ return STRUCTURE_DEFINITION;
}
@Override
diff --git a/src/main/java/com/github/technus/tectech/entity/fx/BlockHint.java b/src/main/java/com/github/technus/tectech/entity/fx/BlockHint.java
index dd5cd59ac7..3c7f18ff32 100644
--- a/src/main/java/com/github/technus/tectech/entity/fx/BlockHint.java
+++ b/src/main/java/com/github/technus/tectech/entity/fx/BlockHint.java
@@ -13,6 +13,7 @@ import net.minecraft.world.World;
import org.lwjgl.opengl.GL11;
@SideOnly(Side.CLIENT)
+@Deprecated
public class BlockHint extends EntityFX {
private IIcon[] icons = new IIcon[6];
private short[] mRGBa = Dyes._NULL.mRGBa;
diff --git a/src/main/java/com/github/technus/tectech/entity/fx/WeightlessParticleFX.java b/src/main/java/com/github/technus/tectech/entity/fx/WeightlessParticleFX.java
index d1d2ed611c..92fa34990e 100644
--- a/src/main/java/com/github/technus/tectech/entity/fx/WeightlessParticleFX.java
+++ b/src/main/java/com/github/technus/tectech/entity/fx/WeightlessParticleFX.java
@@ -6,6 +6,7 @@ import net.minecraft.client.particle.EntityFX;
import net.minecraft.world.World;
@SideOnly(Side.CLIENT)
+@Deprecated
public class WeightlessParticleFX extends EntityFX
{
public WeightlessParticleFX(World p_i1205_1_, double p_i1205_2_, double p_i1205_4_, double p_i1205_6_, double p_i1205_8_, double p_i1205_10_, double p_i1205_12_)
diff --git a/src/main/java/com/github/technus/tectech/mechanics/alignment/AlignmentLimits.java b/src/main/java/com/github/technus/tectech/mechanics/alignment/AlignmentLimits.java
index 26a6d80dd8..779406371a 100644
--- a/src/main/java/com/github/technus/tectech/mechanics/alignment/AlignmentLimits.java
+++ b/src/main/java/com/github/technus/tectech/mechanics/alignment/AlignmentLimits.java
@@ -12,6 +12,7 @@ import java.util.function.Function;
import static com.github.technus.tectech.mechanics.alignment.IAlignment.STATES_COUNT;
+@Deprecated
public class AlignmentLimits implements IAlignmentLimits {
protected final boolean[] validStates=new boolean[STATES_COUNT];
diff --git a/src/main/java/com/github/technus/tectech/mechanics/alignment/AlignmentMessage.java b/src/main/java/com/github/technus/tectech/mechanics/alignment/AlignmentMessage.java
index 07a3e02c1f..61fc398171 100644
--- a/src/main/java/com/github/technus/tectech/mechanics/alignment/AlignmentMessage.java
+++ b/src/main/java/com/github/technus/tectech/mechanics/alignment/AlignmentMessage.java
@@ -16,6 +16,7 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import net.minecraftforge.common.DimensionManager;
+@Deprecated
public class AlignmentMessage implements IMessage {
int mPosX;
int mPosY;
diff --git a/src/main/java/com/github/technus/tectech/mechanics/alignment/AlignmentUtility.java b/src/main/java/com/github/technus/tectech/mechanics/alignment/AlignmentUtility.java
index 68e11b77af..af3369465c 100644
--- a/src/main/java/com/github/technus/tectech/mechanics/alignment/AlignmentUtility.java
+++ b/src/main/java/com/github/technus/tectech/mechanics/alignment/AlignmentUtility.java
@@ -8,6 +8,7 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import net.minecraftforge.common.util.FakePlayer;
+@Deprecated
public class AlignmentUtility {
private AlignmentUtility(){
diff --git a/src/main/java/com/github/technus/tectech/mechanics/alignment/IAlignment.java b/src/main/java/com/github/technus/tectech/mechanics/alignment/IAlignment.java
index a2a6301070..0ea202cc98 100644
--- a/src/main/java/com/github/technus/tectech/mechanics/alignment/IAlignment.java
+++ b/src/main/java/com/github/technus/tectech/mechanics/alignment/IAlignment.java
@@ -8,6 +8,7 @@ import net.minecraftforge.common.util.ForgeDirection;
import java.util.Arrays;
+@Deprecated
public interface IAlignment extends IAlignmentLimits,IAlignmentProvider {
int DIRECTIONS_COUNT= Direction.VALUES.length;
int ROTATIONS_COUNT= Rotation.VALUES.length;
diff --git a/src/main/java/com/github/technus/tectech/mechanics/alignment/IAlignmentLimits.java b/src/main/java/com/github/technus/tectech/mechanics/alignment/IAlignmentLimits.java
index 68b4d84dab..a1f505baff 100644
--- a/src/main/java/com/github/technus/tectech/mechanics/alignment/IAlignmentLimits.java
+++ b/src/main/java/com/github/technus/tectech/mechanics/alignment/IAlignmentLimits.java
@@ -4,6 +4,7 @@ import com.github.technus.tectech.mechanics.alignment.enumerable.Flip;
import com.github.technus.tectech.mechanics.alignment.enumerable.Rotation;
import net.minecraftforge.common.util.ForgeDirection;
+@Deprecated
public interface IAlignmentLimits {
IAlignmentLimits UNLIMITED= (direction, rotation, flip) -> true;
diff --git a/src/main/java/com/github/technus/tectech/mechanics/alignment/IAlignmentProvider.java b/src/main/java/com/github/technus/tectech/mechanics/alignment/IAlignmentProvider.java
index 07dc972aac..23bf9ae266 100644
--- a/src/main/java/com/github/technus/tectech/mechanics/alignment/IAlignmentProvider.java
+++ b/src/main/java/com/github/technus/tectech/mechanics/alignment/IAlignmentProvider.java
@@ -1,5 +1,6 @@
package com.github.technus.tectech.mechanics.alignment;
+@Deprecated
public interface IAlignmentProvider {
IAlignment getAlignment();
} \ No newline at end of file
diff --git a/src/main/java/com/github/technus/tectech/mechanics/alignment/IntegerAxisSwap.java b/src/main/java/com/github/technus/tectech/mechanics/alignment/IntegerAxisSwap.java
index 1c44164731..2ec6ea6893 100644
--- a/src/main/java/com/github/technus/tectech/mechanics/alignment/IntegerAxisSwap.java
+++ b/src/main/java/com/github/technus/tectech/mechanics/alignment/IntegerAxisSwap.java
@@ -7,6 +7,7 @@ import net.minecraftforge.common.util.ForgeDirection;
import static com.github.technus.tectech.mechanics.alignment.enumerable.Direction.getAxisVector;
import static java.lang.Math.abs;
+@Deprecated
public class IntegerAxisSwap {
private final Vec3Impl forFirstAxis;
private final Vec3Impl forSecondAxis;
diff --git a/src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/Direction.java b/src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/Direction.java
index cc3971fedb..56356b3606 100644
--- a/src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/Direction.java
+++ b/src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/Direction.java
@@ -3,6 +3,7 @@ package com.github.technus.tectech.mechanics.alignment.enumerable;
import com.github.technus.tectech.util.Vec3Impl;
import net.minecraftforge.common.util.ForgeDirection;
+@Deprecated
public enum Direction {
DOWN(ForgeDirection.DOWN),
UP(ForgeDirection.UP),
diff --git a/src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/ExtendedFacing.java b/src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/ExtendedFacing.java
index 5949b432df..04f2a55bd5 100644
--- a/src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/ExtendedFacing.java
+++ b/src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/ExtendedFacing.java
@@ -14,6 +14,7 @@ import static java.lang.Math.abs;
import static java.util.Arrays.stream;
import static java.util.stream.Collectors.toMap;
+@Deprecated
public enum ExtendedFacing {
DOWN_NORMAL_NONE("down normal none"),
DOWN_NORMAL_HORIZONTAL("down normal horizontal"),
diff --git a/src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/Flip.java b/src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/Flip.java
index 4b1dff70ec..0b85c5197e 100644
--- a/src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/Flip.java
+++ b/src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/Flip.java
@@ -9,6 +9,7 @@ import static java.lang.Math.abs;
import static java.util.Arrays.stream;
import static java.util.stream.Collectors.toMap;
+@Deprecated
public enum Flip {
NONE(3, "none"),
HORIZONTAL(2, "horizontal"),
diff --git a/src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/Rotation.java b/src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/Rotation.java
index 5d41f54a11..b6cd1aa015 100644
--- a/src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/Rotation.java
+++ b/src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/Rotation.java
@@ -9,6 +9,7 @@ import static java.lang.Math.abs;
import static java.util.Arrays.stream;
import static java.util.stream.Collectors.toMap;
+@Deprecated
public enum Rotation {
NORMAL(2, "normal"),
CLOCKWISE(3, "clockwise"),
diff --git a/src/main/java/com/github/technus/tectech/mechanics/constructable/ConstructableUtility.java b/src/main/java/com/github/technus/tectech/mechanics/constructable/ConstructableUtility.java
index 2dc74330f9..6d605eef6e 100644
--- a/src/main/java/com/github/technus/tectech/mechanics/constructable/ConstructableUtility.java
+++ b/src/main/java/com/github/technus/tectech/mechanics/constructable/ConstructableUtility.java
@@ -13,6 +13,7 @@ import net.minecraft.world.World;
import net.minecraftforge.common.util.FakePlayer;
import net.minecraftforge.common.util.ForgeDirection;
+@Deprecated
public class ConstructableUtility {
private ConstructableUtility(){
diff --git a/src/main/java/com/github/technus/tectech/mechanics/constructable/IConstructable.java b/src/main/java/com/github/technus/tectech/mechanics/constructable/IConstructable.java
index 1de0381f1f..ed0cdfbf7d 100644
--- a/src/main/java/com/github/technus/tectech/mechanics/constructable/IConstructable.java
+++ b/src/main/java/com/github/technus/tectech/mechanics/constructable/IConstructable.java
@@ -7,6 +7,7 @@ import net.minecraft.item.ItemStack;
/**
* Created by Tec on 24.03.2017.
*/
+@Deprecated
public interface IConstructable {
void construct(ItemStack stackSize, boolean hintsOnly);
diff --git a/src/main/java/com/github/technus/tectech/mechanics/constructable/IMultiblockInfoContainer.java b/src/main/java/com/github/technus/tectech/mechanics/constructable/IMultiblockInfoContainer.java
index 173e0d16ec..da124fcf4d 100644
--- a/src/main/java/com/github/technus/tectech/mechanics/constructable/IMultiblockInfoContainer.java
+++ b/src/main/java/com/github/technus/tectech/mechanics/constructable/IMultiblockInfoContainer.java
@@ -12,6 +12,7 @@ import java.util.HashMap;
/**
* To implement IConstructable on not own TileEntities
*/
+@Deprecated
public interface IMultiblockInfoContainer<T> {
HashMap<String, IMultiblockInfoContainer<?>> MULTIBLOCK_MAP = new HashMap<>();
diff --git a/src/main/java/com/github/technus/tectech/mechanics/dataTransport/DataPacket.java b/src/main/java/com/github/technus/tectech/mechanics/dataTransport/DataPacket.java
index 990a48ac70..f30105f1ee 100644
--- a/src/main/java/com/github/technus/tectech/mechanics/dataTransport/DataPacket.java
+++ b/src/main/java/com/github/technus/tectech/mechanics/dataTransport/DataPacket.java
@@ -1,6 +1,6 @@
package com.github.technus.tectech.mechanics.dataTransport;
-import com.github.technus.tectech.util.Vec3Impl;
+import com.gtnewhorizon.structurelib.util.Vec3Impl;
import net.minecraft.nbt.NBTTagCompound;
import java.util.Collections;
diff --git a/src/main/java/com/github/technus/tectech/mechanics/dataTransport/QuantumDataPacket.java b/src/main/java/com/github/technus/tectech/mechanics/dataTransport/QuantumDataPacket.java
index 268de6f71c..0fddb53fe9 100644
--- a/src/main/java/com/github/technus/tectech/mechanics/dataTransport/QuantumDataPacket.java
+++ b/src/main/java/com/github/technus/tectech/mechanics/dataTransport/QuantumDataPacket.java
@@ -1,6 +1,6 @@
package com.github.technus.tectech.mechanics.dataTransport;
-import com.github.technus.tectech.util.Vec3Impl;
+import com.gtnewhorizon.structurelib.util.Vec3Impl;
import net.minecraft.nbt.NBTTagCompound;
public class QuantumDataPacket extends DataPacket<Long> {
diff --git a/src/main/java/com/github/technus/tectech/mechanics/spark/ThaumSpark.java b/src/main/java/com/github/technus/tectech/mechanics/spark/ThaumSpark.java
index e31e63f250..0480cfffd2 100644
--- a/src/main/java/com/github/technus/tectech/mechanics/spark/ThaumSpark.java
+++ b/src/main/java/com/github/technus/tectech/mechanics/spark/ThaumSpark.java
@@ -1,6 +1,7 @@
package com.github.technus.tectech.mechanics.spark;
-import com.github.technus.tectech.util.Vec3Impl;
+
+import com.gtnewhorizon.structurelib.util.Vec3Impl;
import java.io.Serializable;
import java.util.Objects;
diff --git a/src/main/java/com/github/technus/tectech/mechanics/structure/IBlockPosConsumer.java b/src/main/java/com/github/technus/tectech/mechanics/structure/IBlockPosConsumer.java
index c3ea2d3e3f..d37e29c36a 100644
--- a/src/main/java/com/github/technus/tectech/mechanics/structure/IBlockPosConsumer.java
+++ b/src/main/java/com/github/technus/tectech/mechanics/structure/IBlockPosConsumer.java
@@ -2,6 +2,7 @@ package com.github.technus.tectech.mechanics.structure;
import net.minecraft.world.World;
+@Deprecated
public interface IBlockPosConsumer {
void consume(World world, int x, int y, int z);
}
diff --git a/src/main/java/com/github/technus/tectech/mechanics/structure/ICustomBlockSetting.java b/src/main/java/com/github/technus/tectech/mechanics/structure/ICustomBlockSetting.java
index b70e76fbac..10d9dcca73 100644
--- a/src/main/java/com/github/technus/tectech/mechanics/structure/ICustomBlockSetting.java
+++ b/src/main/java/com/github/technus/tectech/mechanics/structure/ICustomBlockSetting.java
@@ -3,6 +3,7 @@ package com.github.technus.tectech.mechanics.structure;
import net.minecraft.block.Block;
import net.minecraft.world.World;
+@Deprecated
public interface ICustomBlockSetting {
/**
* Default block setting calls {@link World#setBlock(int x, int y, int z, Block block, int meta, int updateType)} like:
diff --git a/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureDefinition.java b/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureDefinition.java
index c8488d5cea..cb40214eac 100644
--- a/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureDefinition.java
+++ b/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureDefinition.java
@@ -9,6 +9,7 @@ import java.util.Arrays;
import static com.github.technus.tectech.loader.TecTechConfig.DEBUG_MODE;
+@Deprecated
public interface IStructureDefinition<T> {
/**
* Used internally
diff --git a/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElement.java b/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElement.java
index f946e71f91..ac5f4f7296 100644
--- a/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElement.java
+++ b/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElement.java
@@ -6,6 +6,7 @@ import net.minecraft.world.World;
/**
* Use StructureUtility to instantiate
*/
+@Deprecated
public interface IStructureElement<T> {
boolean check(T t,World world,int x,int y,int z);
diff --git a/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElementChain.java b/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElementChain.java
index f9593ee1c5..2051e06c4d 100644
--- a/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElementChain.java
+++ b/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElementChain.java
@@ -6,6 +6,7 @@ import net.minecraft.world.World;
/**
* Use StructureUtility to instantiate
*/
+@Deprecated
public interface IStructureElementChain<T> extends IStructureElement<T> {
IStructureElement<T>[] fallbacks();
diff --git a/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElementCheckOnly.java b/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElementCheckOnly.java
index ec15aea53b..a866da828d 100644
--- a/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElementCheckOnly.java
+++ b/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElementCheckOnly.java
@@ -3,6 +3,7 @@ package com.github.technus.tectech.mechanics.structure;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
+@Deprecated
public interface IStructureElementCheckOnly<T> extends IStructureElement<T> {
@Override
default boolean placeBlock(T t, World world, int x, int y, int z, ItemStack trigger){
diff --git a/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElementDeferred.java b/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElementDeferred.java
index dbb74312a8..e1714e520c 100644
--- a/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElementDeferred.java
+++ b/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElementDeferred.java
@@ -3,5 +3,6 @@ package com.github.technus.tectech.mechanics.structure;
/**
* Use StructureUtility to instantiate
*/
+@Deprecated
public interface IStructureElementDeferred<T> extends IStructureElement<T> {
}
diff --git a/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElementNoPlacement.java b/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElementNoPlacement.java
index 47e6060878..1ba5dc30f5 100644
--- a/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElementNoPlacement.java
+++ b/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElementNoPlacement.java
@@ -3,6 +3,7 @@ package com.github.technus.tectech.mechanics.structure;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
+@Deprecated
public interface IStructureElementNoPlacement<T> extends IStructureElement<T> {
@Override
default boolean placeBlock(T t, World world, int x, int y, int z, ItemStack trigger){
diff --git a/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureNavigate.java b/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureNavigate.java
index d3f4134cea..5e73f25640 100644
--- a/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureNavigate.java
+++ b/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureNavigate.java
@@ -6,6 +6,7 @@ import net.minecraft.world.World;
/**
* Use StructureUtility to instantiate
*/
+@Deprecated
interface IStructureNavigate<T> extends IStructureElement<T> {
@Override
default boolean check(T t, World world, int x, int y, int z){
diff --git a/src/main/java/com/github/technus/tectech/mechanics/structure/Structure.java b/src/main/java/com/github/technus/tectech/mechanics/structure/Structure.java
index 83951372a2..44cad98791 100644
--- a/src/main/java/com/github/technus/tectech/mechanics/structure/Structure.java
+++ b/src/main/java/com/github/technus/tectech/mechanics/structure/Structure.java
@@ -1,11 +1,12 @@
package com.github.technus.tectech.mechanics.structure;
import com.github.technus.tectech.TecTech;
-import com.github.technus.tectech.mechanics.alignment.enumerable.ExtendedFacing;
import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder;
import com.github.technus.tectech.thing.casing.TT_Container_Casings;
+import com.gtnewhorizon.structurelib.alignment.enumerable.ExtendedFacing;
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.init.Blocks;
@@ -21,7 +22,7 @@ public class Structure {
@Deprecated
@SafeVarargs
- public static <T> IHatchAdder<T>[] adders(IHatchAdder<T>... iHatchAdder) {
+ public static <T> IGT_HatchAdder<T>[] adders(IGT_HatchAdder<T>... iHatchAdder) {
return iHatchAdder;
}
@@ -32,7 +33,7 @@ public class Structure {
String[][] structure,//0-9 casing, +- air no air, A... ignore 'A'-CHAR-1 blocks
Block[] blockType,//use numbers 0-9 for casing types
byte[] blockMeta,//use numbers 0-9 for casing types
- IHatchAdder<T>[] addingMethods,
+ IGT_HatchAdder<T>[] addingMethods,
short[] casingTextures,
Block[] blockTypeFallback,//use numbers 0-9 for casing types
byte[] blockMetaFallback,//use numbers 0-9 for casing types
diff --git a/src/main/java/com/github/technus/tectech/mechanics/structure/StructureDefinition.java b/src/main/java/com/github/technus/tectech/mechanics/structure/StructureDefinition.java
index 9a1e94d98a..ca1dbce77b 100644
--- a/src/main/java/com/github/technus/tectech/mechanics/structure/StructureDefinition.java
+++ b/src/main/java/com/github/technus/tectech/mechanics/structure/StructureDefinition.java
@@ -7,6 +7,7 @@ import java.util.*;
import static com.github.technus.tectech.loader.TecTechConfig.DEBUG_MODE;
import static com.github.technus.tectech.mechanics.structure.StructureUtility.*;
+@Deprecated
public class StructureDefinition<T> implements IStructureDefinition<T> {
private final Map<Character, IStructureElement<T>> elements;
private final Map<String, String> shapes;
diff --git a/src/main/java/com/github/technus/tectech/mechanics/structure/StructureUtility.java b/src/main/java/com/github/technus/tectech/mechanics/structure/StructureUtility.java
index 28b72f8ba6..f469925dbc 100644
--- a/src/main/java/com/github/technus/tectech/mechanics/structure/StructureUtility.java
+++ b/src/main/java/com/github/technus/tectech/mechanics/structure/StructureUtility.java
@@ -30,6 +30,7 @@ import static java.lang.Integer.MIN_VALUE;
*
* (Just import static this class to have a nice fluent syntax while defining structure definitions)
*/
+@Deprecated
public class StructureUtility {
private static final String NICE_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz=|!@#$%&()[]{};:<>/?_,.*^'`";
@SuppressWarnings("rawtypes")
diff --git a/src/main/java/com/github/technus/tectech/mechanics/structure/adders/IBlockAdder.java b/src/main/java/com/github/technus/tectech/mechanics/structure/adders/IBlockAdder.java
index 908c4c4aca..29229f7902 100644
--- a/src/main/java/com/github/technus/tectech/mechanics/structure/adders/IBlockAdder.java
+++ b/src/main/java/com/github/technus/tectech/mechanics/structure/adders/IBlockAdder.java
@@ -3,6 +3,7 @@ package com.github.technus.tectech.mechanics.structure.adders;
import net.minecraft.block.Block;
+@Deprecated
public interface IBlockAdder<T> {
/**
* Callback on block added, needs to check if block is valid (and add it)
diff --git a/src/main/java/com/github/technus/tectech/mechanics/structure/adders/IHatchAdder.java b/src/main/java/com/github/technus/tectech/mechanics/structure/adders/IHatchAdder.java
index a47befc2e8..197dd2fd45 100644
--- a/src/main/java/com/github/technus/tectech/mechanics/structure/adders/IHatchAdder.java
+++ b/src/main/java/com/github/technus/tectech/mechanics/structure/adders/IHatchAdder.java
@@ -3,6 +3,7 @@ package com.github.technus.tectech.mechanics.structure.adders;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+@Deprecated
public interface IHatchAdder<T> {
/**
* Callback to add hatch, needs to check if hatch is valid (and add it)
diff --git a/src/main/java/com/github/technus/tectech/mechanics/structure/adders/ITileAdder.java b/src/main/java/com/github/technus/tectech/mechanics/structure/adders/ITileAdder.java
index cc3c7dbb7a..c262bbb154 100644
--- a/src/main/java/com/github/technus/tectech/mechanics/structure/adders/ITileAdder.java
+++ b/src/main/java/com/github/technus/tectech/mechanics/structure/adders/ITileAdder.java
@@ -2,6 +2,7 @@ package com.github.technus.tectech.mechanics.structure.adders;
import net.minecraft.tileentity.TileEntity;
+@Deprecated
public interface ITileAdder<T> {
/**
* Callback to add hatch, needs to check if tile is valid (and add it)
diff --git a/src/main/java/com/github/technus/tectech/mechanics/tesla/ITeslaConnectableSimple.java b/src/main/java/com/github/technus/tectech/mechanics/tesla/ITeslaConnectableSimple.java
index 3b56b6968c..2adc25bbed 100644
--- a/src/main/java/com/github/technus/tectech/mechanics/tesla/ITeslaConnectableSimple.java
+++ b/src/main/java/com/github/technus/tectech/mechanics/tesla/ITeslaConnectableSimple.java
@@ -1,6 +1,6 @@
package com.github.technus.tectech.mechanics.tesla;
-import com.github.technus.tectech.util.Vec3Impl;
+import com.gtnewhorizon.structurelib.util.Vec3Impl;
public interface ITeslaConnectableSimple {
//-128 to -1 disables capability
diff --git a/src/main/java/com/github/technus/tectech/mechanics/tesla/TeslaCoverConnection.java b/src/main/java/com/github/technus/tectech/mechanics/tesla/TeslaCoverConnection.java
index 5c6fef6af8..0b84236709 100644
--- a/src/main/java/com/github/technus/tectech/mechanics/tesla/TeslaCoverConnection.java
+++ b/src/main/java/com/github/technus/tectech/mechanics/tesla/TeslaCoverConnection.java
@@ -1,7 +1,7 @@
package com.github.technus.tectech.mechanics.tesla;
-import com.github.technus.tectech.util.Vec3Impl;
import com.google.common.base.Objects;
+import com.gtnewhorizon.structurelib.util.Vec3Impl;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import static com.github.technus.tectech.mechanics.tesla.ITeslaConnectable.TeslaUtil.teslaSimpleNodeSetAdd;
@@ -14,7 +14,10 @@ public class TeslaCoverConnection implements ITeslaConnectableSimple {
public TeslaCoverConnection(IGregTechTileEntity IGT, byte teslaReceptionCapability) {
this.IGT = IGT;
- this.pos = new Vec3Impl(IGT);
+ this.pos = new Vec3Impl(IGT.getXCoord(),
+ IGT.getYCoord(),
+ IGT.getZCoord());
+
this.teslaReceptionCapability = teslaReceptionCapability;
}
diff --git a/src/main/java/com/github/technus/tectech/thing/item/ConstructableTriggerItem.java b/src/main/java/com/github/technus/tectech/thing/item/ConstructableTriggerItem.java
index 752f2d1bcc..81fec52ebd 100644
--- a/src/main/java/com/github/technus/tectech/thing/item/ConstructableTriggerItem.java
+++ b/src/main/java/com/github/technus/tectech/thing/item/ConstructableTriggerItem.java
@@ -18,6 +18,7 @@ import static net.minecraft.util.StatCollector.translateToLocal;
/**
* Created by Tec on 15.03.2017.
*/
+@Deprecated
public final class ConstructableTriggerItem extends Item {
public static ConstructableTriggerItem INSTANCE;
diff --git a/src/main/java/com/github/technus/tectech/thing/item/FrontRotationTriggerItem.java b/src/main/java/com/github/technus/tectech/thing/item/FrontRotationTriggerItem.java
index d71abb34b7..39193fd598 100644
--- a/src/main/java/com/github/technus/tectech/thing/item/FrontRotationTriggerItem.java
+++ b/src/main/java/com/github/technus/tectech/thing/item/FrontRotationTriggerItem.java
@@ -18,6 +18,7 @@ import static net.minecraft.util.StatCollector.translateToLocal;
/**
* Created by Tec on 15.03.2017.
*/
+@Deprecated
public final class FrontRotationTriggerItem extends Item {
public static FrontRotationTriggerItem INSTANCE;
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..05829c89e4 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,28 @@
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.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose;
+import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional;
import static net.minecraft.util.StatCollector.translateToLocal;
/**
@@ -31,30 +32,6 @@ public class GT_MetaTileEntity_EM_annihilation extends GT_MetaTileEntity_Multibl
//region variables
private static Textures.BlockIcons.CustomIcon ScreenOFF;
private static Textures.BlockIcons.CustomIcon ScreenON;
- //endregion
-
- //region structure
- 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",},
- {"C01A10", "A223222322", "A244242442", "03442424430", "12225252221", "A244222442", "12225252221", "03442424430", "A244242442", "A223222322", "C01A10",},
- {"D111", "A244222442", "A4G4", "A4G4", "12G21", "12G21", "12G21", "A4G4", "A4G4", "A244222442", "D111",},
- {"A0C0C0", "03444244430", "A4G4", "A4G4", "A4G4", "02G20", "A4G4", "A4G4", "A4G4", "03444244430", "A0C0C0",},
- {"00C!C00", "02444544420", "A4G4", "A4G4", "A4G4", "!5G5!", "A4G4", "A4G4", "A4G4", "02444544420", "00C!C00",},
- {"A0C0C0", "03444244430", "A4G4", "A4G4", "A4G4", "02G20", "A4G4", "A4G4", "A4G4", "03444244430", "A0C0C0",},
- {"D111", "A244222442", "A4G4", "A4G4", "12G21", "12G21", "12G21", "A4G4", "A4G4", "A244222442", "D111",},
- {"C01A10", "A223222322", "A244242442", "03442424430", "12225252221", "A244222442", "12225252221", "03442424430", "A244242442", "A223222322", "C01A10",},
- {"C01A10", "C01A10", "D1A1", "00B101B00", "11111111111", "C01110", "11111111111", "00B101B00", "D1A1", "C01A10", "C01A10",},
- {"\u0002", "D000", "C0 0", "C0 0", "C0 0", "D000"},
- };
- 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(
- 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
@@ -62,6 +39,33 @@ public class GT_MetaTileEntity_EM_annihilation extends GT_MetaTileEntity_Multibl
};
//endregion
+ //region structure
+ private static final IStructureDefinition<GT_MetaTileEntity_EM_annihilation> STRUCTURE_DEFINITION =
+ StructureDefinition.<GT_MetaTileEntity_EM_annihilation>builder()
+ .addShape("main", transpose(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_EM_annihilation::addElementalToMachineList, textureOffset + 4,2, sBlockCasingsTT, 4))
+ .addElement('G', ofBlock(QuantumGlassBlock.INSTANCE, 0))
+ .addElement('H', ofHatchAdderOptional(GT_MetaTileEntity_EM_annihilation::addClassicToMachineList, textureOffset, 1, sBlockCasingsTT, 0))
+ .build();
+ //endregion
+
public GT_MetaTileEntity_EM_annihilation(int aID, String aName, String aNameRegional) {
super(aID, aName, aNameRegional);
}
@@ -77,7 +81,7 @@ 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("main", 5, 5, 0);
}
@Override
@@ -107,7 +111,12 @@ 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);
+ structureBuild_EM("main", 5, 5, 0, hintsOnly, stackSize);
+ }
+
+ @Override
+ public IStructureDefinition<GT_MetaTileEntity_EM_annihilation> getStructure_EM() {
+ return STRUCTURE_DEFINITION;
}
@Override
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_bhg.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_bhg.java
index 06476fb62e..448c930351 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_bhg.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_bhg.java
@@ -1,12 +1,12 @@
package com.github.technus.tectech.thing.metaTileEntity.multi;
-import com.github.technus.tectech.mechanics.constructable.IConstructable;
-import com.github.technus.tectech.mechanics.structure.IStructureDefinition;
-import com.github.technus.tectech.mechanics.structure.StructureDefinition;
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;
@@ -17,14 +17,14 @@ 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.StructureUtility.ofBlock;
-import static com.github.technus.tectech.mechanics.structure.StructureUtility.ofHatchAdderOptional;
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.metaTileEntity.multi.GT_MetaTileEntity_EM_decay.URANIUM_INGOT_MASS_DIFF;
import static com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_EM_decay.URANIUM_MASS_TO_EU_INSTANT;
-import static gregtech.api.enums.GT_Values.E;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose;
+import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional;
import static net.minecraft.util.StatCollector.translateToLocal;
/**
@@ -49,92 +49,90 @@ public class GT_MetaTileEntity_EM_bhg extends GT_MetaTileEntity_MultiblockBase_E
//per dim disable thingies
//region structure actual
- private static final IStructureDefinition<GT_MetaTileEntity_EM_bhg> STRUCTURE_DEFINITION= StructureDefinition
- .<GT_MetaTileEntity_EM_bhg>builder()
- .addShapeOldApi("t1",new String[][]{
- {"\u000B", "M0000000", "L00 00", "L0 0", "L0 !!! 0", "L0 !.! 0", "L0 !!! 0", "L0 0", "L00 00", "M0000000",},
- {"\u0008", "O0A0", "O0A0", "O0A0", "O0A0", "N11111", "M1101011", "I000010010010000", "M1111111", "I000010010010000", "M1101011", "N11111", "O0A0", "O0A0", "O0A0", "O0A0",},
- {"\u0006", "O0A0", "O0A0", "O0A0", "P1", "P1", "M1111111", "L11E11", "L1B222B1", "G000B1A23332A1B000", "J111A23332A111", "G000B1A23332A1B000", "L1B222B1", "L11E11", "M1111111", "P1", "P1", "O0A0", "O0A0", "O0A0",},
- {"\u0005", "O0A0", "O0A0", "P1", "P1", "\u0004", "F00Q00", "H11M11", "F00Q00", "\u0004", "P1", "P1", "O0A0", "O0A0",},
- {"\u0004", "O0A0", "N00000", "P1", "P4", "P4", "\u0003", "F0S0", "E00S00", "F0144M4410", "E00S00", "F0S0", "\u0003", "P4", "P4", "P1", "N00000", "O0A0",},
- {"\u0003", "O0A0", "O0A0", "P1", "M2224222", "\u0004", "G2Q2", "G2Q2", "D00A2Q2A00", "F14Q41", "D00A2Q2A00", "G2Q2", "G2Q2", "\u0004", "M2224222", "P1", "O0A0", "O0A0",},
- {"\u0002", "O0A0", "N00000", "P1", "P4", "\u0006", "D0W0", "C00W00", "D014S410", "C00W00", "D0W0", "\u0006", "P4", "P1", "N00000", "O0A0",},
- {"\u0001", "O0A0", "O0A0", "P1", "M2224222", "\u0006", "E2U2", "E2U2", "B00A2U2A00", "D14U41", "B00A2U2A00", "E2U2", "E2U2", "\u0006", "M2224222", "P1", "O0A0", "O0A0",},
- {"\u0001", "O0A0", "P1", "P4", "\u0009", "B0[0", "C14W41", "B0[0", "\u0009", "P4", "P1", "O0A0",},
- {E, "O0A0", "O0A0", "P1", "P4", "\u0009", "A00[00", "C14W41", "A00[00", "\u0009", "P4", "P1", "O0A0", "O0A0",},
- {E, "O0A0", "P1", "\u000B", "A0]0", "B1[1", "A0]0", "\u000B", "P1", "O0A0",},
- {E, "O0A0", "P1", "\u000B", "A0]0", "B1[1", "A0]0", "\u000B", "P1", "O0A0",},
- {"O0A0", "O0A0", "M1111111", "\u0009", "B1[1", "B1[1", "001[100", "B1[1", "001[100", "B1[1", "B1[1", "\u0009", "M1111111", "O0A0", "O0A0",},
- {"O0A0", "N11111", "L11E11", "\u0001", "G2Q2", E, "E2U2", "\u0003", "B1[1", "B1[1", "A1]1", "01]10", "A1]1", "01]10", "A1]1", "B1[1", "B1[1", "\u0003", "E2U2", E, "G2Q2", "\u0001", "L11E11", "N11111", "O0A0",},
- {"O0A0", "M1101011", "L1B222B1", E, "F0S0", "G2Q2", "D0W0", "E2U2", "\u0003", "B1[1", "A1]1", "A1]1", "002[200", "A12[21", "002[200", "A1]1", "A1]1", "B1[1", "\u0003", "E2U2", "D0W0", "G2Q2", "F0S0", E, "L1B222B1", "M1101011", "O0A0",},
- {"L000000000", "I000010010010000", "G000B1A23332A1B000", "F00Q00", "E00S00", "D00A2Q2A00", "C00W00", "B00A2U2A00", "B0[0", "A00[00", "A0]0", "A0]0", "001[100", "01]10", "002[200", "003[300", "013[310", "003[300", "002[200", "01]10", "001[100", "A0]0", "A0]0", "A00[00", "B0[0", "B00A2U2A00", "C00W00", "D00A2Q2A00", "E00S00", "F00Q00", "G000B1A23332A1B000", "I000010010010000", "L000000000",},
- {"O0A0", "M1111111", "J111A23332A111", "H11M11", "F0144M4410", "F14Q41", "D014S410", "D14U41", "C14W41", "C14W41", "B1[1", "B1[1", "B1[1", "A1]1", "A12[21", "013[310", "A13[31", "013[310", "A12[21", "A1]1", "B1[1", "B1[1", "B1[1", "C14W41", "C14W41", "D14U41", "D014S410", "F14Q41", "F0144M4410", "H11M11", "J111A23332A111", "M1111111", "O0A0",},
- {"L000000000", "I000010010010000", "G000B1A23332A1B000", "F00Q00", "E00S00", "D00A2Q2A00", "C00W00", "B00A2U2A00", "B0[0", "A00[00", "A0]0", "A0]0", "001[100", "01]10", "002[200", "003[300", "013[310", "003[300", "002[200", "01]10", "001[100", "A0]0", "A0]0", "A00[00", "B0[0", "B00A2U2A00", "C00W00", "D00A2Q2A00", "E00S00", "F00Q00", "G000B1A23332A1B000", "I000010010010000", "L000000000",},
- {"O0A0", "M1101011", "L1B222B1", E, "F0S0", "G2Q2", "D0W0", "E2U2", "\u0003", "B1[1", "A1]1", "A1]1", "002[200", "A12[21", "002[200", "A1]1", "A1]1", "B1[1", "\u0003", "E2U2", "D0W0", "G2Q2", "F0S0", E, "L1B222B1", "M1101011", "O0A0",},
- {"O0A0", "N11111", "L11E11", "\u0001", "G2Q2", E, "E2U2", "\u0003", "B1[1", "B1[1", "A1]1", "01]10", "A1]1", "01]10", "A1]1", "B1[1", "B1[1", "\u0003", "E2U2", E, "G2Q2", "\u0001", "L11E11", "N11111", "O0A0",},
- {"O0A0", "O0A0", "M1111111", "\u0009", "B1[1", "B1[1", "001[100", "B1[1", "001[100", "B1[1", "B1[1", "\u0009", "M1111111", "O0A0", "O0A0",},
- {E, "O0A0", "P1", "\u000B", "A0]0", "B1[1", "A0]0", "\u000B", "P1", "O0A0",},
- {E, "O0A0", "P1", "\u000B", "A0]0", "B1[1", "A0]0", "\u000B", "P1", "O0A0",},
- {E, "O0A0", "O0A0", "P1", "P4", "\u0009", "A00[00", "C14W41", "A00[00", "\u0009", "P4", "P1", "O0A0", "O0A0",},
- {"\u0001", "O0A0", "P1", "P4", "\u0009", "B0[0", "C14W41", "B0[0", "\u0009", "P4", "P1", "O0A0",},
- {"\u0001", "O0A0", "O0A0", "P1", "M2224222", "\u0006", "E2U2", "E2U2", "B00A2U2A00", "D14U41", "B00A2U2A00", "E2U2", "E2U2", "\u0006", "M2224222", "P1", "O0A0", "O0A0",},
- {"\u0002", "O0A0", "N00000", "P1", "P4", "\u0006", "D0W0", "C00W00", "D014S410", "C00W00", "D0W0", "\u0006", "P4", "P1", "N00000", "O0A0",},
- {"\u0003", "O0A0", "O0A0", "P1", "M2224222", "\u0004", "G2Q2", "G2Q2", "D00A2Q2A00", "F14Q41", "D00A2Q2A00", "G2Q2", "G2Q2", "\u0004", "M2224222", "P1", "O0A0", "O0A0",},
- {"\u0004", "O0A0", "N00000", "P1", "P4", "P4", "\u0003", "F0S0", "E00S00", "F0144M4410", "E00S00", "F0S0", "\u0003", "P4", "P4", "P1", "N00000", "O0A0",},
- {"\u0005", "O0A0", "O0A0", "P1", "P1", "\u0004", "F00Q00", "H11M11", "F00Q00", "\u0004", "P1", "P1", "O0A0", "O0A0",},
- {"\u0006", "O0A0", "O0A0", "O0A0", "P1", "P1", "M1111111", "L11E11", "L1B222B1", "G000B1A23332A1B000", "J111A23332A111", "G000B1A23332A1B000", "L1B222B1", "L11E11", "M1111111", "P1", "P1", "O0A0", "O0A0", "O0A0",},
- {"\u0008", "O0A0", "O0A0", "O0A0", "O0A0", "N11111", "M1101011", "I000010010010000", "M1111111", "I000010010010000", "M1101011", "N11111", "O0A0", "O0A0", "O0A0", "O0A0",},
- {"\u000B", "O0A0", "O0A0", "O0A0", "L000000000", "O0A0", "L000000000", "O0A0", "O0A0", "O0A0",},
- })
- .addShapeOldApi("t2",new String[][]{
- {"\u000B", "M0000000", "L00 00", "L0 0", "L0 !!! 0", "L0 !.! 0", "L0 !!! 0", "L0 0", "L00 00", "M0000000",},
- {"\u0008", "O0A0", "M550A055", "L5550A0555", "K55550A05555", "J5555111115555", "J5551101011555", "I000010010010000", "M1111111", "I000010010010000", "J5551101011555", "J5555111115555", "K55550A05555", "L5550A0555", "M550A055", "O0A0",},
- {"\u0006", "O0A0", "M550A055", "K55550A05555", "J555C1C555", "I555D1D555", "I55B1111111B55", "H55B11E11B55", "H55B1B222B1B55", "G000B1A23332A1B000", "J111A23332A111", "G000B1A23332A1B000", "H55B1B222B1B55", "H55B11E11B55", "I55B1111111B55", "I555D1D555", "J555C1C555", "K55550A05555", "M550A055", "O0A0",},
- {"\u0005", "O0A0", "L5550A0555", "J555C1C555", "I55E1E55", "H55M55", "H5O5", "G55O55", "G5Q5", "G5Q5", "F00Q00", "H11M11", "F00Q00", "G5Q5", "G5Q5", "G55O55", "H5O5", "H55M55", "I55E1E55", "J555C1C555", "L5550A0555", "O0A0",},
- {"\u0004", "O0A0", "K55500000555", "I555D1D555", "H55F4F55", "G55G4G55", "G5Q5", "F55Q55", "F5S5", "F5S5", "F0S0", "E00S00", "F0144M4410", "E00S00", "F0S0", "F5S5", "F5S5", "F55Q55", "G5Q5", "G55G4G55", "H55F4F55", "I555D1D555", "K55500000555", "O0A0",},
- {"\u0003", "O0A0", "J555550A055555", "H555E1E555", "G55D2224222D55", "F55Q55", "F5S5", "E55S55", "E5U5", "E5U5", "E5A2Q2A5", "E5A2Q2A5", "D00A2Q2A00", "F14Q41", "D00A2Q2A00", "E5A2Q2A5", "E5A2Q2A5", "E5U5", "E5U5", "E55S55", "F5S5", "F55Q55", "G55D2224222D55", "H555E1E555", "J555550A055555", "O0A0",},
- {"\u0002", "O0A0", "K55500000555", "H555E1E555", "G55G4G55", "F5S5", "E55S55", "E5U5", "E5U5", "D5W5", "D5W5", "D5W5", "D0W0", "C00W00", "D014S410", "C00W00", "D0W0", "D5W5", "D5W5", "D5W5", "E5U5", "E5U5", "E55S55", "F5S5", "G55G4G55", "H555E1E555", "K55500000555", "O0A0",},
- {"\u0001", "O0A0", "L5550A0555", "I555D1D555", "G55D2224222D55", "F5S5", "E5U5", "E5U5", "D5W5", "D5W5", "D5W5", "C5Y5", "C5A2U2A5", "C5A2U2A5", "B00A2U2A00", "D14U41", "B00A2U2A00", "C5A2U2A5", "C5A2U2A5", "C5Y5", "D5W5", "D5W5", "D5W5", "E5U5", "E5U5", "F5S5", "G55D2224222D55", "I555D1D555", "L5550A0555", "O0A0",},
- {"\u0001", "M550A055", "J555C1C555", "H55F4F55", "F55Q55", "E55S55", "E5U5", "D5W5", "D5W5", "C5Y5", "C5Y5", "C5Y5", "B5[5", "B5[5", "B0[0", "C14W41", "B0[0", "B5[5", "B5[5", "C5Y5", "C5Y5", "C5Y5", "D5W5", "D5W5", "E5U5", "E55S55", "F55Q55", "H55F4F55", "J555C1C555", "M550A055",},
- {E, "O0A0", "K55550A05555", "I55E1E55", "G55G4G55", "F5S5", "E5U5", "D5W5", "D5W5", "C5Y5", "C5Y5", "B5[5", "B5[5", "B5[5", "B5[5", "A00[00", "C14W41", "A00[00", "B5[5", "B5[5", "B5[5", "B5[5", "C5Y5", "C5Y5", "D5W5", "D5W5", "E5U5", "F5S5", "G55G4G55", "I55E1E55", "K55550A05555", "O0A0",},
- {E, "M550A055", "J555C1C555", "H55M55", "G5Q5", "E55S55", "E5U5", "D5W5", "C5Y5", "C5Y5", "B5[5", "B5[5", "B5[5", "A5]5", "A5]5", "A0]0", "B1[1", "A0]0", "A5]5", "A5]5", "B5[5", "B5[5", "B5[5", "C5Y5", "C5Y5", "D5W5", "E5U5", "E55S55", "G5Q5", "H55M55", "J555C1C555", "M550A055",},
- {E, "L5550A0555", "I555D1D555", "H5O5", "F55Q55", "E5U5", "D5W5", "D5W5", "C5Y5", "B5[5", "B5[5", "B5[5", "A5]5", "A5]5", "A5]5", "A0]0", "B1[1", "A0]0", "A5]5", "A5]5", "A5]5", "B5[5", "B5[5", "B5[5", "C5Y5", "D5W5", "D5W5", "E5U5", "F55Q55", "H5O5", "I555D1D555", "L5550A0555",},
- {"O0A0", "K55550A05555", "I55B1111111B55", "G55O55", "F5S5", "E5U5", "D5W5", "C5Y5", "C5Y5", "B5[5", "B5[5", "A5]5", "A5]5", "A51[15", "A51[15", "001[100", "B1[1", "001[100", "A51[15", "A51[15", "A5]5", "A5]5", "B5[5", "B5[5", "C5Y5", "C5Y5", "D5W5", "E5U5", "F5S5", "G55O55", "I55B1111111B55", "K55550A05555", "O0A0",},
- {"O0A0", "J5555111115555", "H55B11E11B55", "G5Q5", "F5S5", "E5A2Q2A5", "D5W5", "C5A2U2A5", "B5[5", "B5[5", "A5]5", "A5]5", "A51[15", "A51[15", "A1]1", "01]10", "A1]1", "01]10", "A1]1", "A51[15", "A51[15", "A5]5", "A5]5", "B5[5", "B5[5", "C5A2U2A5", "D5W5", "E5A2Q2A5", "F5S5", "G5Q5", "H55B11E11B55", "J5555111115555", "O0A0",},
- {"O0A0", "J5551101011555", "H55B1B222B1B55", "G5Q5", "F0S0", "E5A2Q2A5", "D0W0", "C5A2U2A5", "B5[5", "B5[5", "A5]5", "A5]5", "A51[15", "A1]1", "A1]1", "002[200", "A12[21", "002[200", "A1]1", "A1]1", "A51[15", "A5]5", "A5]5", "B5[5", "B5[5", "C5A2U2A5", "D0W0", "E5A2Q2A5", "F0S0", "G5Q5", "H55B1B222B1B55", "J5551101011555", "O0A0",},
- {"L000000000", "I000010010010000", "G000B1A23332A1B000", "F00Q00", "E00S00", "D00A2Q2A00", "C00W00", "B00A2U2A00", "B0[0", "A00[00", "A0]0", "A0]0", "001[100", "01]10", "002[200", "003[300", "013[310", "003[300", "002[200", "01]10", "001[100", "A0]0", "A0]0", "A00[00", "B0[0", "B00A2U2A00", "C00W00", "D00A2Q2A00", "E00S00", "F00Q00", "G000B1A23332A1B000", "I000010010010000", "L000000000",},
- {"O0A0", "M1111111", "J111A23332A111", "H11M11", "F0144M4410", "F14Q41", "D014S410", "D14U41", "C14W41", "C14W41", "B1[1", "B1[1", "B1[1", "A1]1", "A12[21", "013[310", "A13[31", "013[310", "A12[21", "A1]1", "B1[1", "B1[1", "B1[1", "C14W41", "C14W41", "D14U41", "D014S410", "F14Q41", "F0144M4410", "H11M11", "J111A23332A111", "M1111111", "O0A0",},
- {"L000000000", "I000010010010000", "G000B1A23332A1B000", "F00Q00", "E00S00", "D00A2Q2A00", "C00W00", "B00A2U2A00", "B0[0", "A00[00", "A0]0", "A0]0", "001[100", "01]10", "002[200", "003[300", "013[310", "003[300", "002[200", "01]10", "001[100", "A0]0", "A0]0", "A00[00", "B0[0", "B00A2U2A00", "C00W00", "D00A2Q2A00", "E00S00", "F00Q00", "G000B1A23332A1B000", "I000010010010000", "L000000000",},
- {"O0A0", "J5551101011555", "H55B1B222B1B55", "G5Q5", "F0S0", "E5A2Q2A5", "D0W0", "C5A2U2A5", "B5[5", "B5[5", "A5]5", "A5]5", "A51[15", "A1]1", "A1]1", "002[200", "A12[21", "002[200", "A1]1", "A1]1", "A51[15", "A5]5", "A5]5", "B5[5", "B5[5", "C5A2U2A5", "D0W0", "E5A2Q2A5", "F0S0", "G5Q5", "H55B1B222B1B55", "J5551101011555", "O0A0",},
- {"O0A0", "J5555111115555", "H55B11E11B55", "G5Q5", "F5S5", "E5A2Q2A5", "D5W5", "C5A2U2A5", "B5[5", "B5[5", "A5]5", "A5]5", "A51[15", "A51[15", "A1]1", "01]10", "A1]1", "01]10", "A1]1", "A51[15", "A51[15", "A5]5", "A5]5", "B5[5", "B5[5", "C5A2U2A5", "D5W5", "E5A2Q2A5", "F5S5", "G5Q5", "H55B11E11B55", "J5555111115555", "O0A0",},
- {"O0A0", "K55550A05555", "I55B1111111B55", "G55O55", "F5S5", "E5U5", "D5W5", "C5Y5", "C5Y5", "B5[5", "B5[5", "A5]5", "A5]5", "A51[15", "A51[15", "001[100", "B1[1", "001[100", "A51[15", "A51[15", "A5]5", "A5]5", "B5[5", "B5[5", "C5Y5", "C5Y5", "D5W5", "E5U5", "F5S5", "G55O55", "I55B1111111B55", "K55550A05555", "O0A0",},
- {E, "L5550A0555", "I555D1D555", "H5O5", "F55Q55", "E5U5", "D5W5", "D5W5", "C5Y5", "B5[5", "B5[5", "B5[5", "A5]5", "A5]5", "A5]5", "A0]0", "B1[1", "A0]0", "A5]5", "A5]5", "A5]5", "B5[5", "B5[5", "B5[5", "C5Y5", "D5W5", "D5W5", "E5U5", "F55Q55", "H5O5", "I555D1D555", "L5550A0555",},
- {E, "M550A055", "J555C1C555", "H55M55", "G5Q5", "E55S55", "E5U5", "D5W5", "C5Y5", "C5Y5", "B5[5", "B5[5", "B5[5", "A5]5", "A5]5", "A0]0", "B1[1", "A0]0", "A5]5", "A5]5", "B5[5", "B5[5", "B5[5", "C5Y5", "C5Y5", "D5W5", "E5U5", "E55S55", "G5Q5", "H55M55", "J555C1C555", "M550A055",},
- {E, "O0A0", "K55550A05555", "I55E1E55", "G55G4G55", "F5S5", "E5U5", "D5W5", "D5W5", "C5Y5", "C5Y5", "B5[5", "B5[5", "B5[5", "B5[5", "A00[00", "C14W41", "A00[00", "B5[5", "B5[5", "B5[5", "B5[5", "C5Y5", "C5Y5", "D5W5", "D5W5", "E5U5", "F5S5", "G55G4G55", "I55E1E55", "K55550A05555", "O0A0",},
- {"\u0001", "M550A055", "J555C1C555", "H55F4F55", "F55Q55", "E55S55", "E5U5", "D5W5", "D5W5", "C5Y5", "C5Y5", "C5Y5", "B5[5", "B5[5", "B0[0", "C14W41", "B0[0", "B5[5", "B5[5", "C5Y5", "C5Y5", "C5Y5", "D5W5", "D5W5", "E5U5", "E55S55", "F55Q55", "H55F4F55", "J555C1C555", "M550A055",},
- {"\u0001", "O0A0", "L5550A0555", "I555D1D555", "G55D2224222D55", "F5S5", "E5U5", "E5U5", "D5W5", "D5W5", "D5W5", "C5Y5", "C5A2U2A5", "C5A2U2A5", "B00A2U2A00", "D14U41", "B00A2U2A00", "C5A2U2A5", "C5A2U2A5", "C5Y5", "D5W5", "D5W5", "D5W5", "E5U5", "E5U5", "F5S5", "G55D2224222D55", "I555D1D555", "L5550A0555", "O0A0",},
- {"\u0002", "O0A0", "K55500000555", "H555E1E555", "G55G4G55", "F5S5", "E55S55", "E5U5", "E5U5", "D5W5", "D5W5", "D5W5", "D0W0", "C00W00", "D014S410", "C00W00", "D0W0", "D5W5", "D5W5", "D5W5", "E5U5", "E5U5", "E55S55", "F5S5", "G55G4G55", "H555E1E555", "K55500000555", "O0A0",},
- {"\u0003", "O0A0", "J555550A055555", "H555E1E555", "G55D2224222D55", "F55Q55", "F5S5", "E55S55", "E5U5", "E5U5", "E5A2Q2A5", "E5A2Q2A5", "D00A2Q2A00", "F14Q41", "D00A2Q2A00", "E5A2Q2A5", "E5A2Q2A5", "E5U5", "E5U5", "E55S55", "F5S5", "F55Q55", "G55D2224222D55", "H555E1E555", "J555550A055555", "O0A0",},
- {"\u0004", "O0A0", "K55500000555", "I555D1D555", "H55F4F55", "G55G4G55", "G5Q5", "F55Q55", "F5S5", "F5S5", "F0S0", "E00S00", "F0144M4410", "E00S00", "F0S0", "F5S5", "F5S5", "F55Q55", "G5Q5", "G55G4G55", "H55F4F55", "I555D1D555", "K55500000555", "O0A0",},
- {"\u0005", "O0A0", "L5550A0555", "J555C1C555", "I55E1E55", "H55M55", "H5O5", "G55O55", "G5Q5", "G5Q5", "F00Q00", "H11M11", "F00Q00", "G5Q5", "G5Q5", "G55O55", "H5O5", "H55M55", "I55E1E55", "J555C1C555", "L5550A0555", "O0A0",},
- {"\u0006", "O0A0", "M550A055", "K55550A05555", "J555C1C555", "I555D1D555", "I55B1111111B55", "H55B11E11B55", "H55B1B222B1B55", "G000B1A23332A1B000", "J111A23332A111", "G000B1A23332A1B000", "H55B1B222B1B55", "H55B11E11B55", "I55B1111111B55", "I555D1D555", "J555C1C555", "K55550A05555", "M550A055", "O0A0",},
- {"\u0008", "O0A0", "M550A055", "L5550A0555", "K55550A05555", "J5555111115555", "J5551101011555", "I000010010010000", "M1111111", "I000010010010000", "J5551101011555", "J5555111115555", "K55550A05555", "L5550A0555", "M550A055", "O0A0",},
- {"\u000B", "O0A0", "O0A0", "O0A0", "L000000000", "O0A0", "L000000000", "O0A0", "O0A0", "O0A0",},
- })
- .addElement('0', ofBlock(sBlockCasingsTT,12))
- .addElement('1', ofBlock(sBlockCasingsTT,13))
- .addElement('2', ofBlock(sBlockCasingsTT,14))
- .addElement('3', ofBlock(sBlockCasingsTT,10))
- .addElement('4', ofBlock(sBlockCasingsTT,11))
- .addElement('5', ofBlock(QuantumGlassBlock.INSTANCE,0))
- .addElement(' ', ofHatchAdderOptional(GT_MetaTileEntity_EM_bhg::addClassicToMachineList,
- textureOffset,1,sBlockCasingsTT,0))
- .addElement('!', ofHatchAdderOptional(GT_MetaTileEntity_EM_bhg::addElementalToMachineList,
- textureOffset + 4,2,sBlockCasingsTT,4))
+ private static final IStructureDefinition<GT_MetaTileEntity_EM_bhg> STRUCTURE_DEFINITION=
+ StructureDefinition.<GT_MetaTileEntity_EM_bhg>builder()
+ .addShape("main_t1", transpose(new String[][]{
+ {" "," "," "," "," "," "," "," "," "," "," "," "," C C "," C C "," C C "," CCCCCCCCC "," C C "," CCCCCCCCC "," C C "," C C "," C C "," "," "," "," "," "," "," "," "," "," "," "," "},
+ {" "," "," "," "," "," "," "," "," "," C C "," C C "," C C "," C C "," DDDDD "," DDCDCDD "," CCCCDCCDCCDCCCC "," DDDDDDD "," CCCCDCCDCCDCCCC "," DDCDCDD "," DDDDD "," C C "," C C "," C C "," C C "," "," "," "," "," "," "," "," "," "},
+ {" "," "," "," "," "," "," "," C C "," C C "," C C "," D "," D "," DDDDDDD "," DD DD "," D EEE D "," CCC D EAAAE D CCC "," DDD EAAAE DDD "," CCC D EAAAE D CCC "," D EEE D "," DD DD "," DDDDDDD "," D "," D "," C C "," C C "," C C "," "," "," "," "," "," "," "},
+ {" "," "," "," "," "," "," C C "," C C "," D "," D "," "," "," "," "," "," CC CC "," DD DD "," CC CC "," "," "," "," "," "," D "," D "," C C "," C C "," "," "," "," "," "," "},
+ {" "," "," "," "," "," C C "," CCCCC "," D "," B "," B "," "," "," "," "," C C "," CC CC "," CDBB BBDC "," CC CC "," C C "," "," "," "," "," B "," B "," D "," CCCCC "," C C "," "," "," "," "," "},
+ {" "," "," "," "," C C "," C C "," D "," EEEBEEE "," "," "," "," "," "," E E "," E E "," CC E E CC "," DB BD "," CC E E CC "," E E "," E E "," "," "," "," "," "," EEEBEEE "," D "," C C "," C C "," "," "," "," "},
+ {" "," "," "," C C "," CCCCC "," D "," B "," "," "," "," "," "," "," "," C C "," CC CC "," CDB BDC "," CC CC "," C C "," "," "," "," "," "," "," "," B "," D "," CCCCC "," C C "," "," "," "},
+ {" "," "," C C "," C C "," D "," EEEBEEE "," "," "," "," "," "," "," "," E E "," E E "," CC E E CC "," DB BD "," CC E E CC "," E E "," E E "," "," "," "," "," "," "," "," EEEBEEE "," D "," C C "," C C "," "," "},
+ {" "," "," C C "," D "," B "," "," "," "," "," "," "," "," "," "," "," C C "," DB BD "," C C "," "," "," "," "," "," "," "," "," "," "," B "," D "," C C "," "," "},
+ {" "," C C "," C C "," D "," B "," "," "," "," "," "," "," "," "," "," "," CC CC "," DB BD "," CC CC "," "," "," "," "," "," "," "," "," "," "," B "," D "," C C "," C C "," "},
+ {" "," C C "," D "," "," "," "," "," "," "," "," "," "," "," "," "," C C "," D D "," C C "," "," "," "," "," "," "," "," "," "," "," "," "," D "," C C "," "},
+ {" "," C C "," D "," "," "," "," "," "," "," "," "," "," "," "," "," C C "," D D "," C C "," "," "," "," "," "," "," "," "," "," "," "," "," D "," C C "," "},
+ {" CCCCCCC "," C C "," DDDDDDD "," "," "," "," "," "," "," "," "," "," "," D D "," D D ","CCD DCC"," D D ","CCD DCC"," D D "," D D "," "," "," "," "," "," "," "," "," "," "," DDDDDDD "," C C "," C C "},
+ {" CCHHHHHCC "," DDDDD "," DD DD "," "," "," E E "," "," E E "," "," "," "," "," D D "," D D "," D D ","CD DC"," D D ","CD DC"," D D "," D D "," D D "," "," "," "," "," E E "," "," E E "," "," "," DD DD "," DDDDD "," C C "},
+ {" CHHHHHHHC "," DDCDCDD "," D EEE D "," "," C C "," E E "," C C "," E E "," "," "," "," "," D D "," D D "," D D ","CCE ECC"," DE ED ","CCE ECC"," D D "," D D "," D D "," "," "," "," "," E E "," C C "," E E "," C C "," "," D EEE D "," DDCDCDD "," C C "},
+ {" CHHFFFHHC "," CCCCDCCDCCDCCCC "," CCC D EAAAE D CCC "," CC CC "," CC CC "," CC E E CC "," CC CC "," CC E E CC "," C C "," CC CC "," C C "," C C ","CCD DCC","CD DC","CCE ECC","CCA ACC","CDA ADC","CCA ACC","CCE ECC","CD DC","CCD DCC"," C C "," C C "," CC CC "," C C "," CC E E CC "," CC CC "," CC E E CC "," CC CC "," CC CC "," CCC D EAAAE D CCC "," CCCCDCCDCCDCCCC "," CCCCCCCCC "},
+ {" CHHF~FHHC "," DDDDDDD "," DDD EAAAE DDD "," DD DD "," CDBB BBDC "," DB BD "," CDB BDC "," DB BD "," DB BD "," DB BD "," D D "," D D "," D D "," D D "," DE ED ","CDA ADC"," DA AD ","CDA ADC"," DE ED "," D D "," D D "," D D "," D D "," DB BD "," DB BD "," DB BD "," CDB BDC "," DB BD "," CDBB BBDC "," DD DD "," DDD EAAAE DDD "," DDDDDDD "," C C "},
+ {" CHHFFFHHC "," CCCCDCCDCCDCCCC "," CCC D EAAAE D CCC "," CC CC "," CC CC "," CC E E CC "," CC CC "," CC E E CC "," C C "," CC CC "," C C "," C C ","CCD DCC","CD DC","CCE ECC","CCA ACC","CDA ADC","CCA ACC","CCE ECC","CD DC","CCD DCC"," C C "," C C "," CC CC "," C C "," CC E E CC "," CC CC "," CC E E CC "," CC CC "," CC CC "," CCC D EAAAE D CCC "," CCCCDCCDCCDCCCC "," CCCCCCCCC "},
+ {" CHHHHHHHC "," DDCDCDD "," D EEE D "," "," C C "," E E "," C C "," E E "," "," "," "," "," D D "," D D "," D D ","CCE ECC"," DE ED ","CCE ECC"," D D "," D D "," D D "," "," "," "," "," E E "," C C "," E E "," C C "," "," D EEE D "," DDCDCDD "," C C "},
+ {" CCHHHHHCC "," DDDDD "," DD DD "," "," "," E E "," "," E E "," "," "," "," "," D D "," D D "," D D ","CD DC"," D D ","CD DC"," D D "," D D "," D D "," "," "," "," "," E E "," "," E E "," "," "," DD DD "," DDDDD "," C C "},
+ {" CCCCCCC "," C C "," DDDDDDD "," "," "," "," "," "," "," "," "," "," "," D D "," D D ","CCD DCC"," D D ","CCD DCC"," D D "," D D "," "," "," "," "," "," "," "," "," "," "," DDDDDDD "," C C "," C C "},
+ {" "," C C "," D "," "," "," "," "," "," "," "," "," "," "," "," "," C C "," D D "," C C "," "," "," "," "," "," "," "," "," "," "," "," "," D "," C C "," "},
+ {" "," C C "," D "," "," "," "," "," "," "," "," "," "," "," "," "," C C "," D D "," C C "," "," "," "," "," "," "," "," "," "," "," "," "," D "," C C "," "},
+ {" "," C C "," C C "," D "," B "," "," "," "," "," "," "," "," "," "," "," CC CC "," DB BD "," CC CC "," "," "," "," "," "," "," "," "," "," "," B "," D "," C C "," C C "," "},
+ {" "," "," C C "," D "," B "," "," "," "," "," "," "," "," "," "," "," C C "," DB BD "," C C "," "," "," "," "," "," "," "," "," "," "," B "," D "," C C "," "," "},
+ {" "," "," C C "," C C "," D "," EEEBEEE "," "," "," "," "," "," "," "," E E "," E E "," CC E E CC "," DB BD "," CC E E CC "," E E "," E E "," "," "," "," "," "," "," "," EEEBEEE "," D "," C C "," C C "," "," "},
+ {" "," "," "," C C "," CCCCC "," D "," B "," "," "," "," "," "," "," "," C C "," CC CC "," CDB BDC "," CC CC "," C C "," "," "," "," "," "," "," "," B "," D "," CCCCC "," C C "," "," "," "},
+ {" "," "," "," "," C C "," C C "," D "," EEEBEEE "," "," "," "," "," "," E E "," E E "," CC E E CC "," DB BD "," CC E E CC "," E E "," E E "," "," "," "," "," "," EEEBEEE "," D "," C C "," C C "," "," "," "," "},
+ {" "," "," "," "," "," C C "," CCCCC "," D "," B "," B "," "," "," "," "," C C "," CC CC "," CDBB BBDC "," CC CC "," C C "," "," "," "," "," B "," B "," D "," CCCCC "," C C "," "," "," "," "," "},
+ {" "," "," "," "," "," "," C C "," C C "," D "," D "," "," "," "," "," "," CC CC "," DD DD "," CC CC "," "," "," "," D "," D "," D "," D "," C C "," C C "," "," "," "," "," "," "},
+ {" "," "," "," "," "," "," "," C C "," C C "," C C "," D "," D "," DDDDDDD "," DD DD "," D EEE D "," CCC D EAAAE D CCC "," DDD EAAAE DDD "," CCC D EAAAE D CCC "," D EEE D "," DD DD "," DDDDDDD "," D "," D "," C C "," C C "," C C "," "," "," "," "," "," "," "},
+ {" "," "," "," "," "," "," "," "," "," C C "," C C "," C C "," C C "," DDDDD "," DDCDCDD "," CCCCDCCDCCDCCCC "," DDDDDDD "," CCCCDCCDCCDCCCC "," DDCDCDD "," DDDDD "," C C "," C C "," C C "," C C "," "," "," "," "," "," "," "," "," "},
+ {" "," "," "," "," "," "," "," "," "," "," "," "," C C "," C C "," C C "," CCCCCCCCC "," C C "," CCCCCCCCC "," C C "," C C "," C C "," "," "," "," "," "," "," "," "," "," "," "," "}
+ }))
+ .addShape("main_t2", transpose(new String[][]{
+ {" "," "," "," "," "," "," "," "," "," "," "," "," C C "," C C "," C C "," CCCCCCCCC "," C C "," CCCCCCCCC "," C C "," C C "," C C "," "," "," "," "," "," "," "," "," "," "," "," "},
+ {" "," "," "," "," "," "," "," "," "," C C "," GGC CGG "," GGGC CGGG "," GGGGC CGGGG "," GGGGDDDDDGGGG "," GGGDDCDCDDGGG "," CCCCDCCDCCDCCCC "," DDDDDDD "," CCCCDCCDCCDCCCC "," GGGDDCDCDDGGG "," GGGGDDDDDGGGG "," GGGGC CGGGG "," GGGC CGGG "," GGC CGG "," C C "," "," "," "," "," "," "," "," "," "},
+ {" "," "," "," "," "," "," "," C C "," GGC CGG "," GGGGC CGGGG "," GGG D GGG "," GGG D GGG "," GG DDDDDDD GG "," GG DD DD GG "," GG D EEE D GG "," CCC D EAAAE D CCC "," DDD EAAAE DDD "," CCC D EAAAE D CCC "," GG D EEE D GG "," GG DD DD GG "," GG DDDDDDD GG "," GGG D GGG "," GGG D GGG "," GGGGC CGGGG "," GGC CGG "," C C "," "," "," "," "," "," "," "},
+ {" "," "," "," "," "," "," C C "," GGGC CGGG "," GGG D GGG "," GG D GG "," GG GG "," G G "," GG GG "," G G "," G G "," CC CC "," DD DD "," CC CC "," G G "," G G "," GG GG "," G G "," GG GG "," GG D GG "," GGG D GGG "," GGGC CGGG "," C C "," "," "," "," "," "," "},
+ {" "," "," "," "," "," C C "," GGGCCCCCGGG "," GGG D GGG "," GG B GG "," GG B GG "," G G "," GG GG "," G G "," G G "," C C "," CC CC "," CDBB BBDC "," CC CC "," C C "," G G "," G G "," GG GG "," G G "," GG B GG "," GG B GG "," GGG D GGG "," GGGCCCCCGGG "," C C "," "," "," "," "," "},
+ {" "," "," "," "," C C "," GGGGGC CGGGGG "," GGG D GGG "," GG EEEBEEE GG "," GG GG "," G G "," GG GG "," G G "," G G "," G E E G "," G E E G "," CC E E CC "," DB BD "," CC E E CC "," G E E G "," G E E G "," G G "," G G "," GG GG "," G G "," GG GG "," GG EEEBEEE GG "," GGG D GGG "," GGGGGC CGGGGG "," C C "," "," "," "," "},
+ {" "," "," "," C C "," GGGCCCCCGGG "," GGG D GGG "," GG B GG "," G G "," GG GG "," G G "," G G "," G G "," G G "," G G "," C C "," CC CC "," CDB BDC "," CC CC "," C C "," G G "," G G "," G G "," G G "," G G "," GG GG "," G G "," GG B GG "," GGG D GGG "," GGGCCCCCGGG "," C C "," "," "," "},
+ {" "," "," C C "," GGGC CGGG "," GGG D GGG "," GG EEEBEEE GG "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G E E G "," G E E G "," CC E E CC "," DB BD "," CC E E CC "," G E E G "," G E E G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," GG EEEBEEE GG "," GGG D GGG "," GGGC CGGG "," C C "," "," "},
+ {" "," "," GGC CGG "," GGG D GGG "," GG B GG "," GG GG "," GG GG "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," C C "," DB BD "," C C "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," GG GG "," GG GG "," GG B GG "," GGG D GGG "," GGC CGG "," "," "},
+ {" "," C C "," GGGGC CGGGG "," GG D GG "," GG B GG "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," CC CC "," DB BD "," CC CC "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," GG B GG "," GG D GG "," GGGGC CGGGG "," C C "," "},
+ {" "," GGC CGG "," GGG D GGG "," GG GG "," G G "," GG GG "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," C C "," D D "," C C "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," GG GG "," G G "," GG GG "," GGG D GGG "," GGC CGG "," "},
+ {" "," GGGC CGGG "," GGG D GGG "," G G "," GG GG "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," C C "," D D "," C C "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," GG GG "," G G "," GGG D GGG "," GGGC CGGG "," "},
+ {" CCCCCCC "," GGGGC CGGGG "," GG DDDDDDD GG "," GG GG "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," GD DG "," GD DG ","CCD DCC"," D D ","CCD DCC"," GD DG "," GD DG "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," GG GG "," GG DDDDDDD GG "," GGGGC CGGGG "," C C "},
+ {" CCHHHHHCC "," GGGGDDDDDGGGG "," GG DD DD GG "," G G "," G G "," G E E G "," G G "," G E E G "," G G "," G G "," G G "," G G "," GD DG "," GD DG "," D D ","CD DC"," D D ","CD DC"," D D "," GD DG "," GD DG "," G G "," G G "," G G "," G G "," G E E G "," G G "," G E E G "," G G "," G G "," GG DD DD GG "," GGGGDDDDDGGGG "," C C "},
+ {" CHHHHHHHC "," GGGDDCDCDDGGG "," GG D EEE D GG "," G G "," C C "," G E E G "," C C "," G E E G "," G G "," G G "," G G "," G G "," GD DG "," D D "," D D ","CCE ECC"," DE ED ","CCE ECC"," D D "," D D "," GD DG "," G G "," G G "," G G "," G G "," G E E G "," C C "," G E E G "," C C "," G G "," GG D EEE D GG "," GGGDDCDCDDGGG "," C C "},
+ {" CHHFFFHHC "," CCCCDCCDCCDCCCC "," CCC D EAAAE D CCC "," CC CC "," CC CC "," CC E E CC "," CC CC "," CC E E CC "," C C "," CC CC "," C C "," C C ","CCD DCC","CD DC","CCE ECC","CCA ACC","CDA ADC","CCA ACC","CCE ECC","CD DC","CCD DCC"," C C "," C C "," CC CC "," C C "," CC E E CC "," CC CC "," CC E E CC "," CC CC "," CC CC "," CCC D EAAAE D CCC "," CCCCDCCDCCDCCCC "," CCCCCCCCC "},
+ {" CHHF~FHHC "," DDDDDDD "," DDD EAAAE DDD "," DD DD "," CDBB BBDC "," DB BD "," CDB BDC "," DB BD "," DB BD "," DB BD "," D D "," D D "," D D "," D D "," DE ED ","CDA ADC"," DA AD ","CDA ADC"," DE ED "," D D "," D D "," D D "," D D "," DB BD "," DB BD "," DB BD "," CDB BDC "," DB BD "," CDBB BBDC "," DD DD "," DDD EAAAE DDD "," DDDDDDD "," C C "},
+ {" CHHFFFHHC "," CCCCDCCDCCDCCCC "," CCC D EAAAE D CCC "," CC CC "," CC CC "," CC E E CC "," CC CC "," CC E E CC "," C C "," CC CC "," C C "," C C ","CCD DCC","CD DC","CCE ECC","CCA ACC","CDA ADC","CCA ACC","CCE ECC","CD DC","CCD DCC"," C C "," C C "," CC CC "," C C "," CC E E CC "," CC CC "," CC E E CC "," CC CC "," CC CC "," CCC D EAAAE D CCC "," CCCCDCCDCCDCCCC "," CCCCCCCCC "},
+ {" CHHHHHHHC "," GGGDDCDCDDGGG "," GG D EEE D GG "," G G "," C C "," G E E G "," C C "," G E E G "," G G "," G G "," G G "," G G "," GD DG "," D D "," D D ","CCE ECC"," DE ED ","CCE ECC"," D D "," D D "," GD DG "," G G "," G G "," G G "," G G "," G E E G "," C C "," G E E G "," C C "," G G "," GG D EEE D GG "," GGGDDCDCDDGGG "," C C "},
+ {" CCHHHHHCC "," GGGGDDDDDGGGG "," GG DD DD GG "," G G "," G G "," G E E G "," G G "," G E E G "," G G "," G G "," G G "," G G "," GD DG "," GD DG "," D D ","CD DC"," D D ","CD DC"," D D "," GD DG "," GD DG "," G G "," G G "," G G "," G G "," G E E G "," G G "," G E E G "," G G "," G G "," GG DD DD GG "," GGGGDDDDDGGGG "," C C "},
+ {" CCCCCCC "," GGGGC CGGGG "," GG DDDDDDD GG "," GG GG "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," GD DG "," GD DG ","CCD DCC"," D D ","CCD DCC"," GD DG "," GD DG "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," GG GG "," GG DDDDDDD GG "," GGGGC CGGGG "," C C "},
+ {" "," GGGC CGGG "," GGG D GGG "," G G "," GG GG "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," C C "," D D "," C C "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," GG GG "," G G "," GGG D GGG "," GGGC CGGG "," "},
+ {" "," GGC CGG "," GGG D GGG "," GG GG "," G G "," GG GG "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," C C "," D D "," C C "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," GG GG "," G G "," GG GG "," GGG D GGG "," GGC CGG "," "},
+ {" "," C C "," GGGGC CGGGG "," GG D GG "," GG B GG "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," CC CC "," DB BD "," CC CC "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," GG B GG "," GG D GG "," GGGGC CGGGG "," C C "," "},
+ {" "," "," GGC CGG "," GGG D GGG "," GG B GG "," GG GG "," GG GG "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," C C "," DB BD "," C C "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," GG GG "," GG GG "," GG B GG "," GGG D GGG "," GGC CGG "," "," "},
+ {" "," "," C C "," GGGC CGGG "," GGG D GGG "," GG EEEBEEE GG "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G E E G "," G E E G "," CC E E CC "," DB BD "," CC E E CC "," G E E G "," G E E G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," GG EEEBEEE GG "," GGG D GGG "," GGGC CGGG "," C C "," "," "},
+ {" "," "," "," C C "," GGGCCCCCGGG "," GGG D GGG "," GG B GG "," G G "," GG GG "," G G "," G G "," G G "," G G "," G G "," C C "," CC CC "," CDB BDC "," CC CC "," C C "," G G "," G G "," G G "," G G "," G G "," GG GG "," G G "," GG B GG "," GGG D GGG "," GGGCCCCCGGG "," C C "," "," "," "},
+ {" "," "," "," "," C C "," GGGGGC CGGGGG "," GGG D GGG "," GG EEEBEEE GG "," GG GG "," G G "," GG GG "," G G "," G G "," G E E G "," G E E G "," CC E E CC "," DB BD "," CC E E CC "," G E E G "," G E E G "," G G "," G G "," GG GG "," G G "," GG GG "," GG EEEBEEE GG "," GGG D GGG "," GGGGGC CGGGGG "," C C "," "," "," "," "},
+ {" "," "," "," "," "," C C "," GGGCCCCCGGG "," GGG D GGG "," GG B GG "," GG B GG "," G G "," GG GG "," G G "," G G "," C C "," CC CC "," CDBB BBDC "," CC CC "," C C "," G G "," G G "," GG GG "," G G "," GG B GG "," GG B GG "," GGG D GGG "," GGGCCCCCGGG "," C C "," "," "," "," "," "},
+ {" "," "," "," "," "," "," C C "," GGGC CGGG "," GGG D GGG "," GG D GG "," GG GG "," G G "," GG GG "," G G "," G G "," CC CC "," DD DD "," CC CC "," G G "," G G "," GG GG "," G D G "," GG D GG "," GG D GG "," GGG D GGG "," GGGC CGGG "," C C "," "," "," "," "," "," "},
+ {" "," "," "," "," "," "," "," C C "," GGC CGG "," GGGGC CGGGG "," GGG D GGG "," GGG D GGG "," GG DDDDDDD GG "," GG DD DD GG "," GG D EEE D GG "," CCC D EAAAE D CCC "," DDD EAAAE DDD "," CCC D EAAAE D CCC "," GG D EEE D GG "," GG DD DD GG "," GG DDDDDDD GG "," GGG D GGG "," GGG D GGG "," GGGGC CGGGG "," GGC CGG "," C C "," "," "," "," "," "," "," "},
+ {" "," "," "," "," "," "," "," "," "," C C "," GGC CGG "," GGGC CGGG "," GGGGC CGGGG "," GGGGDDDDDGGGG "," GGGDDCDCDDGGG "," CCCCDCCDCCDCCCC "," DDDDDDD "," CCCCDCCDCCDCCCC "," GGGDDCDCDDGGG "," GGGGDDDDDGGGG "," GGGGC CGGGG "," GGGC CGGG "," GGC CGG "," C C "," "," "," "," "," "," "," "," "," "},
+ {" "," "," "," "," "," "," "," "," "," "," "," "," C C "," C C "," C C "," CCCCCCCCC "," C C "," CCCCCCCCC "," C C "," C C "," C C "," "," "," "," "," "," "," "," "," "," "," "," "}
+ }))
+ .addElement('A', ofBlock(sBlockCasingsTT, 10))
+ .addElement('B', ofBlock(sBlockCasingsTT, 11))
+ .addElement('C', ofBlock(sBlockCasingsTT, 12))
+ .addElement('D', ofBlock(sBlockCasingsTT, 13))
+ .addElement('E', ofBlock(sBlockCasingsTT, 14))
+ .addElement('F', ofHatchAdderOptional(GT_MetaTileEntity_EM_bhg::addElementalToMachineList, textureOffset + 4, 2, sBlockCasingsTT, 4))
+ .addElement('G', ofBlock(QuantumGlassBlock.INSTANCE, 0))
+ .addElement('H', ofHatchAdderOptional(GT_MetaTileEntity_EM_bhg::addClassicToMachineList, textureOffset, 1, sBlockCasingsTT, 0))
.build();
@Override
- public IStructureDefinition<? extends GT_MetaTileEntity_MultiblockBase_EM> getStructure_EM() {
+ public IStructureDefinition<GT_MetaTileEntity_EM_bhg> getStructure_EM() {
return STRUCTURE_DEFINITION;
}
@@ -308,7 +306,12 @@ public class GT_MetaTileEntity_EM_bhg extends GT_MetaTileEntity_MultiblockBase_E
@Override
public void construct(ItemStack stackSize, boolean hintsOnly) {
- structureBuild_EM((stackSize.stackSize&1)==1?"t1":"t2", 16, 16, 0, hintsOnly,stackSize);
+ try {
+ structureBuild_EM((stackSize.stackSize & 1) == 1 ? "main_t1" : "main_t2", 16, 16, 0, hintsOnly, stackSize);
+ }
+ catch (Exception e) {
+ e.printStackTrace();
+ }
}
@Override
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_collider.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_collider.java
index 329b3cbc14..49c43d6b4e 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_collider.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_collider.java
@@ -3,7 +3,6 @@ package com.github.technus.tectech.thing.metaTileEntity.multi;
import com.github.technus.tectech.TecTech;
import com.github.technus.tectech.compatibility.thaumcraft.elementalMatter.definitions.dComplexAspectDefinition;
import com.github.technus.tectech.compatibility.thaumcraft.elementalMatter.definitions.ePrimalAspectDefinition;
-import com.github.technus.tectech.mechanics.constructable.IConstructable;
import com.github.technus.tectech.mechanics.elementalMatter.core.cElementalDecayResult;
import com.github.technus.tectech.mechanics.elementalMatter.core.cElementalInstanceStackMap;
import com.github.technus.tectech.mechanics.elementalMatter.core.cElementalMutableDefinitionStackMap;
@@ -12,8 +11,6 @@ import com.github.technus.tectech.mechanics.elementalMatter.core.templates.cElem
import com.github.technus.tectech.mechanics.elementalMatter.definitions.complex.dAtomDefinition;
import com.github.technus.tectech.mechanics.elementalMatter.definitions.complex.dHadronDefinition;
import com.github.technus.tectech.mechanics.elementalMatter.definitions.primitive.eQuarkDefinition;
-import com.github.technus.tectech.mechanics.structure.IStructureDefinition;
-import com.github.technus.tectech.mechanics.structure.StructureDefinition;
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.hatch.GT_MetaTileEntity_Hatch_InputElemental;
@@ -23,6 +20,9 @@ import com.github.technus.tectech.thing.metaTileEntity.multi.base.IStatusFunctio
import com.github.technus.tectech.thing.metaTileEntity.multi.base.Parameters;
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;
@@ -39,12 +39,13 @@ import java.util.HashMap;
import static com.github.technus.tectech.loader.TecTechConfig.DEBUG_MODE;
import static com.github.technus.tectech.mechanics.elementalMatter.core.transformations.bTransformationInfo.AVOGADRO_CONSTANT;
-import static com.github.technus.tectech.mechanics.structure.StructureUtility.*;
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.metaTileEntity.multi.base.LedStatus.*;
import static com.github.technus.tectech.util.DoubleCount.add;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.*;
+import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional;
import static net.minecraft.util.StatCollector.translateToLocal;
/**
@@ -302,49 +303,6 @@ public class GT_MetaTileEntity_EM_collider extends GT_MetaTileEntity_MultiblockB
//region structure
//use multi A energy inputs, use less power the longer it runs
- private static final IStructureDefinition<GT_MetaTileEntity_EM_collider> STRUCTURE_DEFINITION = StructureDefinition
- .<GT_MetaTileEntity_EM_collider>builder()
- .addShapeOldApi("main", new String[][]{
- {"I0A0A0", "I00000", "I0A0A0",},
- {"H0000000", "G001111100", "H0000000",},
- {"F22223332222", "F41155555114", "F22223332222",},
- {"E2000000000002", "E4155111115514", "E2000000000002",},
- {"D20000E00002", "D41511E11514", "D20000E00002",},
- {"C2000I0002", "C4151I1514", "C2000I0002",},
- {"B2000K0002", "B4151K1514", "B2000K0002",},
- {"B200M002", "A0151M1510", "B200M002",},
- {"A0200M0020", "A0151M1510", "A0200M0020",},
- {"0020O0200", "0151O1510", "0020O0200",},
- {"A030O030", "0151O1510", "A030O030",},
- {"0030O0300", "0151O1510", "0030O0300",},
- {"A030O030", "0151O1510", "A030O030",},
- {"0020O0200", "0151O1510", "0020O0200",},
- {"A0200M0020", "A0151M1510", "A0200M0020",},
- {"B200M002", "A0151M1510", "B200M002",},
- {"B2000K0002", "B4151K1514", "B2000K0002",},
- {"C2000I0002", "C4151I1514", "C2000I0002",},
- {"D200002&&&200002", "D415112&.&211514", "D200002&&&200002",},
- {"E20!!22222!!02", "E4155111115514", "E20!!22222!!02",},
- {"F2222#$#2222", "F41155555114", "F2222#$#2222",},
- })
- .addElement('0', ofBlock(sBlockCasingsTT, 4))
- .addElement('1', ofBlock(sBlockCasingsTT, 7))
- .addElement('2', defer(t -> (int) t.eTier, (t, item) -> 2 - (item.stackSize & 1),
- error(), ofBlock(sBlockCasingsTT, 4), ofBlock(sBlockCasingsTT, 5)))
- .addElement('3', ofBlock(QuantumGlassBlock.INSTANCE, 0))
- .addElement('4', defer(t -> (int) t.eTier, (t, item) -> 2 - (item.stackSize & 1),
- error(), ofBlock(sBlockCasingsTT, 4), ofBlock(sBlockCasingsTT, 6)))
- .addElement('5', defer(t -> (int) t.eTier, (t, item) -> 2 - (item.stackSize & 1),
- error(), ofBlock(sBlockCasingsTT, 8), ofBlock(sBlockCasingsTT, 9)))
- .addElement('&', ofHatchAdderOptional(GT_MetaTileEntity_EM_collider::addClassicToMachineList,
- textureOffset, 1, sBlockCasingsTT, 0))
- .addElement('!', ofHatchAdderOptional(GT_MetaTileEntity_EM_collider::addElementalInputToMachineList,
- textureOffset + 4, 2, sBlockCasingsTT, 4))
- .addElement('$', ofHatchAdderOptional(GT_MetaTileEntity_EM_collider::addElementalOutputToMachineList,
- textureOffset + 4, 3, sBlockCasingsTT, 4))
- .addElement('#', ofHatchAdderOptional(GT_MetaTileEntity_EM_collider::addElementalMufflerToMachineList,
- textureOffset + 4, 4, sBlockCasingsTT, 4))
- .build();
private static final String[] description = new String[]{
EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":",
translateToLocal("gt.blockmachines.multimachine.em.collider.hint.0"),//1 - Classic Hatches or High Power Casing
@@ -354,8 +312,27 @@ public class GT_MetaTileEntity_EM_collider extends GT_MetaTileEntity_MultiblockB
translateToLocal("gt.blockmachines.multimachine.em.collider.hint.4"),//General - Another Controller facing opposite direction
};
+ private static final IStructureDefinition<GT_MetaTileEntity_EM_collider> STRUCTURE_DEFINITION =
+ StructureDefinition.<GT_MetaTileEntity_EM_collider>builder()
+ .addShape("main", transpose(new String[][]{
+ {" A A A "," AAAAAAA "," BBBBIIIBBBB "," BAAAAAAAAAAAB "," BAAAA AAAAB "," BAAA AAAB "," BAAA AAAB "," BAA AAB "," ABAA AABA ","AABA ABAA"," AIA AIA ","AAIA AIAA"," AIA AIA ","AABA ABAA"," ABAA AABA "," BAA AAB "," BAAA AAAB "," BAAA AAAB "," BAAAABJJJBAAAAB "," BAHHBBBBBHHAB "," BBBBGFGBBBB "},
+ {" AAAAA "," AADDDDDAA "," CDDEEEEEDDC "," CDEEDDDDDEEDC "," CDEDD DDEDC "," CDED DEDC "," CDED DEDC "," ADED DEDA "," ADED DEDA ","ADED DEDA","ADED DEDA","ADED DEDA","ADED DEDA","ADED DEDA"," ADED DEDA "," ADED DEDA "," CDED DEDC "," CDED DEDC "," CDEDDBJ~JBDDEDC "," CDEEDDDDDEEDC "," CDDEEEEEDDC "},
+ {" A A A "," AAAAAAA "," BBBBIIIBBBB "," BAAAAAAAAAAAB "," BAAAA AAAAB "," BAAA AAAB "," BAAA AAAB "," BAA AAB "," ABAA AABA ","AABA ABAA"," AIA AIA ","AAIA AIAA"," AIA AIA ","AABA ABAA"," ABAA AABA "," BAA AAB "," BAAA AAAB "," BAAA AAAB "," BAAAABJJJBAAAAB "," BAHHBBBBBHHAB "," BBBBGFGBBBB "}
+ }))
+ .addElement('A', ofBlock(sBlockCasingsTT, 4))
+ .addElement('B', defer(t -> (int) t.eTier, (t, item) -> 2 - (item.stackSize & 1), error(), ofBlock(sBlockCasingsTT, 4), ofBlock(sBlockCasingsTT, 5)))
+ .addElement('C', defer(t -> (int) t.eTier, (t, item) -> 2 - (item.stackSize & 1), error(), ofBlock(sBlockCasingsTT, 4), ofBlock(sBlockCasingsTT, 6)))
+ .addElement('D', ofBlock(sBlockCasingsTT, 7))
+ .addElement('E', defer(t -> (int) t.eTier, (t, item) -> 2 - (item.stackSize & 1), error(), ofBlock(sBlockCasingsTT, 8), ofBlock(sBlockCasingsTT, 9)))
+ .addElement('F', ofHatchAdderOptional(GT_MetaTileEntity_EM_collider::addElementalOutputToMachineList, textureOffset + 4, 3, sBlockCasingsTT, 4))
+ .addElement('G', ofHatchAdderOptional(GT_MetaTileEntity_EM_collider::addElementalMufflerToMachineList, textureOffset + 4, 4, sBlockCasingsTT, 4))
+ .addElement('H', ofHatchAdderOptional(GT_MetaTileEntity_EM_collider::addElementalInputToMachineList, textureOffset + 4, 2, sBlockCasingsTT, 4))
+ .addElement('I', ofBlock(QuantumGlassBlock.INSTANCE, 0))
+ .addElement('J', ofHatchAdderOptional(GT_MetaTileEntity_EM_collider::addClassicToMachineList, textureOffset, 1, sBlockCasingsTT, 0))
+ .build();
+
@Override
- public IStructureDefinition<? extends GT_MetaTileEntity_MultiblockBase_EM> getStructure_EM() {
+ public IStructureDefinition<GT_MetaTileEntity_EM_collider> getStructure_EM() {
return STRUCTURE_DEFINITION;
}
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java
index 6a6a707399..31d41fb39e 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java
@@ -1,10 +1,7 @@
package com.github.technus.tectech.thing.metaTileEntity.multi;
import com.github.technus.tectech.TecTech;
-import com.github.technus.tectech.mechanics.constructable.IConstructable;
import com.github.technus.tectech.mechanics.dataTransport.QuantumDataPacket;
-import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder;
-import com.github.technus.tectech.mechanics.structure.Structure;
import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_InputData;
import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_OutputData;
import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_Rack;
@@ -12,7 +9,10 @@ import com.github.technus.tectech.thing.metaTileEntity.multi.base.*;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_RenderedExtendedFacingTexture;
import com.github.technus.tectech.util.CommonValues;
import com.github.technus.tectech.util.Util;
-import com.github.technus.tectech.util.Vec3Impl;
+import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable;
+import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
+import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+import com.gtnewhorizon.structurelib.util.Vec3Impl;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gregtech.api.enums.Textures;
@@ -22,7 +22,6 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase;
-import net.minecraft.block.Block;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
@@ -30,13 +29,15 @@ import net.minecraft.util.ResourceLocation;
import java.util.ArrayList;
-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.metaTileEntity.multi.base.LedStatus.*;
import static com.github.technus.tectech.util.CommonValues.MULTI_CHECK_AT;
import static com.github.technus.tectech.util.CommonValues.V;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose;
+import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional;
import static net.minecraft.util.StatCollector.translateToLocal;
/**
@@ -51,23 +52,44 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB
//endregion
//region structure
- private static final String[][] front = new String[][]{{"A ", "A ", "A. ", "A ",},};
- private static final String[][] terminator = new String[][]{{"A ", "A ", "A ", "A ",},};
- private static final String[][] cap = new String[][]{{"-01", "A22", "A22", "-01",},};
- private static final String[][] slice = new String[][]{{"-01", "A!2", "A!2", "-01",},};
- private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT};
- private static final byte[] blockMeta = new byte[]{2, 1, 3};
- private static final IHatchAdder<GT_MetaTileEntity_EM_computer>[] addingMethods = adders(
- GT_MetaTileEntity_EM_computer::addToMachineList,
- GT_MetaTileEntity_EM_computer::addRackToMachineList);
- private static final short[] casingTextures = new short[]{textureOffset + 1, textureOffset + 3};
- private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT};
- private static final byte[] blockMetaFallback = new byte[]{1, 3};
private static final String[] description = new String[]{
EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":",
translateToLocal("gt.blockmachines.multimachine.em.computer.hint.0"),//1 - Classic/Data Hatches or Computer casing
translateToLocal("gt.blockmachines.multimachine.em.computer.hint.1"),//2 - Rack Hatches or Advanced computer casing
};
+
+ private static final IStructureDefinition<GT_MetaTileEntity_EM_computer> STRUCTURE_DEFINITION =
+ StructureDefinition.<GT_MetaTileEntity_EM_computer>builder()
+ .addShape("front", transpose(new String[][]{
+ {" AA"},
+ {" AA"},
+ {" ~A"},
+ {" AA"}
+ }))
+ .addShape("cap", transpose(new String[][]{
+ {"-CB"},
+ {" DD"},
+ {" DD"},
+ {"-CB"}
+ }))
+ .addShape("slice", transpose(new String[][]{
+ {"-CB"},
+ {" ED"},
+ {" ED"},
+ {"-CB"}
+ }))
+ .addShape("back", transpose(new String[][]{
+ {" AA"},
+ {" AA"},
+ {" AA"},
+ {" AA"}
+ }))
+ .addElement('A', ofHatchAdderOptional(GT_MetaTileEntity_EM_computer::addToMachineList, textureOffset + 1, 1, sBlockCasingsTT, 1))
+ .addElement('B', ofBlock(sBlockCasingsTT, 1))
+ .addElement('C', ofBlock(sBlockCasingsTT, 2))
+ .addElement('D', ofBlock(sBlockCasingsTT, 3))
+ .addElement('E', ofHatchAdderOptional(GT_MetaTileEntity_EM_computer::addRackToMachineList, textureOffset + 3, 2, sBlockCasingsTT, 3))
+ .build();
//endregion
//region parameters
@@ -129,15 +151,15 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB
}
}
eRacks.clear();
- if (!structureCheck_EM(front, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 2, 0)) {
+ if (!structureCheck_EM("front", 1, 2, 0)) {
return false;
}
- if (!structureCheck_EM(cap, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 2, -1)) {
+ if (!structureCheck_EM("cap", 1, 2, -1)) {
return false;
}
byte offset = -2, totalLen = 4;
while (offset > -16) {
- if (!structureCheck_EM(slice, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 2, offset)) {
+ if (!structureCheck_EM("slice", 1, 2, offset)) {
break;
}
totalLen++;
@@ -146,10 +168,10 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB
if (totalLen > 17) {
return false;
}
- if (!structureCheck_EM(cap, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 2, ++offset)) {
+ if (!structureCheck_EM("cap", 1, 2, ++offset)) {
return false;
}
- if (!structureCheck_EM(terminator, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 2, --offset)) {
+ if (!structureCheck_EM("back", 1, 2, --offset)) {
return false;
}
eCertainMode = (byte) Math.min(totalLen / 3, 5);
@@ -246,7 +268,10 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB
@Override
public void outputAfterRecipe_EM() {
if (!eOutputData.isEmpty()) {
- Vec3Impl pos = new Vec3Impl(getBaseMetaTileEntity());
+ Vec3Impl pos = new Vec3Impl(getBaseMetaTileEntity().getXCoord(),
+ getBaseMetaTileEntity().getYCoord(),
+ getBaseMetaTileEntity().getZCoord());
+
QuantumDataPacket pack = new QuantumDataPacket(eAvailableData / eOutputData.size()).unifyTraceWith(pos);
if (pack == null) {
return;
@@ -359,16 +384,21 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB
@Override
public void construct(ItemStack stackSize, boolean hintsOnly) {
IGregTechTileEntity igt = getBaseMetaTileEntity();
- Structure.builder(front, blockType, blockMeta, 1, 2, 0, igt, getExtendedFacing(), hintsOnly);
- Structure.builder(cap, blockType, blockMeta, 1, 2, -1, igt, getExtendedFacing(), hintsOnly);
+ structureBuild_EM("front", 1, 2, 0, hintsOnly, stackSize);
+ structureBuild_EM("cap", 1, 2, -1, hintsOnly, stackSize);
byte offset = -2;
for (int rackSlices = Math.min(stackSize.stackSize, 12); rackSlices > 0; rackSlices--) {
- Structure.builder(slice, blockType, blockMeta, 1, 2, offset--, igt, getExtendedFacing(), hintsOnly);
+ structureBuild_EM("slice", 1 , 2, offset--, hintsOnly, stackSize);
}
- Structure.builder(cap, blockType, blockMeta, 1, 2, offset--, igt, getExtendedFacing(), hintsOnly);
- Structure.builder(terminator, blockType, blockMeta, 1, 2, offset, igt, getExtendedFacing(), hintsOnly);
+ structureBuild_EM("cap", 1, 2, offset--, hintsOnly, stackSize);
+ structureBuild_EM("back", 1, 2, offset, hintsOnly, stackSize);
+ }
+
+ @Override
+ public IStructureDefinition<GT_MetaTileEntity_EM_computer> getStructure_EM() {
+ return STRUCTURE_DEFINITION;
}
@Override
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_crafting.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_crafting.java
index 7d8204c07f..9c631c8af6 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_crafting.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_crafting.java
@@ -1,27 +1,28 @@
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.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose;
+import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional;
import static net.minecraft.util.StatCollector.translateToLocal;
/**
@@ -36,32 +37,30 @@ public class GT_MetaTileEntity_EM_crafting extends GT_MetaTileEntity_MultiblockB
//endregion
//region structure
- private static final String[][] shape = new String[][]{
- {"A000", "0 0", "0 . 0", "0 0", "A000",},
- {"00000", "00000", "00000", "00000", "00000",},
- {"0C0", "A!!!", "A!1!", "A!!!", "0C0",},
- {"22222", "22222", "22122", "22222", "22222",},
- {"23432", "33333", "43134", "33333", "23432",},
- {"23332", "33333", "33533", "33333", "23332",},
- {"23432", "33333", "43134", "33333", "23432",},
- {"22222", "22222", "22122", "22222", "22222",},
- {"0C0", "A!!!", "A!1!", "A!!!", "0C0",},
- {"00000", "00000", "00000", "00000", "00000",},
- {"A000", "0 0", "0 0", "0 0", "A000",},
- };
- private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT, QuantumGlassBlock.INSTANCE, sBlockCasingsTT, sBlockCasingsTT};
- private static final byte[] blockMeta = new byte[]{4, 10, 5, 0, 6, 9};
- private static final IHatchAdder<GT_MetaTileEntity_EM_crafting>[] addingMethods = adders(
- GT_MetaTileEntity_EM_crafting::addClassicToMachineList,
- GT_MetaTileEntity_EM_crafting::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.crafter.hint.0"),//1 - Classic Hatches or High Power Casing
translateToLocal("gt.blockmachines.multimachine.em.crafter.hint.1"),//2 - Elemental Hatches or Molecular Casing
};
+
+ private static final IStructureDefinition<GT_MetaTileEntity_EM_crafting> STRUCTURE_DEFINITION= StructureDefinition
+ .<GT_MetaTileEntity_EM_crafting>builder()
+ .addShape("main", transpose(new String[][]{
+ {" AAA ","AAAAA","A A","BBBBB","BGCGB","BGGGB","BGCGB","BBBBB","A A","AAAAA"," AAA "},
+ {"AHHHA","AAAAA"," FFF ","BBBBB","GGGGG","GGGGG","GGGGG","BBBBB"," FFF ","AAAAA","AHHHA"},
+ {"AH~HA","AAAAA"," FEF ","BBEBB","CGEGC","GGDGG","CGEGC","BBEBB"," FEF ","AAAAA","AHHHA"},
+ {"AHHHA","AAAAA"," FFF ","BBBBB","GGGGG","GGGGG","GGGGG","BBBBB"," FFF ","AAAAA","AHHHA"},
+ {" AAA ","AAAAA","A A","BBBBB","BGCGB","BGGGB","BGCGB","BBBBB","A A","AAAAA"," AAA "}
+ }))
+ .addElement('A', ofBlock(sBlockCasingsTT, 4))
+ .addElement('B', ofBlock(sBlockCasingsTT, 5))
+ .addElement('C', ofBlock(sBlockCasingsTT, 6))
+ .addElement('D', ofBlock(sBlockCasingsTT, 9))
+ .addElement('E', ofBlock(sBlockCasingsTT, 10))
+ .addElement('F', ofHatchAdderOptional(GT_MetaTileEntity_EM_crafting::addElementalToMachineList, textureOffset + 4, 2, sBlockCasingsTT, 4))
+ .addElement('G', ofBlock(QuantumGlassBlock.INSTANCE, 0))
+ .addElement('H', ofHatchAdderOptional(GT_MetaTileEntity_EM_crafting::addClassicToMachineList, textureOffset, 1, sBlockCasingsTT, 0))
+ .build();
//endregion
public GT_MetaTileEntity_EM_crafting(int aID, String aName, String aNameRegional) {
@@ -79,7 +78,7 @@ public class GT_MetaTileEntity_EM_crafting extends GT_MetaTileEntity_MultiblockB
@Override
public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) {
- return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 2, 2, 0);
+ return structureCheck_EM("main", 2, 2, 0);
}
@Override
@@ -109,7 +108,12 @@ public class GT_MetaTileEntity_EM_crafting extends GT_MetaTileEntity_MultiblockB
@Override
public void construct(ItemStack stackSize, boolean hintsOnly) {
- Structure.builder(shape, blockType, blockMeta, 2, 2, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly);
+ structureBuild_EM("main", 2, 2, 0, hintsOnly, stackSize);
+ }
+
+ @Override
+ public IStructureDefinition<GT_MetaTileEntity_EM_crafting> getStructure_EM() {
+ return STRUCTURE_DEFINITION;
}
@Override
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dataBank.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dataBank.java
index 582be290ac..bea2b8a0ba 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dataBank.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dataBank.java
@@ -1,10 +1,7 @@
package com.github.technus.tectech.thing.metaTileEntity.multi;
import com.github.technus.tectech.Reference;
-import com.github.technus.tectech.mechanics.constructable.IConstructable;
import com.github.technus.tectech.mechanics.dataTransport.InventoryDataPacket;
-import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder;
-import com.github.technus.tectech.mechanics.structure.Structure;
import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_InputDataItems;
import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_OutputDataItems;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_Container_MultiMachineEM;
@@ -12,6 +9,9 @@ import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_GUIContaine
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;
@@ -20,7 +20,6 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_DataAccess;
-import net.minecraft.block.Block;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
@@ -28,12 +27,14 @@ import net.minecraft.util.ResourceLocation;
import java.util.ArrayList;
-import static com.github.technus.tectech.mechanics.structure.Structure.adders;
import static com.github.technus.tectech.recipe.TT_recipeAdder.nullItem;
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.util.CommonValues.V;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose;
+import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional;
import static net.minecraft.util.StatCollector.translateToLocal;
public class GT_MetaTileEntity_EM_dataBank extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable {
@@ -43,24 +44,24 @@ public class GT_MetaTileEntity_EM_dataBank extends GT_MetaTileEntity_MultiblockB
//endregion
//region structure
- private static final String[][] shape = new String[][]{
- {"0 0", "0 . 0", "0 0",},
- {"0!!!0", "01110", "0!!!0",},
- {"0!!!0", "0!!!0", "0!!!0",},
- };
- private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT};
- private static final byte[] blockMeta = new byte[]{2, 1};
- private static final IHatchAdder<GT_MetaTileEntity_EM_dataBank>[] addingMethods = adders(
- GT_MetaTileEntity_EM_dataBank::addClassicToMachineList,
- GT_MetaTileEntity_EM_dataBank::addDataBankHatchToMachineList);
- private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 1};
- private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT};
- private static final byte[] blockMetaFallback = new byte[]{0, 1};
private static final String[] description = new String[]{
EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":",
translateToLocal("gt.blockmachines.multimachine.em.databank.hint.0"),//1 - Classic Hatches or high power casing
translateToLocal("gt.blockmachines.multimachine.em.databank.hint.1"),//2 - Data Access/Data Bank Master Hatches or computer casing
};
+
+ private static final IStructureDefinition<GT_MetaTileEntity_EM_dataBank> STRUCTURE_DEFINITION =
+ StructureDefinition.<GT_MetaTileEntity_EM_dataBank>builder()
+ .addShape("main", transpose(new String[][]{
+ {"BCCCB","BDDDB","BDDDB"},
+ {"BC~CB","BAAAB","BDDDB"},
+ {"BCCCB","BDDDB","BDDDB"}
+ }))
+ .addElement('A', ofBlock(sBlockCasingsTT, 1))
+ .addElement('B', ofBlock(sBlockCasingsTT, 2))
+ .addElement('C', ofHatchAdderOptional(GT_MetaTileEntity_EM_dataBank::addClassicToMachineList, textureOffset, 1, sBlockCasingsTT, 0))
+ .addElement('D', ofHatchAdderOptional(GT_MetaTileEntity_EM_dataBank::addDataBankHatchToMachineList, textureOffset + 1, 2, sBlockCasingsTT, 1))
+ .build();
//endregion
public GT_MetaTileEntity_EM_dataBank(int aID, String aName, String aNameRegional) {
@@ -80,7 +81,7 @@ public class GT_MetaTileEntity_EM_dataBank extends GT_MetaTileEntity_MultiblockB
public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) {
eDataAccessHatches.clear();
eStacksDataOutputs.clear();
- return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 2, 1, 0);
+ return structureCheck_EM("main", 2, 1, 0);
}
@Override
@@ -174,7 +175,12 @@ public class GT_MetaTileEntity_EM_dataBank extends GT_MetaTileEntity_MultiblockB
@Override
public void construct(ItemStack stackSize, boolean hintsOnly) {
- Structure.builder(shape, blockType, blockMeta, 2, 1, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly);
+ structureBuild_EM("main", 2, 1, 0, hintsOnly, stackSize);
+ }
+
+ @Override
+ public IStructureDefinition<GT_MetaTileEntity_EM_dataBank> getStructure_EM() {
+ return STRUCTURE_DEFINITION;
}
@Override
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_decay.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_decay.java
index d534b41fec..b3a8e52bbf 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_decay.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_decay.java
@@ -1,10 +1,7 @@
package com.github.technus.tectech.thing.metaTileEntity.multi;
-import com.github.technus.tectech.mechanics.constructable.IConstructable;
import com.github.technus.tectech.mechanics.elementalMatter.core.cElementalInstanceStackMap;
import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.cElementalInstanceStack;
-import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder;
-import com.github.technus.tectech.mechanics.structure.Structure;
import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_EnergyMulti;
import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_InputElemental;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM;
@@ -13,6 +10,9 @@ import com.github.technus.tectech.thing.metaTileEntity.multi.base.IStatusFunctio
import com.github.technus.tectech.thing.metaTileEntity.multi.base.Parameters;
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;
@@ -23,7 +23,6 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energ
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase;
import ic2.core.init.MainConfig;
import ic2.core.util.ConfigUtil;
-import net.minecraft.block.Block;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
@@ -32,13 +31,15 @@ import net.minecraft.util.EnumChatFormatting;
import org.apache.commons.lang3.reflect.FieldUtils;
import static com.github.technus.tectech.mechanics.elementalMatter.core.transformations.bTransformationInfo.AVOGADRO_CONSTANT;
-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.metaTileEntity.multi.base.LedStatus.STATUS_OK;
import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStatus.STATUS_TOO_LOW;
import static com.github.technus.tectech.util.CommonValues.VN;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose;
+import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional;
import static net.minecraft.util.StatCollector.translateToLocal;
import static net.minecraft.util.StatCollector.translateToLocalFormatted;
@@ -58,30 +59,28 @@ public class GT_MetaTileEntity_EM_decay extends GT_MetaTileEntity_MultiblockBase
//endregion
//region structure
- private static final String[][] shape = new String[][]{
- {"0C0", "A ", "A . ", "A ", "0C0",},
- {"00000", "00000", "00000", "00000", "00000",},
- {"0C0", "A!!!", "A!0!", "A!!!", "0C0",},
- {"01110", "12221", "12221", "12221", "01110",},
- {"01310", "12221", "32223", "12221", "01310",},
- {"01110", "12221", "12221", "12221", "01110",},
- {"0C0", "A!!!", "A!0!", "A!!!", "0C0",},
- {"00000", "00000", "00000", "00000", "00000",},
- {"0C0", "A ", "A ", "A ", "0C0",},
- };
- private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT};
- private static final byte[] blockMeta = new byte[]{4, 5, 8, 6};
- private static final IHatchAdder<GT_MetaTileEntity_EM_decay>[] addingMethods = adders(
- GT_MetaTileEntity_EM_decay::addClassicToMachineList,
- GT_MetaTileEntity_EM_decay::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.decay.hint.0"),//1 - Classic Hatches or High Power Casing
translateToLocal("gt.blockmachines.multimachine.em.decay.hint.1"),//2 - Elemental Hatches or Molecular Casing
};
+
+ private static final IStructureDefinition<GT_MetaTileEntity_EM_decay> STRUCTURE_DEFINITION =
+ StructureDefinition.<GT_MetaTileEntity_EM_decay>builder()
+ .addShape("main",transpose(new String[][]{
+ {"A A","AAAAA","A A","ABBBA","ABCBA","ABBBA","A A","AAAAA","A A"},
+ {" FFF ","AAAAA"," EEE ","BDDDB","BDDDB","BDDDB"," EEE ","AAAAA"," FFF "},
+ {" F~F ","AAAAA"," EAE ","BDDDB","CDDDC","BDDDB"," EAE ","AAAAA"," FFF "},
+ {" FFF ","AAAAA"," EEE ","BDDDB","BDDDB","BDDDB"," EEE ","AAAAA"," FFF "},
+ {"A A","AAAAA","A A","ABBBA","ABCBA","ABBBA","A A","AAAAA","A A"}
+ }))
+ .addElement('A', ofBlock(sBlockCasingsTT, 4))
+ .addElement('B', ofBlock(sBlockCasingsTT, 5))
+ .addElement('C', ofBlock(sBlockCasingsTT, 6))
+ .addElement('D', ofBlock(sBlockCasingsTT, 8))
+ .addElement('E', ofHatchAdderOptional(GT_MetaTileEntity_EM_decay::addElementalToMachineList, textureOffset + 4, 2, sBlockCasingsTT, 4))
+ .addElement('F', ofHatchAdderOptional(GT_MetaTileEntity_EM_decay::addClassicToMachineList, textureOffset, 1, sBlockCasingsTT, 0))
+ .build();
//endregion
//region parameters
@@ -110,7 +109,7 @@ public class GT_MetaTileEntity_EM_decay extends GT_MetaTileEntity_MultiblockBase
@Override
public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) {
- return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 2, 2, 0);
+ return structureCheck_EM("main", 2, 2, 0);
}
@Override
@@ -248,7 +247,12 @@ public class GT_MetaTileEntity_EM_decay extends GT_MetaTileEntity_MultiblockBase
@Override
public void construct(ItemStack stackSize, boolean hintsOnly) {
- Structure.builder(shape, blockType, blockMeta, 2, 2, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly);
+ structureBuild_EM("main", 2, 2, 0, hintsOnly, stackSize);
+ }
+
+ @Override
+ public IStructureDefinition<GT_MetaTileEntity_EM_decay> getStructure_EM() {
+ return STRUCTURE_DEFINITION;
}
@Override
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dequantizer.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dequantizer.java
index 9814092710..f0dca07f9c 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dequantizer.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dequantizer.java
@@ -1,23 +1,22 @@
package com.github.technus.tectech.thing.metaTileEntity.multi;
-import com.github.technus.tectech.mechanics.constructable.IConstructable;
import com.github.technus.tectech.mechanics.elementalMatter.core.cElementalInstanceStackMap;
import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.cElementalInstanceStack;
import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.iHasElementalDefinition;
import com.github.technus.tectech.mechanics.elementalMatter.core.transformations.aFluidDequantizationInfo;
import com.github.technus.tectech.mechanics.elementalMatter.core.transformations.aItemDequantizationInfo;
import com.github.technus.tectech.mechanics.elementalMatter.core.transformations.aOredictDequantizationInfo;
-import com.github.technus.tectech.mechanics.structure.Structure;
-import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder;
import com.github.technus.tectech.thing.block.QuantumGlassBlock;
import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_InputElemental;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM;
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.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import net.minecraft.block.Block;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.ResourceLocation;
@@ -29,10 +28,14 @@ import java.util.ArrayList;
import static com.github.technus.tectech.mechanics.elementalMatter.core.templates.iElementalDefinition.STABLE_RAW_LIFE_TIME;
import static com.github.technus.tectech.mechanics.elementalMatter.definitions.complex.dAtomDefinition.refMass;
import static com.github.technus.tectech.mechanics.elementalMatter.definitions.complex.dAtomDefinition.refUnstableMass;
-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.thing.casing.TT_Container_Casings.sHintCasingsTT;
import static com.github.technus.tectech.util.CommonValues.V;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose;
+import static gregtech.api.util.GT_StructureUtility.ofHatchAdder;
+import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional;
import static net.minecraft.util.StatCollector.translateToLocal;
/**
@@ -41,21 +44,22 @@ import static net.minecraft.util.StatCollector.translateToLocal;
public class GT_MetaTileEntity_EM_dequantizer 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[][]{
- {" ", " . ", " ",},
- {"010", "111", "010",},
- {"\"\"\"", "\"1\"", "\"\"\"",},
- {"121", "2!2", "121",},
- };
- private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT, QuantumGlassBlock.INSTANCE};
- private static final byte[] blockMeta = new byte[]{0, 4, 0};
- private static final IHatchAdder<GT_MetaTileEntity_EM_dequantizer>[] addingMethods = adders(
- GT_MetaTileEntity_EM_dequantizer::addClassicToMachineList,
- GT_MetaTileEntity_EM_dequantizer::addElementalInputToMachineList,
- GT_MetaTileEntity_EM_dequantizer::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 IStructureDefinition<GT_MetaTileEntity_EM_dequantizer> STRUCTURE_DEFINITION =
+ StructureDefinition.<GT_MetaTileEntity_EM_dequantizer>builder()
+ .addShape("main", transpose(new String[][]{
+ {"CCC","ABA","EEE","BDB"},
+ {"C~C","BBB","EBE","DFD"},
+ {"CCC","ABA","EEE","BDB"}
+ }))
+ .addElement('A', ofBlock(sBlockCasingsTT, 0))
+ .addElement('B', ofBlock(sBlockCasingsTT, 4))
+ .addElement('C', ofHatchAdderOptional(GT_MetaTileEntity_EM_dequantizer::addClassicToMachineList, textureOffset, 1, sBlockCasingsTT, 0))
+ .addElement('D', ofBlock(QuantumGlassBlock.INSTANCE, 0))
+ .addElement('E', ofHatchAdderOptional(GT_MetaTileEntity_EM_dequantizer::addElementalMufflerToMachineList, textureOffset + 4, 3, sBlockCasingsTT, 4))
+ .addElement('F', ofHatchAdder(GT_MetaTileEntity_EM_dequantizer::addElementalInputToMachineList, textureOffset + 4, sHintCasingsTT, 1))
+ .build();
+
private static final String[] description = new String[]{
EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":",
translateToLocal("gt.blockmachines.multimachine.em.emtomatter.hint.0"),//1 - Classic Hatches or High Power Casing"
@@ -92,7 +96,7 @@ public class GT_MetaTileEntity_EM_dequantizer extends GT_MetaTileEntity_Multiblo
@Override
public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) {
- return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 1, 0);
+ return structureCheck_EM("main", 1, 1, 0);
}
@Override
@@ -155,7 +159,12 @@ public class GT_MetaTileEntity_EM_dequantizer extends GT_MetaTileEntity_Multiblo
@Override
public void construct(ItemStack stackSize, boolean hintsOnly) {
- Structure.builder(shape, blockType, blockMeta, 1, 1, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly);
+ structureBuild_EM("main", 1, 1, 0, hintsOnly, stackSize);
+ }
+
+ @Override
+ public IStructureDefinition<GT_MetaTileEntity_EM_dequantizer> getStructure_EM() {
+ return STRUCTURE_DEFINITION;
}
@Override
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_infuser.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_infuser.java
index 82fd2df5ed..18416e70f6 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_infuser.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_infuser.java
@@ -3,20 +3,19 @@ package com.github.technus.tectech.thing.metaTileEntity.multi;
import cofh.api.energy.IEnergyContainerItem;
import com.github.technus.tectech.Reference;
import com.github.technus.tectech.TecTech;
-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.metaTileEntity.multi.base.GT_Container_MultiMachineEM;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_GUIContainer_MultiMachineEM;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM;
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.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import ic2.api.item.ElectricItem;
import ic2.api.item.IElectricItem;
-import net.minecraft.block.Block;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
@@ -24,10 +23,12 @@ import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.ResourceLocation;
import static com.github.technus.tectech.loader.TecTechConfig.DEBUG_MODE;
-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.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose;
import static gregtech.api.GregTech_API.mEUtoRF;
+import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional;
import static net.minecraft.util.StatCollector.translateToLocal;
/**
@@ -35,22 +36,24 @@ import static net.minecraft.util.StatCollector.translateToLocal;
*/
public class GT_MetaTileEntity_EM_infuser extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable {
//region structure
- private static final String[][] shape = new String[][]{
- {" ", "000", "1.1", "000", " ",},
- {" ", "010", "111", "010", " ",},
- {" ", "000", "111", "000", " ",},
- };
- private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT};
- private static final byte[] blockMeta = new byte[]{7, 4};
- private static final IHatchAdder<GT_MetaTileEntity_EM_infuser>[] addingMethods = adders(
- GT_MetaTileEntity_EM_infuser::addClassicToMachineList);
- private static final short[] casingTextures = new short[]{textureOffset};
- private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT};
- private static final byte[] blockMetaFallback = new byte[]{0};
private static final String[] description = new String[]{
EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":",
translateToLocal("gt.blockmachines.multimachine.em.infuser.hint"),//1 - Classic Hatches or High Power Casing
};
+
+ private static final IStructureDefinition<GT_MetaTileEntity_EM_infuser> STRUCTURE_DEFINITION =
+ StructureDefinition.<GT_MetaTileEntity_EM_infuser>builder()
+ .addShape("main", transpose(new String[][]{
+ {"CCC","CCC","CCC"},
+ {"BBB","BAB","BBB"},
+ {"A~A","AAA","AAA"},
+ {"BBB","BAB","BBB"},
+ {"CCC","CCC","CCC"}
+ }))
+ .addElement('A', ofBlock(sBlockCasingsTT, 4))
+ .addElement('B', ofBlock(sBlockCasingsTT, 7))
+ .addElement('C', ofHatchAdderOptional(GT_MetaTileEntity_EM_infuser::addClassicToMachineList, textureOffset, 1, sBlockCasingsTT, 0))
+ .build();
//endregion
public GT_MetaTileEntity_EM_infuser(int aID, String aName, String aNameRegional) {
@@ -114,7 +117,7 @@ public class GT_MetaTileEntity_EM_infuser extends GT_MetaTileEntity_MultiblockBa
@Override
public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) {
- return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 2, 0);
+ return structureCheck_EM("main", 1, 2, 0);
}
@Override
@@ -185,7 +188,12 @@ public class GT_MetaTileEntity_EM_infuser extends GT_MetaTileEntity_MultiblockBa
@Override
public void construct(ItemStack stackSize, boolean hintsOnly) {
- Structure.builder(shape, blockType, blockMeta, 1, 2, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly);
+ structureBuild_EM("main", 1, 2, 0, hintsOnly, stackSize);
+ }
+
+ @Override
+ public IStructureDefinition<GT_MetaTileEntity_EM_infuser> getStructure_EM() {
+ return STRUCTURE_DEFINITION;
}
@Override
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_junction.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_junction.java
index b63079d2dc..53cf072293 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_junction.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_junction.java
@@ -1,8 +1,5 @@
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.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_InputElemental;
import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_OutputElemental;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM;
@@ -10,19 +7,21 @@ import com.github.technus.tectech.thing.metaTileEntity.multi.base.INameFunction;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.IStatusFunction;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.Parameters;
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 gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.util.GT_Utility;
-import net.minecraft.block.Block;
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.TT_Container_Casings.sBlockCasingsTT;
import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStatus.*;
import static com.github.technus.tectech.util.CommonValues.V;
-import static gregtech.api.enums.GT_Values.E;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock;
+import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional;
import static net.minecraft.util.StatCollector.translateToLocal;
/**
@@ -31,32 +30,32 @@ import static net.minecraft.util.StatCollector.translateToLocal;
public class GT_MetaTileEntity_EM_junction 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[][]{
- {" ", " . ", " ",},
- {"000", "000", "000",},
- {"!!!", "!0!", "!!!",},
- {"!!!", "!!!", "!!!",},
- };
- private static final String[][] shapeBig = new String[][]{
- {E, "A ", "A . ", "A ",},
- {"A!!!", "!000!", "!010!", "!000!", "A!!!",},
- {"!!!!!", "!000!", "!000!", "!000!", "!!!!!",},
- {"A!!!", "!000!", "!000!", "!000!", "A!!!",},
- {"A!!!", "!!!!!", "!!!!!", "!!!!!", "A!!!",},
- };
- private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT};
- private static final byte[] blockMeta = new byte[]{4, 5};
- private static final IHatchAdder<GT_MetaTileEntity_EM_junction>[] addingMethods = adders(
- GT_MetaTileEntity_EM_junction::addClassicToMachineList,
- GT_MetaTileEntity_EM_junction::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.junction.hint.0"),//1 - Classic Hatches or High Power Casing
translateToLocal("gt.blockmachines.multimachine.em.junction.hint.1"),//2 - Elemental Hatches or Molecular Casing
};
+
+ private static final IStructureDefinition<GT_MetaTileEntity_EM_junction> STRUCTURE_DEFINITION =
+ StructureDefinition.<GT_MetaTileEntity_EM_junction>builder()
+ .addShape("main", new String[][]{
+ {"CCC", "C~C", "CCC"},
+ {"AAA", "AAA", "AAA"},
+ {"DDD", "DAD", "DDD"},
+ {"DDD", "DDD", "DDD"}
+ })
+ .addShape("mainBig", new String[][]{
+ {" ", " CCC ", " C~C ", " CCC ", " "},
+ {" DDD ", "DAAAD", "DABAD", "DAAAD", " DDD "},
+ {"DDDDD", "DAAAD", "DAAAD", "DAAAD", "DDDDD"},
+ {" DDD ", "DAAAD", "DAAAD", "DAAAD", " DDD "},
+ {" DDD ", "DDDDD", "DDDDD", "DDDDD", " DDD "}
+ })
+ .addElement('A', ofBlock(sBlockCasingsTT, 4))
+ .addElement('B', ofBlock(sBlockCasingsTT, 5))
+ .addElement('C', ofHatchAdderOptional(GT_MetaTileEntity_EM_junction::addClassicToMachineList, textureOffset, 1, sBlockCasingsTT, 0))
+ .addElement('D', ofHatchAdderOptional(GT_MetaTileEntity_EM_junction::addElementalToMachineList, textureOffset + 4, 2, sBlockCasingsTT, 4))
+ .build();
//endregion
//region parameters
@@ -106,9 +105,9 @@ public class GT_MetaTileEntity_EM_junction extends GT_MetaTileEntity_MultiblockB
public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) {
int meta = iGregTechTileEntity.getMetaIDAtSide(GT_Utility.getOppositeSide(iGregTechTileEntity.getFrontFacing()));
if (meta == 4) {
- return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 1, 0);
+ return structureCheck_EM("main", 1, 1, 0);
} else if (meta == 5) {
- return structureCheck_EM(shapeBig, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 2, 2, 0);
+ return structureCheck_EM("mainBig", 2, 2, 0);
}
return false;
}
@@ -177,7 +176,16 @@ public class GT_MetaTileEntity_EM_junction extends GT_MetaTileEntity_MultiblockB
@Override
public void construct(ItemStack stackSize, boolean hintsOnly) {
- Structure.builder(shape, blockType, blockMeta, 1, 1, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly);
+ if ((stackSize.stackSize & 1) == 1) {
+ structureBuild_EM("main", 1, 1, 0, hintsOnly, stackSize);
+ } else {
+ structureBuild_EM("mainBig", 2, 2, 0, hintsOnly, stackSize);
+ }
+ }
+
+ @Override
+ public IStructureDefinition<GT_MetaTileEntity_EM_junction> getStructure_EM() {
+ return STRUCTURE_DEFINITION;
}
@Override
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_quantizer.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_quantizer.java
index d6ab35cd4b..5b6b2c18e7 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_quantizer.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_quantizer.java
@@ -2,7 +2,6 @@ package com.github.technus.tectech.thing.metaTileEntity.multi;
import com.github.technus.tectech.Reference;
import com.github.technus.tectech.TecTech;
-import com.github.technus.tectech.mechanics.constructable.IConstructable;
import com.github.technus.tectech.mechanics.elementalMatter.core.cElementalInstanceStackMap;
import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.cElementalInstanceStack;
import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.iHasElementalDefinition;
@@ -10,17 +9,17 @@ import com.github.technus.tectech.mechanics.elementalMatter.core.transformations
import com.github.technus.tectech.mechanics.elementalMatter.core.transformations.aItemQuantizationInfo;
import com.github.technus.tectech.mechanics.elementalMatter.core.transformations.aOredictQuantizationInfo;
import com.github.technus.tectech.mechanics.elementalMatter.core.transformations.bTransformationInfo;
-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.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.GregTech_API;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import net.minecraft.block.Block;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.ResourceLocation;
@@ -34,13 +33,16 @@ import static com.github.technus.tectech.mechanics.elementalMatter.core.template
import static com.github.technus.tectech.mechanics.elementalMatter.core.templates.iElementalDefinition.STABLE_RAW_LIFE_TIME;
import static com.github.technus.tectech.mechanics.elementalMatter.definitions.complex.dAtomDefinition.refMass;
import static com.github.technus.tectech.mechanics.elementalMatter.definitions.complex.dAtomDefinition.refUnstableMass;
-import static com.github.technus.tectech.mechanics.structure.Structure.adders;
import static com.github.technus.tectech.recipe.TT_recipeAdder.nullFluid;
import static com.github.technus.tectech.recipe.TT_recipeAdder.nullItem;
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.github.technus.tectech.util.Util.isInputEqual;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose;
+import static gregtech.api.util.GT_StructureUtility.ofHatchAdder;
+import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional;
import static net.minecraft.util.StatCollector.translateToLocal;
/**
@@ -49,21 +51,21 @@ import static net.minecraft.util.StatCollector.translateToLocal;
public class GT_MetaTileEntity_EM_quantizer 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[][]{
- {" ", " . ", " ",},
- {"010", "101", "010",},
- {"\"\"\"", "\"0\"", "\"\"\"",},
- {"202", "0!0", "202",},
- };
- private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT, QuantumGlassBlock.INSTANCE};
- private static final byte[] blockMeta = new byte[]{4, 0, 0};
- private static final IHatchAdder<GT_MetaTileEntity_EM_quantizer>[] addingMethods = adders(
- GT_MetaTileEntity_EM_quantizer::addClassicToMachineList,
- GT_MetaTileEntity_EM_quantizer::addElementalOutputToMachineList,
- GT_MetaTileEntity_EM_quantizer::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 IStructureDefinition<GT_MetaTileEntity_EM_quantizer> STRUCTURE_DEFINITION =
+ StructureDefinition.<GT_MetaTileEntity_EM_quantizer>builder()
+ .addShape("main", transpose(new String[][]{
+ {"CCC","BAB","EEE","DBD"},
+ {"C~C","ABA","EBE","BFB"},
+ {"CCC","BAB","EEE","DBD"}
+ }))
+ .addElement('A', ofBlock(sBlockCasingsTT, 0))
+ .addElement('B', ofBlock(sBlockCasingsTT, 4))
+ .addElement('C', ofHatchAdderOptional(GT_MetaTileEntity_EM_quantizer::addClassicToMachineList, textureOffset, 1, sBlockCasingsTT, 0))
+ .addElement('D', ofBlock(QuantumGlassBlock.INSTANCE, 0))
+ .addElement('E', ofHatchAdderOptional(GT_MetaTileEntity_EM_quantizer::addElementalMufflerToMachineList, textureOffset + 4, 3, sBlockCasingsTT, 4))
+ .addElement('F', ofHatchAdder(GT_MetaTileEntity_EM_quantizer::addElementalOutputToMachineList,textureOffset + 4, 2))
+ .build();
+
private static final String[] description = new String[]{
EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":",
translateToLocal("gt.blockmachines.multimachine.em.mattertoem.hint.0"),//1 - Classic Hatches or High Power Casing
@@ -87,7 +89,7 @@ public class GT_MetaTileEntity_EM_quantizer extends GT_MetaTileEntity_Multiblock
@Override
public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) {
- return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 1, 0);
+ return structureCheck_EM("main", 1, 1, 0);
}
@Override
@@ -199,7 +201,12 @@ public class GT_MetaTileEntity_EM_quantizer extends GT_MetaTileEntity_Multiblock
@Override
public void construct(ItemStack stackSize, boolean hintsOnly) {
- Structure.builder(shape, blockType, blockMeta, 1, 1, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly);
+ structureBuild_EM("main", 1, 1, 0, hintsOnly, stackSize);
+ }
+
+ @Override
+ public IStructureDefinition<GT_MetaTileEntity_EM_quantizer> getStructure_EM() {
+ return STRUCTURE_DEFINITION;
}
@Override
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java
index 889b4cfec3..9f3068aca8 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java
@@ -1,14 +1,14 @@
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.recipe.TT_recipe;
import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_EnergyMulti;
import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_Holder;
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.common.registry.GameRegistry;
import gregtech.api.enums.ItemList;
import gregtech.api.enums.Textures;
@@ -22,10 +22,8 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockB
import gregtech.api.util.GT_LanguageManager;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
-import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
-import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
@@ -36,7 +34,6 @@ import org.apache.commons.lang3.reflect.FieldUtils;
import java.util.ArrayList;
import java.util.LinkedHashMap;
-import static com.github.technus.tectech.mechanics.structure.Structure.adders;
import static com.github.technus.tectech.recipe.TT_recipe.E_RECIPE_ID;
import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset;
import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage;
@@ -45,7 +42,10 @@ import static com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileE
import static com.github.technus.tectech.thing.metaTileEntity.multi.em_machine.GT_MetaTileEntity_EM_machine.machine;
import static com.github.technus.tectech.util.CommonValues.V;
import static com.github.technus.tectech.util.CommonValues.VN;
-import static gregtech.api.enums.GT_Values.E;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose;
+import static gregtech.api.util.GT_StructureUtility.ofHatchAdder;
+import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional;
import static net.minecraft.util.StatCollector.translateToLocal;
import static net.minecraft.util.StatCollector.translateToLocalFormatted;
@@ -64,32 +64,33 @@ public class GT_MetaTileEntity_EM_research extends GT_MetaTileEntity_MultiblockB
private static LinkedHashMap<String, String> lServerNames;
- private String clientLocale = "en_US";
- //endregion
-
- //region structure
- private static final String[][] shape = new String[][]{
- {E, "000", E, E, E, "000"/*,E,*/},
- {"A0", "010", "A1", "A!", "A1", "010", "A0",},
- {"A0", "010", E, E, E, "010", "A0",},
- {"000", "010", E, E, E, "010", "000",},
- {"000", "212", "010", "0.0", "010", "212", "000",},
- {"000", "212", "111", "111", "111", "212", "000",},
- {"000", "222", " ", " ", " ", "222", "000",},
- };
- private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT};
- private static final byte[] blockMeta = new byte[]{1, 3, 2};
- private static final IHatchAdder<GT_MetaTileEntity_EM_research>[] addingMethods = adders(
- GT_MetaTileEntity_EM_research::addClassicToMachineList,
- GT_MetaTileEntity_EM_research::addHolderToMachineList);
- private static final short[] casingTextures = new short[]{textureOffset + 1, textureOffset + 3};
- private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, Blocks.air};
- private static final byte[] blockMetaFallback = new byte[]{1, 0};
private static final String[] description = new String[]{
EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":",
translateToLocal("gt.blockmachines.multimachine.em.research.hint.0"),//1 - Classic/Data Hatches or Computer casing
translateToLocal("gt.blockmachines.multimachine.em.research.hint.1"),//2 - Holder Hatch
};
+
+ private String clientLocale = "en_US";
+ //endregion
+
+ //region structure
+ private static final IStructureDefinition<GT_MetaTileEntity_EM_research> STRUCTURE_DEFINITION =
+ StructureDefinition.<GT_MetaTileEntity_EM_research>builder()
+ .addShape("main", transpose(new String[][]{
+ {" ", " A ", " A ", "AAA", "AAA", "AAA", "AAA"},
+ {"AAA", "ACA", "ACA", "ACA", "BCB", "BCB", "BBB"},
+ {" ", " C ", " ", " ", "ACA", "CCC", "DDD"},
+ {" ", " E ", " ", " ", "A~A", "CCC", "DDD"},
+ {" ", " C ", " ", " ", "ACA", "CCC", "DDD"},
+ {"AAA", "ACA", "ACA", "ACA", "BCB", "BCB", "BBB"},
+ {" ", " A ", " A ", "AAA", "AAA", "AAA", "AAA"}
+ }))
+ .addElement('A', ofBlock(sBlockCasingsTT, 1))
+ .addElement('B', ofBlock(sBlockCasingsTT, 2))
+ .addElement('C', ofBlock(sBlockCasingsTT, 3))
+ .addElement('D', ofHatchAdderOptional(GT_MetaTileEntity_EM_research::addClassicToMachineList, textureOffset + 1,1, sBlockCasingsTT,1))
+ .addElement('E', ofHatchAdder(GT_MetaTileEntity_EM_research::addHolderToMachineList, 3, 2))
+ .build();
//endregion
public GT_MetaTileEntity_EM_research(int aID, String aName, String aNameRegional) {
@@ -262,7 +263,7 @@ public class GT_MetaTileEntity_EM_research extends GT_MetaTileEntity_MultiblockB
}
eHolders.clear();
- if (!structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 3, 4)) {
+ if (!structureCheck_EM("main", 1, 3, 4)) {
return false;
}
@@ -559,7 +560,12 @@ public class GT_MetaTileEntity_EM_research extends GT_MetaTileEntity_MultiblockB
@Override
public void construct(ItemStack stackSize, boolean hintsOnly) {
- Structure.builder(shape, blockType, blockMeta, 1, 3, 4, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly);
+ structureBuild_EM("main", 1, 3, 4, hintsOnly, stackSize);
+ }
+
+ @Override
+ public IStructureDefinition<GT_MetaTileEntity_EM_research> getStructure_EM() {
+ return STRUCTURE_DEFINITION;
}
@Override
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_scanner.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_scanner.java
index b418ec0fa4..20f4fd5d28 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_scanner.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_scanner.java
@@ -1,13 +1,10 @@
package com.github.technus.tectech.thing.metaTileEntity.multi;
import com.github.technus.tectech.TecTech;
-import com.github.technus.tectech.mechanics.constructable.IConstructable;
import com.github.technus.tectech.mechanics.elementalMatter.core.cElementalInstanceStackMap;
import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.cElementalDefinitionStack;
import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.cElementalInstanceStack;
import com.github.technus.tectech.mechanics.elementalMatter.core.tElementalException;
-import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder;
-import com.github.technus.tectech.mechanics.structure.Structure;
import com.github.technus.tectech.recipe.TT_recipe;
import com.github.technus.tectech.thing.CustomItemList;
import com.github.technus.tectech.thing.block.QuantumGlassBlock;
@@ -16,6 +13,9 @@ import com.github.technus.tectech.thing.item.ElementalDefinitionScanStorage_EM;
import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_EnergyMulti;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.*;
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 gregtech.api.enums.ItemList;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
@@ -36,7 +36,6 @@ import org.apache.commons.lang3.reflect.FieldUtils;
import static com.github.technus.tectech.loader.TecTechConfig.DEBUG_MODE;
import static com.github.technus.tectech.mechanics.elementalMatter.definitions.primitive.cPrimitiveDefinition.nbtE__;
-import static com.github.technus.tectech.mechanics.structure.Structure.adders;
import static com.github.technus.tectech.recipe.TT_recipe.E_RECIPE_ID;
import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset;
import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT;
@@ -45,6 +44,10 @@ import static com.github.technus.tectech.thing.metaTileEntity.multi.em_machine.G
import static com.github.technus.tectech.util.CommonValues.V;
import static com.github.technus.tectech.util.CommonValues.VN;
import static com.github.technus.tectech.util.Util.areBitsSet;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose;
+import static gregtech.api.util.GT_StructureUtility.ofHatchAdder;
+import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional;
import static net.minecraft.util.StatCollector.translateToLocal;
import static net.minecraft.util.StatCollector.translateToLocalFormatted;
@@ -69,26 +72,6 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa
//endregion
//region structure
- private static final String[][] shape = new String[][]{
- {" ", " 222 ", " 2.2 ", " 222 ", " ",},
- {"00000", "00000", "00000", "00000", "00000",},
- {"00100", "01110", "11111", "01110", "00100",},
- {"01110", "1---1", "1---1", "1---1", "01110",},
- {"01110", "1---1", "1-A-1", "1---1", "01110",},
- {"01110", "1---1", "1---1", "1---1", "01110",},
- {"00100", "01110", "11\"11", "01110", "00100",},
- {"#####", "#000#", "#0!0#", "#000#", "#####",},
- };
- private static final Block[] blockType = new Block[]{sBlockCasingsTT, QuantumGlassBlock.INSTANCE, sBlockCasingsTT};
- private static final byte[] blockMeta = new byte[]{4, 0, 0};
- private static final IHatchAdder<GT_MetaTileEntity_EM_scanner>[] addingMethods = adders(
- GT_MetaTileEntity_EM_scanner::addClassicToMachineList,
- GT_MetaTileEntity_EM_scanner::addElementalInputToMachineList,
- GT_MetaTileEntity_EM_scanner::addElementalOutputToMachineList,
- GT_MetaTileEntity_EM_scanner::addElementalMufflerToMachineList);
- private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 4, textureOffset + 4, textureOffset + 4};
- private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT};
- private static final byte[] blockMetaFallback = new byte[]{0, 4, 4, 4};
private static final String[] description = new String[]{
EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":",
translateToLocal("gt.blockmachines.multimachine.em.scanner.hint.0"),//1 - Classic Hatches or High Power Casing
@@ -96,6 +79,24 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa
translateToLocal("gt.blockmachines.multimachine.em.scanner.hint.2"),//3 - Elemental Output Hatches or Molecular Casing
translateToLocal("gt.blockmachines.multimachine.em.scanner.hint.3"),//4 - Elemental Overflow Hatches or Molecular Casing
};
+
+ private static final IStructureDefinition<GT_MetaTileEntity_EM_scanner> STRUCTURE_DEFINITION =
+ StructureDefinition.<GT_MetaTileEntity_EM_scanner>builder()
+ .addShape("main", transpose(new String[][]{
+ {"CCCCC","BBBBB","BBDBB","BDDDB","BDDDB","BDDDB","BBDBB","EEEEE"},
+ {"CAAAC","BBBBB","BDDDB","D---D","D---D","D---D","BDDDB","EBBBE"},
+ {"CA~AC","BBBBB","DDDDD","D---D","D---D","D---D","DDGDD","EBFBE"},
+ {"CAAAC","BBBBB","BDDDB","D---D","D---D","D---D","BDDDB","EBBBE"},
+ {"CCCCC","BBBBB","BBDBB","BDDDB","BDDDB","BDDDB","BBDBB","EEEEE"}
+ }))
+ .addElement('A', ofBlock(sBlockCasingsTT, 0))
+ .addElement('B', ofBlock(sBlockCasingsTT, 4))
+ .addElement('C', ofHatchAdderOptional(GT_MetaTileEntity_EM_scanner::addClassicToMachineList, textureOffset, 1, sBlockCasingsTT, 0))
+ .addElement('D', ofBlock(QuantumGlassBlock.INSTANCE, 0))
+ .addElement('E', ofHatchAdderOptional(GT_MetaTileEntity_EM_scanner::addElementalMufflerToMachineList, textureOffset + 4, 4, sBlockCasingsTT, 4))
+ .addElement('F', ofHatchAdder(GT_MetaTileEntity_EM_scanner::addElementalInputToMachineList, textureOffset + 4, 2))
+ .addElement('G', ofHatchAdder(GT_MetaTileEntity_EM_scanner::addElementalOutputToMachineList, textureOffset + 4, 3))
+ .build();
//endregion
//region parameters
@@ -108,9 +109,12 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa
return LedStatus.STATUS_WRONG;
}
v = (int) v;
- if (v == 0) return LedStatus.STATUS_NEUTRAL;
- if (v >= SCAN_GET_CLASS_TYPE) return LedStatus.STATUS_TOO_HIGH;
- if (v < 0) return LedStatus.STATUS_TOO_LOW;
+ if (v == 0)
+ return LedStatus.STATUS_NEUTRAL;
+ if (v >= SCAN_GET_CLASS_TYPE)
+ return LedStatus.STATUS_TOO_HIGH;
+ if (v < 0)
+ return LedStatus.STATUS_TOO_LOW;
return LedStatus.STATUS_OK;
};
protected Parameters.Group.ParameterIn[] scanConfiguration;
@@ -209,7 +213,7 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa
@Override
public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) {
- if (!structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 2, 2, 0)) {
+ if (!structureCheck_EM("main", 2, 2, 0)) {
return false;
}
return eInputHatches.size() == 1 && eOutputHatches.size() == 1 && eOutputHatches.get(0).getBaseMetaTileEntity().getFrontFacing() == iGregTechTileEntity.getFrontFacing();
@@ -516,7 +520,12 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa
@Override
public void construct(ItemStack stackSize, boolean hintsOnly) {
- Structure.builder(shape, blockType, blockMeta, 2, 2, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly);
+ structureBuild_EM("main", 2, 2, 0, hintsOnly, stackSize);
+ }
+
+ @Override
+ public IStructureDefinition<GT_MetaTileEntity_EM_scanner> getStructure_EM() {
+ return STRUCTURE_DEFINITION;
}
@Override
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_stabilizer.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_stabilizer.java
index dcd85af99d..0ff238e4c3 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_stabilizer.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_stabilizer.java
@@ -1,20 +1,21 @@
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.util.CommonValues;
+import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable;
+import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
+import com.gtnewhorizon.structurelib.structure.StructureDefinition;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import net.minecraft.block.Block;
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.TT_Container_Casings.sBlockCasingsTT;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose;
+import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional;
import static net.minecraft.util.StatCollector.translateToLocal;
/**
@@ -22,26 +23,29 @@ import static net.minecraft.util.StatCollector.translateToLocal;
*/
public class GT_MetaTileEntity_EM_stabilizer extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable {
//region structure
- private static final String[][] shape = new String[][]{
- {"A010", "0 0", "1 . 1", "0 0", "A010",},
- {"23232", "32223", "22222", "32223", "23232",},
- {"12!21", "22422", "!444!", "22422", "12!21",},
- {"23232", "32223", "22222", "32223", "23232",},
- {"A010", "0 0", "1 1", "0 0", "A010",},
- };
- private static final Block[] blockType = new Block[]{sBlockCasingsTT, QuantumGlassBlock.INSTANCE, sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT};
- private static final byte[] blockMeta = new byte[]{4, 0, 5, 6, 9};
- private static final IHatchAdder<GT_MetaTileEntity_EM_stabilizer>[] addingMethods = adders(
- GT_MetaTileEntity_EM_stabilizer::addClassicToMachineList,
- GT_MetaTileEntity_EM_stabilizer::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.stabilizer.hint.0"),//1 - Classic Hatches or High Power Casing
translateToLocal("gt.blockmachines.multimachine.em.stabilizer.hint.1"),//2 - Elemental Hatches or Molecular Casing
};
+
+ private static final IStructureDefinition<GT_MetaTileEntity_EM_stabilizer> STRUCTURE_DEFINITION =
+ StructureDefinition.<GT_MetaTileEntity_EM_stabilizer>builder()
+ .addShape("main", transpose(new String[][]{
+ {" AFA ","BCBCB","FBGBF","BCBCB"," AFA "},
+ {"AEEEA","CBBBC","BBDBB","CBBBC","AEEEA"},
+ {"FE~EF","BBBBB","GDDDG","BBBBB","FEEEF"},
+ {"AEEEA","CBBBC","BBDBB","CBBBC","AEEEA"},
+ {" AFA ","BCBCB","FBGBF","BCBCB"," AFA "}
+ }))
+ .addElement('A', ofBlock(sBlockCasingsTT, 4))
+ .addElement('B', ofBlock(sBlockCasingsTT, 5))
+ .addElement('C', ofBlock(sBlockCasingsTT, 6))
+ .addElement('D', ofBlock(sBlockCasingsTT, 9))
+ .addElement('E', ofHatchAdderOptional(GT_MetaTileEntity_EM_stabilizer::addClassicToMachineList, textureOffset, 1, sBlockCasingsTT, 0))
+ .addElement('F', ofBlock(QuantumGlassBlock.INSTANCE, 0))
+ .addElement('G', ofHatchAdderOptional(GT_MetaTileEntity_EM_stabilizer::addElementalToMachineList, textureOffset + 4, 2, sBlockCasingsTT, 4))
+ .build();
//endregion
public GT_MetaTileEntity_EM_stabilizer(int aID, String aName, String aNameRegional) {
@@ -59,7 +63,7 @@ public class GT_MetaTileEntity_EM_stabilizer extends GT_MetaTileEntity_Multibloc
@Override
public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) {
- return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 2, 2, 0);
+ return structureCheck_EM("main", 2, 2, 0);
}
@Override
@@ -73,7 +77,12 @@ public class GT_MetaTileEntity_EM_stabilizer extends GT_MetaTileEntity_Multibloc
@Override
public void construct(ItemStack stackSize, boolean hintsOnly) {
- Structure.builder(shape, blockType, blockMeta, 2, 2, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly);
+ structureBuild_EM("main", 2, 2, 0, hintsOnly, stackSize);
+ }
+
+ @Override
+ public IStructureDefinition<GT_MetaTileEntity_EM_stabilizer> getStructure_EM() {
+ return STRUCTURE_DEFINITION;
}
@Override
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java
index 5ade4ec965..1ca125977d 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java
@@ -1,10 +1,7 @@
package com.github.technus.tectech.thing.metaTileEntity.multi;
import com.github.technus.tectech.Reference;
-import com.github.technus.tectech.mechanics.constructable.IConstructable;
import com.github.technus.tectech.mechanics.dataTransport.QuantumDataPacket;
-import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder;
-import com.github.technus.tectech.mechanics.structure.Structure;
import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_InputData;
import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_OutputData;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM;
@@ -13,24 +10,28 @@ import com.github.technus.tectech.thing.metaTileEntity.multi.base.IStatusFunctio
import com.github.technus.tectech.thing.metaTileEntity.multi.base.Parameters;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_RenderedExtendedFacingTexture;
import com.github.technus.tectech.util.CommonValues;
-import com.github.technus.tectech.util.Vec3Impl;
+import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable;
+import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
+import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+import com.gtnewhorizon.structurelib.util.Vec3Impl;
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.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.ResourceLocation;
-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.metaTileEntity.multi.base.LedStatus.*;
import static com.github.technus.tectech.util.CommonValues.V;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose;
+import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional;
import static net.minecraft.util.StatCollector.translateToLocal;
/**
@@ -38,22 +39,21 @@ import static net.minecraft.util.StatCollector.translateToLocal;
*/
public class GT_MetaTileEntity_EM_switch extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable {
//region structure
- private static final String[][] shape = new String[][]{
- {" ", " . ", " ",},
- {" ", " 0 ", " ",},
- {" ", " ", " ",},
- };
- private static final Block[] blockType = new Block[]{sBlockCasingsTT};
- private static final byte[] blockMeta = new byte[]{3};
- private static final IHatchAdder<GT_MetaTileEntity_EM_switch>[] addingMethods = adders(
- GT_MetaTileEntity_EM_switch::addClassicToMachineList);
- private static final short[] casingTextures = new short[]{textureOffset + 1};
- private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT};
- private static final byte[] blockMetaFallback = new byte[]{1};
private static final String[] description = new String[]{
EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":",
"1 - Classic/Data Hatches or Computer casing",//1 - Classic/Data Hatches or Computer casing
};
+
+ private static final IStructureDefinition<GT_MetaTileEntity_EM_switch> STRUCTURE_DEFINITION =
+ StructureDefinition.<GT_MetaTileEntity_EM_switch>builder()
+ .addShape("main", transpose(new String[][]{
+ {"BBB","BBB","BBB"},
+ {"B~B","BAB","BBB"},
+ {"BBB","BBB","BBB"}
+ }))
+ .addElement('A', ofBlock(sBlockCasingsTT, 3))
+ .addElement('B', ofHatchAdderOptional(GT_MetaTileEntity_EM_switch::addClassicToMachineList, textureOffset + 1, 1, sBlockCasingsTT, 1))
+ .build();
//endregion
//region parameters
@@ -99,7 +99,7 @@ public class GT_MetaTileEntity_EM_switch extends GT_MetaTileEntity_MultiblockBas
@Override
public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) {
- return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 1, 0);
+ return structureCheck_EM("main", 1, 1, 0);
}
@Override
@@ -134,7 +134,10 @@ public class GT_MetaTileEntity_EM_switch extends GT_MetaTileEntity_MultiblockBas
}
}
- Vec3Impl pos = new Vec3Impl(getBaseMetaTileEntity());
+ Vec3Impl pos = new Vec3Impl(getBaseMetaTileEntity().getXCoord(),
+ getBaseMetaTileEntity().getYCoord(),
+ getBaseMetaTileEntity().getZCoord());
+
QuantumDataPacket pack = new QuantumDataPacket(0L).unifyTraceWith(pos);
if (pack == null) {
return;
@@ -223,7 +226,12 @@ public class GT_MetaTileEntity_EM_switch extends GT_MetaTileEntity_MultiblockBas
@Override
public void construct(ItemStack stackSize, boolean hintsOnly) {
- Structure.builder(shape, blockType, blockMeta, 1, 1, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly);
+ structureBuild_EM("main", 1, 1, 0, hintsOnly, stackSize);
+ }
+
+ @Override
+ public IStructureDefinition<GT_MetaTileEntity_EM_switch> getStructure_EM() {
+ return STRUCTURE_DEFINITION;
}
@Override
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_transformer.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_transformer.java
index 3e288ccafa..b2f7da7bc3 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_transformer.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_transformer.java
@@ -1,14 +1,14 @@
package com.github.technus.tectech.thing.metaTileEntity.multi;
import com.github.technus.tectech.Reference;
-import com.github.technus.tectech.mechanics.constructable.IConstructable;
-import com.github.technus.tectech.mechanics.structure.IStructureDefinition;
-import com.github.technus.tectech.mechanics.structure.StructureDefinition;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_Container_MultiMachineEM;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_GUIContainer_MultiMachineEM;
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;
@@ -20,12 +20,13 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.ResourceLocation;
-import static com.github.technus.tectech.mechanics.structure.StructureUtility.*;
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.*;
import static gregtech.api.GregTech_API.sBlockCasings1;
+import static gregtech.api.util.GT_StructureUtility.ofHatchAdder;
import static net.minecraft.util.StatCollector.translateToLocal;
/**
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_wormhole.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_wormhole.java
index fa51447e9f..7b85d3406a 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_wormhole.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_wormhole.java
@@ -1,28 +1,28 @@
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 gregtech.api.enums.GT_Values.E;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose;
+import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional;
import static net.minecraft.util.StatCollector.translateToLocal;
/**
@@ -35,32 +35,33 @@ public class GT_MetaTileEntity_EM_wormhole extends GT_MetaTileEntity_MultiblockB
//endregion
//region structure
- private static final String[][] shape = new String[][]{
- {E, E, E, "C ", "C . ", "C "/*,E,E,E,*/},
- {E, E, "D0", "C000", "B00100", "C000", "D0"/*,E,E,*/},
- {E, E, "D0", "C2A2", "B0C0", "C2A2", "D0"/*,E,E,*/},
- {E, "D0", "D0", E, "A00C00", E, "D0", "D0"/*,E,*/},
- {E, "D0", E, E, "A0E0", E, E, "D0"/*,E,*/},
- {"D0", "D0", E, E, "00E00", E, E, "D0", "D0",},
- {"B00000", "A0033300", "003C300", "03E30", "03E30", "03E30", "003C300", "A0033300", "B00000",},
- {"B0!!!0", "A 31113 ", "031222130", "!12C21!", "!12C21!", "!12C21!", "031222130", "A 31113 ", "B0!!!0",},
- {"B0!!!0", "A 31113 ", "031444130", "!14C41!", "!14C41!", "!14C41!", "031444130", "A 31113 ", "B0!!!0",},
- {"B0!!!0", "A 31113 ", "031222130", "!12C21!", "!12C21!", "!12C21!", "031222130", "A 31113 ", "B0!!!0",},
- {"B00000", "A0033300", "003C300", "03E30", "03E30", "03E30", "003C300", "A0033300", "B00000",},
- };
- private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT, QuantumGlassBlock.INSTANCE, sBlockCasingsTT, sBlockCasingsTT};
- private static final byte[] blockMeta = new byte[]{12, 10, 0, 5, 11};
- private static final IHatchAdder<GT_MetaTileEntity_EM_wormhole>[] addingMethods = adders(
- GT_MetaTileEntity_EM_wormhole::addClassicToMachineList,
- GT_MetaTileEntity_EM_wormhole::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.wormhole.hint.0"),//1 - Classic Hatches or High Power Casing
translateToLocal("gt.blockmachines.multimachine.em.wormhole.hint.1"),//2 - Elemental Hatches or Molecular Casing
};
+
+ private static final IStructureDefinition<GT_MetaTileEntity_EM_wormhole> STRUCTURE_DEFINITION =
+ StructureDefinition.<GT_MetaTileEntity_EM_wormhole>builder()
+ .addShape("main", transpose(new String[][]{
+ {" "," "," "," "," "," D "," DDDDD "," DGGGD "," DGGGD "," DGGGD "," DDDDD "},
+ {" "," "," "," D "," D "," D "," DDAAADD "," EABBBAE "," EABBBAE "," EABBBAE "," DDAAADD "},
+ {" "," D "," D "," D "," "," ","DDA ADD","DABFFFBAD","DABCCCBAD","DABFFFBAD","DDA ADD"},
+ {" EEE "," DDD "," F F "," "," "," ","DA AD","GBF FBG","GBC CBG","GBF FBG","DA AD"},
+ {" E~E "," DDBDD "," D D "," DD DD "," D D ","DD DD","DA AD","GBF FBG","GBC CBG","GBF FBG","DA AD"},
+ {" EEE "," DDD "," F F "," "," "," ","DA AD","GBF FBG","GBC CBG","GBF FBG","DA AD"},
+ {" "," D "," D "," D "," "," ","DDA ADD","DABFFFBAD","DABCCCBAD","DABFFFBAD","DDA ADD"},
+ {" "," "," "," D "," D "," D "," DDAAADD "," EABBBAE "," EABBBAE "," EABBBAE "," DDAAADD "},
+ {" "," "," "," "," "," D "," DDDDD "," DGGGD "," DGGGD "," DGGGD "," DDDDD "}
+ }))
+ .addElement('A', ofBlock(sBlockCasingsTT, 5))
+ .addElement('B', ofBlock(sBlockCasingsTT, 10))
+ .addElement('C', ofBlock(sBlockCasingsTT, 11))
+ .addElement('D', ofBlock(sBlockCasingsTT, 12))
+ .addElement('E', ofHatchAdderOptional(GT_MetaTileEntity_EM_wormhole::addClassicToMachineList, textureOffset, 1, sBlockCasingsTT, 0))
+ .addElement('F', ofBlock(QuantumGlassBlock.INSTANCE, 0))
+ .addElement('G', ofHatchAdderOptional(GT_MetaTileEntity_EM_wormhole::addElementalToMachineList, textureOffset + 4, 2, sBlockCasingsTT, 4))
+ .build();
//endregion
public GT_MetaTileEntity_EM_wormhole(int aID, String aName, String aNameRegional) {
@@ -78,7 +79,7 @@ public class GT_MetaTileEntity_EM_wormhole extends GT_MetaTileEntity_MultiblockB
@Override
public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) {
- return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 4, 4, 0);
+ return structureCheck_EM("main", 4, 4, 0);
}
@Override
@@ -108,7 +109,12 @@ public class GT_MetaTileEntity_EM_wormhole extends GT_MetaTileEntity_MultiblockB
@Override
public void construct(ItemStack stackSize, boolean hintsOnly) {
- Structure.builder(shape, blockType, blockMeta, 4, 4, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly);
+ structureBuild_EM("main", 4, 4, 0, hintsOnly, stackSize);
+ }
+
+ @Override
+ public IStructureDefinition<GT_MetaTileEntity_EM_wormhole> getStructure_EM() {
+ return STRUCTURE_DEFINITION;
}
@Override
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_microwave.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_microwave.java
index 674ffe8c3e..b99ed26f5b 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_microwave.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_microwave.java
@@ -1,20 +1,19 @@
package com.github.technus.tectech.thing.metaTileEntity.multi;
import com.github.technus.tectech.Reference;
-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.metaTileEntity.multi.base.*;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_RenderedExtendedFacingTexture;
import com.github.technus.tectech.util.CommonValues;
-import com.github.technus.tectech.util.Vec3Impl;
+import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable;
+import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
+import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+import com.gtnewhorizon.structurelib.util.Vec3Impl;
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
-import net.minecraft.block.Block;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.item.EntityItem;
@@ -27,10 +26,12 @@ import java.util.ArrayList;
import java.util.HashSet;
import static com.github.technus.tectech.loader.MainLoader.microwaving;
-import static com.github.technus.tectech.mechanics.structure.Structure.adders;
import static com.github.technus.tectech.recipe.TT_recipeAdder.nullItem;
import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStatus.*;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose;
import static gregtech.api.GregTech_API.sBlockCasings4;
+import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional;
import static net.minecraft.util.AxisAlignedBB.getBoundingBox;
import static net.minecraft.util.StatCollector.translateToLocal;
@@ -44,26 +45,23 @@ public class GT_MetaTileEntity_TM_microwave extends GT_MetaTileEntity_Multiblock
//region structure
//use multi A energy inputs, use less power the longer it runs
- private static final String[][] shape = new String[][]{
- {"00000", "00000", "00.00", "0 0",},
- {"0---0", "0---0", "0---0", " 000 ",},
- {"0---0", "0---0", "0---0", " 000 ",},
- {"0---0", "0---0", "0---0", " 000 ",},
- {"00000", "00000", "00000", "0 0",},
- };
- private static final Block[] blockType = new Block[]{sBlockCasings4};
- private static final byte[] blockMeta = new byte[]{1};
-
- private static final IHatchAdder<GT_MetaTileEntity_TM_microwave>[] addingMethods = adders(
- GT_MetaTileEntity_TM_microwave::addClassicToMachineList);
- private static final short[] casingTextures = new short[]{49};
- private static final Block[] blockTypeFallback = new Block[]{sBlockCasings4};
- private static final byte[] blockMetaFallback = new byte[]{1};
private static final String[] description = new String[]{
EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":",
translateToLocal("gt.blockmachines.multimachine.tm.microwave.hint.0"),//1 - Classic Hatches or Clean Stainless Steel Casing
translateToLocal("gt.blockmachines.multimachine.tm.microwave.hint.1"),//Also acts like a hopper so give it an Output Bus
};
+
+ private static final IStructureDefinition<GT_MetaTileEntity_TM_microwave> STRUCTURE_DEFINITION =
+ StructureDefinition.<GT_MetaTileEntity_TM_microwave>builder()
+ .addShape("main", transpose(new String[][]{
+ {"AAAAA","A---A","A---A","A---A","AAAAA"},
+ {"AAAAA","A---A","A---A","A---A","AAAAA"},
+ {"AA~AA","A---A","A---A","A---A","AAAAA"},
+ {"ABBBA","BAAAB","BAAAB","BAAAB","ABBBA"}
+ }))
+ .addElement('A', ofBlock(sBlockCasings4, 1))
+ .addElement('B', ofHatchAdderOptional(GT_MetaTileEntity_TM_microwave::addClassicToMachineList, 49, 1, sBlockCasings4, 1))
+ .build();
//endregion
//region parameters
@@ -101,7 +99,7 @@ public class GT_MetaTileEntity_TM_microwave extends GT_MetaTileEntity_Multiblock
@Override
public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) {
- return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 2, 2, 0);
+ return structureCheck_EM("main", 2, 2, 0);
}
@Override
@@ -249,7 +247,12 @@ public class GT_MetaTileEntity_TM_microwave extends GT_MetaTileEntity_Multiblock
@Override
public void construct(ItemStack stackSize, boolean hintsOnly) {
- Structure.builder(shape, blockType, blockMeta, 2, 2, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly);
+ structureBuild_EM("main", 2, 2, 0, hintsOnly, stackSize);
+ }
+
+ @Override
+ public IStructureDefinition<GT_MetaTileEntity_TM_microwave> getStructure_EM() {
+ return STRUCTURE_DEFINITION;
}
@Override
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_proccessingStack.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_proccessingStack.java
index 38e14b9a6f..3a1a5a5418 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_proccessingStack.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_proccessingStack.java
@@ -1,27 +1,32 @@
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.thing.metaTileEntity.multi.base.GT_Container_MultiMachineEM;
-import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_GUIContainer_MultiMachineEM;
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 gregtech.api.enums.Textures;
-import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-
-import static com.github.technus.tectech.mechanics.structure.Structure.adders;
-import static gregtech.api.GregTech_API.sBlockCasings4;
-import static net.minecraft.util.StatCollector.translateToLocal;
+@Deprecated
public class GT_MetaTileEntity_TM_proccessingStack extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable {
+ protected GT_MetaTileEntity_TM_proccessingStack(int aID, String aName, String aNameRegional) {
+ super(aID, aName, aNameRegional);
+ }
+
+ @Override
+ public void construct(ItemStack stackSize, boolean hintsOnly) {
+
+ }
+
+ @Override
+ public String[] getStructureDescription(ItemStack stackSize) {
+ return new String[0];
+ }
+
+ @Override
+ public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
+ return null;
+ }
+ /*
//region variables
private boolean hasBeenPausedThisCycle = false;
//endregion
@@ -131,4 +136,5 @@ public class GT_MetaTileEntity_TM_proccessingStack extends GT_MetaTileEntity_Mul
public String[] getStructureDescription(ItemStack stackSize) {
return description;
}
+ */
} \ No newline at end of file
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java
index c2f475888f..0778feb1fd 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java
@@ -2,11 +2,8 @@ package com.github.technus.tectech.thing.metaTileEntity.multi;
import com.github.technus.tectech.TecTech;
import com.github.technus.tectech.loader.NetworkDispatcher;
-import com.github.technus.tectech.mechanics.constructable.IConstructable;
import com.github.technus.tectech.mechanics.spark.RendererMessage;
import com.github.technus.tectech.mechanics.spark.ThaumSpark;
-import com.github.technus.tectech.mechanics.structure.Structure;
-import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder;
import com.github.technus.tectech.mechanics.tesla.ITeslaConnectable;
import com.github.technus.tectech.mechanics.tesla.ITeslaConnectableSimple;
import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_Capacitor;
@@ -19,10 +16,12 @@ import com.github.technus.tectech.thing.metaTileEntity.multi.base.IStatusFunctio
import com.github.technus.tectech.thing.metaTileEntity.multi.base.Parameters;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_RenderedExtendedFacingTexture;
import com.github.technus.tectech.util.CommonValues;
-import com.github.technus.tectech.util.Vec3Impl;
-import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.Multimap;
import com.google.common.collect.MultimapBuilder;
+import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable;
+import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
+import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+import com.gtnewhorizon.structurelib.util.Vec3Impl;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gregtech.api.enums.Materials;
@@ -31,7 +30,6 @@ import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.*;
-import net.minecraft.block.Block;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
@@ -41,14 +39,16 @@ import net.minecraftforge.fluids.FluidStack;
import java.util.ArrayList;
import java.util.HashSet;
-import static com.github.technus.tectech.mechanics.structure.Structure.adders;
import static com.github.technus.tectech.mechanics.tesla.ITeslaConnectable.TeslaUtil.*;
+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.sBlockCasingsBA0;
import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStatus.*;
import static com.github.technus.tectech.util.CommonValues.V;
-import static gregtech.api.enums.GT_Values.E;
-import static java.lang.Math.*;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.*;
+import static gregtech.api.util.GT_StructureUtility.ofHatchAdder;
+import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional;
+import static java.lang.Math.min;
import static net.minecraft.util.StatCollector.translateToLocal;
public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable, ITeslaConnectable {
@@ -100,35 +100,45 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock
//endregion
//region structure
- private static final String[][] shape = new String[][]{//3 16 0
- {"\u000F", "A . ",},
- {E, "B000", "B000", "B000", "\u0001", "B000", E, "B000", E, "B000", E, "B000", "\u0001", "B111", " 22222 ",},
- {"B000", "A00000", "A00000", "A00000", "B000", E, "A0A!A0", E, "A0A!A0", E, "A0A!A0", E, "A0A!A0", "\u0001", "A1C1", " 21112 ",},
- {"B000", "A00000", "A00000", "A00000", "B030", "C3", "A0!3!0", "C3", "A0!3!0", "C3", "A0!3!0", "C3", "A0!3!0", "C3", "C3", "A1A3A1", " 21212 ",},
- {"B000", "A00000", "A00000", "A00000", "B000", E, "A0A!A0", E, "A0A!A0", E, "A0A!A0", E, "A0A!A0", "\u0001", "A1C1", " 21112 ",},
- {E, "B000", "B000", "B000", "\u0001", "B000", E, "B000", E, "B000", E, "B000", "\u0001", "B111", " 22222 ",},
- {"\u000F", "A ",},
- };
- private static final Block[] blockType = new Block[]{sBlockCasingsBA0, sBlockCasingsBA0, sBlockCasingsBA0, sBlockCasingsBA0};
- private static final byte[] blockMetaT0 = new byte[]{7, 0, 6, 8};
- private static final byte[] blockMetaT1 = new byte[]{7, 1, 6, 8};
- private static final byte[] blockMetaT2 = new byte[]{7, 2, 6, 8};
- private static final byte[] blockMetaT3 = new byte[]{7, 3, 6, 8};
- private static final byte[] blockMetaT4 = new byte[]{7, 4, 6, 8};
- private static final byte[] blockMetaT5 = new byte[]{7, 5, 6, 8};
- private static final byte[] blockMetaT6 = new byte[]{7, 9, 6, 8};
- private static final byte[][] blockMetas = new byte[][]{blockMetaT0, blockMetaT1, blockMetaT2, blockMetaT3, blockMetaT4, blockMetaT5, blockMetaT6};
- private static final IHatchAdder<GT_MetaTileEntity_TM_teslaCoil>[] addingMethods = adders(
- GT_MetaTileEntity_TM_teslaCoil::addCapacitorToMachineList,
- GT_MetaTileEntity_TM_teslaCoil::addFrameToMachineList);
- private static final short[] casingTextures = new short[]{(texturePage << 7) + 16 + 6, 0};
- private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsBA0, null};
- private static final byte[] blockMetaFallback = new byte[]{6, 0};
private static final String[] description = new String[]{
EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":",
translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.hint.0"),//1 - Classic Hatches, Capacitor Hatches or Tesla Base Casing
translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.hint.1"),//2 - Titanium Frames
};
+
+ private static final IStructureDefinition<GT_MetaTileEntity_TM_teslaCoil> STRUCTURE_DEFINITION =
+ StructureDefinition.<GT_MetaTileEntity_TM_teslaCoil>builder()
+ .addShape("main", transpose(new String[][]{
+ {" "," "," BBB "," BBB "," BBB "," "," "},
+ {" "," BBB "," BBBBB "," BBBBB "," BBBBB "," BBB "," "},
+ {" "," BBB "," BBBBB "," BBBBB "," BBBBB "," BBB "," "},
+ {" "," BBB "," BBBBB "," BBBBB "," BBBBB "," BBB "," "},
+ {" "," "," BBB "," BCB "," BBB "," "," "},
+ {" "," "," "," C "," "," "," "},
+ {" "," BBB "," B F B "," BFCFB "," B F B "," BBB "," "},
+ {" "," "," "," C "," "," "," "},
+ {" "," BBB "," B F B "," BFCFB "," B F B "," BBB "," "},
+ {" "," "," "," C "," "," "," "},
+ {" "," BBB "," B F B "," BFCFB "," B F B "," BBB "," "},
+ {" "," "," "," C "," "," "," "},
+ {" "," BBB "," B F B "," BFCFB "," B F B "," BBB "," "},
+ {" "," "," "," C "," "," "," "},
+ {" "," "," "," C "," "," "," "},
+ {" "," DDD "," D D "," D C D "," D D "," DDD "," "},
+ {" EE~EE ","EAAAAAE","EADDDAE","EADADAE","EADDDAE"," AAAAAE"," EEEEE "}
+ }))
+ .addElement('A', ofBlock(sBlockCasingsBA0, 6))
+ .addElement('B', ofBlock(sBlockCasingsBA0, 7))
+ .addElement('C', ofBlock(sBlockCasingsBA0, 8))
+ .addElement('D', defer(t -> ofBlock(sBlockCasingsBA0, t.getCoilWindingMeta())))
+ .addElement('E', ofHatchAdderOptional(GT_MetaTileEntity_TM_teslaCoil::addCapacitorToMachineList, textureOffset + 16 + 6, 1, sBlockCasingsBA0, 6))
+ .addElement('F', ofHatchAdder(GT_MetaTileEntity_TM_teslaCoil::addFrameToMachineList, 0, 2))
+ .build();
+
+ public int getCoilWindingMeta() {
+ Vec3Impl xyzOffsets = getExtendedFacing().getWorldOffset(new Vec3Impl(0, -1, 1));
+ return this.getBaseMetaTileEntity().getMetaIDOffset(xyzOffsets.get0(), xyzOffsets.get1(), xyzOffsets.get2());
+ }
//endregion
//region parameters
@@ -348,7 +358,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock
mTier = 6;
}//Hacky remap because the ZPM coils were added later
- if (structureCheck_EM(shape, blockType, blockMetas[mTier], addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 3, 16, 0) && eCapacitorHatches.size() > 0) {
+ if (structureCheck_EM("main", 3, 16, 0)) {
for (GT_MetaTileEntity_Hatch_Capacitor cap : eCapacitorHatches) {
if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(cap)) {
cap.getBaseMetaTileEntity().setActive(iGregTechTileEntity.isActive());
@@ -360,11 +370,15 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock
oldRotation = (byte) getExtendedFacing().ordinal();
oldOrientation = iGregTechTileEntity.getFrontFacing();
+ Vec3Impl posBMTE = new Vec3Impl(getBaseMetaTileEntity().getXCoord(),
+ getBaseMetaTileEntity().getYCoord(),
+ getBaseMetaTileEntity().getZCoord());
+
//Calculate coordinates of the middle bottom
- posTop = getExtendedFacing().getWorldOffset(new Vec3Impl(0, 0, 2)).add(getBaseMetaTileEntity());
+ posTop = getExtendedFacing().getWorldOffset(new Vec3Impl(0, 0, 2)).add(posBMTE);
//Calculate coordinates of the top sphere
- posTop = getExtendedFacing().getWorldOffset(new Vec3Impl(0, -14, 2)).add(getBaseMetaTileEntity());
+ posTop = getExtendedFacing().getWorldOffset(new Vec3Impl(0, -14, 2)).add(posBMTE);
}
return true;
}
@@ -681,8 +695,13 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock
}
@Override
+ public IStructureDefinition<GT_MetaTileEntity_TM_teslaCoil> getStructure_EM() {
+ return STRUCTURE_DEFINITION;
+ }
+
+ @Override
public void construct(ItemStack stackSize, boolean hintsOnly) {
- Structure.builder(shape, blockType, blockMetas[(stackSize.stackSize - 1) % 7], 3, 16, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly);
+ structureBuild_EM("main", 3, 16, 0, hintsOnly, stackSize);
}
@Override
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java
index 9ba6235c83..75e9d016c2 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java
@@ -3,24 +3,29 @@ package com.github.technus.tectech.thing.metaTileEntity.multi.base;
import com.github.technus.tectech.Reference;
import com.github.technus.tectech.TecTech;
import com.github.technus.tectech.loader.NetworkDispatcher;
-import com.github.technus.tectech.mechanics.alignment.AlignmentLimits;
-import com.github.technus.tectech.mechanics.alignment.AlignmentMessage;
-import com.github.technus.tectech.mechanics.alignment.IAlignment;
-import com.github.technus.tectech.mechanics.alignment.IAlignmentLimits;
-import com.github.technus.tectech.mechanics.alignment.enumerable.ExtendedFacing;
-import com.github.technus.tectech.mechanics.alignment.enumerable.Flip;
-import com.github.technus.tectech.mechanics.alignment.enumerable.Rotation;
+
+import com.github.technus.tectech.mechanics.structure.Structure;
+import com.gtnewhorizon.structurelib.StructureLibAPI;
+import com.gtnewhorizon.structurelib.alignment.AlignmentMessage;
+import com.gtnewhorizon.structurelib.alignment.IAlignment;
+import com.gtnewhorizon.structurelib.alignment.IAlignmentLimits;
+import com.gtnewhorizon.structurelib.alignment.IAlignmentProvider;
+import com.gtnewhorizon.structurelib.alignment.enumerable.ExtendedFacing;
+import com.gtnewhorizon.structurelib.alignment.enumerable.Flip;
+import com.gtnewhorizon.structurelib.alignment.enumerable.Rotation;
+import com.gtnewhorizon.structurelib.structure.StructureUtility;
+import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
+import com.gtnewhorizon.structurelib.util.Vec3Impl;
+import cpw.mods.fml.common.network.NetworkRegistry;
+import gregtech.api.util.GT_StructureUtility;
+
import com.github.technus.tectech.mechanics.elementalMatter.core.cElementalInstanceStackMap;
import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.cElementalDefinitionStack;
import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.cElementalInstanceStack;
import com.github.technus.tectech.mechanics.elementalMatter.core.tElementalException;
-import com.github.technus.tectech.mechanics.structure.IStructureDefinition;
-import com.github.technus.tectech.mechanics.structure.Structure;
-import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder;
import com.github.technus.tectech.thing.metaTileEntity.hatch.*;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_RenderedExtendedFacingTexture;
import com.github.technus.tectech.util.Util;
-import com.github.technus.tectech.util.Vec3Impl;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gregtech.api.enums.Textures;
@@ -32,6 +37,7 @@ import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.implementations.*;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
+import gregtech.api.util.IGT_HatchAdder;
import gregtech.common.GT_Pollution;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
@@ -46,6 +52,8 @@ import net.minecraftforge.fluids.FluidStack;
import java.util.ArrayList;
+import static gregtech.api.util.GT_StructureUtility.*;
+
import static com.github.technus.tectech.loader.TecTechConfig.DEBUG_MODE;
import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage;
import static com.github.technus.tectech.util.CommonValues.*;
@@ -144,7 +152,7 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt
private boolean explodedThisTick = false;
//front rotation val
- private IAlignmentLimits alignmentLimits = AlignmentLimits.UNLIMITED;
+ private IAlignmentLimits alignmentLimits = IAlignmentLimits.UNLIMITED;
private ExtendedFacing extendedFacing = ExtendedFacing.DEFAULT;
//endregion
@@ -175,9 +183,12 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt
IGregTechTileEntity base = getBaseMetaTileEntity();
mMachine = false;
if (getBaseMetaTileEntity().isServerSide()) {
- NetworkDispatcher.INSTANCE.sendToAllAround(new AlignmentMessage.AlignmentData(this),
- base.getWorld().provider.dimensionId,
- base.getXCoord(), base.getYCoord(), base.getZCoord(), 512);
+ //NetworkDispatcher.INSTANCE.sendToAllAround(new AlignmentMessage.AlignmentData(this),
+ // base.getWorld().provider.dimensionId,
+ // base.getXCoord(), base.getYCoord(), base.getZCoord(), 512);
+ StructureLibAPI.sendAlignment((IAlignmentProvider) base,
+ new NetworkRegistry.TargetPoint(base.getWorld().provider.dimensionId,
+ base.getXCoord(), base.getYCoord(), base.getZCoord(), 512));
}else{
base.issueTextureUpdate();
}
@@ -190,11 +201,6 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt
}
@Override
- public void setAlignmentLimits(IAlignmentLimits limits) {
- alignmentLimits=limits;
- }
-
- @Override
public boolean isFacingValid(byte aFacing) {
return canSetToDirectionAny(ForgeDirection.getOrientation(aFacing));
}
@@ -237,7 +243,7 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt
String[][] structure,//0-9 casing, +- air no air, a-z ignore
Block[] blockType,//use numbers 0-9 for casing types
byte[] blockMeta,//use numbers 0-9 for casing types
- IHatchAdder<T>[] addingMethods,
+ IGT_HatchAdder<T>[] addingMethods,
short[] casingTextures,
Block[] blockTypeFallback,//use numbers 0-9 for casing types
byte[] blockMetaFallback,//use numbers 0-9 for casing types
@@ -648,7 +654,9 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt
*/
protected long getAvailableData_EM() {
long result = 0;
- Vec3Impl pos = new Vec3Impl(getBaseMetaTileEntity());
+ Vec3Impl pos = new Vec3Impl(getBaseMetaTileEntity().getXCoord(),
+ getBaseMetaTileEntity().getYCoord(),
+ getBaseMetaTileEntity().getZCoord());
for (GT_MetaTileEntity_Hatch_InputData in : eInputData) {
if (in.q != null) {
Long value = in.q.contentIfNotInTrace(pos);
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/render/TT_RenderedExtendedFacingTexture.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/render/TT_RenderedExtendedFacingTexture.java
index 44bfa4445d..5ed53634de 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/render/TT_RenderedExtendedFacingTexture.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/render/TT_RenderedExtendedFacingTexture.java
@@ -1,8 +1,8 @@
package com.github.technus.tectech.thing.metaTileEntity.multi.base.render;
-import com.github.technus.tectech.mechanics.alignment.IAlignmentProvider;
-import com.github.technus.tectech.mechanics.alignment.enumerable.ExtendedFacing;
import com.github.technus.tectech.util.LightingHelper;
+import com.gtnewhorizon.structurelib.alignment.IAlignmentProvider;
+import com.gtnewhorizon.structurelib.alignment.enumerable.ExtendedFacing;
import gregtech.api.enums.Dyes;
import gregtech.api.interfaces.IColorModulationContainer;
import gregtech.api.interfaces.IIconContainer;
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/GT_MetaTileEntity_EM_machine.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/GT_MetaTileEntity_EM_machine.java
index 6b26132292..a43bf2b128 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/GT_MetaTileEntity_EM_machine.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/GT_MetaTileEntity_EM_machine.java
@@ -3,13 +3,13 @@ package com.github.technus.tectech.thing.metaTileEntity.multi.em_machine;
import com.github.technus.tectech.TecTech;
import com.github.technus.tectech.mechanics.constructable.IConstructable;
import com.github.technus.tectech.mechanics.elementalMatter.core.cElementalInstanceStackMap;
-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.block.QuantumStuffBlock;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.*;
import com.github.technus.tectech.util.CommonValues;
import com.github.technus.tectech.util.Util;
+import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
+import com.gtnewhorizon.structurelib.structure.StructureDefinition;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import net.minecraft.block.Block;
@@ -23,10 +23,11 @@ import net.minecraftforge.common.util.ForgeDirection;
import java.util.HashMap;
import java.util.function.Supplier;
-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.thing.metaTileEntity.multi.base.LedStatus.*;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock;
+import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional;
import static net.minecraft.util.StatCollector.translateToLocal;
/**
@@ -41,26 +42,28 @@ public class GT_MetaTileEntity_EM_machine extends GT_MetaTileEntity_MultiblockBa
//endregion
//region structure
- private static final String[][] shape = new String[][]{
- {"B0", "A ", "0 - 0", "A ", "B0",},
- {"A000", "00000", "00.00", "00000", "A000",},
- {"A121", "1---1", "2---2", "1---1", "A121",},
- {"A131", "1---1", "3-A-3", "1---1", "A131",},
- {"A121", "1---1", "2---2", "1---1", "A121",},
- {"A000", "00000", "00-00", "00000", "A000",},
- {"B0", "A!!!", "0!!!0", "A!!!", "B0",},};
- private static final Block[] blockType = new Block[]{sBlockCasingsTT, QuantumGlassBlock.INSTANCE, sBlockCasingsTT, sBlockCasingsTT};
- private static final byte[] blockMeta = new byte[]{4, 0, 5, 6};
- private static final IHatchAdder<GT_MetaTileEntity_EM_machine>[] addingMethods = adders(
- GT_MetaTileEntity_EM_machine::addClassicToMachineList,
- GT_MetaTileEntity_EM_machine::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.processing.hint.0"),//1 - Classic Hatches or High Power Casing
- translateToLocal("gt.blockmachines.multimachine.em.processing.hint.1"),};//2 - Elemental Hatches or Molecular Casing
+ translateToLocal("gt.blockmachines.multimachine.em.processing.hint.1"),//2 - Elemental Hatches or Molecular Casing
+ };
+
+ private static final IStructureDefinition<GT_MetaTileEntity_EM_machine> STRUCTURE_DEFINITION =
+ StructureDefinition.<GT_MetaTileEntity_EM_machine>builder()
+ .addShape("main", new String[][]{
+ {" A "," AAA "," EBE "," ECE "," EBE "," AAA "," A "},
+ {" DDD ","AAAAA","E---E","E---E","E---E","AAAAA"," FFF "},
+ {"AD-DA","AA~AA","B---B","C---C","B---B","AA-AA","AFFFA"},
+ {" DDD ","AAAAA","E---E","E---E","E---E","AAAAA"," FFF "},
+ {" A "," AAA "," EBE "," ECE "," EBE "," AAA "," A "}
+ })
+ .addElement('A', ofBlock(sBlockCasingsTT, 4))
+ .addElement('B', ofBlock(sBlockCasingsTT, 5))
+ .addElement('C', ofBlock(sBlockCasingsTT, 6))
+ .addElement('D', ofHatchAdderOptional(GT_MetaTileEntity_EM_machine::addClassicToMachineList, textureOffset, 1, sBlockCasingsTT, 0))
+ .addElement('E', ofBlock(QuantumGlassBlock.INSTANCE, 0))
+ .addElement('F', ofHatchAdderOptional(GT_MetaTileEntity_EM_machine::addElementalToMachineList, textureOffset + 4, 2, sBlockCasingsTT, 4))
+ .build();
//endregion
//region parameters
@@ -190,7 +193,7 @@ public class GT_MetaTileEntity_EM_machine extends GT_MetaTileEntity_MultiblockBa
@Override
public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) {
- return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 2, 2, 1);
+ return structureCheck_EM("main", 2, 2, 1);
}
@Override
@@ -354,7 +357,12 @@ public class GT_MetaTileEntity_EM_machine extends GT_MetaTileEntity_MultiblockBa
@Override
public void construct(ItemStack stackSize, boolean hintsOnly) {
- Structure.builder(shape, blockType, blockMeta, 2, 2, 1, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly);
+ structureBuild_EM("main", 2, 2, 1, hintsOnly, stackSize);
+ }
+
+ @Override
+ public IStructureDefinition<GT_MetaTileEntity_EM_machine> getStructure_EM() {
+ return STRUCTURE_DEFINITION;
}
@Override
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_DebugStructureWriter.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_DebugStructureWriter.java
index 3b194c516b..01d5e2321e 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_DebugStructureWriter.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_DebugStructureWriter.java
@@ -1,12 +1,12 @@
package com.github.technus.tectech.thing.metaTileEntity.single;
import com.github.technus.tectech.TecTech;
-import com.github.technus.tectech.mechanics.alignment.enumerable.ExtendedFacing;
-import com.github.technus.tectech.mechanics.structure.StructureUtility;
import com.github.technus.tectech.thing.metaTileEntity.single.gui.GT_Container_DebugStructureWriter;
import com.github.technus.tectech.thing.metaTileEntity.single.gui.GT_GUIContainer_DebugStructureWriter;
import com.github.technus.tectech.util.CommonValues;
import com.github.technus.tectech.util.Util;
+import com.gtnewhorizon.structurelib.alignment.enumerable.ExtendedFacing;
+import com.gtnewhorizon.structurelib.structure.StructureUtility;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gregtech.api.enums.Textures;
@@ -20,9 +20,13 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumChatFormatting;
import net.minecraftforge.common.util.ForgeDirection;
+import java.util.Comparator;
+import java.util.function.Function;
+
import static com.github.technus.tectech.thing.metaTileEntity.Textures.MACHINE_CASINGS_TT;
import static net.minecraft.util.StatCollector.translateToLocal;
@@ -115,11 +119,18 @@ public class GT_MetaTileEntity_DebugStructureWriter extends GT_MetaTileEntity_Ti
@Override
public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
if (aBaseMetaTileEntity.isAllowedToWork()) {
- String pseudoJavaCode = StructureUtility.getPseudoJavaCode(aBaseMetaTileEntity.getWorld(),
- ExtendedFacing.of(ForgeDirection.getOrientation(aBaseMetaTileEntity.getFrontFacing())),
+// String pseudoJavaCode = StructureUtility.getPseudoJavaCode(aBaseMetaTileEntity.getWorld(),
+// ExtendedFacing.of(ForgeDirection.getOrientation(aBaseMetaTileEntity.getFrontFacing())),
+// aBaseMetaTileEntity.getXCoord(), aBaseMetaTileEntity.getYCoord(), aBaseMetaTileEntity.getZCoord(),
+// numbers[0], numbers[1], numbers[2],
+// numbers[3], numbers[4], numbers[5],false);
+ String pseudoJavaCode = StructureUtility.getPseudoJavaCode(
+ aBaseMetaTileEntity.getWorld(), ExtendedFacing.of(ForgeDirection.getOrientation(aBaseMetaTileEntity.getFrontFacing())),
aBaseMetaTileEntity.getXCoord(), aBaseMetaTileEntity.getYCoord(), aBaseMetaTileEntity.getZCoord(),
numbers[0], numbers[1], numbers[2],
- numbers[3], numbers[4], numbers[5],false);
+ te -> te.getClass().getCanonicalName(),
+ numbers[3], numbers[4], numbers[5],
+ false);
TecTech.LOGGER.info(pseudoJavaCode);
result = pseudoJavaCode.split("\\n");
aBaseMetaTileEntity.disableWorking();
@@ -129,11 +140,18 @@ public class GT_MetaTileEntity_DebugStructureWriter extends GT_MetaTileEntity_Ti
@Override
public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) {
IGregTechTileEntity aBaseMetaTileEntity = getBaseMetaTileEntity();
- String pseudoJavaCode = StructureUtility.getPseudoJavaCode(aBaseMetaTileEntity.getWorld(),
- ExtendedFacing.of(ForgeDirection.getOrientation(aBaseMetaTileEntity.getFrontFacing())),
+// String pseudoJavaCode = StructureUtility.getPseudoJavaCode(aBaseMetaTileEntity.getWorld(),
+// ExtendedFacing.of(ForgeDirection.getOrientation(aBaseMetaTileEntity.getFrontFacing())),
+// aBaseMetaTileEntity.getXCoord(), aBaseMetaTileEntity.getYCoord(), aBaseMetaTileEntity.getZCoord(),
+// numbers[0], numbers[1], numbers[2],
+// numbers[3], numbers[4], numbers[5],true);
+ String pseudoJavaCode = StructureUtility.getPseudoJavaCode(
+ aBaseMetaTileEntity.getWorld(), ExtendedFacing.of(ForgeDirection.getOrientation(aBaseMetaTileEntity.getFrontFacing())),
aBaseMetaTileEntity.getXCoord(), aBaseMetaTileEntity.getYCoord(), aBaseMetaTileEntity.getZCoord(),
numbers[0], numbers[1], numbers[2],
- numbers[3], numbers[4], numbers[5],true);
+ te -> te.getClass().getCanonicalName(),
+ numbers[3], numbers[4], numbers[5],
+ false);
TecTech.LOGGER.info(pseudoJavaCode);
result = pseudoJavaCode.split("\\n");
aBaseMetaTileEntity.disableWorking();
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_TeslaCoil.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_TeslaCoil.java
index 274389b01a..3b240e4c56 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_TeslaCoil.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_TeslaCoil.java
@@ -8,10 +8,10 @@ import com.github.technus.tectech.loader.NetworkDispatcher;
import com.github.technus.tectech.mechanics.spark.RendererMessage;
import com.github.technus.tectech.mechanics.spark.ThaumSpark;
import com.github.technus.tectech.util.Util;
-import com.github.technus.tectech.util.Vec3Impl;
import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.Multimap;
import com.google.common.collect.MultimapBuilder;
+import com.gtnewhorizon.structurelib.util.Vec3Impl;
import eu.usrv.yamcore.auxiliary.PlayerChatHelper;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
@@ -333,7 +333,9 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB
@Override
public Vec3Impl getTeslaPosition() {
- return new Vec3Impl(this.getBaseMetaTileEntity());
+ return new Vec3Impl(this.getBaseMetaTileEntity().getXCoord(),
+ this.getBaseMetaTileEntity().getYCoord(),
+ this.getBaseMetaTileEntity().getZCoord());
}
@Override
diff --git a/src/main/java/com/github/technus/tectech/util/Vec3Impl.java b/src/main/java/com/github/technus/tectech/util/Vec3Impl.java
index 9ba96d741a..56a9176767 100644
--- a/src/main/java/com/github/technus/tectech/util/Vec3Impl.java
+++ b/src/main/java/com/github/technus/tectech/util/Vec3Impl.java
@@ -4,6 +4,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import net.minecraft.dispenser.IPosition;
import net.minecraftforge.common.util.ForgeDirection;
+@Deprecated
public class Vec3Impl implements Comparable<Vec3Impl> {
public static final Vec3Impl NULL_VECTOR = new Vec3Impl(0, 0, 0);
private final int val0;