aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/com/github/technus/tectech/TecTech.java2
-rw-r--r--src/main/java/com/github/technus/tectech/compatibility/gtpp/GtppAtomLoader.java6
-rw-r--r--src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/EssentiaCompat.java4
-rw-r--r--src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/EssentiaCompatEnabled.java7
-rw-r--r--src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaDequantizer.java38
-rw-r--r--src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java27
-rw-r--r--src/main/java/com/github/technus/tectech/loader/recipe/BaseRecipeLoader.java11
-rw-r--r--src/main/java/com/github/technus/tectech/thing/casing/GT_Item_HintTT.java47
-rw-r--r--src/main/java/com/github/technus/tectech/thing/casing/TT_Container_Casings.java2
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_annihilation.java7
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_bhg.java7
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java13
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_crafting.java9
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dataBank.java7
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_decay.java17
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dequantizer.java69
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_infuser.java7
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_junction.java9
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_quantizer.java32
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java5
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_scanner.java34
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_stabilizer.java7
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java7
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_transformer.java10
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_wormhole.java7
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_microwave.java7
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_proccessingStack.java6
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java6
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java26
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_collider/GT_MetaTileEntity_EM_collider.java33
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/GT_MetaTileEntity_EM_machine.java12
31 files changed, 228 insertions, 253 deletions
diff --git a/src/main/java/com/github/technus/tectech/TecTech.java b/src/main/java/com/github/technus/tectech/TecTech.java
index 10b8f69b1a..03701668ef 100644
--- a/src/main/java/com/github/technus/tectech/TecTech.java
+++ b/src/main/java/com/github/technus/tectech/TecTech.java
@@ -36,7 +36,7 @@ import java.util.Iterator;
import static com.github.technus.tectech.loader.TecTechConfig.DEBUG_MODE;
@Mod(modid = Reference.MODID, name = Reference.NAME, version = Reference.VERSION, dependencies = "required-after:Forge@[10.13.4.1614,);"
- + "required-after:YAMCore@[0.5.70,);" + "required-after:gregtech;" + "after:CoFHCore;" + "after:Thaumcraft;" + "after:dreamcraft;")
+ + "required-after:YAMCore@[0.5.70,);" + "required-after:gregtech;" + "after:CoFHCore;" + "after:Thaumcraft;" + "after:dreamcraft;" + "required-after:structurelib;")
public class TecTech {
@SidedProxy(clientSide = Reference.CLIENTSIDE, serverSide = Reference.SERVERSIDE)
public static CommonProxy proxy;
diff --git a/src/main/java/com/github/technus/tectech/compatibility/gtpp/GtppAtomLoader.java b/src/main/java/com/github/technus/tectech/compatibility/gtpp/GtppAtomLoader.java
index 67a363fc6c..65219271f9 100644
--- a/src/main/java/com/github/technus/tectech/compatibility/gtpp/GtppAtomLoader.java
+++ b/src/main/java/com/github/technus/tectech/compatibility/gtpp/GtppAtomLoader.java
@@ -50,7 +50,11 @@ public class GtppAtomLoader {
Class<?> clazz=Class.forName("gtPlusPlus.core.material.Material");
getUnlocalizedName=clazz.getMethod("getUnlocalizedName");
- getFluid=clazz.getMethod("getFluid", int.class);
+ try{
+ getFluid=clazz.getMethod("getFluidStack", int.class);
+ }catch (Exception e){
+ getFluid=clazz.getMethod("getFluid", int.class);
+ }
clazz=Class.forName("gtPlusPlus.core.material.MaterialGenerator");
generate=clazz.getMethod("generate", Class.forName("gtPlusPlus.core.material.Material"), boolean.class, boolean.class);
diff --git a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/EssentiaCompat.java b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/EssentiaCompat.java
index 35d3a1b91f..a335b81793 100644
--- a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/EssentiaCompat.java
+++ b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/EssentiaCompat.java
@@ -10,11 +10,11 @@ import net.minecraft.tileentity.TileEntity;
public class EssentiaCompat {
public static EssentiaCompat essentiaContainerCompat;
- public boolean check(GT_MetaTileEntity_MultiblockBase_EM meta){
+ public <T extends GT_MetaTileEntity_MultiblockBase_EM> boolean check(T meta,TileEntity te){
return false;
}
- public TileEntity getContainer(GT_MetaTileEntity_MultiblockBase_EM meta){
+ public <T extends GT_MetaTileEntity_MultiblockBase_EM> TileEntity getContainer(T meta){
return null;
}
diff --git a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/EssentiaCompatEnabled.java b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/EssentiaCompatEnabled.java
index 37df2c48cc..bd20269944 100644
--- a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/EssentiaCompatEnabled.java
+++ b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/EssentiaCompatEnabled.java
@@ -16,13 +16,12 @@ import static com.github.technus.tectech.compatibility.thaumcraft.elementalMatte
*/
public class EssentiaCompatEnabled extends EssentiaCompat {
@Override
- public boolean check(GT_MetaTileEntity_MultiblockBase_EM meta) {
- TileEntity tile =meta.getBaseMetaTileEntity().getTileEntityAtSide(meta.getBaseMetaTileEntity().getBackFacing());
- return tile instanceof TileEssentiaReservoir || tile instanceof TileJarFillable;
+ public <T extends GT_MetaTileEntity_MultiblockBase_EM> boolean check(T meta,TileEntity te) {
+ return te instanceof TileEssentiaReservoir || te instanceof TileJarFillable;
}
@Override
- public TileEntity getContainer(GT_MetaTileEntity_MultiblockBase_EM meta) {
+ public <T extends GT_MetaTileEntity_MultiblockBase_EM> TileEntity getContainer(T meta) {
TileEntity tile =meta.getBaseMetaTileEntity().getTileEntityAtSide(meta.getBaseMetaTileEntity().getBackFacing());
return tile!=null && !tile.isInvalid() && tile instanceof TileEssentiaReservoir || tile instanceof TileJarFillable ?tile:null;
}
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 3e009c064a..3278aa812b 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
@@ -3,7 +3,6 @@ package com.github.technus.tectech.compatibility.thaumcraft.thing.metaTileEntity
import com.github.technus.tectech.mechanics.elementalMatter.core.maps.EMInstanceStackMap;
import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.EMInstanceStack;
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;
@@ -14,7 +13,6 @@ 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.nbt.NBTTagCompound;
@@ -30,7 +28,10 @@ import static com.github.technus.tectech.mechanics.elementalMatter.core.transfor
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 com.gtnewhorizon.structurelib.structure.StructureUtility.ofTileAdder;
+import static gregtech.api.util.GT_StructureUtility.ofHatchAdder;
+import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional;
import static net.minecraft.util.StatCollector.translateToLocal;
/**
@@ -51,7 +52,7 @@ public class GT_MetaTileEntity_EM_essentiaDequantizer extends GT_MetaTileEntity_
IStructureDefinition.<GT_MetaTileEntity_EM_essentiaDequantizer>builder()
.addShape("main", new String[][]{
{"DDD", "D~D", "DDD"},
- {"E E", " ", "E E"},
+ {"E E", " * ", "E E"},
{"ABA", "BCB", "ABA"},
{"FFF", "FBF", "FFF"},
{"BEB", "EGE", "BEB"}
@@ -63,10 +64,10 @@ public class GT_MetaTileEntity_EM_essentiaDequantizer extends GT_MetaTileEntity_
.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))
+ .addElement('*', ofTileAdder(essentiaContainerCompat::check, StructureLibAPI.getBlockHint(),12))
.build();
private String outputEssentiaName;
-
//endregion
public GT_MetaTileEntity_EM_essentiaDequantizer(int aID, String aName, String aNameRegional) {
@@ -84,7 +85,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 structureCheck_EM("main", 1, 1, 0);
}
@Override
@@ -131,8 +132,8 @@ public class GT_MetaTileEntity_EM_essentiaDequantizer extends GT_MetaTileEntity_
TileEntity container = essentiaContainerCompat.getContainer(this);
if (container == null) {
stopMachine();
- } else {
- if (!essentiaContainerCompat.putInContainer(container, outputEssentiaName)) {
+ }else{
+ if(!essentiaContainerCompat.putInContainer(container,outputEssentiaName)){
stopMachine();
}
}
@@ -157,21 +158,25 @@ public class GT_MetaTileEntity_EM_essentiaDequantizer extends GT_MetaTileEntity_
@Override
public void construct(ItemStack stackSize, boolean hintsOnly) {
IGregTechTileEntity iGregTechTileEntity = getBaseMetaTileEntity();
- int xDir = ForgeDirection.getOrientation(iGregTechTileEntity.getBackFacing()).offsetX;
- int yDir = ForgeDirection.getOrientation(iGregTechTileEntity.getBackFacing()).offsetY;
- int zDir = ForgeDirection.getOrientation(iGregTechTileEntity.getBackFacing()).offsetZ;
+ int xDir = ForgeDirection.getOrientation(iGregTechTileEntity.getBackFacing()).offsetX;
+ int yDir = ForgeDirection.getOrientation(iGregTechTileEntity.getBackFacing()).offsetY;
+ int zDir = ForgeDirection.getOrientation(iGregTechTileEntity.getBackFacing()).offsetZ;
if (hintsOnly) {
StructureLibAPI.hintParticle(iGregTechTileEntity.getWorld(),
iGregTechTileEntity.getXCoord() + xDir,
iGregTechTileEntity.getYCoord() + yDir,
iGregTechTileEntity.getZCoord() + zDir,
- TT_Container_Casings.sHintCasingsTT, 12);
+ StructureLibAPI.getBlockHint(), 12);
} else {
if (iGregTechTileEntity.getBlockOffset(xDir, 0, zDir).getMaterial() == Material.air) {
- iGregTechTileEntity.getWorld().setBlock(iGregTechTileEntity.getXCoord() + xDir, iGregTechTileEntity.getYCoord() + yDir, iGregTechTileEntity.getZCoord() + zDir, TT_Container_Casings.sHintCasingsTT, 12, 2);
+ iGregTechTileEntity.getWorld().setBlock(
+ iGregTechTileEntity.getXCoord() + xDir,
+ iGregTechTileEntity.getYCoord() + yDir,
+ iGregTechTileEntity.getZCoord() + zDir,
+ StructureLibAPI.getBlockHint(), 12, 2);
}
}
- Structure.builder(shape, blockType, blockMeta, 1, 1, 0, iGregTechTileEntity, getExtendedFacing(), hintsOnly);
+ structureBuild_EM("main", 1, 1, 0, stackSize, hintsOnly);
}
@Override
@@ -190,4 +195,9 @@ public class GT_MetaTileEntity_EM_essentiaDequantizer extends GT_MetaTileEntity_
super.loadNBTData(aNBT);
outputEssentiaName = aNBT.getString("eOutputEssentia");
}
+
+ @Override
+ public IStructureDefinition<? extends GT_MetaTileEntity_MultiblockBase_EM> getStructure_EM() {
+ return STRUCTURE_DEFINITION;
+ }
}
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 c044ae64ae..debbcd2ae0 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
@@ -5,19 +5,16 @@ import com.github.technus.tectech.mechanics.elementalMatter.core.definitions.IEM
import com.github.technus.tectech.mechanics.elementalMatter.core.maps.EMInstanceStackMap;
import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.EMInstanceStack;
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.StructureLibAPI;
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.util.EnumChatFormatting;
@@ -29,7 +26,10 @@ import static com.github.technus.tectech.mechanics.elementalMatter.core.transfor
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 com.gtnewhorizon.structurelib.structure.StructureUtility.ofTileAdder;
+import static gregtech.api.util.GT_StructureUtility.ofHatchAdder;
+import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional;
import static net.minecraft.util.StatCollector.translateToLocal;
/**
@@ -42,15 +42,15 @@ public class GT_MetaTileEntity_EM_essentiaQuantizer extends GT_MetaTileEntity_Mu
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 Molecular Casing
+ translateToLocal("gt.blockmachines.multimachine.em.essentiatoem.hint.2"),//3 - Elemental Overflow Hatches or Elemental 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()
+ IStructureDefinition.<GT_MetaTileEntity_EM_essentiaQuantizer>builder()
.addShape("main", new String[][]{
{"FFF", "F~F", "FFF"},
- {"E E", " ", "E E"},
+ {"E E", " * ", "E E"},
{"BAB", "ACA", "BAB"},
{"DDD", "DBD", "DDD"},
{"EBE", "BGB", "EBE"}
@@ -62,6 +62,7 @@ public class GT_MetaTileEntity_EM_essentiaQuantizer extends GT_MetaTileEntity_Mu
.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))
+ .addElement('*', ofTileAdder(essentiaContainerCompat::check, StructureLibAPI.getBlockHint(),12))
.build();
//endregion
@@ -80,7 +81,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("main", 1, 1, 0);
+ return structureCheck_EM("main", 1, 1, 0);
}
@Override
@@ -139,13 +140,17 @@ public class GT_MetaTileEntity_EM_essentiaQuantizer extends GT_MetaTileEntity_Mu
iGregTechTileEntity.getXCoord() + xDir,
iGregTechTileEntity.getYCoord() + yDir,
iGregTechTileEntity.getZCoord() + zDir,
- TT_Container_Casings.sHintCasingsTT, 12);
+ StructureLibAPI.getBlockHint(), 12);
} else {
if (iGregTechTileEntity.getBlockOffset(xDir, 0, zDir).getMaterial() == Material.air) {
- iGregTechTileEntity.getWorld().setBlock(iGregTechTileEntity.getXCoord() + xDir, iGregTechTileEntity.getYCoord() + yDir, iGregTechTileEntity.getZCoord() + zDir, TT_Container_Casings.sHintCasingsTT, 12, 2);
+ iGregTechTileEntity.getWorld().setBlock(
+ iGregTechTileEntity.getXCoord() + xDir,
+ iGregTechTileEntity.getYCoord() + yDir,
+ iGregTechTileEntity.getZCoord() + zDir,
+ StructureLibAPI.getBlockHint(), 12, 2);
}
}
- structureBuild_EM("main", 1, 1, 0, hintsOnly, stackSize);
+ structureBuild_EM("main", 1, 1, 0, stackSize, hintsOnly);
}
@Override
diff --git a/src/main/java/com/github/technus/tectech/loader/recipe/BaseRecipeLoader.java b/src/main/java/com/github/technus/tectech/loader/recipe/BaseRecipeLoader.java
index d18b3215e1..20f58b739b 100644
--- a/src/main/java/com/github/technus/tectech/loader/recipe/BaseRecipeLoader.java
+++ b/src/main/java/com/github/technus/tectech/loader/recipe/BaseRecipeLoader.java
@@ -8,8 +8,8 @@ import com.github.technus.tectech.mechanics.elementalMatter.core.transformations
import com.github.technus.tectech.mechanics.elementalMatter.definitions.complex.EMAtomDefinition;
import com.github.technus.tectech.mechanics.elementalMatter.definitions.complex.EMHadronDefinition;
import com.github.technus.tectech.thing.CustomItemList;
-import com.github.technus.tectech.thing.casing.TT_Container_Casings;
import com.github.technus.tectech.thing.item.EuMeterGT;
+import com.gtnewhorizon.structurelib.StructureLibAPI;
import cpw.mods.fml.common.Loader;
import gregtech.api.enums.Dyes;
import gregtech.api.enums.ItemList;
@@ -44,8 +44,11 @@ public class BaseRecipeLoader {
// Recipes init - common goes here rest goes into methods below
// ===================================================================================================
- for (int i = 0; i <= 15; i++) {
- RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(i), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Cobalt, 1)}, Materials.Aluminium.getMolten(864), new ItemStack(TT_Container_Casings.sHintCasingsTT, 1, i), 32, 120);
+ for(int i=0;i<=15;i++) {
+ RA.addAssemblerRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(i),
+ GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Cobalt, 1)},
+ Materials.Aluminium.getMolten(864),
+ new ItemStack(StructureLibAPI.getBlockHint(), 1, i), 32, 120);
}
//Scrench
@@ -114,7 +117,7 @@ public class BaseRecipeLoader {
if (Loader.isModLoaded(Reference.DREAMCRAFT)) {
new DreamCraftRecipeLoader().run(transformationInfo);//init recipes for GTNH version
} else if (Loader.isModLoaded(Reference.SPARTAKCORE)) {
- new SpartakCoreRecipeLoader().run(transformationInfo);//init recipes for SpartakCore version
+ new SpartakCoreRecipeLoader().run(transformationInfo);//init recipes for SpartakCore version
} else {
new BloodyRecipeLoader().run(transformationInfo);//init recipes for NON-GTNH version
}
diff --git a/src/main/java/com/github/technus/tectech/thing/casing/GT_Item_HintTT.java b/src/main/java/com/github/technus/tectech/thing/casing/GT_Item_HintTT.java
deleted file mode 100644
index 426e7d569b..0000000000
--- a/src/main/java/com/github/technus/tectech/thing/casing/GT_Item_HintTT.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package com.github.technus.tectech.thing.casing;
-
-import gregtech.common.blocks.GT_Item_Casings_Abstract;
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-
-import java.util.List;
-
-import static com.github.technus.tectech.util.CommonValues.TEC_MARK_GENERAL;
-import static net.minecraft.util.StatCollector.translateToLocal;
-
-/**
- * Created by danie_000 on 03.10.2016.
- */
-public class GT_Item_HintTT extends GT_Item_Casings_Abstract {
- public GT_Item_HintTT(Block par1) {
- super(par1);
- }
-
- @Override
- public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) {
- aList.add(TEC_MARK_GENERAL);
- aList.add(translateToLocal("gt.blockhintTT.desc.0"));//Helps while building
- switch (aStack.getItemDamage()) {
- case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7: case 8: case 9: case 10: case 11:
- aList.add(EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + translateToLocal("gt.blockhintTT.desc.1"));//Placeholder for a certain group.
- break;
- case 12:
- aList.add(EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + translateToLocal("gt.blockhintTT.desc.2"));//General placeholder.
- break;
- case 13:
- aList.add(EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + translateToLocal("gt.blockhintTT.desc.3"));//Make sure it contains Air material.
- break;
- case 14:
- aList.add(EnumChatFormatting.AQUA.toString() + EnumChatFormatting.BOLD + translateToLocal("gt.blockhintTT.desc.4"));//Make sure it does not contain Air material.
- break;
- case 15:
- aList.add(EnumChatFormatting.BLUE.toString() + translateToLocal("gt.blockhintTT.desc.5"));//ERROR, what did u expect?
- break;
- default://WTF?
- aList.add("Damn son where did you get that!?");
- aList.add(EnumChatFormatting.BLUE.toString() + "From outer space... I guess...");
- }
- }
-}
diff --git a/src/main/java/com/github/technus/tectech/thing/casing/TT_Container_Casings.java b/src/main/java/com/github/technus/tectech/thing/casing/TT_Container_Casings.java
index 071a4ae28f..40bb20d545 100644
--- a/src/main/java/com/github/technus/tectech/thing/casing/TT_Container_Casings.java
+++ b/src/main/java/com/github/technus/tectech/thing/casing/TT_Container_Casings.java
@@ -7,7 +7,7 @@ import net.minecraft.block.Block;
*/
public final class TT_Container_Casings {
public static Block sBlockCasingsTT;
- public static Block sHintCasingsTT;
+
public static Block sBlockCasingsBA0;
public static Block sBlockCasingsNH;
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 05829c89e4..ba3bfe728d 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
@@ -6,7 +6,6 @@ import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_Rend
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;
@@ -41,7 +40,7 @@ public class GT_MetaTileEntity_EM_annihilation extends GT_MetaTileEntity_Multibl
//region structure
private static final IStructureDefinition<GT_MetaTileEntity_EM_annihilation> STRUCTURE_DEFINITION =
- StructureDefinition.<GT_MetaTileEntity_EM_annihilation>builder()
+ IStructureDefinition.<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 "," "},
@@ -111,7 +110,7 @@ public class GT_MetaTileEntity_EM_annihilation extends GT_MetaTileEntity_Multibl
@Override
public void construct(ItemStack stackSize, boolean hintsOnly) {
- structureBuild_EM("main", 5, 5, 0, hintsOnly, stackSize);
+ structureBuild_EM("main", 5, 5, 0, stackSize, hintsOnly);
}
@Override
@@ -123,4 +122,4 @@ public class GT_MetaTileEntity_EM_annihilation extends GT_MetaTileEntity_Multibl
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_EM_bhg.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_bhg.java
index 448c930351..5f177ef859 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
@@ -6,7 +6,6 @@ import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_Rend
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;
@@ -50,7 +49,7 @@ public class GT_MetaTileEntity_EM_bhg extends GT_MetaTileEntity_MultiblockBase_E
//region structure actual
private static final IStructureDefinition<GT_MetaTileEntity_EM_bhg> STRUCTURE_DEFINITION=
- StructureDefinition.<GT_MetaTileEntity_EM_bhg>builder()
+ IStructureDefinition.<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 "," "," "," "," "," "," "," "," "," "},
@@ -307,7 +306,7 @@ public class GT_MetaTileEntity_EM_bhg extends GT_MetaTileEntity_MultiblockBase_E
@Override
public void construct(ItemStack stackSize, boolean hintsOnly) {
try {
- structureBuild_EM((stackSize.stackSize & 1) == 1 ? "main_t1" : "main_t2", 16, 16, 0, hintsOnly, stackSize);
+ structureBuild_EM((stackSize.stackSize & 1) == 1 ? "main_t1" : "main_t2", 16, 16, 0, stackSize, hintsOnly);
}
catch (Exception e) {
e.printStackTrace();
@@ -318,4 +317,4 @@ public class GT_MetaTileEntity_EM_bhg extends GT_MetaTileEntity_MultiblockBase_E
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_EM_computer.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java
index 31d41fb39e..faa48d39de 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
@@ -11,7 +11,6 @@ import com.github.technus.tectech.util.CommonValues;
import com.github.technus.tectech.util.Util;
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;
@@ -59,7 +58,7 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB
};
private static final IStructureDefinition<GT_MetaTileEntity_EM_computer> STRUCTURE_DEFINITION =
- StructureDefinition.<GT_MetaTileEntity_EM_computer>builder()
+ IStructureDefinition.<GT_MetaTileEntity_EM_computer>builder()
.addShape("front", transpose(new String[][]{
{" AA"},
{" AA"},
@@ -384,16 +383,16 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB
@Override
public void construct(ItemStack stackSize, boolean hintsOnly) {
IGregTechTileEntity igt = getBaseMetaTileEntity();
- structureBuild_EM("front", 1, 2, 0, hintsOnly, stackSize);
- structureBuild_EM("cap", 1, 2, -1, hintsOnly, stackSize);
+ structureBuild_EM("front", 1, 2, 0, stackSize, hintsOnly);
+ structureBuild_EM("cap", 1, 2, -1, stackSize, hintsOnly);
byte offset = -2;
for (int rackSlices = Math.min(stackSize.stackSize, 12); rackSlices > 0; rackSlices--) {
- structureBuild_EM("slice", 1 , 2, offset--, hintsOnly, stackSize);
+ structureBuild_EM("slice", 1 , 2, offset--, stackSize, hintsOnly);
}
- structureBuild_EM("cap", 1, 2, offset--, hintsOnly, stackSize);
- structureBuild_EM("back", 1, 2, offset, hintsOnly, stackSize);
+ structureBuild_EM("cap", 1, 2, offset--, stackSize, hintsOnly);
+ structureBuild_EM("back", 1, 2, offset, stackSize, hintsOnly);
}
@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 9c631c8af6..65870f9e76 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
@@ -6,7 +6,6 @@ import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_Rend
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;
@@ -43,8 +42,8 @@ public class GT_MetaTileEntity_EM_crafting extends GT_MetaTileEntity_MultiblockB
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()
+ private static final IStructureDefinition<GT_MetaTileEntity_EM_crafting> STRUCTURE_DEFINITION=
+ IStructureDefinition.<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"},
@@ -108,7 +107,7 @@ public class GT_MetaTileEntity_EM_crafting extends GT_MetaTileEntity_MultiblockB
@Override
public void construct(ItemStack stackSize, boolean hintsOnly) {
- structureBuild_EM("main", 2, 2, 0, hintsOnly, stackSize);
+ structureBuild_EM("main", 2, 2, 0, stackSize, hintsOnly);
}
@Override
@@ -120,4 +119,4 @@ public class GT_MetaTileEntity_EM_crafting extends GT_MetaTileEntity_MultiblockB
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_EM_dataBank.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dataBank.java
index bea2b8a0ba..84e6026448 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
@@ -11,7 +11,6 @@ import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_Rend
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;
@@ -51,7 +50,7 @@ public class GT_MetaTileEntity_EM_dataBank extends GT_MetaTileEntity_MultiblockB
};
private static final IStructureDefinition<GT_MetaTileEntity_EM_dataBank> STRUCTURE_DEFINITION =
- StructureDefinition.<GT_MetaTileEntity_EM_dataBank>builder()
+ IStructureDefinition.<GT_MetaTileEntity_EM_dataBank>builder()
.addShape("main", transpose(new String[][]{
{"BCCCB","BDDDB","BDDDB"},
{"BC~CB","BAAAB","BDDDB"},
@@ -175,7 +174,7 @@ public class GT_MetaTileEntity_EM_dataBank extends GT_MetaTileEntity_MultiblockB
@Override
public void construct(ItemStack stackSize, boolean hintsOnly) {
- structureBuild_EM("main", 2, 1, 0, hintsOnly, stackSize);
+ structureBuild_EM("main", 2, 1, 0, stackSize, hintsOnly);
}
@Override
@@ -187,4 +186,4 @@ public class GT_MetaTileEntity_EM_dataBank extends GT_MetaTileEntity_MultiblockB
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_EM_decay.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_decay.java
index 9e43205a85..0b8a521581 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,7 +1,7 @@
package com.github.technus.tectech.thing.metaTileEntity.multi;
-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.maps.EMInstanceStackMap;
+import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.EMInstanceStack;
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;
@@ -10,6 +10,8 @@ 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 cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gregtech.api.enums.Textures;
@@ -18,9 +20,9 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase;
+import gregtech.api.util.GT_Utility;
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;
@@ -28,13 +30,16 @@ import net.minecraft.item.ItemStack;
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.elementalMatter.core.transformations.EMTransformationRegistry.EM_COUNT_PER_MATERIAL_AMOUNT;
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;
@@ -61,7 +66,7 @@ public class GT_MetaTileEntity_EM_decay extends GT_MetaTileEntity_MultiblockBase
};
private static final IStructureDefinition<GT_MetaTileEntity_EM_decay> STRUCTURE_DEFINITION =
- StructureDefinition.<GT_MetaTileEntity_EM_decay>builder()
+ IStructureDefinition.<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 "},
@@ -251,7 +256,7 @@ public class GT_MetaTileEntity_EM_decay extends GT_MetaTileEntity_MultiblockBase
@Override
public void construct(ItemStack stackSize, boolean hintsOnly) {
- structureBuild_EM("main", 2, 2, 0, hintsOnly, stackSize);
+ structureBuild_EM("main", 2, 2, 0, stackSize, hintsOnly);
}
@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 53ef9641b2..ba1ac8b298 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,20 +1,21 @@
package com.github.technus.tectech.thing.metaTileEntity.multi;
-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.TecTech;
+import com.github.technus.tectech.mechanics.elementalMatter.core.maps.EMInstanceStackMap;
+import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.EMInstanceStack;
+import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.IEMStack;
+import com.github.technus.tectech.mechanics.elementalMatter.core.transformations.EMDequantizationInfo;
+import com.github.technus.tectech.mechanics.elementalMatter.core.transformations.OreDictionaryStack;
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 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;
@@ -23,12 +24,16 @@ import net.minecraftforge.oredict.OreDictionary;
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.elementalMatter.core.definitions.IEMDefinition.STABLE_RAW_LIFE_TIME;
+import static com.github.technus.tectech.mechanics.elementalMatter.definitions.complex.EMAtomDefinition.refMass;
+import static com.github.technus.tectech.mechanics.elementalMatter.definitions.complex.EMAtomDefinition.refUnstableMass;
import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset;
import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT;
import static com.github.technus.tectech.util.CommonValues.V;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock;
+import static 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;
/**
@@ -39,19 +44,19 @@ public class GT_MetaTileEntity_EM_dequantizer extends GT_MetaTileEntity_Multiblo
//use multi A energy inputs, use less power the longer it runs
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();
+ IStructureDefinition.<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('D', ofBlock(QuantumGlassBlock.INSTANCE, 0))
+ .addElement('C', ofHatchAdderOptional(GT_MetaTileEntity_EM_dequantizer::addClassicToMachineList, textureOffset, 1, sBlockCasingsTT, 0))
+ .addElement('F', ofHatchAdder(GT_MetaTileEntity_EM_dequantizer::addElementalInputToMachineList, textureOffset + 4, 2))
+ .addElement('E', ofHatchAdderOptional(GT_MetaTileEntity_EM_dequantizer::addElementalMufflerToMachineList, textureOffset + 4, 3, sBlockCasingsTT, 4))
+ .build();
private static final String[] description = new String[]{
EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":",
@@ -72,7 +77,7 @@ public class GT_MetaTileEntity_EM_dequantizer extends GT_MetaTileEntity_Multiblo
private void startRecipe(IEMStack from, long energy) {
mMaxProgresstime = 20;
mEfficiencyIncrease = 10000;
- double mass = from.getMass();
+ double mass = from.getMass();
double euMult = Math.abs(mass / refMass);
eAmpereFlow = (int) Math.ceil(Math.sqrt(Math.sqrt(euMult)));
if (mass > refUnstableMass || from.getDefinition().getRawTimeSpan(energy) < STABLE_RAW_LIFE_TIME) {
@@ -98,13 +103,13 @@ public class GT_MetaTileEntity_EM_dequantizer extends GT_MetaTileEntity_Multiblo
EMInstanceStackMap map = in.getContentHandler();
for (EMInstanceStack stack : map.valuesToArray()) {
EMDequantizationInfo emDequantizationInfo = TecTech.transformationInfo.getInfoMap().get(stack.getDefinition());
- if(emDequantizationInfo!=null && emDequantizationInfo.getStack()!=null && map.removeAllAmounts(emDequantizationInfo.getInput())){
- Object out=emDequantizationInfo.getStack();
- if(out instanceof ItemStack){
- mOutputItems=new ItemStack[]{emDequantizationInfo.getItem()};
- }else if(out instanceof FluidStack){
- mOutputFluids=new FluidStack[]{emDequantizationInfo.getFluid()};
- }else if(out instanceof OreDictionaryStack){
+ if (emDequantizationInfo != null && emDequantizationInfo.getStack() != null && map.removeAllAmounts(emDequantizationInfo.getInput())) {
+ Object out = emDequantizationInfo.getStack();
+ if (out instanceof ItemStack) {
+ mOutputItems = new ItemStack[]{emDequantizationInfo.getItem()};
+ } else if (out instanceof FluidStack) {
+ mOutputFluids = new FluidStack[]{emDequantizationInfo.getFluid()};
+ } else if (out instanceof OreDictionaryStack) {
ArrayList<ItemStack> items = OreDictionary.getOres(OreDictionary.getOreName(emDequantizationInfo.getOre().getOreId()));
if (items != null && !items.isEmpty()) {
mOutputItems = new ItemStack[]{items.get(0)};
@@ -135,7 +140,7 @@ public class GT_MetaTileEntity_EM_dequantizer extends GT_MetaTileEntity_Multiblo
@Override
public void construct(ItemStack stackSize, boolean hintsOnly) {
- structureBuild_EM("main", 1, 1, 0, hintsOnly, stackSize);
+ structureBuild_EM("main", 1, 1, 0, stackSize, hintsOnly);
}
@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 18416e70f6..207768323b 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
@@ -9,7 +9,6 @@ import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEnt
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;
@@ -42,7 +41,7 @@ public class GT_MetaTileEntity_EM_infuser extends GT_MetaTileEntity_MultiblockBa
};
private static final IStructureDefinition<GT_MetaTileEntity_EM_infuser> STRUCTURE_DEFINITION =
- StructureDefinition.<GT_MetaTileEntity_EM_infuser>builder()
+ IStructureDefinition.<GT_MetaTileEntity_EM_infuser>builder()
.addShape("main", transpose(new String[][]{
{"CCC","CCC","CCC"},
{"BBB","BAB","BBB"},
@@ -188,7 +187,7 @@ public class GT_MetaTileEntity_EM_infuser extends GT_MetaTileEntity_MultiblockBa
@Override
public void construct(ItemStack stackSize, boolean hintsOnly) {
- structureBuild_EM("main", 1, 2, 0, hintsOnly, stackSize);
+ structureBuild_EM("main", 1, 2, 0, stackSize, hintsOnly);
}
@Override
@@ -200,4 +199,4 @@ public class GT_MetaTileEntity_EM_infuser extends GT_MetaTileEntity_MultiblockBa
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_EM_junction.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_junction.java
index 451443fa8a..a3944c6e31 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
@@ -9,7 +9,6 @@ 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;
@@ -37,7 +36,7 @@ public class GT_MetaTileEntity_EM_junction extends GT_MetaTileEntity_MultiblockB
};
private static final IStructureDefinition<GT_MetaTileEntity_EM_junction> STRUCTURE_DEFINITION =
- StructureDefinition.<GT_MetaTileEntity_EM_junction>builder()
+ IStructureDefinition.<GT_MetaTileEntity_EM_junction>builder()
.addShape("main", new String[][]{
{"CCC", "C~C", "CCC"},
{"AAA", "AAA", "AAA"},
@@ -177,9 +176,9 @@ public class GT_MetaTileEntity_EM_junction extends GT_MetaTileEntity_MultiblockB
@Override
public void construct(ItemStack stackSize, boolean hintsOnly) {
if ((stackSize.stackSize & 1) == 1) {
- structureBuild_EM("main", 1, 1, 0, hintsOnly, stackSize);
+ structureBuild_EM("main", 1, 1, 0, stackSize, hintsOnly);
} else {
- structureBuild_EM("mainBig", 2, 2, 0, hintsOnly, stackSize);
+ structureBuild_EM("mainBig", 2, 2, 0, stackSize, hintsOnly);
}
}
@@ -192,4 +191,4 @@ public class GT_MetaTileEntity_EM_junction extends GT_MetaTileEntity_MultiblockB
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_EM_quantizer.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_quantizer.java
index 1d75cb420c..64bce35ca0 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,22 +2,22 @@ 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.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.aFluidQuantizationInfo;
-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.elementalMatter.core.maps.EMInstanceStackMap;
+import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.EMInstanceStack;
+import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.IEMStack;
+import com.github.technus.tectech.mechanics.elementalMatter.core.transformations.EMFluidQuantizationInfo;
+import com.github.technus.tectech.mechanics.elementalMatter.core.transformations.EMItemQuantizationInfo;
+import com.github.technus.tectech.mechanics.elementalMatter.core.transformations.EMOredictQuantizationInfo;
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 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;
@@ -27,16 +27,20 @@ import net.minecraftforge.oredict.OreDictionary;
import java.util.ArrayList;
import static com.github.technus.tectech.loader.TecTechConfig.DEBUG_MODE;
-import static com.github.technus.tectech.mechanics.elementalMatter.core.templates.iElementalDefinition.DEFAULT_ENERGY_LEVEL;
-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.elementalMatter.core.definitions.IEMDefinition.DEFAULT_ENERGY_LEVEL;
+import static com.github.technus.tectech.mechanics.elementalMatter.core.definitions.IEMDefinition.STABLE_RAW_LIFE_TIME;
+import static com.github.technus.tectech.mechanics.elementalMatter.definitions.complex.EMAtomDefinition.refMass;
+import static com.github.technus.tectech.mechanics.elementalMatter.definitions.complex.EMAtomDefinition.refUnstableMass;
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;
/**
@@ -46,7 +50,7 @@ public class GT_MetaTileEntity_EM_quantizer extends GT_MetaTileEntity_Multiblock
//region structure
//use multi A energy inputs, use less power the longer it runs
private static final IStructureDefinition<GT_MetaTileEntity_EM_quantizer> STRUCTURE_DEFINITION =
- StructureDefinition.<GT_MetaTileEntity_EM_quantizer>builder()
+ IStructureDefinition.<GT_MetaTileEntity_EM_quantizer>builder()
.addShape("main", transpose(new String[][]{
{"CCC","BAB","EEE","DBD"},
{"C~C","ABA","EBE","BFB"},
@@ -195,7 +199,7 @@ public class GT_MetaTileEntity_EM_quantizer extends GT_MetaTileEntity_Multiblock
@Override
public void construct(ItemStack stackSize, boolean hintsOnly) {
- structureBuild_EM("main", 1, 1, 0, hintsOnly, stackSize);
+ structureBuild_EM("main", 1, 1, 0, stackSize, hintsOnly);
}
@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 f5fc1fa3af..33660d838f 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
@@ -8,7 +8,6 @@ import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_Rend
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;
@@ -75,7 +74,7 @@ public class GT_MetaTileEntity_EM_research extends GT_MetaTileEntity_MultiblockB
//region structure
private static final IStructureDefinition<GT_MetaTileEntity_EM_research> STRUCTURE_DEFINITION =
- StructureDefinition.<GT_MetaTileEntity_EM_research>builder()
+ IStructureDefinition.<GT_MetaTileEntity_EM_research>builder()
.addShape("main", transpose(new String[][]{
{" ", " A ", " A ", "AAA", "AAA", "AAA", "AAA"},
{"AAA", "ACA", "ACA", "ACA", "BCB", "BCB", "BBB"},
@@ -570,7 +569,7 @@ public class GT_MetaTileEntity_EM_research extends GT_MetaTileEntity_MultiblockB
@Override
public void construct(ItemStack stackSize, boolean hintsOnly) {
- structureBuild_EM("main", 1, 3, 4, hintsOnly, stackSize);
+ structureBuild_EM("main", 1, 3, 4, stackSize, hintsOnly);
}
@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 d63ccf2df1..68e7519950 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,10 +1,11 @@
package com.github.technus.tectech.thing.metaTileEntity.multi;
import com.github.technus.tectech.TecTech;
-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.elementalMatter.core.EMException;
+import com.github.technus.tectech.mechanics.elementalMatter.core.maps.EMInstanceStackMap;
+import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.EMDefinitionStack;
+import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.EMInstanceStack;
+import com.github.technus.tectech.mechanics.elementalMatter.definitions.primitive.EMPrimitiveDefinition;
import com.github.technus.tectech.recipe.TT_recipe;
import com.github.technus.tectech.thing.CustomItemList;
import com.github.technus.tectech.thing.block.QuantumGlassBlock;
@@ -13,6 +14,8 @@ 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 gregtech.api.enums.ItemList;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
@@ -20,6 +23,7 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energ
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase;
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.block.material.Material;
import net.minecraft.entity.player.EntityPlayer;
@@ -32,7 +36,6 @@ import net.minecraftforge.common.util.ForgeDirection;
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.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;
@@ -41,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;
@@ -57,7 +64,7 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa
private TT_recipe.TT_EMRecipe.TT_EMRecipe eRecipe;
private EMDefinitionStack objectResearched;
private EMInstanceStackMap objectsScanned;
- private String machineType;
+ private String machineType;
private long computationRemaining, computationRequired;
private int[] scanComplexity;
@@ -74,7 +81,7 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa
};
private static final IStructureDefinition<GT_MetaTileEntity_EM_scanner> STRUCTURE_DEFINITION =
- StructureDefinition.<GT_MetaTileEntity_EM_scanner>builder()
+ IStructureDefinition.<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"},
@@ -102,12 +109,9 @@ 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;
@@ -522,8 +526,8 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa
}
@Override
- public void construct(ItemStack stackSize, boolean hintsOnly) {
- structureBuild_EM("main", 2, 2, 0, hintsOnly, stackSize);
+ public void construct(ItemStack trigger, boolean hintsOnly) {
+ structureBuild_EM("main", 2, 2, 0, trigger, hintsOnly);
}
@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 0ff238e4c3..6bedce3ede 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
@@ -5,7 +5,6 @@ import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEnt
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.item.ItemStack;
@@ -30,7 +29,7 @@ public class GT_MetaTileEntity_EM_stabilizer extends GT_MetaTileEntity_Multibloc
};
private static final IStructureDefinition<GT_MetaTileEntity_EM_stabilizer> STRUCTURE_DEFINITION =
- StructureDefinition.<GT_MetaTileEntity_EM_stabilizer>builder()
+ IStructureDefinition.<GT_MetaTileEntity_EM_stabilizer>builder()
.addShape("main", transpose(new String[][]{
{" AFA ","BCBCB","FBGBF","BCBCB"," AFA "},
{"AEEEA","CBBBC","BBDBB","CBBBC","AEEEA"},
@@ -77,7 +76,7 @@ public class GT_MetaTileEntity_EM_stabilizer extends GT_MetaTileEntity_Multibloc
@Override
public void construct(ItemStack stackSize, boolean hintsOnly) {
- structureBuild_EM("main", 2, 2, 0, hintsOnly, stackSize);
+ structureBuild_EM("main", 2, 2, 0, stackSize, hintsOnly);
}
@Override
@@ -89,4 +88,4 @@ public class GT_MetaTileEntity_EM_stabilizer extends GT_MetaTileEntity_Multibloc
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_EM_switch.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java
index 1ca125977d..bd38a46b7f 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
@@ -12,7 +12,6 @@ import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_Rend
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 com.gtnewhorizon.structurelib.util.Vec3Impl;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@@ -45,7 +44,7 @@ public class GT_MetaTileEntity_EM_switch extends GT_MetaTileEntity_MultiblockBas
};
private static final IStructureDefinition<GT_MetaTileEntity_EM_switch> STRUCTURE_DEFINITION =
- StructureDefinition.<GT_MetaTileEntity_EM_switch>builder()
+ IStructureDefinition.<GT_MetaTileEntity_EM_switch>builder()
.addShape("main", transpose(new String[][]{
{"BBB","BBB","BBB"},
{"B~B","BAB","BBB"},
@@ -226,7 +225,7 @@ public class GT_MetaTileEntity_EM_switch extends GT_MetaTileEntity_MultiblockBas
@Override
public void construct(ItemStack stackSize, boolean hintsOnly) {
- structureBuild_EM("main", 1, 1, 0, hintsOnly, stackSize);
+ structureBuild_EM("main", 1, 1, 0, stackSize, hintsOnly);
}
@Override
@@ -238,4 +237,4 @@ public class GT_MetaTileEntity_EM_switch extends GT_MetaTileEntity_MultiblockBas
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_EM_transformer.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_transformer.java
index b2f7da7bc3..208d33c610 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
@@ -8,7 +8,6 @@ import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_Rend
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 +22,6 @@ import net.minecraft.util.ResourceLocation;
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;
@@ -39,7 +37,7 @@ public class GT_MetaTileEntity_EM_transformer extends GT_MetaTileEntity_Multiblo
translateToLocal("gt.blockmachines.multimachine.em.transformer.hint"),//1 - Energy IO Hatches or High Power Casing
};
private static final IStructureDefinition<GT_MetaTileEntity_EM_transformer> STRUCTURE_DEFINITION =
- StructureDefinition.<GT_MetaTileEntity_EM_transformer>builder()
+ IStructureDefinition.<GT_MetaTileEntity_EM_transformer>builder()
.addShape("main",new String[][]{
{"111", "1~1", "111",},
{"111", "101", "111",},
@@ -47,7 +45,7 @@ public class GT_MetaTileEntity_EM_transformer extends GT_MetaTileEntity_Multiblo
})
.addElement('0', ofBlock(sBlockCasings1,15))
.addElement('1', ofChain(
- ofHatchAdder(GT_MetaTileEntity_EM_transformer::addEnergyIOToMachineList,textureOffset,sHintCasingsTT,0),
+ ofHatchAdder(GT_MetaTileEntity_EM_transformer::addEnergyIOToMachineList,textureOffset,1),
onElementPass(t->t.casingCount++,ofBlock(sBlockCasingsTT,0))
))
.build();
@@ -161,11 +159,11 @@ public class GT_MetaTileEntity_EM_transformer extends GT_MetaTileEntity_Multiblo
@Override
public void construct(ItemStack stackSize, boolean hintsOnly) {
- structureBuild_EM("main", 1, 1, 0, hintsOnly, stackSize);
+ structureBuild_EM("main", 1, 1, 0, stackSize, hintsOnly);
}
@Override
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_EM_wormhole.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_wormhole.java
index 7b85d3406a..502a300bb3 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
@@ -6,7 +6,6 @@ import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_Rend
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;
@@ -42,7 +41,7 @@ public class GT_MetaTileEntity_EM_wormhole extends GT_MetaTileEntity_MultiblockB
};
private static final IStructureDefinition<GT_MetaTileEntity_EM_wormhole> STRUCTURE_DEFINITION =
- StructureDefinition.<GT_MetaTileEntity_EM_wormhole>builder()
+ IStructureDefinition.<GT_MetaTileEntity_EM_wormhole>builder()
.addShape("main", transpose(new String[][]{
{" "," "," "," "," "," D "," DDDDD "," DGGGD "," DGGGD "," DGGGD "," DDDDD "},
{" "," "," "," D "," D "," D "," DDAAADD "," EABBBAE "," EABBBAE "," EABBBAE "," DDAAADD "},
@@ -109,7 +108,7 @@ public class GT_MetaTileEntity_EM_wormhole extends GT_MetaTileEntity_MultiblockB
@Override
public void construct(ItemStack stackSize, boolean hintsOnly) {
- structureBuild_EM("main", 4, 4, 0, hintsOnly, stackSize);
+ structureBuild_EM("main", 4, 4, 0, stackSize, hintsOnly);
}
@Override
@@ -121,4 +120,4 @@ public class GT_MetaTileEntity_EM_wormhole extends GT_MetaTileEntity_MultiblockB
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_microwave.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_microwave.java
index b99ed26f5b..3df25033ca 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
@@ -6,7 +6,6 @@ import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_Rend
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 com.gtnewhorizon.structurelib.util.Vec3Impl;
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
@@ -52,7 +51,7 @@ public class GT_MetaTileEntity_TM_microwave extends GT_MetaTileEntity_Multiblock
};
private static final IStructureDefinition<GT_MetaTileEntity_TM_microwave> STRUCTURE_DEFINITION =
- StructureDefinition.<GT_MetaTileEntity_TM_microwave>builder()
+ IStructureDefinition.<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"},
@@ -247,7 +246,7 @@ public class GT_MetaTileEntity_TM_microwave extends GT_MetaTileEntity_Multiblock
@Override
public void construct(ItemStack stackSize, boolean hintsOnly) {
- structureBuild_EM("main", 2, 2, 0, hintsOnly, stackSize);
+ structureBuild_EM("main", 2, 2, 0, stackSize, hintsOnly);
}
@Override
@@ -259,4 +258,4 @@ public class GT_MetaTileEntity_TM_microwave extends GT_MetaTileEntity_Multiblock
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_proccessingStack.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_proccessingStack.java
index 427f448e2a..ba0af2d349 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
@@ -2,6 +2,7 @@ package com.github.technus.tectech.thing.metaTileEntity.multi;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM;
import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable;
+import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import net.minecraft.item.ItemStack;
@@ -13,6 +14,11 @@ public class GT_MetaTileEntity_TM_proccessingStack extends GT_MetaTileEntity_Mul
}
@Override
+ public IStructureDefinition<? extends GT_MetaTileEntity_MultiblockBase_EM> getStructure_EM() {
+ return null;
+ }
+
+ @Override
public void construct(ItemStack stackSize, boolean hintsOnly) {
}
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 0778feb1fd..c4d1de75fe 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
@@ -20,7 +20,6 @@ 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;
@@ -103,11 +102,10 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock
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()
+ IStructureDefinition.<GT_MetaTileEntity_TM_teslaCoil>builder()
.addShape("main", transpose(new String[][]{
{" "," "," BBB "," BBB "," BBB "," "," "},
{" "," BBB "," BBBBB "," BBBBB "," BBBBB "," BBB "," "},
@@ -701,7 +699,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock
@Override
public void construct(ItemStack stackSize, boolean hintsOnly) {
- structureBuild_EM("main", 3, 16, 0, hintsOnly, stackSize);
+ structureBuild_EM("main", 3, 16, 0, stackSize, hintsOnly);
}
@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 b02d9cd0a5..3a019de78c 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
@@ -161,6 +161,11 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt
//region SUPER STRUCT
@Override
+ public IAlignmentLimits getAlignmentLimits() {
+ return alignmentLimits;
+ }
+
+ @Override
public ExtendedFacing getExtendedFacing() {
return extendedFacing;
}
@@ -185,16 +190,6 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt
}
@Override
- public IAlignmentLimits getAlignmentLimits() {
- return alignmentLimits;
- }
-
- @Override
- public void setAlignmentLimits(IAlignmentLimits limits) {
- alignmentLimits=limits;
- }
-
- @Override
public boolean isFacingValid(byte aFacing) {
return canSetToDirectionAny(ForgeDirection.getOrientation(aFacing));
}
@@ -208,9 +203,7 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt
* Gets structure
* @return STATIC INSTANCE OF STRUCTURE
*/
- public IStructureDefinition<? extends GT_MetaTileEntity_MultiblockBase_EM> getStructure_EM(){
- throw new NoSuchMethodError("Implement it as STATIC INSTANCE");
- }
+ public abstract IStructureDefinition<? extends GT_MetaTileEntity_MultiblockBase_EM> getStructure_EM();
@SuppressWarnings("unchecked")
private IStructureDefinition<GT_MetaTileEntity_MultiblockBase_EM> getStructure_EM_Internal(){
@@ -224,7 +217,7 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt
horizontalOffset,verticalOffset,depthOffset,!mMachine);
}
- public final boolean structureBuild_EM(String piece,int horizontalOffset, int verticalOffset, int depthOffset,boolean hintsOnly,ItemStack trigger) {
+ public final boolean structureBuild_EM(String piece, int horizontalOffset, int verticalOffset, int depthOffset, ItemStack trigger, boolean hintsOnly) {
IGregTechTileEntity baseMetaTileEntity = getBaseMetaTileEntity();
return getStructure_EM_Internal().buildOrHints(this, trigger, piece, baseMetaTileEntity.getWorld(),
getExtendedFacing(), baseMetaTileEntity.getXCoord(), baseMetaTileEntity.getYCoord(),
@@ -634,9 +627,8 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt
*/
protected long getAvailableData_EM() {
long result = 0;
- Vec3Impl pos = new Vec3Impl(getBaseMetaTileEntity().getXCoord(),
- getBaseMetaTileEntity().getYCoord(),
- getBaseMetaTileEntity().getZCoord());
+ IGregTechTileEntity baseMetaTileEntity = getBaseMetaTileEntity();
+ Vec3Impl pos = new Vec3Impl(baseMetaTileEntity.getXCoord(),baseMetaTileEntity.getYCoord(),baseMetaTileEntity.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/em_collider/GT_MetaTileEntity_EM_collider.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_collider/GT_MetaTileEntity_EM_collider.java
index 0550b5c8ee..b7db310d12 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_collider/GT_MetaTileEntity_EM_collider.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_collider/GT_MetaTileEntity_EM_collider.java
@@ -1,18 +1,17 @@
package com.github.technus.tectech.thing.metaTileEntity.multi.em_collider;
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.elementalMatter.core.cElementalDecayResult;
-import com.github.technus.tectech.mechanics.elementalMatter.core.cElementalInstanceStackMap;
-import com.github.technus.tectech.mechanics.elementalMatter.core.cElementalMutableDefinitionStackMap;
-import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.cElementalInstanceStack;
-import com.github.technus.tectech.mechanics.elementalMatter.core.templates.cElementalPrimitive;
-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.compatibility.thaumcraft.elementalMatter.definitions.EMComplexAspectDefinition;
+import com.github.technus.tectech.compatibility.thaumcraft.elementalMatter.definitions.EMPrimalAspectDefinition;
+import com.github.technus.tectech.mechanics.elementalMatter.core.decay.EMDecayResult;
+import com.github.technus.tectech.mechanics.elementalMatter.core.definitions.EMPrimitiveTemplate;
+import com.github.technus.tectech.mechanics.elementalMatter.core.maps.EMDefinitionStackMap;
+import com.github.technus.tectech.mechanics.elementalMatter.core.maps.EMInstanceStackMap;
+import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.EMInstanceStack;
+import com.github.technus.tectech.mechanics.elementalMatter.definitions.complex.EMAtomDefinition;
+import com.github.technus.tectech.mechanics.elementalMatter.definitions.complex.EMHadronDefinition;
+import com.github.technus.tectech.mechanics.elementalMatter.definitions.primitive.EMQuarkDefinition;
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;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.INameFunction;
@@ -20,9 +19,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.StructureLibAPI;
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;
@@ -38,12 +37,14 @@ import net.minecraftforge.common.util.ForgeDirection;
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.elementalMatter.core.transformations.EMTransformationRegistry.EM_COUNT_PER_MATERIAL_AMOUNT;
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;
/**
@@ -303,7 +304,7 @@ public class GT_MetaTileEntity_EM_collider extends GT_MetaTileEntity_MultiblockB
};
private static final IStructureDefinition<GT_MetaTileEntity_EM_collider> STRUCTURE_DEFINITION =
- StructureDefinition.<GT_MetaTileEntity_EM_collider>builder()
+ IStructureDefinition.<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 "},
@@ -672,9 +673,9 @@ public class GT_MetaTileEntity_EM_collider extends GT_MetaTileEntity_MultiblockB
iGregTechTileEntity.getXCoord() + xDir,
iGregTechTileEntity.getYCoord() + yDir,
iGregTechTileEntity.getZCoord() + zDir,
- TT_Container_Casings.sHintCasingsTT, 12);
+ StructureLibAPI.getBlockHint(), 12);
}
- structureBuild_EM("main", 11, 1, 18, hintsOnly, stackSize);
+ structureBuild_EM("main", 11, 1, 18, stackSize, hintsOnly);
}
@Override
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 9898e82d4c..3b0e8ba91d 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
@@ -1,15 +1,14 @@
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.elementalMatter.core.maps.EMInstanceStackMap;
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.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;
@@ -23,10 +22,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;
/**
@@ -48,7 +48,7 @@ public class GT_MetaTileEntity_EM_machine extends GT_MetaTileEntity_MultiblockBa
};
private static final IStructureDefinition<GT_MetaTileEntity_EM_machine> STRUCTURE_DEFINITION =
- StructureDefinition.<GT_MetaTileEntity_EM_machine>builder()
+ IStructureDefinition.<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 "},
@@ -356,7 +356,7 @@ public class GT_MetaTileEntity_EM_machine extends GT_MetaTileEntity_MultiblockBa
@Override
public void construct(ItemStack stackSize, boolean hintsOnly) {
- structureBuild_EM("main", 2, 2, 1, hintsOnly, stackSize);
+ structureBuild_EM("main", 2, 2, 1, stackSize, hintsOnly);
}
@Override