aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbasdxz <tudurap.com@gmail.com>2020-07-06 13:46:11 +0100
committerbasdxz <tudurap.com@gmail.com>2020-07-06 13:46:11 +0100
commit1f68ed8ef0bbc797137d191c050bebdc6461dbdf (patch)
tree5cbfd92b88f0584e4da4960b59a79bb19a0dabfe
parent484cdfdcd19e3b15aa326f68ab1dca7b8a1e2520 (diff)
parent7e55f6a68a7b7b307034c994f2fac95a83f3753b (diff)
downloadGT5-Unofficial-1f68ed8ef0bbc797137d191c050bebdc6461dbdf.tar.gz
GT5-Unofficial-1f68ed8ef0bbc797137d191c050bebdc6461dbdf.tar.bz2
GT5-Unofficial-1f68ed8ef0bbc797137d191c050bebdc6461dbdf.zip
Merge branch 'master' into BassAddons
-rw-r--r--.gitignore6
-rw-r--r--build.properties6
-rw-r--r--src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java108
-rw-r--r--src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaDequantizer.java25
-rw-r--r--src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java25
-rw-r--r--src/main/java/com/github/technus/tectech/entity/fx/BlockHint.java28
-rw-r--r--src/main/java/com/github/technus/tectech/loader/ConstructableLoader.java57
-rw-r--r--src/main/java/com/github/technus/tectech/loader/MainLoader.java17
-rw-r--r--src/main/java/com/github/technus/tectech/loader/NetworkDispatcher.java2
-rw-r--r--src/main/java/com/github/technus/tectech/loader/TecTechConfig.java20
-rw-r--r--src/main/java/com/github/technus/tectech/loader/thing/MachineLoader.java256
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/alignment/AlignmentUtility.java45
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/alignment/IAlignment.java32
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/alignment/IAlignmentProvider.java5
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/alignment/IntegerAxisSwap.java17
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/ExtendedFacing.java24
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/constructable/ConstructableUtility.java114
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/constructable/IConstructable.java16
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/constructable/IMultiblockInfoContainer.java39
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/constructible/IConstructable.java15
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/spark/RendererMessage.java (renamed from src/main/java/com/github/technus/tectech/mechanics/data/RendererMessage.java)2
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/spark/ThaumSpark.java (renamed from src/main/java/com/github/technus/tectech/mechanics/data/ThaumSpark.java)108
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/structure/IBlockPosConsumer.java7
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/structure/ICustomBlockSetting.java17
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/structure/IStructureDefinition.java167
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElement.java43
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElementChain.java41
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElementCheckOnly.java16
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElementDeferred.java7
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElementNoPlacement.java11
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/structure/IStructureNavigate.java28
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/structure/Structure.java262
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/structure/StructureDefinition.java288
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/structure/StructureUtility.java1327
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/structure/adders/IBlockAdder.java14
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/structure/adders/IHatchAdder.java14
-rw-r--r--src/main/java/com/github/technus/tectech/mechanics/structure/adders/ITileAdder.java12
-rw-r--r--src/main/java/com/github/technus/tectech/proxy/ClientProxy.java28
-rw-r--r--src/main/java/com/github/technus/tectech/proxy/CommonProxy.java4
-rw-r--r--src/main/java/com/github/technus/tectech/thing/item/ConstructableTriggerItem.java123
-rw-r--r--src/main/java/com/github/technus/tectech/thing/item/EuMeterGT.java2
-rw-r--r--src/main/java/com/github/technus/tectech/thing/item/FrontRotationTriggerItem.java33
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_DynamoTunnel.java9
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_EnergyTunnel.java2
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_annihilation.java19
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_bhg.java195
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_collider.java134
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java52
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_crafting.java19
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dataBank.java21
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_decay.java25
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dequantizer.java25
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_infuser.java18
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_junction.java25
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_quantizer.java27
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java28
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_scanner.java30
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_stabilizer.java19
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java24
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_transformer.java50
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_wormhole.java19
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_microwave.java17
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_proccessingStack.java14
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java36
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java76
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/IHatchAdder.java8
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/SoundLoop.java9
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/render/TT_RenderedExtendedFacingTexture.java8
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/GT_MetaTileEntity_EM_machine.java20
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/pipe/GT_MetaTileEntity_Pipe_Data.java1
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_DebugPollutor.java2
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_DebugStructureWriter.java40
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_TeslaCoil.java4
-rw-r--r--src/main/java/com/github/technus/tectech/util/Util.java544
-rw-r--r--src/main/java/com/github/technus/tectech/util/Vec3Impl.java28
-rw-r--r--src/main/resources/assets/tectech/lang/en_US.lang254
-rw-r--r--src/main/resources/assets/tectech/lang/zh_CN.lang254
-rw-r--r--src/main/resources/assets/tectech/sounds/fx_lo_freq.oggbin14802 -> 29373 bytes
-rw-r--r--src/main/resources/assets/tectech/sounds/fx_mid_freq.oggbin15252 -> 26378 bytes
79 files changed, 3795 insertions, 1672 deletions
diff --git a/.gitignore b/.gitignore
index e97facd823..02507f643c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -35,3 +35,9 @@ GregTech.lang
mods/
classes/
logs/
+libs/AsieLib-1.7.10-0.4.9-deobf.jar
+libs/Computronics-1.7.10-1.6.6-deobf.jar
+libs/Galacticraft-API-1.7-3.0.12.504.jar
+libs/GTNewHorizonsCoreMod-1.7.10-1.6.10.jar
+libs/MicdoodleCore-1.7-3.0.12.504.jar
+libs/worldedit-forge-mc1.7.10-6.1.1-dist.jar
diff --git a/build.properties b/build.properties
index 8dd601eb38..3b282b43c2 100644
--- a/build.properties
+++ b/build.properties
@@ -1,13 +1,13 @@
minecraft.version=1.7.10
forge.version=10.13.4.1614
-tectech.version=3.8.0
+tectech.version=3.8.3
ic2.version=2.2.790-experimental
codechickenlib.version=1.1.3.140
codechickencore.version=1.0.7.47
nei.version=1.0.5.120
-gregtech.jenkinsbuild=512
-gregtech.version=5.09.33.41
+gregtech.jenkinsbuild=620
+gregtech.version=5.09.33.50
cofhcore.version=[1.7.10]3.1.4-329-dev
yamcore.version=0.5.79
baubles.version=1.0.1.10
diff --git a/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java b/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java
index 86468de1b2..b669165176 100644
--- a/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java
+++ b/src/main/java/com/github/technus/tectech/compatibility/dreamcraft/DreamCraftRecipeLoader.java
@@ -30,9 +30,11 @@ import static com.github.technus.tectech.loader.recipe.RecipeLoader.getOrDefault
*/
public class DreamCraftRecipeLoader implements Runnable {
//region reflect a bit
+ @SuppressWarnings("rawtypes")
private Class CUSTOM_ITEM_LIST;
private Method ADD_ASSEMBLER_RECIPE;
+ @SuppressWarnings("unchecked")
private IItemContainer getItemContainer(String name) {
return (IItemContainer) Enum.valueOf(CUSTOM_ITEM_LIST, name);
}
@@ -41,7 +43,7 @@ public class DreamCraftRecipeLoader implements Runnable {
try {
ADD_ASSEMBLER_RECIPE.invoke(GT_Values.RA, items, fluid, output, time, eut, true);
} catch (Exception e) {
- throw new Error(e);
+ throw new RuntimeException("Failed to add clean room assembler recipe! " +output.getDisplayName(),e);
}
}
//endregion
@@ -253,9 +255,9 @@ public class DreamCraftRecipeLoader implements Runnable {
GT_Values.RA.addAssemblerRecipe(new ItemStack[]{getItemContainer("Transformer_UIV_UEV").get(1), CustomItemList.eM_dynamoMulti4_UEV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.Draconium, 2), GT_OreDictUnificator.get(OrePrefixes.plate, getOrDefault("Bedrockium", Materials.Neutronium), 4)}, Materials.Electrum.getMolten(4608), CustomItemList.eM_dynamoMulti16_UEV.get(1), 200, 2000000);
GT_Values.RA.addAssemblerRecipe(new ItemStack[]{getItemContainer("WetTransformer_UIV_UEV").get(1), CustomItemList.eM_dynamoMulti16_UEV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt12, Materials.Draconium, 2), GT_OreDictUnificator.get(OrePrefixes.plate, getOrDefault("Bedrockium", Materials.Neutronium), 6)}, Materials.Tungsten.getMolten(4608), CustomItemList.eM_dynamoMulti64_UEV.get(1), 400, 2000000);
- //GT_Values.RA.ADD_ASSEMBLER_RECIPE(new ItemStack[]{com.dreammaster.gthandler.CustomItemList.Hatch_Dynamo_UIV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.NetherStar, 2), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.BlackPlutonium, 2)}, Materials.Silver.getMolten(8000), CustomItemList.eM_dynamoMulti4_UIV.get(1), 100, 8000000);
- //GT_Values.RA.ADD_ASSEMBLER_RECIPE(new ItemStack[]{com.dreammaster.gthandler.CustomItemList.Transformer_UMV_UIV.get(1), CustomItemList.eM_dynamoMulti4_UIV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.NetherStar, 2), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.BlackPlutonium, 4)}, Materials.Electrum.getMolten(8000), CustomItemList.eM_dynamoMulti16_UIV.get(1), 200, 8000000);
- //GT_Values.RA.ADD_ASSEMBLER_RECIPE(new ItemStack[]{com.dreammaster.gthandler.CustomItemList.WetTransformer_UMV_UIV.get(1), CustomItemList.eM_dynamoMulti16_UIV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt12, Materials.NetherStar, 2), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.BlackPlutonium, 6)}, Materials.Tungsten.getMolten(8000), CustomItemList.eM_dynamoMulti64_UIV.get(1), 400, 8000000);
+ GT_Values.RA.addAssemblerRecipe(new ItemStack[]{getItemContainer("Hatch_Dynamo_UIV").get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.NetherStar, 2), GT_OreDictUnificator.get(OrePrefixes.plate, getOrDefault("BlackPlutonium", Materials.Neutronium), 2)}, Materials.Silver.getMolten(8000), CustomItemList.eM_dynamoMulti4_UIV.get(1), 100, 8000000);
+ GT_Values.RA.addAssemblerRecipe(new ItemStack[]{getItemContainer("Transformer_UMV_UIV").get(1), CustomItemList.eM_dynamoMulti4_UIV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.NetherStar, 2), GT_OreDictUnificator.get(OrePrefixes.plate, getOrDefault("BlackPlutonium", Materials.Neutronium), 4)}, Materials.Electrum.getMolten(8000), CustomItemList.eM_dynamoMulti16_UIV.get(1), 200, 8000000);
+ GT_Values.RA.addAssemblerRecipe(new ItemStack[]{getItemContainer("WetTransformer_UMV_UIV").get(1), CustomItemList.eM_dynamoMulti16_UIV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt12, Materials.NetherStar, 2), GT_OreDictUnificator.get(OrePrefixes.plate, getOrDefault("BlackPlutonium", Materials.Neutronium), 6)}, Materials.Tungsten.getMolten(8000), CustomItemList.eM_dynamoMulti64_UIV.get(1), 400, 8000000);
//Energy Hatches IV-UIV
GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hatch_Energy_IV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.Tungsten, 2), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.TungstenSteel, 2)}, Materials.Silver.getMolten(144), CustomItemList.eM_energyMulti4_IV.get(1), 100, 1920);
@@ -282,10 +284,20 @@ public class DreamCraftRecipeLoader implements Runnable {
GT_Values.RA.addAssemblerRecipe(new ItemStack[]{getItemContainer("Transformer_UIV_UEV").get(1), CustomItemList.eM_energyMulti4_UEV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.Draconium, 2), GT_OreDictUnificator.get(OrePrefixes.plate, getOrDefault("Bedrockium", Materials.Neutronium), 4)}, Materials.Electrum.getMolten(4608), CustomItemList.eM_energyMulti16_UEV.get(1), 200, 2000000);
GT_Values.RA.addAssemblerRecipe(new ItemStack[]{getItemContainer("WetTransformer_UIV_UEV").get(1), CustomItemList.eM_energyMulti16_UEV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt12, Materials.Draconium, 2), GT_OreDictUnificator.get(OrePrefixes.plate, getOrDefault("Bedrockium", Materials.Neutronium), 6)}, Materials.Tungsten.getMolten(4608), CustomItemList.eM_energyMulti64_UEV.get(1), 400, 2000000);
- //GT_Values.RA.ADD_ASSEMBLER_RECIPE(new ItemStack[]{com.dreammaster.gthandler.CustomItemList.Hatch_Energy_UIV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.NetherStar, 2), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.BlackPlutonium, 2)}, Materials.Silver.getMolten(8000), CustomItemList.eM_energyMulti4_UIV.get(1), 100, 8000000);
- //GT_Values.RA.ADD_ASSEMBLER_RECIPE(new ItemStack[]{com.dreammaster.gthandler.CustomItemList.Transformer_UMV_UIV.get(1), CustomItemList.eM_energyMulti4_UIV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.NetherStar, 2), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.BlackPlutonium, 4)}, Materials.Electrum.getMolten(8000), CustomItemList.eM_energyMulti16_UIV.get(1), 200, 8000000);
- //GT_Values.RA.ADD_ASSEMBLER_RECIPE(new ItemStack[]{com.dreammaster.gthandler.CustomItemList.WetTransformer_UMV_UIV.get(1), CustomItemList.eM_energyMulti16_UIV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt12, Materials.NetherStar, 2), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.BlackPlutonium, 6)}, Materials.Tungsten.getMolten(8000), CustomItemList.eM_energyMulti64_UIV.get(1), 400, 8000000);
-
+ GT_Values.RA.addAssemblerRecipe(new ItemStack[]{getItemContainer("Hatch_Energy_UIV").get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.NetherStar, 2), GT_OreDictUnificator.get(OrePrefixes.plate, getOrDefault("BlackPlutonium", Materials.Neutronium), 2)}, Materials.Silver.getMolten(8000), CustomItemList.eM_energyMulti4_UIV.get(1), 100, 8000000);
+ GT_Values.RA.addAssemblerRecipe(new ItemStack[]{getItemContainer("Transformer_UMV_UIV").get(1), CustomItemList.eM_energyMulti4_UIV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt08, Materials.NetherStar, 2), GT_OreDictUnificator.get(OrePrefixes.plate, getOrDefault("BlackPlutonium", Materials.Neutronium), 4)}, Materials.Electrum.getMolten(8000), CustomItemList.eM_energyMulti16_UIV.get(1), 200, 8000000);
+ GT_Values.RA.addAssemblerRecipe(new ItemStack[]{getItemContainer("WetTransformer_UMV_UIV").get(1), CustomItemList.eM_energyMulti16_UIV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt12, Materials.NetherStar, 2), GT_OreDictUnificator.get(OrePrefixes.plate, getOrDefault("BlackPlutonium", Materials.Neutronium), 6)}, Materials.Tungsten.getMolten(8000), CustomItemList.eM_energyMulti64_UIV.get(1), 400, 8000000);
+
+ //Buck Converter IV-UIV
+ if(Loader.isModLoaded("bartworks")) {
+ GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Transformer_LuV_IV.get(1), getItemContainer("Display").get(1), GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Elite, 2), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.TungstenSteel, 2), GT_OreDictUnificator.get(OrePrefixes.wireGt16, Materials.TungstenSteel, 4), GT_ModHandler.getModItem("bartworks", "BW_GlasBlocks", 2L, 2)}, Materials.TungstenSteel.getMolten(288), CustomItemList.Machine_BuckConverter_IV.get(1), 100, 7680);
+ GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Transformer_ZPM_LuV.get(1), getItemContainer("Display").get(1), GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Master, 2), GT_OreDictUnificator.get(OrePrefixes.plate, getOrDefault("Rhodium-PlatedPalladium", Materials.Chrome), 2), GT_OreDictUnificator.get(OrePrefixes.wireGt16, Materials.NiobiumTitanium, 4), GT_ModHandler.getModItem("bartworks", "BW_GlasBlocks", 2L, 3)}, new FluidStack(FluidRegistry.getFluid("molten.rhodium-plated palladium"), 288), CustomItemList.Machine_BuckConverter_LuV.get(1), 100, 30720);
+ GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Transformer_UV_ZPM.get(1), getItemContainer("Display").get(1), GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Ultimate, 2), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 2), GT_OreDictUnificator.get(OrePrefixes.wireGt16, Materials.TungstenSteel, 4), GT_ModHandler.getModItem("bartworks", "BW_GlasBlocks", 2L, 4)}, Materials.Iridium.getMolten(288), CustomItemList.Machine_BuckConverter_ZPM.get(1), 100, 122880);
+ GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Transformer_MAX_UV.get(1), getItemContainer("Display").get(1), GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Superconductor, 2), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Osmium, 2), GT_OreDictUnificator.get(OrePrefixes.wireGt16, Materials.Naquadah, 4), GT_ModHandler.getModItem("bartworks", "BW_GlasBlocks", 2L, 5)}, Materials.Osmium.getMolten(288), CustomItemList.Machine_BuckConverter_UV.get(1), 100, 500000);
+ GT_Values.RA.addAssemblerRecipe(new ItemStack[]{getItemContainer("Transformer_UEV_UHV").get(1), getItemContainer("Display").get(1), GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Infinite, 2), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 2), GT_OreDictUnificator.get(OrePrefixes.wireGt16, Materials.ElectrumFlux, 4), GT_ModHandler.getModItem("bartworks", "BW_GlasBlocks", 4L, 5)}, Materials.Neutronium.getMolten(288), CustomItemList.Machine_BuckConverter_UHV.get(1), 100, 2000000);
+ GT_Values.RA.addAssemblerRecipe(new ItemStack[]{getItemContainer("Transformer_UIV_UEV").get(1), getItemContainer("Display").get(1), GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Bio, 2), GT_OreDictUnificator.get(OrePrefixes.plate, getOrDefault("Bedrockium", Materials.Neutronium), 2), GT_OreDictUnificator.get(OrePrefixes.wireGt16, Materials.Bedrockium, 4), GT_ModHandler.getModItem("bartworks", "BW_GlasBlocks", 8L, 5)}, getOrDefault("Bedrockium", Materials.Neutronium).getMolten(288), CustomItemList.Machine_BuckConverter_UEV.get(1), 100, 8000000);
+ GT_Values.RA.addAssemblerRecipe(new ItemStack[]{getItemContainer("Transformer_UMV_UIV").get(1), getItemContainer("Display").get(1), GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Nano, 2), GT_OreDictUnificator.get(OrePrefixes.plate, getOrDefault("BlackPlutonium", Materials.Neutronium), 2), GT_OreDictUnificator.get(OrePrefixes.wireGt16, Materials.Draconium, 4), GT_ModHandler.getModItem("bartworks", "BW_GlasBlocks", 16L, 5)}, getOrDefault("BlackPlutonium", Materials.Neutronium).getMolten(288), CustomItemList.Machine_BuckConverter_UIV.get(1), 200, 8000000);
+ }
//Laser Dynamo IV-UEV 256/t
GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_IV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 1), ItemList.Emitter_IV.get(1), ItemList.Electric_Pump_IV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.TungstenSteel, 2), GT_Utility.getIntegratedCircuit(1)}, null, CustomItemList.eM_dynamoTunnel1_IV.get(1), 1000, 7680);
GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_LuV.get(1), GT_OreDictUnificator.get(OrePrefixes.lens, Materials.Diamond, 1), ItemList.Emitter_LuV.get(1), ItemList.Electric_Pump_LuV.get(1), GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.VanadiumGallium, 2), GT_Utility.getIntegratedCircuit(1)}, null, CustomItemList.eM_dynamoTunnel1_LuV.get(1), 1000, 30720);
@@ -445,7 +457,25 @@ public class DreamCraftRecipeLoader implements Runnable {
CustomItemList.DATApipe.get(4),
ItemList.Cover_Screen.get(1),
new ItemStack(Blocks.stone_button, 16),
+ GT_Utility.getIntegratedCircuit(1),
}, Materials.Iridium.getMolten(2592), CustomItemList.Parametrizer_Hatch.get(1), 800, 122880);
+ GT_Values.RA.addAssemblerRecipe(new ItemStack[]{
+ CustomItemList.eM_Computer_Casing.get(1),
+ ItemList.Circuit_Ultimatecrystalcomputer.get(1),
+ CustomItemList.DATApipe.get(6),
+ ItemList.Cover_Screen.get(1),
+ new ItemStack(Blocks.stone_button, 32),
+ GT_Utility.getIntegratedCircuit(2),
+ }, Materials.Iridium.getMolten(2592), CustomItemList.ParametrizerX_Hatch.get(1), 800, 122880);
+
+ GT_Values.RA.addAssemblerRecipe(new ItemStack[]{
+ CustomItemList.eM_Computer_Casing.get(1),
+ ItemList.Circuit_Biomainframe.get(1),
+ CustomItemList.DATApipe.get(8),
+ ItemList.Cover_Screen.get(2),
+ new ItemStack(Blocks.stone_button, 64),
+ GT_Utility.getIntegratedCircuit(3),
+ }, Materials.Iridium.getMolten(2592), CustomItemList.ParametrizerTXT_Hatch.get(1), 800, 122880);
//Uncertainty
addAssemblerRecipeWithCleanroom(new ItemStack[]{
CustomItemList.eM_Computer_Casing.get(1),
@@ -453,8 +483,18 @@ public class DreamCraftRecipeLoader implements Runnable {
CustomItemList.DATApipe.get(16),
ItemList.Cover_Screen.get(1),
new ItemStack(Blocks.stone_button, 16),
+ GT_Utility.getIntegratedCircuit(4),
}, Materials.Iridium.getMolten(2592), CustomItemList.Uncertainty_Hatch.get(1), 1200, 122880);
+ addAssemblerRecipeWithCleanroom(new ItemStack[]{
+ CustomItemList.eM_Computer_Casing.get(1),
+ ItemList.Circuit_Biomainframe.get(1),
+ CustomItemList.DATApipe.get(32),
+ ItemList.Cover_Screen.get(1),
+ new ItemStack(Blocks.stone_button, 16),
+ GT_Utility.getIntegratedCircuit(5),
+ }, Materials.Iridium.getMolten(2592), CustomItemList.UncertaintyX_Hatch.get(1), 1200, 122880);
+
//Elemental Input
addAssemblerRecipeWithCleanroom(new ItemStack[]{
CustomItemList.eM_Containment.get(1),
@@ -971,10 +1011,10 @@ public class DreamCraftRecipeLoader implements Runnable {
GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Tritanium, 2),
ItemList.Circuit_Wetwaresupercomputer.get(2L),
ItemList.ZPM_Coil.get(16L),
- ItemList.Circuit_Parts_CapacitorSMD.get(64L),
- ItemList.Circuit_Parts_ResistorSMD.get(64L),
- ItemList.Circuit_Parts_TransistorSMD.get(64L),
- ItemList.Circuit_Parts_DiodeSMD.get(64L),
+ ItemList.Circuit_Parts_CapacitorASMD.get(16L),
+ ItemList.Circuit_Parts_ResistorASMD.get(16L),
+ ItemList.Circuit_Parts_TransistorASMD.get(16L),
+ ItemList.Circuit_Parts_DiodeASMD.get(16L),
ItemList.Circuit_Chip_Ram.get(48L),
GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorZPM, 64L),
GT_OreDictUnificator.get(OrePrefixes.foil, (Materials.AnySyntheticRubber), 64L),
@@ -989,10 +1029,10 @@ public class DreamCraftRecipeLoader implements Runnable {
48000, 128, 500000, 8, new ItemStack[]{
ItemList.Circuit_Board_Bio_Ultra.get(2L),
ItemList.Circuit_Biowarecomputer.get(2L),
- ItemList.Circuit_Parts_TransistorSMD.get(16L),
- ItemList.Circuit_Parts_ResistorSMD.get(16L),
- ItemList.Circuit_Parts_CapacitorSMD.get(16L),
- ItemList.Circuit_Parts_DiodeSMD.get(48L),
+ ItemList.Circuit_Parts_TransistorASMD.get(16L),
+ ItemList.Circuit_Parts_ResistorASMD.get(16L),
+ ItemList.Circuit_Parts_CapacitorASMD.get(16L),
+ ItemList.Circuit_Parts_DiodeASMD.get(16L),
ItemList.Circuit_Chip_NOR.get(32L),
ItemList.Circuit_Chip_Ram.get(64L),
GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.NiobiumTitanium, 32L),
@@ -1009,10 +1049,10 @@ public class DreamCraftRecipeLoader implements Runnable {
GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Tritanium, 4L),
ItemList.Circuit_Biowaresupercomputer.get(2L),
ItemList.UV_Coil.get(16L),
- ItemList.Circuit_Parts_CapacitorSMD.get(64L),
- ItemList.Circuit_Parts_ResistorSMD.get(64L),
- ItemList.Circuit_Parts_TransistorSMD.get(64L),
- ItemList.Circuit_Parts_DiodeSMD.get(64L),
+ ItemList.Circuit_Parts_CapacitorASMD.get(24L),
+ ItemList.Circuit_Parts_ResistorASMD.get(24L),
+ ItemList.Circuit_Parts_TransistorASMD.get(24L),
+ ItemList.Circuit_Parts_DiodeASMD.get(24L),
ItemList.Circuit_Chip_Ram.get(64L),
GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorUHV, 64),
GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Silicone, 64),
@@ -1028,10 +1068,10 @@ public class DreamCraftRecipeLoader implements Runnable {
192000, 512, 2000000, 32, new ItemStack[]{
GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Tritanium, 8),
ItemList.Circuit_Biomainframe.get(2L),
- ItemList.Circuit_Parts_CapacitorSMD.get(64L),
- ItemList.Circuit_Parts_ResistorSMD.get(64L),
- ItemList.Circuit_Parts_TransistorSMD.get(64L),
- ItemList.Circuit_Parts_DiodeSMD.get(64L),
+ ItemList.Circuit_Parts_CapacitorASMD.get(32L),
+ ItemList.Circuit_Parts_ResistorASMD.get(32L),
+ ItemList.Circuit_Parts_TransistorASMD.get(32L),
+ ItemList.Circuit_Parts_DiodeASMD.get(32L),
ItemList.Circuit_Chip_Ram.get(64L),
ItemList.Circuit_Chip_NPIC.get(64L),
GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Draconium, 64),
@@ -1050,10 +1090,10 @@ public class DreamCraftRecipeLoader implements Runnable {
ItemList.Circuit_Board_Bio_Ultra.get(1L),
getItemContainer("PicoWafer").get(4L),
getItemContainer("NanoCircuit").get(2L),
- ItemList.Circuit_Parts_TransistorSMD.get(64L),
- ItemList.Circuit_Parts_ResistorSMD.get(64L),
- ItemList.Circuit_Parts_CapacitorSMD.get(64L),
- ItemList.Circuit_Parts_DiodeSMD.get(64L),
+ ItemList.Circuit_Parts_TransistorASMD.get(484L),
+ ItemList.Circuit_Parts_ResistorASMD.get(48L),
+ ItemList.Circuit_Parts_CapacitorASMD.get(48L),
+ ItemList.Circuit_Parts_DiodeASMD.get(48L),
ItemList.Circuit_Chip_PPIC.get(64L),
GT_OreDictUnificator.get(OrePrefixes.foil, Materials.NiobiumTitanium, 16),
GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Osmium, 32),
@@ -1069,10 +1109,10 @@ public class DreamCraftRecipeLoader implements Runnable {
720000, 2048, 8000000, 128, new ItemStack[]{
GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Neutronium, 16),
getItemContainer("PikoCircuit").get(8L),
- ItemList.Circuit_Parts_CapacitorSMD.get(64L),
- ItemList.Circuit_Parts_DiodeSMD.get(64L),
- ItemList.Circuit_Parts_TransistorSMD.get(64L),
- ItemList.Circuit_Parts_ResistorSMD.get(64L),
+ ItemList.Circuit_Parts_CapacitorASMD.get(64L),
+ ItemList.Circuit_Parts_DiodeASMD.get(64L),
+ ItemList.Circuit_Parts_TransistorASMD.get(64L),
+ ItemList.Circuit_Parts_ResistorASMD.get(64L),
ItemList.Circuit_Chip_QPIC.get(64L),
GT_OreDictUnificator.get(OrePrefixes.foil, Materials.NiobiumTitanium, 64),
GT_OreDictUnificator.get(OrePrefixes.bolt, Materials.Indium, 64),
@@ -1153,7 +1193,7 @@ public class DreamCraftRecipeLoader implements Runnable {
ItemList.Field_Generator_UV.get(2),
ItemList.Circuit_Wafer_HPIC.get(64),
ItemList.Circuit_Wafer_HPIC.get(64),
- ItemList.Circuit_Parts_DiodeSMD.get(64),
+ ItemList.Circuit_Parts_DiodeASMD.get(32),
GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorUHV, 32),
}, new FluidStack[]{
Materials.SolderingAlloy.getMolten(2880),
@@ -1172,7 +1212,7 @@ public class DreamCraftRecipeLoader implements Runnable {
ItemList.Circuit_Wafer_UHPIC.get(64),
ItemList.Circuit_Wafer_UHPIC.get(64),
ItemList.Circuit_Wafer_SoC2.get(32),
- ItemList.Circuit_Parts_DiodeSMD.get(64),
+ ItemList.Circuit_Parts_DiodeASMD.get(64),
GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.Neutronium, 64),
}, new FluidStack[]{
Materials.SolderingAlloy.getMolten(3760),
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 ab6b723e09..87e2660e01 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
@@ -1,16 +1,17 @@
package com.github.technus.tectech.compatibility.thaumcraft.thing.metaTileEntity.multi;
-import com.github.technus.tectech.util.CommonValues;
import com.github.technus.tectech.TecTech;
import com.github.technus.tectech.compatibility.thaumcraft.elementalMatter.definitions.ePrimalAspectDefinition;
+import com.github.technus.tectech.mechanics.constructable.IConstructable;
import com.github.technus.tectech.mechanics.elementalMatter.core.cElementalInstanceStackMap;
import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.cElementalInstanceStack;
+import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder;
+import com.github.technus.tectech.mechanics.structure.Structure;
import com.github.technus.tectech.thing.block.QuantumGlassBlock;
import com.github.technus.tectech.thing.casing.TT_Container_Casings;
-import com.github.technus.tectech.mechanics.constructible.IConstructable;
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.thing.metaTileEntity.multi.base.IHatchAdder;
+import com.github.technus.tectech.util.CommonValues;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
@@ -23,11 +24,11 @@ import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.common.util.ForgeDirection;
-import static com.github.technus.tectech.util.CommonValues.V;
-import static com.github.technus.tectech.util.Util.StructureBuilderExtreme;
import static com.github.technus.tectech.compatibility.thaumcraft.thing.metaTileEntity.multi.EssentiaCompat.essentiaContainerCompat;
+import static com.github.technus.tectech.mechanics.structure.Structure.adders;
import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset;
import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT;
+import static com.github.technus.tectech.util.CommonValues.V;
import static gregtech.api.enums.GT_Values.E;
import static net.minecraft.util.StatCollector.translateToLocal;
@@ -46,10 +47,10 @@ public class GT_MetaTileEntity_EM_essentiaDequantizer extends GT_MetaTileEntity_
};
private static final Block[] blockType = new Block[]{QuantumGlassBlock.INSTANCE, sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT};
private static final byte[] blockMeta = new byte[]{0, 0, 4, 8};
- private final IHatchAdder[] addingMethods = new IHatchAdder[]{
- this::addClassicToMachineList,
- this::addElementalInputToMachineList,
- this::addElementalMufflerToMachineList};
+ private static final IHatchAdder<GT_MetaTileEntity_EM_essentiaDequantizer>[] addingMethods = adders(
+ GT_MetaTileEntity_EM_essentiaDequantizer::addClassicToMachineList,
+ GT_MetaTileEntity_EM_essentiaDequantizer::addElementalInputToMachineList,
+ GT_MetaTileEntity_EM_essentiaDequantizer::addElementalMufflerToMachineList);
private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 4, textureOffset + 4};
private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT};
private static final byte[] blockMetaFallback = new byte[]{0, 4, 4};
@@ -123,7 +124,7 @@ public class GT_MetaTileEntity_EM_essentiaDequantizer extends GT_MetaTileEntity_
}
@Override
- public void construct(int stackSize, boolean hintsOnly) {
+ public void construct(ItemStack stackSize, boolean hintsOnly) {
IGregTechTileEntity iGregTechTileEntity = getBaseMetaTileEntity();
int xDir = ForgeDirection.getOrientation(iGregTechTileEntity.getBackFacing()).offsetX;
int yDir = ForgeDirection.getOrientation(iGregTechTileEntity.getBackFacing()).offsetY;
@@ -139,11 +140,11 @@ public class GT_MetaTileEntity_EM_essentiaDequantizer extends GT_MetaTileEntity_
iGregTechTileEntity.getWorld().setBlock(iGregTechTileEntity.getXCoord() + xDir, iGregTechTileEntity.getYCoord() + yDir, iGregTechTileEntity.getZCoord() + zDir, TT_Container_Casings.sHintCasingsTT, 12, 2);
}
}
- StructureBuilderExtreme(shape, blockType, blockMeta, 1, 1, 0, iGregTechTileEntity, getExtendedFacing(), hintsOnly);
+ Structure.builder(shape, blockType, blockMeta, 1, 1, 0, iGregTechTileEntity, getExtendedFacing(), hintsOnly);
}
@Override
- public String[] getStructureDescription(int stackSize) {
+ public String[] getStructureDescription(ItemStack stackSize) {
return description;
}
} \ No newline at end of file
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 309d029b8e..a716420e81 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
@@ -1,16 +1,17 @@
package com.github.technus.tectech.compatibility.thaumcraft.thing.metaTileEntity.multi;
-import com.github.technus.tectech.util.CommonValues;
import com.github.technus.tectech.TecTech;
import com.github.technus.tectech.compatibility.thaumcraft.elementalMatter.definitions.ePrimalAspectDefinition;
+import com.github.technus.tectech.mechanics.constructable.IConstructable;
import com.github.technus.tectech.mechanics.elementalMatter.core.cElementalInstanceStackMap;
import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.cElementalInstanceStack;
+import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder;
+import com.github.technus.tectech.mechanics.structure.Structure;
import com.github.technus.tectech.thing.block.QuantumGlassBlock;
import com.github.technus.tectech.thing.casing.TT_Container_Casings;
-import com.github.technus.tectech.mechanics.constructible.IConstructable;
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.thing.metaTileEntity.multi.base.IHatchAdder;
+import com.github.technus.tectech.util.CommonValues;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
@@ -23,11 +24,11 @@ import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.common.util.ForgeDirection;
-import static com.github.technus.tectech.util.CommonValues.V;
-import static com.github.technus.tectech.util.Util.StructureBuilderExtreme;
import static com.github.technus.tectech.compatibility.thaumcraft.thing.metaTileEntity.multi.EssentiaCompat.essentiaContainerCompat;
+import static com.github.technus.tectech.mechanics.structure.Structure.adders;
import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset;
import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT;
+import static com.github.technus.tectech.util.CommonValues.V;
import static gregtech.api.enums.GT_Values.E;
import static net.minecraft.util.StatCollector.translateToLocal;
@@ -46,10 +47,10 @@ public class GT_MetaTileEntity_EM_essentiaQuantizer extends GT_MetaTileEntity_Mu
};
private static final Block[] blockType = new Block[]{QuantumGlassBlock.INSTANCE, sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT};
private static final byte[] blockMeta = new byte[]{0, 4, 0, 8};
- private final IHatchAdder[] addingMethods = new IHatchAdder[]{
- this::addClassicToMachineList,
- this::addElementalOutputToMachineList,
- this::addElementalMufflerToMachineList};
+ private static final IHatchAdder<GT_MetaTileEntity_EM_essentiaQuantizer>[] addingMethods = adders(
+ GT_MetaTileEntity_EM_essentiaQuantizer::addClassicToMachineList,
+ GT_MetaTileEntity_EM_essentiaQuantizer::addElementalOutputToMachineList,
+ GT_MetaTileEntity_EM_essentiaQuantizer::addElementalMufflerToMachineList);
private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 4, textureOffset + 4};
private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT};
private static final byte[] blockMetaFallback = new byte[]{0, 4, 4};
@@ -127,7 +128,7 @@ public class GT_MetaTileEntity_EM_essentiaQuantizer extends GT_MetaTileEntity_Mu
}
@Override
- public void construct(int stackSize, boolean hintsOnly) {
+ public void construct(ItemStack stackSize, boolean hintsOnly) {
IGregTechTileEntity iGregTechTileEntity = getBaseMetaTileEntity();
int xDir = ForgeDirection.getOrientation(iGregTechTileEntity.getBackFacing()).offsetX;
int yDir = ForgeDirection.getOrientation(iGregTechTileEntity.getBackFacing()).offsetY;
@@ -143,11 +144,11 @@ public class GT_MetaTileEntity_EM_essentiaQuantizer extends GT_MetaTileEntity_Mu
iGregTechTileEntity.getWorld().setBlock(iGregTechTileEntity.getXCoord() + xDir, iGregTechTileEntity.getYCoord() + yDir, iGregTechTileEntity.getZCoord() + zDir, TT_Container_Casings.sHintCasingsTT, 12, 2);
}
}
- StructureBuilderExtreme(shape, blockType, blockMeta, 1, 1, 0, iGregTechTileEntity, getExtendedFacing(), hintsOnly);
+ Structure.builder(shape, blockType, blockMeta, 1, 1, 0, iGregTechTileEntity, getExtendedFacing(), hintsOnly);
}
@Override
- public String[] getStructureDescription(int stackSize) {
+ public String[] getStructureDescription(ItemStack stackSize) {
return description;
}
} \ No newline at end of file
diff --git a/src/main/java/com/github/technus/tectech/entity/fx/BlockHint.java b/src/main/java/com/github/technus/tectech/entity/fx/BlockHint.java
index ab075f7ffd..dd5cd59ac7 100644
--- a/src/main/java/com/github/technus/tectech/entity/fx/BlockHint.java
+++ b/src/main/java/com/github/technus/tectech/entity/fx/BlockHint.java
@@ -3,6 +3,7 @@ package com.github.technus.tectech.entity.fx;
import com.github.technus.tectech.TecTech;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
+import gregtech.api.enums.Dyes;
import net.minecraft.block.Block;
import net.minecraft.client.particle.EntityFX;
import net.minecraft.client.renderer.Tessellator;
@@ -14,11 +15,31 @@ import org.lwjgl.opengl.GL11;
@SideOnly(Side.CLIENT)
public class BlockHint extends EntityFX {
private IIcon[] icons = new IIcon[6];
+ private short[] mRGBa = Dyes._NULL.mRGBa;
public BlockHint(World world){
this(world,0,0,0, Blocks.stone,0);
}
+ /**
+ *
+ * @param world
+ * @param x
+ * @param y
+ * @param z
+ * @param icons DOWN, UP, NORTH, SOUTH, WEST, EAST
+ */
+ public BlockHint(World world, int x, int y, int z, IIcon[] icons) {
+ super(world, x + .25, y + .5, z + .25);
+ particleGravity = 0;
+ prevPosX = posX;
+ prevPosY = posY;
+ prevPosZ = posZ;
+ noClip = true;
+ particleMaxAge = 2000 + TecTech.RANDOM.nextInt(200);
+ this.icons=icons;
+ }
+
public BlockHint(World world, int x, int y, int z, Block block, int meta) {
super(world, x+.25, y+.5, z+.25);
particleGravity = 0;
@@ -32,6 +53,11 @@ public class BlockHint extends EntityFX {
}
}
+ public BlockHint withColorTint(short[] coloure){
+ this.mRGBa =coloure;
+ return this;
+ }
+
@Override
public void renderParticle(Tessellator tes, float subTickTime, float p_70539_3_, float p_70539_4_, float p_70539_5_, float p_70539_6_, float p_70539_7_) {
float size = .5f;
@@ -40,7 +66,7 @@ public class BlockHint extends EntityFX {
float Z = (float) (prevPosZ + (posZ - prevPosZ) * (double) subTickTime - EntityFX.interpPosZ);
GL11.glDisable(GL11.GL_CULL_FACE);
GL11.glDepthMask(false);
- tes.setColorRGBA_F(.9F, .95F, 1F, .75f);
+ tes.setColorRGBA((int) (mRGBa[0] * .9F), (int) (mRGBa[1] * .95F), (int) (mRGBa[2] * 1F), 192);
//var8, var9 - X U
//var 10, var 11 - Y V
diff --git a/src/main/java/com/github/technus/tectech/loader/ConstructableLoader.java b/src/main/java/com/github/technus/tectech/loader/ConstructableLoader.java
new file mode 100644
index 0000000000..dc282ec0b6
--- /dev/null
+++ b/src/main/java/com/github/technus/tectech/loader/ConstructableLoader.java
@@ -0,0 +1,57 @@
+package com.github.technus.tectech.loader;
+
+import com.github.technus.tectech.mechanics.alignment.enumerable.ExtendedFacing;
+import com.github.technus.tectech.mechanics.constructable.IMultiblockInfoContainer;
+import com.github.technus.tectech.mechanics.structure.IStructureDefinition;
+import com.github.technus.tectech.mechanics.structure.StructureDefinition;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_ElectricBlastFurnace;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.EnumChatFormatting;
+
+import static com.github.technus.tectech.mechanics.constructable.IMultiblockInfoContainer.registerMetaClass;
+import static com.github.technus.tectech.mechanics.structure.StructureUtility.ofBlock;
+import static com.github.technus.tectech.mechanics.structure.StructureUtility.ofHint;
+import static gregtech.api.GregTech_API.sBlockCasings1;
+
+public class ConstructableLoader implements Runnable {
+
+ @Override
+ public void run() {
+ registerMetaClass(GT_MetaTileEntity_ElectricBlastFurnace.class, new IMultiblockInfoContainer<GT_MetaTileEntity_ElectricBlastFurnace>() {
+ //region Structure
+ private final IStructureDefinition<GT_MetaTileEntity_ElectricBlastFurnace> definition=
+ StructureDefinition.<GT_MetaTileEntity_ElectricBlastFurnace>builder()
+ .addShapeOldApi("main",new String[][]{
+ {"000","\"\"\"","\"\"\""," . ",},
+ {"0!0","\"A\"","\"A\""," ",},
+ {"000","\"\"\"","\"\"\""," ",},
+ })
+ .addElement('0', ofBlock(sBlockCasings1,11))
+ .addElement('\"', ofHint(3))
+ .addElement('!', ofHint(2))
+ .addElement(' ', ofHint(1))
+ .build();
+ private final String[] desc=new String[]{
+ EnumChatFormatting.AQUA+"Hint Details:",
+ "1 - Classic Hatches or Heat Proof Casing",
+ "2 - Muffler Hatch",
+ "3 - Coil blocks"
+ };
+ //endregion
+
+ @Override
+ public void construct(ItemStack stackSize, boolean hintsOnly, GT_MetaTileEntity_ElectricBlastFurnace tileEntity, ExtendedFacing aSide) {
+ IGregTechTileEntity base = tileEntity.getBaseMetaTileEntity();
+ definition.buildOrHints(tileEntity, stackSize, "main", base.getWorld(),
+ aSide, base.getXCoord(), base.getYCoord(),
+ base.getZCoord(), 1, 3, 0, hintsOnly);
+ }
+
+ @Override
+ public String[] getDescription(ItemStack stackSize) {
+ return desc;
+ }
+ });
+ }
+}
diff --git a/src/main/java/com/github/technus/tectech/loader/MainLoader.java b/src/main/java/com/github/technus/tectech/loader/MainLoader.java
index f7bec9adc0..d473da6b07 100644
--- a/src/main/java/com/github/technus/tectech/loader/MainLoader.java
+++ b/src/main/java/com/github/technus/tectech/loader/MainLoader.java
@@ -121,7 +121,7 @@ public final class MainLoader {
}
public static void postLoad() {
- ProgressManager.ProgressBar progressBarPostLoad = ProgressManager.push("TecTech Post Loader", 5);
+ ProgressManager.ProgressBar progressBarPostLoad = ProgressManager.push("TecTech Post Loader", 6);
progressBarPostLoad.step("Dreamcraft Compatibility");
if(Loader.isModLoaded(Reference.DREAMCRAFT)){
@@ -153,9 +153,18 @@ public final class MainLoader {
registerExtraHazmats();
TecTech.LOGGER.info("Hazmat additions done");
- progressBarPostLoad.step("Nerf blocks blast resistance");
- fixBlocks();
- TecTech.LOGGER.info("Blocks nerf done");
+ if (!configTecTech.DISABLE_BLOCK_HARDNESS_NERF) {
+ progressBarPostLoad.step("Nerf blocks blast resistance");
+ fixBlocks();
+ TecTech.LOGGER.info("Blocks nerf done");
+ } else {
+ progressBarPostLoad.step("Do not nerf blocks blast resistance");
+ TecTech.LOGGER.info("Blocks were not nerfed");
+ }
+
+ progressBarPostLoad.step("Constructable stuff");
+ new ConstructableLoader().run();
+ TecTech.LOGGER.info("Constructable initialized");
ProgressManager.pop(progressBarPostLoad);
}
diff --git a/src/main/java/com/github/technus/tectech/loader/NetworkDispatcher.java b/src/main/java/com/github/technus/tectech/loader/NetworkDispatcher.java
index 7d35a216f0..581c81d15f 100644
--- a/src/main/java/com/github/technus/tectech/loader/NetworkDispatcher.java
+++ b/src/main/java/com/github/technus/tectech/loader/NetworkDispatcher.java
@@ -2,7 +2,7 @@ package com.github.technus.tectech.loader;
import com.github.technus.tectech.mechanics.data.ChunkDataMessage;
import com.github.technus.tectech.mechanics.data.PlayerDataMessage;
-import com.github.technus.tectech.mechanics.data.RendererMessage;
+import com.github.technus.tectech.mechanics.spark.RendererMessage;
import com.github.technus.tectech.mechanics.alignment.AlignmentMessage;
import com.github.technus.tectech.thing.metaTileEntity.hatch.TextParametersMessage;
import com.github.technus.tectech.mechanics.pipe.PipeActivityMessage;
diff --git a/src/main/java/com/github/technus/tectech/loader/TecTechConfig.java b/src/main/java/com/github/technus/tectech/loader/TecTechConfig.java
index e16580befe..0c2920e585 100644
--- a/src/main/java/com/github/technus/tectech/loader/TecTechConfig.java
+++ b/src/main/java/com/github/technus/tectech/loader/TecTechConfig.java
@@ -18,6 +18,7 @@ public class TecTechConfig extends ConfigManager {
public boolean NERF_FUSION;
public boolean ENABLE_TURRET_EXPLOSIONS;
public boolean DISABLE_MATERIAL_LOADING_FFS;
+ public boolean DISABLE_BLOCK_HARDNESS_NERF;
public float TURRET_DAMAGE_FACTOR;
public float TURRET_EXPLOSION_FACTOR;
public float TESLA_MULTI_MIN_EFFICIENCY;
@@ -38,8 +39,9 @@ public class TecTechConfig extends ConfigManager {
EASY_SCAN = false;
BOOM_ENABLE = true;
NERF_FUSION = false;
+ DISABLE_BLOCK_HARDNESS_NERF = false;
ENABLE_TURRET_EXPLOSIONS = true;
- DISABLE_MATERIAL_LOADING_FFS=false;
+ DISABLE_MATERIAL_LOADING_FFS = false;
TURRET_DAMAGE_FACTOR = 10;
TURRET_EXPLOSION_FACTOR = 1;
TESLA_MULTI_MIN_EFFICIENCY = 0.955F;
@@ -72,19 +74,21 @@ public class TecTechConfig extends ConfigManager {
"Damage is multiplied by this number");
TURRET_EXPLOSION_FACTOR = _mainConfig.getFloat("TurretExplosionFactor", "Features", TURRET_EXPLOSION_FACTOR, 0, Short.MAX_VALUE,
"Explosion strength is multiplied by this number");
- DISABLE_MATERIAL_LOADING_FFS = _mainConfig.getBoolean("DisableMaterialLoading", "Debug", DISABLE_MATERIAL_LOADING_FFS,
+ DISABLE_BLOCK_HARDNESS_NERF = _mainConfig.getBoolean("DisableBlockHardnessNerf", "Features", DISABLE_BLOCK_HARDNESS_NERF,
+ "Set to true to disable the block hardness nerf");
+ DISABLE_MATERIAL_LOADING_FFS = _mainConfig.getBoolean("DisableMaterialLoading", "Debug", DISABLE_MATERIAL_LOADING_FFS,
"Set to true to disable gregtech material processing");
- TESLA_MULTI_MIN_EFFICIENCY = _mainConfig.getFloat("teslaMultiMinEfficency", "Features", TESLA_MULTI_MIN_EFFICIENCY, 0, 1,
+ TESLA_MULTI_MIN_EFFICIENCY = _mainConfig.getFloat("teslaMultiMinEfficency", "Features", TESLA_MULTI_MIN_EFFICIENCY, 0, 1,
"Worst possible power loss per block for the multi block tesla");
- TESLA_MULTI_MAX_EFFICIENCY = _mainConfig.getFloat("teslaMultiMaxEfficency", "Features", TESLA_MULTI_MAX_EFFICIENCY, 0, 1,
+ TESLA_MULTI_MAX_EFFICIENCY = _mainConfig.getFloat("teslaMultiMaxEfficency", "Features", TESLA_MULTI_MAX_EFFICIENCY, 0, 1,
"Best possible power loss per block for the multi block tesla");
- TESLA_MULTI_OVERDRIVE_LOSS = _mainConfig.getFloat("teslaMultiOverdriveLoss", "Features", TESLA_MULTI_OVERDRIVE_LOSS, 0, 1,
+ TESLA_MULTI_OVERDRIVE_LOSS = _mainConfig.getFloat("teslaMultiOverdriveLoss", "Features", TESLA_MULTI_OVERDRIVE_LOSS, 0, 1,
"Additional losses for overdrive use on the multi block tesla");
- TESLA_SINGLE_MIN_EFFICIENCY = _mainConfig.getFloat("teslaSingleMinEfficency", "Features", TESLA_SINGLE_MIN_EFFICIENCY, 0, 1,
+ TESLA_SINGLE_MIN_EFFICIENCY = _mainConfig.getFloat("teslaSingleMinEfficency", "Features", TESLA_SINGLE_MIN_EFFICIENCY, 0, 1,
"Worst possible power loss per block for the single block tesla");
- TESLA_SINGLE_MAX_EFFICIENCY = _mainConfig.getFloat("teslaSingleMaxEfficency", "Features", TESLA_SINGLE_MAX_EFFICIENCY, 0, 1,
+ TESLA_SINGLE_MAX_EFFICIENCY = _mainConfig.getFloat("teslaSingleMaxEfficency", "Features", TESLA_SINGLE_MAX_EFFICIENCY, 0, 1,
"Best possible power loss per block for the single block tesla");
- TESLA_SINGLE_OVERDRIVE_LOSS = _mainConfig.getFloat("teslaSingleOverdriveLoss", "Features", TESLA_SINGLE_OVERDRIVE_LOSS, 0, 1,
+ TESLA_SINGLE_OVERDRIVE_LOSS = _mainConfig.getFloat("teslaSingleOverdriveLoss", "Features", TESLA_SINGLE_OVERDRIVE_LOSS, 0, 1,
"Additional losses for overdrive use on the single block tesla");
}
diff --git a/src/main/java/com/github/technus/tectech/loader/thing/MachineLoader.java b/src/main/java/com/github/technus/tectech/loader/thing/MachineLoader.java
index 9dd71df9eb..8a46732e66 100644
--- a/src/main/java/com/github/technus/tectech/loader/thing/MachineLoader.java
+++ b/src/main/java/com/github/technus/tectech/loader/thing/MachineLoader.java
@@ -198,141 +198,141 @@ public class MachineLoader implements Runnable {
// ===================================================================================================
eM_energyTunnel1_IV.set(new GT_MetaTileEntity_Hatch_EnergyTunnel(
- 15130, "hatch.energytunnel1.tier.05", "IV 256/t Laser Target Hatch", 5, 256).getStackForm(1L));
+ 15130, "hatch.energytunnel1.tier.05", "IV 256A/t Laser Target Hatch", 5, 256).getStackForm(1L));
eM_energyTunnel2_IV.set(new GT_MetaTileEntity_Hatch_EnergyTunnel(
- 15140, "hatch.energytunnel2.tier.05", "IV 1024/t Laser Target Hatch", 5, 1024).getStackForm(1L));
+ 15140, "hatch.energytunnel2.tier.05", "IV 1024A/t Laser Target Hatch", 5, 1024).getStackForm(1L));
eM_energyTunnel3_IV.set(new GT_MetaTileEntity_Hatch_EnergyTunnel(
- 15150, "hatch.energytunnel3.tier.05", "IV 4096/t Laser Target Hatch", 5, 4096).getStackForm(1L));
+ 15150, "hatch.energytunnel3.tier.05", "IV 4096A/t Laser Target Hatch", 5, 4096).getStackForm(1L));
eM_energyTunnel4_IV.set(new GT_MetaTileEntity_Hatch_EnergyTunnel(
- 15160, "hatch.energytunnel4.tier.05", "IV 16384/t Laser Target Hatch", 5, 16384).getStackForm(1L));
+ 15160, "hatch.energytunnel4.tier.05", "IV 16384A/t Laser Target Hatch", 5, 16384).getStackForm(1L));
eM_energyTunnel5_IV.set(new GT_MetaTileEntity_Hatch_EnergyTunnel(
- 15170, "hatch.energytunnel5.tier.05", "IV 65536/t Laser Target Hatch", 5, 65536).getStackForm(1L));
+ 15170, "hatch.energytunnel5.tier.05", "IV 65536A/t Laser Target Hatch", 5, 65536).getStackForm(1L));
eM_energyTunnel6_IV.set(new GT_MetaTileEntity_Hatch_EnergyTunnel(
- 15180, "hatch.energytunnel6.tier.05", "IV 262144/t Laser Target Hatch", 5, 262144).getStackForm(1L));
+ 15180, "hatch.energytunnel6.tier.05", "IV 262144A/t Laser Target Hatch", 5, 262144).getStackForm(1L));
eM_energyTunnel7_IV.set(new GT_MetaTileEntity_Hatch_EnergyTunnel(
- 15190, "hatch.energytunnel7.tier.05", "IV 1048576/t Laser Target Hatch", 5, 1048576).getStackForm(1L));
+ 15190, "hatch.energytunnel7.tier.05", "IV 1048576A/t Laser Target Hatch", 5, 1048576).getStackForm(1L));
eM_energyTunnel1_LuV.set(new GT_MetaTileEntity_Hatch_EnergyTunnel(
- 15131, "hatch.energytunnel1.tier.06", "LuV 256/t Laser Target Hatch", 6, 256).getStackForm(1L));
+ 15131, "hatch.energytunnel1.tier.06", "LuV 256A/t Laser Target Hatch", 6, 256).getStackForm(1L));
eM_energyTunnel2_LuV.set(new GT_MetaTileEntity_Hatch_EnergyTunnel(
- 15141, "hatch.energytunnel2.tier.06", "LuV 1024/t Laser Target Hatch", 6, 1024).getStackForm(1L));
+ 15141, "hatch.energytunnel2.tier.06", "LuV 1024A/t Laser Target Hatch", 6, 1024).getStackForm(1L));
eM_energyTunnel3_LuV.set(new GT_MetaTileEntity_Hatch_EnergyTunnel(
- 15151, "hatch.energytunnel3.tier.06", "LuV 4096/t Laser Target Hatch", 6, 4096).getStackForm(1L));
+ 15151, "hatch.energytunnel3.tier.06", "LuV 4096A/t Laser Target Hatch", 6, 4096).getStackForm(1L));
eM_energyTunnel4_LuV.set(new GT_MetaTileEntity_Hatch_EnergyTunnel(
- 15161, "hatch.energytunnel4.tier.06", "LuV 16384/t Laser Target Hatch", 6, 16384).getStackForm(1L));
+ 15161, "hatch.energytunnel4.tier.06", "LuV 16384A/t Laser Target Hatch", 6, 16384).getStackForm(1L));
eM_energyTunnel5_LuV.set(new GT_MetaTileEntity_Hatch_EnergyTunnel(
- 15171, "hatch.energytunnel5.tier.06", "LuV 65536/t Laser Target Hatch", 6, 65536).getStackForm(1L));
+ 15171, "hatch.energytunnel5.tier.06", "LuV 65536A/t Laser Target Hatch", 6, 65536).getStackForm(1L));
eM_energyTunnel6_LuV.set(new GT_MetaTileEntity_Hatch_EnergyTunnel(
- 15181, "hatch.energytunnel6.tier.06", "LuV 262144/t Laser Target Hatch", 6, 262144).getStackForm(1L));
+ 15181, "hatch.energytunnel6.tier.06", "LuV 262144A/t Laser Target Hatch", 6, 262144).getStackForm(1L));
eM_energyTunnel7_LuV.set(new GT_MetaTileEntity_Hatch_EnergyTunnel(
- 15191, "hatch.energytunnel7.tier.06", "LuV 1048576/t Laser Target Hatch", 6, 1048576).getStackForm(1L));
+ 15191, "hatch.energytunnel7.tier.06", "LuV 1048576A/t Laser Target Hatch", 6, 1048576).getStackForm(1L));
eM_energyTunnel1_ZPM.set(new GT_MetaTileEntity_Hatch_EnergyTunnel(
- 15132, "hatch.energytunnel1.tier.07", "ZPM 256/t Laser Target Hatch", 7, 256).getStackForm(1L));
+ 15132, "hatch.energytunnel1.tier.07", "ZPM 256A/t Laser Target Hatch", 7, 256).getStackForm(1L));
eM_energyTunnel2_ZPM.set(new GT_MetaTileEntity_Hatch_EnergyTunnel(
- 15142, "hatch.energytunnel2.tier.07", "ZPM 1024/t Laser Target Hatch", 7, 1024).getStackForm(1L));
+ 15142, "hatch.energytunnel2.tier.07", "ZPM 1024A/t Laser Target Hatch", 7, 1024).getStackForm(1L));
eM_energyTunnel3_ZPM.set(new GT_MetaTileEntity_Hatch_EnergyTunnel(
- 15152, "hatch.energytunnel3.tier.07", "ZPM 4096/t Laser Target Hatch", 7, 4096).getStackForm(1L));
+ 15152, "hatch.energytunnel3.tier.07", "ZPM 4096A/t Laser Target Hatch", 7, 4096).getStackForm(1L));
eM_energyTunnel4_ZPM.set(new GT_MetaTileEntity_Hatch_EnergyTunnel(
- 15162, "hatch.energytunnel4.tier.07", "ZPM 16384/t Laser Target Hatch", 7, 16384).getStackForm(1L));
+ 15162, "hatch.energytunnel4.tier.07", "ZPM 16384A/t Laser Target Hatch", 7, 16384).getStackForm(1L));
eM_energyTunnel5_ZPM.set(new GT_MetaTileEntity_Hatch_EnergyTunnel(
- 15172, "hatch.energytunnel5.tier.07", "ZPM 65536/t Laser Target Hatch", 7, 65536).getStackForm(1L));
+ 15172, "hatch.energytunnel5.tier.07", "ZPM 65536A/t Laser Target Hatch", 7, 65536).getStackForm(1L));
eM_energyTunnel6_ZPM.set(new GT_MetaTileEntity_Hatch_EnergyTunnel(
- 15182, "hatch.energytunnel6.tier.07", "ZPM 262144/t Laser Target Hatch", 7, 262144).getStackForm(1L));
+ 15182, "hatch.energytunnel6.tier.07", "ZPM 262144A/t Laser Target Hatch", 7, 262144).getStackForm(1L));
eM_energyTunnel7_ZPM.set(new GT_MetaTileEntity_Hatch_EnergyTunnel(
- 15192, "hatch.energytunnel7.tier.07", "ZPM 1048576/t Laser Target Hatch", 7, 1048576).getStackForm(1L));
+ 15192, "hatch.energytunnel7.tier.07", "ZPM 1048576A/t Laser Target Hatch", 7, 1048576).getStackForm(1L));
eM_energyTunnel1_UV.set(new GT_MetaTileEntity_Hatch_EnergyTunnel(
- 15133, "hatch.energytunnel1.tier.08", "UV 256/t Laser Target Hatch", 8, 256).getStackForm(1L));
+ 15133, "hatch.energytunnel1.tier.08", "UV 256A/t Laser Target Hatch", 8, 256).getStackForm(1L));
eM_energyTunnel2_UV.set(new GT_MetaTileEntity_Hatch_EnergyTunnel(
- 15143, "hatch.energytunnel2.tier.08", "UV 1024/t Laser Target Hatch", 8, 1024).getStackForm(1L));
+ 15143, "hatch.energytunnel2.tier.08", "UV 1024A/t Laser Target Hatch", 8, 1024).getStackForm(1L));
eM_energyTunnel3_UV.set(new GT_MetaTileEntity_Hatch_EnergyTunnel(
- 15153, "hatch.energytunnel3.tier.08", "UV 4096/t Laser Target Hatch", 8, 4096).getStackForm(1L));
+ 15153, "hatch.energytunnel3.tier.08", "UV 4096A/t Laser Target Hatch", 8, 4096).getStackForm(1L));
eM_energyTunnel4_UV.set(new GT_MetaTileEntity_Hatch_EnergyTunnel(
- 15163, "hatch.energytunnel4.tier.08", "UV 16384/t Laser Target Hatch", 8, 16384).getStackForm(1L));
+ 15163, "hatch.energytunnel4.tier.08", "UV 16384A/t Laser Target Hatch", 8, 16384).getStackForm(1L));
eM_energyTunnel5_UV.set(new GT_MetaTileEntity_Hatch_EnergyTunnel(
- 15173, "hatch.energytunnel5.tier.08", "UV 65536/t Laser Target Hatch", 8, 65536).getStackForm(1L));
+ 15173, "hatch.energytunnel5.tier.08", "UV 65536A/t Laser Target Hatch", 8, 65536).getStackForm(1L));
eM_energyTunnel6_UV.set(new GT_MetaTileEntity_Hatch_EnergyTunnel(
- 15183, "hatch.energytunnel6.tier.08", "UV 262144/t Laser Target Hatch", 8, 262144).getStackForm(1L));
+ 15183, "hatch.energytunnel6.tier.08", "UV 262144A/t Laser Target Hatch", 8, 262144).getStackForm(1L));
eM_energyTunnel7_UV.set(new GT_MetaTileEntity_Hatch_EnergyTunnel(
- 15193, "hatch.energytunnel7.tier.08", "UV 1048576/t Laser Target Hatch", 8, 1048576).getStackForm(1L));
+ 15193, "hatch.energytunnel7.tier.08", "UV 1048576A/t Laser Target Hatch", 8, 1048576).getStackForm(1L));
eM_energyTunnel1_UHV.set(new GT_MetaTileEntity_Hatch_EnergyTunnel(
- 15134, "hatch.energytunnel1.tier.09", "UHV 256/t Laser Target Hatch", 9, 256).getStackForm(1L));
+ 15134, "hatch.energytunnel1.tier.09", "UHV 256A/t Laser Target Hatch", 9, 256).getStackForm(1L));
eM_energyTunnel2_UHV.set(new GT_MetaTileEntity_Hatch_EnergyTunnel(
- 15144, "hatch.energytunnel2.tier.09", "UHV 1024/t Laser Target Hatch", 9, 1024).getStackForm(1L));
+ 15144, "hatch.energytunnel2.tier.09", "UHV 1024A/t Laser Target Hatch", 9, 1024).getStackForm(1L));
eM_energyTunnel3_UHV.set(new GT_MetaTileEntity_Hatch_EnergyTunnel(
- 15154, "hatch.energytunnel3.tier.09", "UHV 4096/t Laser Target Hatch", 9, 4096).getStackForm(1L));
+ 15154, "hatch.energytunnel3.tier.09", "UHV 4096A/t Laser Target Hatch", 9, 4096).getStackForm(1L));
eM_energyTunnel4_UHV.set(new GT_MetaTileEntity_Hatch_EnergyTunnel(
- 15164, "hatch.energytunnel4.tier.09", "UHV 16384/t Laser Target Hatch", 9, 16384).getStackForm(1L));
+ 15164, "hatch.energytunnel4.tier.09", "UHV 16384A/t Laser Target Hatch", 9, 16384).getStackForm(1L));
eM_energyTunnel5_UHV.set(new GT_MetaTileEntity_Hatch_EnergyTunnel(
- 15174, "hatch.energytunnel5.tier.09", "UHV 65536/t Laser Target Hatch", 9, 65536).getStackForm(1L));
+ 15174, "hatch.energytunnel5.tier.09", "UHV 65536A/t Laser Target Hatch", 9, 65536).getStackForm(1L));
eM_energyTunnel6_UHV.set(new GT_MetaTileEntity_Hatch_EnergyTunnel(
- 15184, "hatch.energytunnel6.tier.09", "UHV 262144/t Laser Target Hatch", 9, 262144).getStackForm(1L));
+ 15184, "hatch.energytunnel6.tier.09", "UHV 262144A/t Laser Target Hatch", 9, 262144).getStackForm(1L));
eM_energyTunnel7_UHV.set(new GT_MetaTileEntity_Hatch_EnergyTunnel(
- 15194, "hatch.energytunnel7.tier.09", "UHV 1048576/t Laser Target Hatch", 9, 1048576).getStackForm(1L));
+ 15194, "hatch.energytunnel7.tier.09", "UHV 1048576A/t Laser Target Hatch", 9, 1048576).getStackForm(1L));
eM_energyTunnel1_UEV.set(new GT_MetaTileEntity_Hatch_EnergyTunnel(
- 15135, "hatch.energytunnel1.tier.10", "UEV 256/t Laser Target Hatch", 10, 256).getStackForm(1L));
+ 15135, "hatch.energytunnel1.tier.10", "UEV 256A/t Laser Target Hatch", 10, 256).getStackForm(1L));
eM_energyTunnel2_UEV.set(new GT_MetaTileEntity_Hatch_EnergyTunnel(
- 15145, "hatch.energytunnel2.tier.10", "UEV 1024/t Laser Target Hatch", 10, 1024).getStackForm(1L));
+ 15145, "hatch.energytunnel2.tier.10", "UEV 1024A/t Laser Target Hatch", 10, 1024).getStackForm(1L));
eM_energyTunnel3_UEV.set(new GT_MetaTileEntity_Hatch_EnergyTunnel(
- 15155, "hatch.energytunnel3.tier.10", "UEV 4096/t Laser Target Hatch", 10, 4096).getStackForm(1L));
+ 15155, "hatch.energytunnel3.tier.10", "UEV 4096A/t Laser Target Hatch", 10, 4096).getStackForm(1L));
eM_energyTunnel4_UEV.set(new GT_MetaTileEntity_Hatch_EnergyTunnel(
- 15165, "hatch.energytunnel4.tier.10", "UEV 16384/t Laser Target Hatch", 10, 16384).getStackForm(1L));
+ 15165, "hatch.energytunnel4.tier.10", "UEV 16384A/t Laser Target Hatch", 10, 16384).getStackForm(1L));
eM_energyTunnel5_UEV.set(new GT_MetaTileEntity_Hatch_EnergyTunnel(
- 15175, "hatch.energytunnel5.tier.10", "UEV 65536/t Laser Target Hatch", 10, 65536).getStackForm(1L));
+ 15175, "hatch.energytunnel5.tier.10", "UEV 65536A/t Laser Target Hatch", 10, 65536).getStackForm(1L));
eM_energyTunnel6_UEV.set(new GT_MetaTileEntity_Hatch_EnergyTunnel(
- 15185, "hatch.energytunnel6.tier.10", "UEV 262144/t Laser Target Hatch", 10, 262144).getStackForm(1L));
+ 15185, "hatch.energytunnel6.tier.10", "UEV 262144A/t Laser Target Hatch", 10, 262144).getStackForm(1L));
eM_energyTunnel7_UEV.set(new GT_MetaTileEntity_Hatch_EnergyTunnel(
- 15195, "hatch.energytunnel7.tier.10", "UEV 1048576/t Laser Target Hatch", 10, 1048576).getStackForm(1L));
+ 15195, "hatch.energytunnel7.tier.10", "UEV 1048576A/t Laser Target Hatch", 10, 1048576).getStackForm(1L));
eM_energyTunnel1_UIV.set(new GT_MetaTileEntity_Hatch_EnergyTunnel(
- 15136, "hatch.energytunnel1.tier.11", "UIV 256/t Laser Target Hatch", 11, 256).getStackForm(1L));
+ 15136, "hatch.energytunnel1.tier.11", "UIV 256A/t Laser Target Hatch", 11, 256).getStackForm(1L));
eM_energyTunnel2_UIV.set(new GT_MetaTileEntity_Hatch_EnergyTunnel(
- 15146, "hatch.energytunnel2.tier.11", "UIV 1024/t Laser Target Hatch", 11, 1024).getStackForm(1L));
+ 15146, "hatch.energytunnel2.tier.11", "UIV 1024A/t Laser Target Hatch", 11, 1024).getStackForm(1L));
eM_energyTunnel3_UIV.set(new GT_MetaTileEntity_Hatch_EnergyTunnel(
- 15156, "hatch.energytunnel3.tier.11", "UIV 4096/t Laser Target Hatch", 11, 4096).getStackForm(1L));
+ 15156, "hatch.energytunnel3.tier.11", "UIV 4096A/t Laser Target Hatch", 11, 4096).getStackForm(1L));
eM_energyTunnel4_UIV.set(new GT_MetaTileEntity_Hatch_EnergyTunnel(
- 15166, "hatch.energytunnel4.tier.11", "UIV 16384/t Laser Target Hatch", 11, 16384).getStackForm(1L));
+ 15166, "hatch.energytunnel4.tier.11", "UIV 16384A/t Laser Target Hatch", 11, 16384).getStackForm(1L));
eM_energyTunnel5_UIV.set(new GT_MetaTileEntity_Hatch_EnergyTunnel(
- 15176, "hatch.energytunnel5.tier.11", "UIV 65536/t Laser Target Hatch", 11, 65536).getStackForm(1L));
+ 15176, "hatch.energytunnel5.tier.11", "UIV 65536A/t Laser Target Hatch", 11, 65536).getStackForm(1L));
eM_energyTunnel6_UIV.set(new GT_MetaTileEntity_Hatch_EnergyTunnel(
- 15186, "hatch.energytunnel6.tier.11", "UIV 262144/t Laser Target Hatch", 11, 262144).getStackForm(1L));
+ 15186, "hatch.energytunnel6.tier.11", "UIV 262144A/t Laser Target Hatch", 11, 262144).getStackForm(1L));
eM_energyTunnel7_UIV.set(new GT_MetaTileEntity_Hatch_EnergyTunnel(
- 15196, "hatch.energytunnel7.tier.11", "UIV 1048576/t Laser Target Hatch", 11, 1048576).getStackForm(1L));
+ 15196, "hatch.energytunnel7.tier.11", "UIV 1048576A/t Laser Target Hatch", 11, 1048576).getStackForm(1L));
eM_energyTunnel1_UMV.set(new GT_MetaTileEntity_Hatch_EnergyTunnel(
- 15137, "hatch.energytunnel1.tier.12", "UMV 256/t Laser Target Hatch", 12, 256).getStackForm(1L));
+ 15137, "hatch.energytunnel1.tier.12", "UMV 256A/t Laser Target Hatch", 12, 256).getStackForm(1L));
eM_energyTunnel2_UMV.set(new GT_MetaTileEntity_Hatch_EnergyTunnel(
- 15147, "hatch.energytunnel2.tier.12", "UMV 1024/t Laser Target Hatch", 12, 1024).getStackForm(1L));
+ 15147, "hatch.energytunnel2.tier.12", "UMV 1024A/t Laser Target Hatch", 12, 1024).getStackForm(1L));
eM_energyTunnel3_UMV.set(new GT_MetaTileEntity_Hatch_EnergyTunnel(
- 15157, "hatch.energytunnel3.tier.12", "UMV 4096/t Laser Target Hatch", 12, 4096).getStackForm(1L));
+ 15157, "hatch.energytunnel3.tier.12", "UMV 4096A/t Laser Target Hatch", 12, 4096).getStackForm(1L));
eM_energyTunnel4_UMV.set(new GT_MetaTileEntity_Hatch_EnergyTunnel(
- 15167, "hatch.energytunnel4.tier.12", "UMV 16384/t Laser Target Hatch", 12, 16384).getStackForm(1L));
+ 15167, "hatch.energytunnel4.tier.12", "UMV 16384A/t Laser Target Hatch", 12, 16384).getStackForm(1L));
eM_energyTunnel5_UMV.set(new GT_MetaTileEntity_Hatch_EnergyTunnel(
- 15177, "hatch.energytunnel5.tier.12", "UMV 65536/t Laser Target Hatch", 12, 65536).getStackForm(1L));
+ 15177, "hatch.energytunnel5.tier.12", "UMV 65536A/t Laser Target Hatch", 12, 65536).getStackForm(1L));
eM_energyTunnel6_UMV.set(new GT_MetaTileEntity_Hatch_EnergyTunnel(
- 15187, "hatch.energytunnel6.tier.12", "UMV 262144/t Laser Target Hatch", 12, 262144).getStackForm(1L));
+ 15187, "hatch.energytunnel6.tier.12", "UMV 262144A/t Laser Target Hatch", 12, 262144).getStackForm(1L));
eM_energyTunnel7_UMV.set(new GT_MetaTileEntity_Hatch_EnergyTunnel(
- 15197, "hatch.energytunnel7.tier.12", "UMV 1048576/t Laser Target Hatch", 12, 1048576).getStackForm(1L));
+ 15197, "hatch.energytunnel7.tier.12", "UMV 1048576A/t Laser Target Hatch", 12, 1048576).getStackForm(1L));
eM_energyTunnel1_UXV.set(new GT_MetaTileEntity_Hatch_EnergyTunnel(
- 15138, "hatch.energytunnel1.tier.13", "UXV 256/t Laser Target Hatch", 13, 256).getStackForm(1L));
+ 15138, "hatch.energytunnel1.tier.13", "UXV 256A/t Laser Target Hatch", 13, 256).getStackForm(1L));
eM_energyTunnel2_UXV.set(new GT_MetaTileEntity_Hatch_EnergyTunnel(
- 15148, "hatch.energytunnel2.tier.13", "UXV 1024/t Laser Target Hatch", 13, 1024).getStackForm(1L));
+ 15148, "hatch.energytunnel2.tier.13", "UXV 1024A/t Laser Target Hatch", 13, 1024).getStackForm(1L));
eM_energyTunnel3_UXV.set(new GT_MetaTileEntity_Hatch_EnergyTunnel(
- 15158, "hatch.energytunnel3.tier.13", "UXV 4096/t Laser Target Hatch", 13, 4096).getStackForm(1L));
+ 15158, "hatch.energytunnel3.tier.13", "UXV 4096A/t Laser Target Hatch", 13, 4096).getStackForm(1L));
eM_energyTunnel4_UXV.set(new GT_MetaTileEntity_Hatch_EnergyTunnel(
- 15168, "hatch.energytunnel4.tier.13", "UXV 16384/t Laser Target Hatch", 13, 16384).getStackForm(1L));
+ 15168, "hatch.energytunnel4.tier.13", "UXV 16384A/t Laser Target Hatch", 13, 16384).getStackForm(1L));
eM_energyTunnel5_UXV.set(new GT_MetaTileEntity_Hatch_EnergyTunnel(
- 15178, "hatch.energytunnel5.tier.13", "UXV 65536/t Laser Target Hatch", 13, 65536).getStackForm(1L));
+ 15178, "hatch.energytunnel5.tier.13", "UXV 65536A/t Laser Target Hatch", 13, 65536).getStackForm(1L));
eM_energyTunnel6_UXV.set(new GT_MetaTileEntity_Hatch_EnergyTunnel(
- 15188, "hatch.energytunnel6.tier.13", "UXV 262144/t Laser Target Hatch", 13, 262144).getStackForm(1L));
+ 15188, "hatch.energytunnel6.tier.13", "UXV 262144A/t Laser Target Hatch", 13, 262144).getStackForm(1L));
eM_energyTunnel7_UXV.set(new GT_MetaTileEntity_Hatch_EnergyTunnel(
- 15198, "hatch.energytunnel7.tier.13", "UXV 1048576/t Laser Target Hatch", 13, 1048576).getStackForm(1L));
+ 15198, "hatch.energytunnel7.tier.13", "UXV 1048576A/t Laser Target Hatch", 13, 1048576).getStackForm(1L));
eM_energyTunnel9001.set(new GT_MetaTileEntity_Hatch_EnergyTunnel(
- 15199, "hatch.energytunnel.tier.14", "Legendary Laser Target Hatch", 14, (int) V[14]).getStackForm(1L));
+ 15199, "hatch.energytunnel.tier.14", "Legendary Laser Target Hatch", 13, (int) V[13]).getStackForm(1L));
// ===================================================================================================
// Multi AMP Power OUTPUTS
@@ -406,141 +406,141 @@ public class MachineLoader implements Runnable {
// ===================================================================================================
eM_dynamoTunnel1_IV.set(new GT_MetaTileEntity_Hatch_DynamoTunnel(
- 15230, "hatch.dynamotunnel1.tier.05", "IV 256/t Laser Source Hatch", 5, 256).getStackForm(1L));
+ 15230, "hatch.dynamotunnel1.tier.05", "IV 256A/t Laser Source Hatch", 5, 256).getStackForm(1L));
eM_dynamoTunnel2_IV.set(new GT_MetaTileEntity_Hatch_DynamoTunnel(
- 15240, "hatch.dynamotunnel2.tier.05", "IV 1024/t Laser Source Hatch", 5, 1024).getStackForm(1L));
+ 15240, "hatch.dynamotunnel2.tier.05", "IV 1024A/t Laser Source Hatch", 5, 1024).getStackForm(1L));
eM_dynamoTunnel3_IV.set(new GT_MetaTileEntity_Hatch_DynamoTunnel(
- 15250, "hatch.dynamotunnel3.tier.05", "IV 4096/t Laser Source Hatch", 5, 4096).getStackForm(1L));
+ 15250, "hatch.dynamotunnel3.tier.05", "IV 4096A/t Laser Source Hatch", 5, 4096).getStackForm(1L));
eM_dynamoTunnel4_IV.set(new GT_MetaTileEntity_Hatch_DynamoTunnel(
- 15260, "hatch.dynamotunnel4.tier.05", "IV 16384/t Laser Source Hatch", 5, 16384).getStackForm(1L));
+ 15260, "hatch.dynamotunnel4.tier.05", "IV 16384A/t Laser Source Hatch", 5, 16384).getStackForm(1L));
eM_dynamoTunnel5_IV.set(new GT_MetaTileEntity_Hatch_DynamoTunnel(
- 15270, "hatch.dynamotunnel5.tier.05", "IV 65536/t Laser Source Hatch", 5, 65536).getStackForm(1L));
+ 15270, "hatch.dynamotunnel5.tier.05", "IV 65536A/t Laser Source Hatch", 5, 65536).getStackForm(1L));
eM_dynamoTunnel6_IV.set(new GT_MetaTileEntity_Hatch_DynamoTunnel(
- 15280, "hatch.dynamotunnel6.tier.05", "IV 262144/t Laser Source Hatch", 5, 262144).getStackForm(1L));
+ 15280, "hatch.dynamotunnel6.tier.05", "IV 262144A/t Laser Source Hatch", 5, 262144).getStackForm(1L));
eM_dynamoTunnel7_IV.set(new GT_MetaTileEntity_Hatch_DynamoTunnel(
- 15290, "hatch.dynamotunnel7.tier.05", "IV 1048576/t Laser Source Hatch", 5, 1048576).getStackForm(1L));
+ 15290, "hatch.dynamotunnel7.tier.05", "IV 1048576A/t Laser Source Hatch", 5, 1048576).getStackForm(1L));
eM_dynamoTunnel1_LuV.set(new GT_MetaTileEntity_Hatch_DynamoTunnel(
- 15231, "hatch.dynamotunnel1.tier.06", "LuV 256/t Laser Source Hatch", 6, 256).getStackForm(1L));
+ 15231, "hatch.dynamotunnel1.tier.06", "LuV 256A/t Laser Source Hatch", 6, 256).getStackForm(1L));
eM_dynamoTunnel2_LuV.set(new GT_MetaTileEntity_Hatch_DynamoTunnel(
- 15241, "hatch.dynamotunnel2.tier.06", "LuV 1024/t Laser Source Hatch", 6, 1024).getStackForm(1L));
+ 15241, "hatch.dynamotunnel2.tier.06", "LuV 1024A/t Laser Source Hatch", 6, 1024).getStackForm(1L));
eM_dynamoTunnel3_LuV.set(new GT_MetaTileEntity_Hatch_DynamoTunnel(
- 15251, "hatch.dynamotunnel3.tier.06", "LuV 4096/t Laser Source Hatch", 6, 4096).getStackForm(1L));
+ 15251, "hatch.dynamotunnel3.tier.06", "LuV 4096A/t Laser Source Hatch", 6, 4096).getStackForm(1L));
eM_dynamoTunnel4_LuV.set(new GT_MetaTileEntity_Hatch_DynamoTunnel(
- 15261, "hatch.dynamotunnel4.tier.06", "LuV 16384/t Laser Source Hatch", 6, 16384).getStackForm(1L));
+ 15261, "hatch.dynamotunnel4.tier.06", "LuV 16384A/t Laser Source Hatch", 6, 16384).getStackForm(1L));
eM_dynamoTunnel5_LuV.set(new GT_MetaTileEntity_Hatch_DynamoTunnel(
- 15271, "hatch.dynamotunnel5.tier.06", "LuV 65536/t Laser Source Hatch", 6, 65536).getStackForm(1L));
+ 15271, "hatch.dynamotunnel5.tier.06", "LuV 65536A/t Laser Source Hatch", 6, 65536).getStackForm(1L));
eM_dynamoTunnel6_LuV.set(new GT_MetaTileEntity_Hatch_DynamoTunnel(
- 15281, "hatch.dynamotunnel6.tier.06", "LuV 262144/t Laser Source Hatch", 6, 262144).getStackForm(1L));
+ 15281, "hatch.dynamotunnel6.tier.06", "LuV 262144A/t Laser Source Hatch", 6, 262144).getStackForm(1L));
eM_dynamoTunnel7_LuV.set(new GT_MetaTileEntity_Hatch_DynamoTunnel(
- 15291, "hatch.dynamotunnel7.tier.06", "LuV 1048576/t Laser Source Hatch", 6, 1048576).getStackForm(1L));
+ 15291, "hatch.dynamotunnel7.tier.06", "LuV 1048576A/t Laser Source Hatch", 6, 1048576).getStackForm(1L));
eM_dynamoTunnel1_ZPM.set(new GT_MetaTileEntity_Hatch_DynamoTunnel(
- 15232, "hatch.dynamotunnel1.tier.07", "ZPM 256/t Laser Source Hatch", 7, 256).getStackForm(1L));
+ 15232, "hatch.dynamotunnel1.tier.07", "ZPM 256A/t Laser Source Hatch", 7, 256).getStackForm(1L));
eM_dynamoTunnel2_ZPM.set(new GT_MetaTileEntity_Hatch_DynamoTunnel(
- 15242, "hatch.dynamotunnel2.tier.07", "ZPM 1024/t Laser Source Hatch", 7, 1024).getStackForm(1L));
+ 15242, "hatch.dynamotunnel2.tier.07", "ZPM 1024A/t Laser Source Hatch", 7, 1024).getStackForm(1L));
eM_dynamoTunnel3_ZPM.set(new GT_MetaTileEntity_Hatch_DynamoTunnel(
- 15252, "hatch.dynamotunnel3.tier.07", "ZPM 4096/t Laser Source Hatch", 7, 4096).getStackForm(1L));
+ 15252, "hatch.dynamotunnel3.tier.07", "ZPM 4096A/t Laser Source Hatch", 7, 4096).getStackForm(1L));
eM_dynamoTunnel4_ZPM.set(new GT_MetaTileEntity_Hatch_DynamoTunnel(
- 15262, "hatch.dynamotunnel4.tier.07", "ZPM 16384/t Laser Source Hatch", 7, 16384).getStackForm(1L));
+ 15262, "hatch.dynamotunnel4.tier.07", "ZPM 16384A/t Laser Source Hatch", 7, 16384).getStackForm(1L));
eM_dynamoTunnel5_ZPM.set(new GT_MetaTileEntity_Hatch_DynamoTunnel(
- 15272, "hatch.dynamotunnel5.tier.07", "ZPM 65536/t Laser Source Hatch", 7, 65536).getStackForm(1L));
+ 15272, "hatch.dynamotunnel5.tier.07", "ZPM 65536A/t Laser Source Hatch", 7, 65536).getStackForm(1L));
eM_dynamoTunnel6_ZPM.set(new GT_MetaTileEntity_Hatch_DynamoTunnel(
- 15282, "hatch.dynamotunnel6.tier.07", "ZPM 262144/t Laser Source Hatch", 7, 262144).getStackForm(1L));
+ 15282, "hatch.dynamotunnel6.tier.07", "ZPM 262144A/t Laser Source Hatch", 7, 262144).getStackForm(1L));
eM_dynamoTunnel7_ZPM.set(new GT_MetaTileEntity_Hatch_DynamoTunnel(
- 15292, "hatch.dynamotunnel7.tier.07", "ZPM 1048576/t Laser Source Hatch", 7, 1048576).getStackForm(1L));
+ 15292, "hatch.dynamotunnel7.tier.07", "ZPM 1048576A/t Laser Source Hatch", 7, 1048576).getStackForm(1L));
eM_dynamoTunnel1_UV.set(new GT_MetaTileEntity_Hatch_DynamoTunnel(
- 15233, "hatch.dynamotunnel1.tier.08", "UV 256/t Laser Source Hatch", 8, 256).getStackForm(1L));
+ 15233, "hatch.dynamotunnel1.tier.08", "UV 256A/t Laser Source Hatch", 8, 256).getStackForm(1L));
eM_dynamoTunnel2_UV.set(new GT_MetaTileEntity_Hatch_DynamoTunnel(
- 15243, "hatch.dynamotunnel2.tier.08", "UV 1024/t Laser Source Hatch", 8, 1024).getStackForm(1L));
+ 15243, "hatch.dynamotunnel2.tier.08", "UV 1024A/t Laser Source Hatch", 8, 1024).getStackForm(1L));
eM_dynamoTunnel3_UV.set(new GT_MetaTileEntity_Hatch_DynamoTunnel(
- 15253, "hatch.dynamotunnel3.tier.08", "UV 4096/t Laser Source Hatch", 8, 4096).getStackForm(1L));
+ 15253, "hatch.dynamotunnel3.tier.08", "UV 4096A/t Laser Source Hatch", 8, 4096).getStackForm(1L));
eM_dynamoTunnel4_UV.set(new GT_MetaTileEntity_Hatch_DynamoTunnel(
- 15263, "hatch.dynamotunnel4.tier.08", "UV 16384/t Laser Source Hatch", 8, 16384).getStackForm(1L));
+ 15263, "hatch.dynamotunnel4.tier.08", "UV 16384A/t Laser Source Hatch", 8, 16384).getStackForm(1L));
eM_dynamoTunnel5_UV.set(new GT_MetaTileEntity_Hatch_DynamoTunnel(
- 15273, "hatch.dynamotunnel5.tier.08", "UV 65536/t Laser Source Hatch", 8, 65536).getStackForm(1L));
+ 15273, "hatch.dynamotunnel5.tier.08", "UV 65536A/t Laser Source Hatch", 8, 65536).getStackForm(1L));
eM_dynamoTunnel6_UV.set(new GT_MetaTileEntity_Hatch_DynamoTunnel(
- 15283, "hatch.dynamotunnel6.tier.08", "UV 262144/t Laser Source Hatch", 8, 262144).getStackForm(1L));
+ 15283, "hatch.dynamotunnel6.tier.08", "UV 262144A/t Laser Source Hatch", 8, 262144).getStackForm(1L));
eM_dynamoTunnel7_UV.set(new GT_MetaTileEntity_Hatch_DynamoTunnel(
- 15293, "hatch.dynamotunnel7.tier.08", "UV 1048576/t Laser Source Hatch", 8, 1048576).getStackForm(1L));
+ 15293, "hatch.dynamotunnel7.tier.08", "UV 1048576A/t Laser Source Hatch", 8, 1048576).getStackForm(1L));
eM_dynamoTunnel1_UHV.set(new GT_MetaTileEntity_Hatch_DynamoTunnel(
- 15234, "hatch.dynamotunnel1.tier.09", "UHV 256/t Laser Source Hatch", 9, 256).getStackForm(1L));
+ 15234, "hatch.dynamotunnel1.tier.09", "UHV 256A/t Laser Source Hatch", 9, 256).getStackForm(1L));
eM_dynamoTunnel2_UHV.set(new GT_MetaTileEntity_Hatch_DynamoTunnel(
- 15244, "hatch.dynamotunnel2.tier.09", "UHV 1024/t Laser Source Hatch", 9, 1024).getStackForm(1L));
+ 15244, "hatch.dynamotunnel2.tier.09", "UHV 1024A/t Laser Source Hatch", 9, 1024).getStackForm(1L));
eM_dynamoTunnel3_UHV.set(new GT_MetaTileEntity_Hatch_DynamoTunnel(
- 15254, "hatch.dynamotunnel3.tier.09", "UHV 4096/t Laser Source Hatch", 9, 4096).getStackForm(1L));
+ 15254, "hatch.dynamotunnel3.tier.09", "UHV 4096A/t Laser Source Hatch", 9, 4096).getStackForm(1L));
eM_dynamoTunnel4_UHV.set(new GT_MetaTileEntity_Hatch_DynamoTunnel(
- 15264, "hatch.dynamotunnel4.tier.09", "UHV 16384/t Laser Source Hatch", 9, 16384).getStackForm(1L));
+ 15264, "hatch.dynamotunnel4.tier.09", "UHV 16384A/t Laser Source Hatch", 9, 16384).getStackForm(1L));
eM_dynamoTunnel5_UHV.set(new GT_MetaTileEntity_Hatch_DynamoTunnel(
- 15274, "hatch.dynamotunnel5.tier.09", "UHV 65536/t Laser Source Hatch", 9, 65536).getStackForm(1L));
+ 15274, "hatch.dynamotunnel5.tier.09", "UHV 65536A/t Laser Source Hatch", 9, 65536).getStackForm(1L));
eM_dynamoTunnel6_UHV.set(new GT_MetaTileEntity_Hatch_DynamoTunnel(
- 15284, "hatch.dynamotunnel6.tier.09", "UHV 262144/t Laser Source Hatch", 9, 262144).getStackForm(1L));
+ 15284, "hatch.dynamotunnel6.tier.09", "UHV 262144A/t Laser Source Hatch", 9, 262144).getStackForm(1L));
eM_dynamoTunnel7_UHV.set(new GT_MetaTileEntity_Hatch_DynamoTunnel(
- 15294, "hatch.dynamotunnel7.tier.09", "UHV 1048576/t Laser Source Hatch", 9, 1048576).getStackForm(1L));
+ 15294, "hatch.dynamotunnel7.tier.09", "UHV 1048576A/t Laser Source Hatch", 9, 1048576).getStackForm(1L));
eM_dynamoTunnel1_UEV.set(new GT_MetaTileEntity_Hatch_DynamoTunnel(
- 15235, "hatch.dynamotunnel1.tier.10", "UEV 256/t Laser Source Hatch", 10, 256).getStackForm(1L));
+ 15235, "hatch.dynamotunnel1.tier.10", "UEV 256A/t Laser Source Hatch", 10, 256).getStackForm(1L));
eM_dynamoTunnel2_UEV.set(new GT_MetaTileEntity_Hatch_DynamoTunnel(
- 15245, "hatch.dynamotunnel2.tier.10", "UEV 1024/t Laser Source Hatch", 10, 1024).getStackForm(1L));
+ 15245, "hatch.dynamotunnel2.tier.10", "UEV 1024A/t Laser Source Hatch", 10, 1024).getStackForm(1L));
eM_dynamoTunnel3_UEV.set(new GT_MetaTileEntity_Hatch_DynamoTunnel(
- 15255, "hatch.dynamotunnel3.tier.10", "UEV 4096/t Laser Source Hatch", 10, 4096).getStackForm(1L));
+ 15255, "hatch.dynamotunnel3.tier.10", "UEV 4096A/t Laser Source Hatch", 10, 4096).getStackForm(1L));
eM_dynamoTunnel4_UEV.set(new GT_MetaTileEntity_Hatch_DynamoTunnel(
- 15265, "hatch.dynamotunnel4.tier.10", "UEV 16384/t Laser Source Hatch", 10, 16384).getStackForm(1L));
+ 15265, "hatch.dynamotunnel4.tier.10", "UEV 16384A/t Laser Source Hatch", 10, 16384).getStackForm(1L));
eM_dynamoTunnel5_UEV.set(new GT_MetaTileEntity_Hatch_DynamoTunnel(
- 15275, "hatch.dynamotunnel5.tier.10", "UEV 65536/t Laser Source Hatch", 10, 65536).getStackForm(1L));
+ 15275, "hatch.dynamotunnel5.tier.10", "UEV 65536A/t Laser Source Hatch", 10, 65536).getStackForm(1L));
eM_dynamoTunnel6_UEV.set(new GT_MetaTileEntity_Hatch_DynamoTunnel(
- 15285, "hatch.dynamotunnel6.tier.10", "UEV 262144/t Laser Source Hatch", 10, 262144).getStackForm(1L));
+ 15285, "hatch.dynamotunnel6.tier.10", "UEV 262144A/t Laser Source Hatch", 10, 262144).getStackForm(1L));
eM_dynamoTunnel7_UEV.set(new GT_MetaTileEntity_Hatch_DynamoTunnel(
- 15295, "hatch.dynamotunnel7.tier.10", "UEV 1048576/t Laser Source Hatch", 10, 1048576).getStackForm(1L));
+ 15295, "hatch.dynamotunnel7.tier.10", "UEV 1048576A/t Laser Source Hatch", 10, 1048576).getStackForm(1L));
eM_dynamoTunnel1_UIV.set(new GT_MetaTileEntity_Hatch_DynamoTunnel(
- 15236, "hatch.dynamotunnel1.tier.11", "UIV 256/t Laser Source Hatch", 11, 256).getStackForm(1L));
+ 15236, "hatch.dynamotunnel1.tier.11", "UIV 256A/t Laser Source Hatch", 11, 256).getStackForm(1L));
eM_dynamoTunnel2_UIV.set(new GT_MetaTileEntity_Hatch_DynamoTunnel(
- 15246, "hatch.dynamotunnel2.tier.11", "UIV 1024/t Laser Source Hatch", 11, 1024).getStackForm(1L));
+ 15246, "hatch.dynamotunnel2.tier.11", "UIV 1024A/t Laser Source Hatch", 11, 1024).getStackForm(1L));
eM_dynamoTunnel3_UIV.set(new GT_MetaTileEntity_Hatch_DynamoTunnel(
- 15256, "hatch.dynamotunnel3.tier.11", "UIV 4096/t Laser Source Hatch", 11, 4096).getStackForm(1L));
+ 15256, "hatch.dynamotunnel3.tier.11", "UIV 4096A/t Laser Source Hatch", 11, 4096).getStackForm(1L));
eM_dynamoTunnel4_UIV.set(new GT_MetaTileEntity_Hatch_DynamoTunnel(
- 15266, "hatch.dynamotunnel4.tier.11", "UIV 16384/t Laser Source Hatch", 11, 16384).getStackForm(1L));
+ 15266, "hatch.dynamotunnel4.tier.11", "UIV 16384A/t Laser Source Hatch", 11, 16384).getStackForm(1L));
eM_dynamoTunnel5_UIV.set(new GT_MetaTileEntity_Hatch_DynamoTunnel(
- 15276, "hatch.dynamotunnel5.tier.11", "UIV 65536/t Laser Source Hatch", 11, 65536).getStackForm(1L));
+ 15276, "hatch.dynamotunnel5.tier.11", "UIV 65536A/t Laser Source Hatch", 11, 65536).getStackForm(1L));
eM_dynamoTunnel6_UIV.set(new GT_MetaTileEntity_Hatch_DynamoTunnel(
- 15286, "hatch.dynamotunnel6.tier.11", "UIV 262144/t Laser Source Hatch", 11, 262144).getStackForm(1L));
+ 15286, "hatch.dynamotunnel6.tier.11", "UIV 262144A/t Laser Source Hatch", 11, 262144).getStackForm(1L));
eM_dynamoTunnel7_UIV.set(new GT_MetaTileEntity_Hatch_DynamoTunnel(
- 15296, "hatch.dynamotunnel7.tier.11", "UIV 1048576/t Laser Source Hatch", 11, 1048576).getStackForm(1L));
+ 15296, "hatch.dynamotunnel7.tier.11", "UIV 1048576A/t Laser Source Hatch", 11, 1048576).getStackForm(1L));
eM_dynamoTunnel1_UMV.set(new GT_MetaTileEntity_Hatch_DynamoTunnel(
- 15237, "hatch.dynamotunnel1.tier.12", "UMV 256/t Laser Source Hatch", 12, 256).getStackForm(1L));
+ 15237, "hatch.dynamotunnel1.tier.12", "UMV 256A/t Laser Source Hatch", 12, 256).getStackForm(1L));
eM_dynamoTunnel2_UMV.set(new GT_MetaTileEntity_Hatch_DynamoTunnel(
- 15247, "hatch.dynamotunnel2.tier.12", "UMV 1024/t Laser Source Hatch", 12, 1024).getStackForm(1L));
+ 15247, "hatch.dynamotunnel2.tier.12", "UMV 1024A/t Laser Source Hatch", 12, 1024).getStackForm(1L));
eM_dynamoTunnel3_UMV.set(new GT_MetaTileEntity_Hatch_DynamoTunnel(
- 15257, "hatch.dynamotunnel3.tier.12", "UMV 4096/t Laser Source Hatch", 12, 4096).getStackForm(1L));
+ 15257, "hatch.dynamotunnel3.tier.12", "UMV 4096A/t Laser Source Hatch", 12, 4096).getStackForm(1L));
eM_dynamoTunnel4_UMV.set(new GT_MetaTileEntity_Hatch_DynamoTunnel(
- 15267, "hatch.dynamotunnel4.tier.12", "UMV 16384/t Laser Source Hatch", 12, 16384).getStackForm(1L));
+ 15267, "hatch.dynamotunnel4.tier.12", "UMV 16384A/t Laser Source Hatch", 12, 16384).getStackForm(1L));
eM_dynamoTunnel5_UMV.set(new GT_MetaTileEntity_Hatch_DynamoTunnel(
- 15277, "hatch.dynamotunnel5.tier.12", "UMV 65536/t Laser Source Hatch", 12, 65536).getStackForm(1L));
+ 15277, "hatch.dynamotunnel5.tier.12", "UMV 65536A/t Laser Source Hatch", 12, 65536).getStackForm(1L));
eM_dynamoTunnel6_UMV.set(new GT_MetaTileEntity_Hatch_DynamoTunnel(
- 15287, "hatch.dynamotunnel6.tier.12", "UMV 262144/t Laser Source Hatch", 12, 262144).getStackForm(1L));
+ 15287, "hatch.dynamotunnel6.tier.12", "UMV 262144A/t Laser Source Hatch", 12, 262144).getStackForm(1L));
eM_dynamoTunnel7_UMV.set(new GT_MetaTileEntity_Hatch_DynamoTunnel(
- 15297, "hatch.dynamotunnel7.tier.12", "UMV 1048576/t Laser Source Hatch", 12, 1048576).getStackForm(1L));
+ 15297, "hatch.dynamotunnel7.tier.12", "UMV 1048576A/t Laser Source Hatch", 12, 1048576).getStackForm(1L));
eM_dynamoTunnel1_UXV.set(new GT_MetaTileEntity_Hatch_DynamoTunnel(
- 15238, "hatch.dynamotunnel1.tier.13", "UXV 256/t Laser Source Hatch", 13, 256).getStackForm(1L));
+ 15238, "hatch.dynamotunnel1.tier.13", "UXV 256A/t Laser Source Hatch", 13, 256).getStackForm(1L));
eM_dynamoTunnel2_UXV.set(new GT_MetaTileEntity_Hatch_DynamoTunnel(
- 15248, "hatch.dynamotunnel2.tier.13", "UXV 1024/t Laser Source Hatch", 13, 1024).getStackForm(1L));
+ 15248, "hatch.dynamotunnel2.tier.13", "UXV 1024A/t Laser Source Hatch", 13, 1024).getStackForm(1L));
eM_dynamoTunnel3_UXV.set(new GT_MetaTileEntity_Hatch_DynamoTunnel(
- 15258, "hatch.dynamotunnel3.tier.13", "UXV 4096/t Laser Source Hatch", 13, 4096).getStackForm(1L));
+ 15258, "hatch.dynamotunnel3.tier.13", "UXV 4096A/t Laser Source Hatch", 13, 4096).getStackForm(1L));
eM_dynamoTunnel4_UXV.set(new GT_MetaTileEntity_Hatch_DynamoTunnel(
- 15268, "hatch.dynamotunnel4.tier.13", "UXV 16384/t Laser Source Hatch", 13, 16384).getStackForm(1L));
+ 15268, "hatch.dynamotunnel4.tier.13", "UXV 16384A/t Laser Source Hatch", 13, 16384).getStackForm(1L));
eM_dynamoTunnel5_UXV.set(new GT_MetaTileEntity_Hatch_DynamoTunnel(
- 15278, "hatch.dynamotunnel5.tier.13", "UXV 65536/t Laser Source Hatch", 13, 65536).getStackForm(1L));
+ 15278, "hatch.dynamotunnel5.tier.13", "UXV 65536A/t Laser Source Hatch", 13, 65536).getStackForm(1L));
eM_dynamoTunnel6_UXV.set(new GT_MetaTileEntity_Hatch_DynamoTunnel(
- 15288, "hatch.dynamotunnel6.tier.13", "UXV 262144/t Laser Source Hatch", 13, 262144).getStackForm(1L));
+ 15288, "hatch.dynamotunnel6.tier.13", "UXV 262144A/t Laser Source Hatch", 13, 262144).getStackForm(1L));
eM_dynamoTunnel7_UXV.set(new GT_MetaTileEntity_Hatch_DynamoTunnel(
- 15298, "hatch.dynamotunnel7.tier.13", "UXV 1048576/t Laser Source Hatch", 13, 1048576).getStackForm(1L));
+ 15298, "hatch.dynamotunnel7.tier.13", "UXV 1048576A/t Laser Source Hatch", 13, 1048576).getStackForm(1L));
eM_dynamoTunnel9001.set(new GT_MetaTileEntity_Hatch_DynamoTunnel(
- 15299, "hatch.dynamotunnel.tier.14", "Legendary Laser Source Hatch", 14, (int) V[14]).getStackForm(1L));
+ 15299, "hatch.dynamotunnel.tier.14", "Legendary Laser Source Hatch", 13, (int) V[13]).getStackForm(1L));
// ===================================================================================================
// MULTIBLOCKS
diff --git a/src/main/java/com/github/technus/tectech/mechanics/alignment/AlignmentUtility.java b/src/main/java/com/github/technus/tectech/mechanics/alignment/AlignmentUtility.java
new file mode 100644
index 0000000000..68e11b77af
--- /dev/null
+++ b/src/main/java/com/github/technus/tectech/mechanics/alignment/AlignmentUtility.java
@@ -0,0 +1,45 @@
+package com.github.technus.tectech.mechanics.alignment;
+
+import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.player.EntityPlayerMP;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.world.World;
+import net.minecraftforge.common.util.FakePlayer;
+
+public class AlignmentUtility {
+ private AlignmentUtility(){
+
+ }
+
+ public static boolean handle(EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ){
+ TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
+ if(tTileEntity==null || aPlayer instanceof FakePlayer) {
+ return aPlayer instanceof EntityPlayerMP;
+ }
+ if (aPlayer instanceof EntityPlayerMP) {
+ if (tTileEntity instanceof IGregTechTileEntity) {
+ IMetaTileEntity metaTE = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity();
+ if (metaTE instanceof IAlignmentProvider) {
+ IAlignment alignment = ((IAlignmentProvider) metaTE).getAlignment();
+ if(aPlayer.isSneaking()){
+ alignment.toolSetFlip(null);
+ }else {
+ alignment.toolSetRotation(null);
+ }
+ return true;
+ }
+ } else if (tTileEntity instanceof IAlignmentProvider) {
+ IAlignment alignment = ((IAlignmentProvider) tTileEntity).getAlignment();
+ if(aPlayer.isSneaking()){
+ alignment.toolSetFlip(null);
+ }else {
+ alignment.toolSetRotation(null);
+ }
+ return true;
+ }
+ }
+ return false;
+ }
+}
diff --git a/src/main/java/com/github/technus/tectech/mechanics/alignment/IAlignment.java b/src/main/java/com/github/technus/tectech/mechanics/alignment/IAlignment.java
index d7b48f8865..a2a6301070 100644
--- a/src/main/java/com/github/technus/tectech/mechanics/alignment/IAlignment.java
+++ b/src/main/java/com/github/technus/tectech/mechanics/alignment/IAlignment.java
@@ -8,12 +8,25 @@ import net.minecraftforge.common.util.ForgeDirection;
import java.util.Arrays;
-public interface IAlignment extends IAlignmentLimits {
+public interface IAlignment extends IAlignmentLimits,IAlignmentProvider {
int DIRECTIONS_COUNT= Direction.VALUES.length;
int ROTATIONS_COUNT= Rotation.VALUES.length;
int FLIPS_COUNT= Flip.VALUES.length;
int STATES_COUNT = ExtendedFacing.VALUES.length;
+ ExtendedFacing getExtendedFacing();
+
+ void setExtendedFacing(ExtendedFacing alignment);
+
+ IAlignmentLimits getAlignmentLimits();
+
+ void setAlignmentLimits(IAlignmentLimits limits);
+
+ @Override
+ default IAlignment getAlignment(){
+ return this;
+ }
+
static int getAlignmentIndex(ForgeDirection direction, Rotation rotation, Flip flip){
return (direction.ordinal()*ROTATIONS_COUNT+rotation.getIndex())*FLIPS_COUNT+flip.getIndex();
}
@@ -42,14 +55,6 @@ public interface IAlignment extends IAlignmentLimits {
setExtendedFacing(getExtendedFacing().with(flip));
}
- ExtendedFacing getExtendedFacing();
-
- void setExtendedFacing(ExtendedFacing alignment);
-
- IAlignmentLimits getAlignmentLimits();
-
- void setAlignmentLimits(IAlignmentLimits limits);
-
default boolean toolSetDirection(ForgeDirection direction){
if(direction==null || direction==ForgeDirection.UNKNOWN){
for (int i = 0,j=getDirection().ordinal()+1, valuesLength = Direction.VALUES.length; i < valuesLength; i++) {
@@ -75,6 +80,15 @@ public interface IAlignment extends IAlignmentLimits {
return false;
}
+ default boolean canSetToDirectionAny(ForgeDirection direction){
+ for (ExtendedFacing extendedFacing : ExtendedFacing.FOR_FACING.get(direction)) {
+ if(isNewExtendedFacingValid(extendedFacing)){
+ return true;
+ }
+ }
+ return false;
+ }
+
default boolean toolSetRotation(Rotation rotation) {
if(rotation==null){
int flips = Flip.VALUES.length;
diff --git a/src/main/java/com/github/technus/tectech/mechanics/alignment/IAlignmentProvider.java b/src/main/java/com/github/technus/tectech/mechanics/alignment/IAlignmentProvider.java
new file mode 100644
index 0000000000..07dc972aac
--- /dev/null
+++ b/src/main/java/com/github/technus/tectech/mechanics/alignment/IAlignmentProvider.java
@@ -0,0 +1,5 @@
+package com.github.technus.tectech.mechanics.alignment;
+
+public interface IAlignmentProvider {
+ IAlignment getAlignment();
+} \ No newline at end of file
diff --git a/src/main/java/com/github/technus/tectech/mechanics/alignment/IntegerAxisSwap.java b/src/main/java/com/github/technus/tectech/mechanics/alignment/IntegerAxisSwap.java
index 40cb6c3220..1c44164731 100644
--- a/src/main/java/com/github/technus/tectech/mechanics/alignment/IntegerAxisSwap.java
+++ b/src/main/java/com/github/technus/tectech/mechanics/alignment/IntegerAxisSwap.java
@@ -1,6 +1,7 @@
package com.github.technus.tectech.mechanics.alignment;
import com.github.technus.tectech.util.Vec3Impl;
+import net.minecraft.util.Vec3;
import net.minecraftforge.common.util.ForgeDirection;
import static com.github.technus.tectech.mechanics.alignment.enumerable.Direction.getAxisVector;
@@ -40,6 +41,22 @@ public class IntegerAxisSwap {
forFirstAxis.get2()*point.get0()+forSecondAxis.get2()*point.get1()+forThirdAxis.get2()*point.get2()
);
}
+
+ public Vec3 translate(Vec3 point){
+ return Vec3.createVectorHelper(
+ forFirstAxis.get0()*point.xCoord +forFirstAxis.get1()*point.yCoord +forFirstAxis.get2()*point.zCoord,
+ forSecondAxis.get0()*point.xCoord+forSecondAxis.get1()*point.yCoord+forSecondAxis.get2()*point.zCoord,
+ forThirdAxis.get0()*point.xCoord +forThirdAxis.get1()*point.yCoord +forThirdAxis.get2()*point.zCoord
+ );
+ }
+
+ public Vec3 inverseTranslate(Vec3 point){
+ return Vec3.createVectorHelper(
+ forFirstAxis.get0()*point.xCoord+forSecondAxis.get0()*point.yCoord+forThirdAxis.get0()*point.zCoord,
+ forFirstAxis.get1()*point.xCoord+forSecondAxis.get1()*point.yCoord+forThirdAxis.get1()*point.zCoord,
+ forFirstAxis.get2()*point.xCoord+forSecondAxis.get2()*point.yCoord+forThirdAxis.get2()*point.zCoord
+ );
+ }
public void translate(int[] point,int[] out){
out[0]=forFirstAxis.get0()*point[0] +forFirstAxis.get1()*point[1] +forFirstAxis.get2()*point[2];
diff --git a/src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/ExtendedFacing.java b/src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/ExtendedFacing.java
index 68cc50a5ee..2a93bcc540 100644
--- a/src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/ExtendedFacing.java
+++ b/src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/ExtendedFacing.java
@@ -3,6 +3,7 @@ package com.github.technus.tectech.mechanics.alignment.enumerable;
import com.github.technus.tectech.mechanics.alignment.IAlignment;
import com.github.technus.tectech.mechanics.alignment.IntegerAxisSwap;
import com.github.technus.tectech.util.Vec3Impl;
+import net.minecraft.util.Vec3;
import net.minecraftforge.common.util.ForgeDirection;
import java.util.*;
@@ -11,7 +12,6 @@ import static com.github.technus.tectech.mechanics.alignment.IAlignment.FLIPS_CO
import static com.github.technus.tectech.mechanics.alignment.IAlignment.ROTATIONS_COUNT;
import static java.lang.Math.abs;
import static java.util.Arrays.stream;
-import static java.util.stream.Collectors.reducing;
import static java.util.stream.Collectors.toMap;
public enum ExtendedFacing {
@@ -143,32 +143,32 @@ public enum ExtendedFacing {
switch (direction){
case DOWN:
a= ForgeDirection.WEST;
- b= ForgeDirection.NORTH;
+ b= ForgeDirection.SOUTH;
c= ForgeDirection.UP;
break;
case UP:
a= ForgeDirection.EAST;
- b= ForgeDirection.NORTH;
+ b= ForgeDirection.SOUTH;
c= ForgeDirection.DOWN;
break;
case NORTH:
a= ForgeDirection.WEST;
- b= ForgeDirection.UP;
+ b= ForgeDirection.DOWN;
c= ForgeDirection.SOUTH;
break;
case SOUTH:
a= ForgeDirection.EAST;
- b= ForgeDirection.UP;
+ b= ForgeDirection.DOWN;
c= ForgeDirection.NORTH;
break;
case WEST:
a= ForgeDirection.SOUTH;
- b= ForgeDirection.UP;
+ b= ForgeDirection.DOWN;
c= ForgeDirection.EAST;
break;
case EAST:
a= ForgeDirection.NORTH;
- b= ForgeDirection.UP;
+ b= ForgeDirection.DOWN;
c= ForgeDirection.WEST;
break;
default:throw new RuntimeException("Is impossible...");
@@ -186,7 +186,7 @@ public enum ExtendedFacing {
default:throw new RuntimeException("Even more impossible...");
}
switch (rotation) {
- case COUNTER_CLOCKWISE: {
+ case CLOCKWISE: {
ForgeDirection _a=a;
a =b;
b =_a.getOpposite();
@@ -196,7 +196,7 @@ public enum ExtendedFacing {
a=a.getOpposite();
b=b.getOpposite();
break;
- case CLOCKWISE: {
+ case COUNTER_CLOCKWISE: {
ForgeDirection _a=a;
a =b.getOpposite();
b =_a;
@@ -292,6 +292,9 @@ public enum ExtendedFacing {
* @param abcOffset A,B,C offset (facing relative L-->R,U-->D,F-->B)
* @return X,Y,Z offset in world
*/
+ public Vec3 getWorldOffset(Vec3 abcOffset) {
+ return integerAxisSwap.inverseTranslate(abcOffset);
+ }
public Vec3Impl getWorldOffset(Vec3Impl abcOffset) {
return integerAxisSwap.inverseTranslate(abcOffset);
}
@@ -308,6 +311,9 @@ public enum ExtendedFacing {
* @param xyzOffset X,Y,Z offset in world
* @return A,B,C offset (facing relative L-->R,U-->D,F-->B)
*/
+ public Vec3 getOffsetABC(Vec3 xyzOffset){
+ return integerAxisSwap.translate(xyzOffset);
+ }
public Vec3Impl getOffsetABC(Vec3Impl xyzOffset){
return integerAxisSwap.translate(xyzOffset);
}
diff --git a/src/main/java/com/github/technus/tectech/mechanics/constructable/ConstructableUtility.java b/src/main/java/com/github/technus/tectech/mechanics/constructable/ConstructableUtility.java
new file mode 100644
index 0000000000..2dc74330f9
--- /dev/null
+++ b/src/main/java/com/github/technus/tectech/mechanics/constructable/ConstructableUtility.java
@@ -0,0 +1,114 @@
+package com.github.technus.tectech.mechanics.constructable;
+
+import com.github.technus.tectech.TecTech;
+import com.github.technus.tectech.mechanics.alignment.IAlignment;
+import com.github.technus.tectech.mechanics.alignment.enumerable.ExtendedFacing;
+import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.player.EntityPlayerMP;
+import net.minecraft.item.ItemStack;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.world.World;
+import net.minecraftforge.common.util.FakePlayer;
+import net.minecraftforge.common.util.ForgeDirection;
+
+public class ConstructableUtility {
+ private ConstructableUtility(){
+
+ }
+
+ public static boolean handle(ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide) {
+ TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
+ if(tTileEntity==null || aPlayer instanceof FakePlayer) {
+ return aPlayer instanceof EntityPlayerMP;
+ }
+ if (aPlayer instanceof EntityPlayerMP) {
+ //struct gen
+ if (aPlayer.isSneaking() && aPlayer.capabilities.isCreativeMode) {
+ if (tTileEntity instanceof IGregTechTileEntity) {
+ IMetaTileEntity metaTE = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity();
+ if (metaTE instanceof IConstructable) {
+ ((IConstructable) metaTE).construct(aStack, false);
+ } else if (IMultiblockInfoContainer.contains(metaTE.getClass())) {
+ IMultiblockInfoContainer<IMetaTileEntity> iMultiblockInfoContainer =IMultiblockInfoContainer.get(metaTE.getClass());
+ if(metaTE instanceof IAlignment){
+ iMultiblockInfoContainer.construct(aStack, false, metaTE, (
+ (IAlignment) metaTE).getExtendedFacing());
+ }else {
+ iMultiblockInfoContainer.construct(aStack, false, metaTE,
+ ExtendedFacing.of(ForgeDirection.getOrientation(((IGregTechTileEntity) tTileEntity).getFrontFacing())));
+ }
+ }
+ } else if (tTileEntity instanceof IConstructable) {
+ ((IConstructable) tTileEntity).construct(aStack, false);
+ } else if (IMultiblockInfoContainer.contains(tTileEntity.getClass())) {
+ IMultiblockInfoContainer<TileEntity> iMultiblockInfoContainer =IMultiblockInfoContainer.get(tTileEntity.getClass());
+ if(tTileEntity instanceof IAlignment){
+ iMultiblockInfoContainer.construct(aStack, false, tTileEntity,
+ ((IAlignment) tTileEntity).getExtendedFacing());
+ }else {
+ iMultiblockInfoContainer.construct(aStack, false, tTileEntity,
+ ExtendedFacing.of(ForgeDirection.getOrientation(aSide)));
+ }
+ }
+ }
+ return true;
+ }else if (TecTech.proxy.isThePlayer(aPlayer)){//particles and text client side
+ //if ((!aPlayer.isSneaking() || !aPlayer.capabilities.isCreativeMode)) {
+ if(tTileEntity instanceof IGregTechTileEntity) {
+ IMetaTileEntity metaTE = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity();
+ if (metaTE instanceof IConstructable) {
+ ((IConstructable) metaTE).construct(aStack, true);
+ TecTech.proxy.printInchat(((IConstructable) metaTE).getStructureDescription(aStack));
+ return false;
+ } else if(IMultiblockInfoContainer.contains(metaTE.getClass())){
+ IMultiblockInfoContainer<IMetaTileEntity> iMultiblockInfoContainer =IMultiblockInfoContainer.get(metaTE.getClass());
+ if(metaTE instanceof IAlignment){
+ iMultiblockInfoContainer.construct(aStack, true, metaTE,
+ ((IAlignment) metaTE).getExtendedFacing());
+ }else {
+ iMultiblockInfoContainer.construct(aStack, true, metaTE,
+ ExtendedFacing.of(ForgeDirection.getOrientation(((IGregTechTileEntity) tTileEntity).getFrontFacing())));
+ }
+ TecTech.proxy.printInchat(IMultiblockInfoContainer.get(metaTE.getClass()).getDescription(aStack));
+ return false;
+ }
+ } else if(tTileEntity instanceof IConstructable){
+ ((IConstructable) tTileEntity).construct(aStack,true);
+ TecTech.proxy.printInchat(((IConstructable) tTileEntity).getStructureDescription(aStack));
+ return false;
+ } else if(IMultiblockInfoContainer.contains(tTileEntity.getClass())){
+ IMultiblockInfoContainer<TileEntity> iMultiblockInfoContainer = IMultiblockInfoContainer.get(tTileEntity.getClass());
+ if(tTileEntity instanceof IAlignment){
+ iMultiblockInfoContainer.construct(aStack, true, tTileEntity,
+ ((IAlignment) tTileEntity).getExtendedFacing());
+ }else {
+ iMultiblockInfoContainer.construct(aStack, true, tTileEntity,
+ ExtendedFacing.of(ForgeDirection.getOrientation(aSide)));
+ }
+ TecTech.proxy.printInchat(IMultiblockInfoContainer.get(tTileEntity.getClass()).getDescription(aStack));
+ return false;
+ }
+ //} else {
+ // if(tTileEntity instanceof IGregTechTileEntity) {
+ // IMetaTileEntity metaTE = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity();
+ // if (metaTE instanceof IConstructable) {
+ // TecTech.proxy.printInchat(((IConstructable) metaTE).getStructureDescription(aStack.stackSize));
+ // return false;
+ // } else if(multiblockMap.containsKey(metaTE.getClass().getCanonicalName())){
+ // TecTech.proxy.printInchat(multiblockMap.get(metaTE.getClass().getCanonicalName()).getDescription(aStack.stackSize));
+ // return false;
+ // }
+ // } else if(tTileEntity instanceof IConstructable){
+ // TecTech.proxy.printInchat(((IConstructable) tTileEntity).getStructureDescription(aStack.stackSize));
+ // return false;
+ // } else if(multiblockMap.containsKey(tTileEntity.getClass().getCanonicalName())){
+ // TecTech.proxy.printInchat(multiblockMap.get(tTileEntity.getClass().getCanonicalName()).getDescription(aStack.stackSize));
+ // return false;
+ // }
+ //}
+ }
+ return false;
+ }
+}
diff --git a/src/main/java/com/github/technus/tectech/mechanics/constructable/IConstructable.java b/src/main/java/com/github/technus/tectech/mechanics/constructable/IConstructable.java
new file mode 100644
index 0000000000..1de0381f1f
--- /dev/null
+++ b/src/main/java/com/github/technus/tectech/mechanics/constructable/IConstructable.java
@@ -0,0 +1,16 @@
+package com.github.technus.tectech.mechanics.constructable;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import net.minecraft.item.ItemStack;
+
+/**
+ * Created by Tec on 24.03.2017.
+ */
+public interface IConstructable {
+ void construct(ItemStack stackSize, boolean hintsOnly);
+
+ @SideOnly(Side.CLIENT)
+ String[] getStructureDescription(ItemStack stackSize);
+}
+
diff --git a/src/main/java/com/github/technus/tectech/mechanics/constructable/IMultiblockInfoContainer.java b/src/main/java/com/github/technus/tectech/mechanics/constructable/IMultiblockInfoContainer.java
new file mode 100644
index 0000000000..173e0d16ec
--- /dev/null
+++ b/src/main/java/com/github/technus/tectech/mechanics/constructable/IMultiblockInfoContainer.java
@@ -0,0 +1,39 @@
+package com.github.technus.tectech.mechanics.constructable;
+
+import com.github.technus.tectech.mechanics.alignment.enumerable.ExtendedFacing;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
+import net.minecraft.item.ItemStack;
+import net.minecraft.tileentity.TileEntity;
+
+import java.util.HashMap;
+
+/**
+ * To implement IConstructable on not own TileEntities
+ */
+public interface IMultiblockInfoContainer<T> {
+ HashMap<String, IMultiblockInfoContainer<?>> MULTIBLOCK_MAP = new HashMap<>();
+
+ static <T extends TileEntity> void registerTileClass(Class<T> clazz, IMultiblockInfoContainer<?> info){
+ MULTIBLOCK_MAP.put(clazz.getCanonicalName(),info);
+ }
+
+ static <T extends IMetaTileEntity> void registerMetaClass(Class<T> clazz, IMultiblockInfoContainer<?> info){
+ MULTIBLOCK_MAP.put(clazz.getCanonicalName(),info);
+ }
+
+ @SuppressWarnings("unchecked")
+ static <T> IMultiblockInfoContainer<T> get(Class<?> tClass){
+ return (IMultiblockInfoContainer<T>)MULTIBLOCK_MAP.get(tClass.getCanonicalName());
+ }
+
+ static boolean contains(Class<?> tClass){
+ return MULTIBLOCK_MAP.containsKey(tClass.getCanonicalName());
+ }
+
+ void construct(ItemStack stackSize, boolean hintsOnly, T tileEntity, ExtendedFacing aSide);
+
+ @SideOnly(Side.CLIENT)
+ String[] getDescription(ItemStack stackSize);
+}
diff --git a/src/main/java/com/github/technus/tectech/mechanics/constructible/IConstructable.java b/src/main/java/com/github/technus/tectech/mechanics/constructible/IConstructable.java
deleted file mode 100644
index fdfa2904fb..0000000000
--- a/src/main/java/com/github/technus/tectech/mechanics/constructible/IConstructable.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package com.github.technus.tectech.mechanics.constructible;
-
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-
-/**
- * Created by Tec on 24.03.2017.
- */
-public interface IConstructable {
- void construct(int stackSize, boolean hintsOnly);
-
- @SideOnly(Side.CLIENT)
- String[] getStructureDescription(int stackSize);
-}
-
diff --git a/src/main/java/com/github/technus/tectech/mechanics/data/RendererMessage.java b/src/main/java/com/github/technus/tectech/mechanics/spark/RendererMessage.java
index 514b8b88ad..f2fd17817d 100644
--- a/src/main/java/com/github/technus/tectech/mechanics/data/RendererMessage.java
+++ b/src/main/java/com/github/technus/tectech/mechanics/spark/RendererMessage.java
@@ -1,4 +1,4 @@
-package com.github.technus.tectech.mechanics.data;
+package com.github.technus.tectech.mechanics.spark;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.network.simpleimpl.IMessage;
diff --git a/src/main/java/com/github/technus/tectech/mechanics/data/ThaumSpark.java b/src/main/java/com/github/technus/tectech/mechanics/spark/ThaumSpark.java
index 99f3696aa9..604624828c 100644
--- a/src/main/java/com/github/technus/tectech/mechanics/data/ThaumSpark.java
+++ b/src/main/java/com/github/technus/tectech/mechanics/spark/ThaumSpark.java
@@ -1,54 +1,54 @@
-package com.github.technus.tectech.mechanics.data;
-
-import java.io.Serializable;
-import java.util.Objects;
-
-public class ThaumSpark implements Serializable {
- //This works regardless of if TC is loaded
- private static final long serialVersionUID = -7037856938316679566L;
- public int x, y, z, wID;
- public byte xR, yR, zR;
-
- public ThaumSpark(){
- this.x = 0;
- this.z = 0;
- this.y = 0;
-
- this.xR = 0;
- this.yR = 0;
- this.zR = 0;
-
- this.wID = 0;
- }
-
- public ThaumSpark(int x, int y, int z, byte xR, byte yR, byte zR, int wID) {
- this.x = x;
- this.z = z;
- this.y = y;
-
- this.xR = xR;
- this.yR = yR;
- this.zR = zR;
-
- this.wID = wID;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
- ThaumSpark that = (ThaumSpark) o;
- return x == that.x &&
- y == that.y &&
- z == that.z &&
- wID == that.wID &&
- xR == that.xR &&
- yR == that.yR &&
- zR == that.zR;
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(x, y, z, wID, xR, yR, zR);
- }
-}
+package com.github.technus.tectech.mechanics.spark;
+
+import java.io.Serializable;
+import java.util.Objects;
+
+public class ThaumSpark implements Serializable {
+ //This works regardless of if TC is loaded
+ private static final long serialVersionUID = -7037856938316679566L;
+ public int x, y, z, wID;
+ public byte xR, yR, zR;
+
+ public ThaumSpark(){
+ this.x = 0;
+ this.z = 0;
+ this.y = 0;
+
+ this.xR = 0;
+ this.yR = 0;
+ this.zR = 0;
+
+ this.wID = 0;
+ }
+
+ public ThaumSpark(int x, int y, int z, byte xR, byte yR, byte zR, int wID) {
+ this.x = x;
+ this.z = z;
+ this.y = y;
+
+ this.xR = xR;
+ this.yR = yR;
+ this.zR = zR;
+
+ this.wID = wID;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+ ThaumSpark that = (ThaumSpark) o;
+ return x == that.x &&
+ y == that.y &&
+ z == that.z &&
+ wID == that.wID &&
+ xR == that.xR &&
+ yR == that.yR &&
+ zR == that.zR;
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(x, y, z, wID, xR, yR, zR);
+ }
+}
diff --git a/src/main/java/com/github/technus/tectech/mechanics/structure/IBlockPosConsumer.java b/src/main/java/com/github/technus/tectech/mechanics/structure/IBlockPosConsumer.java
new file mode 100644
index 0000000000..c3ea2d3e3f
--- /dev/null
+++ b/src/main/java/com/github/technus/tectech/mechanics/structure/IBlockPosConsumer.java
@@ -0,0 +1,7 @@
+package com.github.technus.tectech.mechanics.structure;
+
+import net.minecraft.world.World;
+
+public interface IBlockPosConsumer {
+ void consume(World world, int x, int y, int z);
+}
diff --git a/src/main/java/com/github/technus/tectech/mechanics/structure/ICustomBlockSetting.java b/src/main/java/com/github/technus/tectech/mechanics/structure/ICustomBlockSetting.java
new file mode 100644
index 0000000000..b70e76fbac
--- /dev/null
+++ b/src/main/java/com/github/technus/tectech/mechanics/structure/ICustomBlockSetting.java
@@ -0,0 +1,17 @@
+package com.github.technus.tectech.mechanics.structure;
+
+import net.minecraft.block.Block;
+import net.minecraft.world.World;
+
+public interface ICustomBlockSetting {
+ /**
+ * Default block setting calls {@link World#setBlock(int x, int y, int z, Block block, int meta, int updateType)} like:
+ * {@code world.setBlock(x,y,z,this/block,meta,2)} where updateType 2 means to update lighting and stuff
+ * @param world world that should be affected
+ * @param x x position to set
+ * @param y y position to set
+ * @param z z position to set
+ * @param meta required meta
+ */
+ void setBlock(World world, int x, int y, int z, int meta);
+}
diff --git a/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureDefinition.java b/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureDefinition.java
new file mode 100644
index 0000000000..c8488d5cea
--- /dev/null
+++ b/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureDefinition.java
@@ -0,0 +1,167 @@
+package com.github.technus.tectech.mechanics.structure;
+
+import com.github.technus.tectech.TecTech;
+import com.github.technus.tectech.mechanics.alignment.enumerable.ExtendedFacing;
+import net.minecraft.item.ItemStack;
+import net.minecraft.world.World;
+
+import java.util.Arrays;
+
+import static com.github.technus.tectech.loader.TecTechConfig.DEBUG_MODE;
+
+public interface IStructureDefinition<T> {
+ /**
+ * Used internally
+ * @param name same name as for other methods here
+ * @return the array of elements to process
+ */
+ IStructureElement<T>[] getStructureFor(String name);
+
+ default boolean check(T object,String piece, World world, ExtendedFacing extendedFacing,
+ int basePositionX, int basePositionY, int basePositionZ,
+ int basePositionA, int basePositionB, int basePositionC,
+ boolean forceCheckAllBlocks){
+ return iterate(object, null, getStructureFor(piece), world, extendedFacing, basePositionX, basePositionY, basePositionZ,
+ basePositionA, basePositionB, basePositionC,false,forceCheckAllBlocks);
+ }
+
+ default boolean hints(T object, ItemStack trigger,String piece, World world, ExtendedFacing extendedFacing,
+ int basePositionX, int basePositionY, int basePositionZ,
+ int basePositionA, int basePositionB, int basePositionC) {
+ return iterate(object, trigger, getStructureFor(piece), world, extendedFacing, basePositionX, basePositionY, basePositionZ,
+ basePositionA, basePositionB, basePositionC,true,null);
+ }
+
+ default boolean build(T object, ItemStack trigger,String piece, World world, ExtendedFacing extendedFacing,
+ int basePositionX, int basePositionY, int basePositionZ,
+ int basePositionA, int basePositionB, int basePositionC) {
+ return iterate(object, trigger, getStructureFor(piece), world, extendedFacing, basePositionX, basePositionY, basePositionZ,
+ basePositionA, basePositionB, basePositionC,false,null);
+ }
+
+ default boolean buildOrHints(T object, ItemStack trigger,String piece, World world, ExtendedFacing extendedFacing,
+ int basePositionX, int basePositionY, int basePositionZ,
+ int basePositionA, int basePositionB, int basePositionC,
+ boolean hintsOnly){
+ return iterate(object, trigger, getStructureFor(piece), world, extendedFacing, basePositionX, basePositionY, basePositionZ,
+ basePositionA, basePositionB, basePositionC,hintsOnly,null);
+ }
+
+ static <T> boolean iterate(T object, ItemStack trigger, IStructureElement<T>[] elements, World world, ExtendedFacing extendedFacing,
+ int basePositionX, int basePositionY, int basePositionZ,
+ int basePositionA, int basePositionB, int basePositionC,
+ boolean hintsOnly, Boolean checkBlocksIfNotNullForceCheckAllIfTrue){
+ if(world.isRemote ^ hintsOnly){
+ return false;
+ }
+
+ //change base position to base offset
+ basePositionA=-basePositionA;
+ basePositionB=-basePositionB;
+ basePositionC=-basePositionC;
+
+ int[] abc = new int[]{basePositionA,basePositionB,basePositionC};
+ int[] xyz = new int[3];
+
+ if(checkBlocksIfNotNullForceCheckAllIfTrue!=null){
+ if(checkBlocksIfNotNullForceCheckAllIfTrue){
+ for (IStructureElement<T> element : elements) {
+ if(element.isNavigating()) {
+ abc[0] = (element.resetA() ? basePositionA : abc[0]) + element.getStepA();
+ abc[1] = (element.resetB() ? basePositionB : abc[1]) + element.getStepB();
+ abc[2] = (element.resetC() ? basePositionC : abc[2]) + element.getStepC();
+ }else {
+ extendedFacing.getWorldOffset(abc, xyz);
+ xyz[0] += basePositionX;
+ xyz[1] += basePositionY;
+ xyz[2] += basePositionZ;
+
+ if (world.blockExists(xyz[0], xyz[1], xyz[2])) {
+ if(!element.check(object, world, xyz[0], xyz[1], xyz[2])){
+ if(DEBUG_MODE){
+ TecTech.LOGGER.info("Multi ["+basePositionX+", "+basePositionY+", "+basePositionZ+"] failed @ "+
+ Arrays.toString(xyz)+" "+Arrays.toString(abc));
+ }
+ return false;
+ }
+ } else {
+ if(DEBUG_MODE){
+ TecTech.LOGGER.info("Multi ["+basePositionX+", "+basePositionY+", "+basePositionZ+"] !blockExists @ "+
+ Arrays.toString(xyz)+" "+Arrays.toString(abc));
+ }
+ return false;
+ }
+ abc[0]+=1;
+ }
+ }
+ } else {
+ for (IStructureElement<T> element : elements) {
+ if(element.isNavigating()) {
+ abc[0] = (element.resetA() ? basePositionA : abc[0]) + element.getStepA();
+ abc[1] = (element.resetB() ? basePositionB : abc[1]) + element.getStepB();
+ abc[2] = (element.resetC() ? basePositionC : abc[2]) + element.getStepC();
+ }else {
+ extendedFacing.getWorldOffset(abc, xyz);
+ xyz[0] += basePositionX;
+ xyz[1] += basePositionY;
+ xyz[2] += basePositionZ;
+
+ if (world.blockExists(xyz[0], xyz[1], xyz[2])) {
+ if(!element.check(object, world, xyz[0], xyz[1], xyz[2])){
+ if(DEBUG_MODE){
+ TecTech.LOGGER.info("Multi ["+basePositionX+", "+basePositionY+", "+basePositionZ+"] failed @ "+
+ Arrays.toString(xyz)+" "+Arrays.toString(abc));
+ }
+ return false;
+ }
+ } else {
+ if(DEBUG_MODE){
+ TecTech.LOGGER.info("Multi ["+basePositionX+", "+basePositionY+", "+basePositionZ+"] !blockExists @ "+
+ Arrays.toString(xyz)+" "+Arrays.toString(abc));
+ }
+ }
+ abc[0]+=1;
+ }
+ }
+ }
+ }else {
+ if(hintsOnly) {
+ for (IStructureElement<T> element : elements) {
+ if(element.isNavigating()) {
+ abc[0] = (element.resetA() ? basePositionA : abc[0]) + element.getStepA();
+ abc[1] = (element.resetB() ? basePositionB : abc[1]) + element.getStepB();
+ abc[2] = (element.resetC() ? basePositionC : abc[2]) + element.getStepC();
+ }else {
+ extendedFacing.getWorldOffset(abc, xyz);
+ xyz[0] += basePositionX;
+ xyz[1] += basePositionY;
+ xyz[2] += basePositionZ;
+
+ element.spawnHint(object, world, xyz[0], xyz[1], xyz[2], trigger);
+
+ abc[0]+=1;
+ }
+ }
+ } else {
+ for (IStructureElement<T> element : elements) {
+ if(element.isNavigating()) {
+ abc[0] = (element.resetA() ? basePositionA : abc[0]) + element.getStepA();
+ abc[1] = (element.resetB() ? basePositionB : abc[1]) + element.getStepB();
+ abc[2] = (element.resetC() ? basePositionC : abc[2]) + element.getStepC();
+ }else {
+ extendedFacing.getWorldOffset(abc, xyz);
+ xyz[0] += basePositionX;
+ xyz[1] += basePositionY;
+ xyz[2] += basePositionZ;
+
+ if (world.blockExists(xyz[0], xyz[1], xyz[2])) {
+ element.placeBlock(object, world, xyz[0], xyz[1], xyz[2], trigger);
+ }
+ abc[0]+=1;
+ }
+ }
+ }
+ }
+ return true;
+ }
+}
diff --git a/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElement.java b/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElement.java
new file mode 100644
index 0000000000..f946e71f91
--- /dev/null
+++ b/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElement.java
@@ -0,0 +1,43 @@
+package com.github.technus.tectech.mechanics.structure;
+
+import net.minecraft.item.ItemStack;
+import net.minecraft.world.World;
+
+/**
+ * Use StructureUtility to instantiate
+ */
+public interface IStructureElement<T> {
+ boolean check(T t,World world,int x,int y,int z);
+
+ boolean spawnHint(T t, World world, int x, int y, int z, ItemStack trigger);
+
+ boolean placeBlock(T t,World world,int x,int y,int z, ItemStack trigger);
+
+ default int getStepA(){
+ return 1;
+ }
+
+ default int getStepB(){
+ return 0;
+ }
+
+ default int getStepC(){
+ return 0;
+ }
+
+ default boolean resetA(){
+ return false;
+ }
+
+ default boolean resetB(){
+ return false;
+ }
+
+ default boolean resetC(){
+ return false;
+ }
+
+ default boolean isNavigating(){
+ return false;
+ }
+}
diff --git a/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElementChain.java b/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElementChain.java
new file mode 100644
index 0000000000..f9593ee1c5
--- /dev/null
+++ b/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElementChain.java
@@ -0,0 +1,41 @@
+package com.github.technus.tectech.mechanics.structure;
+
+import net.minecraft.item.ItemStack;
+import net.minecraft.world.World;
+
+/**
+ * Use StructureUtility to instantiate
+ */
+public interface IStructureElementChain<T> extends IStructureElement<T> {
+ IStructureElement<T>[] fallbacks();
+
+ @Override
+ default boolean check(T t, World world, int x, int y, int z){
+ for (IStructureElement<T> fallback : fallbacks()) {
+ if (fallback.check(t, world, x, y, z)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ @Override
+ default boolean spawnHint(T t, World world, int x, int y, int z, ItemStack trigger) {
+ for (IStructureElement<T> fallback : fallbacks()) {
+ if (fallback.spawnHint(t, world, x, y, z, trigger)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ @Override
+ default boolean placeBlock(T t, World world, int x, int y, int z, ItemStack trigger) {
+ for (IStructureElement<T> fallback : fallbacks()) {
+ if (fallback.placeBlock(t, world, x, y, z, trigger)) {
+ return true;
+ }
+ }
+ return false;
+ }
+}
diff --git a/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElementCheckOnly.java b/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElementCheckOnly.java
new file mode 100644
index 0000000000..ec15aea53b
--- /dev/null
+++ b/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElementCheckOnly.java
@@ -0,0 +1,16 @@
+package com.github.technus.tectech.mechanics.structure;
+
+import net.minecraft.item.ItemStack;
+import net.minecraft.world.World;
+
+public interface IStructureElementCheckOnly<T> extends IStructureElement<T> {
+ @Override
+ default boolean placeBlock(T t, World world, int x, int y, int z, ItemStack trigger){
+ return false;
+ }
+
+ @Override
+ default boolean spawnHint(T t, World world, int x, int y, int z, ItemStack trigger){
+ return false;
+ }
+}
diff --git a/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElementDeferred.java b/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElementDeferred.java
new file mode 100644
index 0000000000..dbb74312a8
--- /dev/null
+++ b/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElementDeferred.java
@@ -0,0 +1,7 @@
+package com.github.technus.tectech.mechanics.structure;
+
+/**
+ * Use StructureUtility to instantiate
+ */
+public interface IStructureElementDeferred<T> extends IStructureElement<T> {
+}
diff --git a/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElementNoPlacement.java b/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElementNoPlacement.java
new file mode 100644
index 0000000000..47e6060878
--- /dev/null
+++ b/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElementNoPlacement.java
@@ -0,0 +1,11 @@
+package com.github.technus.tectech.mechanics.structure;
+
+import net.minecraft.item.ItemStack;
+import net.minecraft.world.World;
+
+public interface IStructureElementNoPlacement<T> extends IStructureElement<T> {
+ @Override
+ default boolean placeBlock(T t, World world, int x, int y, int z, ItemStack trigger){
+ return false;
+ }
+}
diff --git a/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureNavigate.java b/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureNavigate.java
new file mode 100644
index 0000000000..d3f4134cea
--- /dev/null
+++ b/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureNavigate.java
@@ -0,0 +1,28 @@
+package com.github.technus.tectech.mechanics.structure;
+
+import net.minecraft.item.ItemStack;
+import net.minecraft.world.World;
+
+/**
+ * Use StructureUtility to instantiate
+ */
+interface IStructureNavigate<T> extends IStructureElement<T> {
+ @Override
+ default boolean check(T t, World world, int x, int y, int z){
+ return true;
+ }
+
+ @Override
+ default boolean spawnHint(T t, World world, int x, int y, int z, ItemStack trigger) {
+ return true;
+ }
+
+ @Override
+ default boolean placeBlock(T t, World world, int x, int y, int z, ItemStack trigger) {
+ return true;
+ }
+
+ default boolean isNavigating(){
+ return true;
+ }
+}
diff --git a/src/main/java/com/github/technus/tectech/mechanics/structure/Structure.java b/src/main/java/com/github/technus/tectech/mechanics/structure/Structure.java
new file mode 100644
index 0000000000..83951372a2
--- /dev/null
+++ b/src/main/java/com/github/technus/tectech/mechanics/structure/Structure.java
@@ -0,0 +1,262 @@
+package com.github.technus.tectech.mechanics.structure;
+
+import com.github.technus.tectech.TecTech;
+import com.github.technus.tectech.mechanics.alignment.enumerable.ExtendedFacing;
+import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder;
+import com.github.technus.tectech.thing.casing.TT_Container_Casings;
+import 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.init.Blocks;
+import net.minecraft.world.World;
+import net.minecraftforge.common.util.ForgeDirection;
+
+import static com.github.technus.tectech.loader.TecTechConfig.DEBUG_MODE;
+
+@Deprecated
+public class Structure {
+ private Structure() {
+ }
+
+ @Deprecated
+ @SafeVarargs
+ public static <T> IHatchAdder<T>[] adders(IHatchAdder<T>... iHatchAdder) {
+ return iHatchAdder;
+ }
+
+ //Check Machine Structure based on string[][] (effectively char[][][]), ond offset of the controller
+ //This only checks for REGULAR BLOCKS!
+ @Deprecated
+ public static <T extends IMetaTileEntity> boolean checker(
+ String[][] structure,//0-9 casing, +- air no air, A... ignore 'A'-CHAR-1 blocks
+ Block[] blockType,//use numbers 0-9 for casing types
+ byte[] blockMeta,//use numbers 0-9 for casing types
+ IHatchAdder<T>[] addingMethods,
+ short[] casingTextures,
+ Block[] blockTypeFallback,//use numbers 0-9 for casing types
+ byte[] blockMetaFallback,//use numbers 0-9 for casing types
+ int horizontalOffset, int verticalOffset, int depthOffset,
+ T metaTile,
+ ExtendedFacing extendedFacing,
+ boolean forceCheck) {
+ IGregTechTileEntity aBaseMetaTileEntity = metaTile.getBaseMetaTileEntity();
+ World world = aBaseMetaTileEntity.getWorld();
+ if (world.isRemote) {
+ return false;
+ }
+ //TE Rotation
+ if (extendedFacing == null) {
+ extendedFacing = ExtendedFacing.of(ForgeDirection.getOrientation(aBaseMetaTileEntity.getFrontFacing()));
+ }
+
+ IGregTechTileEntity igt;
+
+ int[] xyz = new int[3];
+ int[] abc = new int[3];
+ int pointer;
+ int baseX = aBaseMetaTileEntity.getXCoord(),
+ baseZ = aBaseMetaTileEntity.getZCoord(),
+ baseY = aBaseMetaTileEntity.getYCoord();
+ //a,b,c - relative to block face!
+ //x,y,z - relative to block position on map!
+ //yPos - absolute height of checked block
+
+ //perform your duties
+ abc[2] = -depthOffset;
+ for (String[] _structure : structure) {//front to back
+ abc[1] = -verticalOffset;
+ for (String __structure : _structure) {//top to bottom
+ abc[0] = -horizontalOffset;
+ for (char block : __structure.toCharArray()) {//left to right
+ if (block < ' ') {
+ //Control chars allow skipping
+ abc[1] += block;
+ break;
+ } else if (block > '@') {
+ //characters allow to skip check A-1 skip, B-2 skips etc.
+ abc[0] += block - '@';
+ }//else if (block < '+')//used to mark THINGS
+ // a++;
+ else if (block == '.') {
+ abc[0]++;
+ } else {
+ //get x y z from rotation
+ extendedFacing.getWorldOffset(abc, xyz);
+ xyz[0] += baseX;
+ xyz[1] += baseY;
+ xyz[2] += baseZ;
+
+ //that must be here since in some cases other axis (b,c) controls y
+ if (xyz[1] < 0 || xyz[1] >= 256) {
+ return false;
+ }
+
+ //Check block
+ if (world.blockExists(xyz[0], xyz[1], xyz[2])) {//this actually checks if the chunk is loaded at this pos
+ switch (block) {
+ case '-'://must be air
+ if (world.getBlock(xyz[0], xyz[1], xyz[2]).getMaterial() != Material.air) {
+ return false;
+ }
+ break;
+ case '+'://must not be air
+ if (world.getBlock(xyz[0], xyz[1], xyz[2]).getMaterial() == Material.air) {
+ return false;
+ }
+ break;
+ default://check for block (countable)
+ Block worldblock = world.getBlock(xyz[0], xyz[1], xyz[2]);
+ int dmg = worldblock.getDamageValue(world, xyz[0], xyz[1], xyz[2]);
+ if ((pointer = block - '0') >= 0) {
+ //countable air -> net.minecraft.block.BlockAir
+ if (worldblock != blockType[pointer]) {
+ if (DEBUG_MODE) {
+ TecTech.LOGGER.info("Struct-block-error " + xyz[0] + ' ' + xyz[1] + ' ' + xyz[2] + " / " + abc[0] + ' ' + abc[1] + ' ' + abc[2] + " / " + worldblock.getUnlocalizedName() + ' ' + blockType[pointer].getUnlocalizedName());
+ }
+ return false;
+ }
+ if (dmg != blockMeta[pointer]) {
+ if (DEBUG_MODE) {
+ TecTech.LOGGER.info("Struct-meta-id-error " + xyz[0] + ' ' + xyz[1] + ' ' + xyz[2] + " / " + abc[0] + ' ' + abc[1] + ' ' + abc[2] + " / " + dmg + ' ' + blockMeta[pointer]);
+ }
+ return false;
+ }
+ } else if ((pointer = block - ' ') >= 0) {
+ igt = aBaseMetaTileEntity.getIGregTechTileEntity(xyz[0], xyz[1], xyz[2]);
+ if (igt == null || !addingMethods[pointer].apply(metaTile, igt, casingTextures[pointer])) {
+ if (worldblock != blockTypeFallback[pointer]) {
+ if (DEBUG_MODE) {
+ TecTech.LOGGER.info("Fallback-struct-block-error " + xyz[0] + ' ' + xyz[1] + ' ' + xyz[2] + " / " + abc[0] + ' ' + abc[1] + ' ' + abc[2] + " / " + worldblock.getUnlocalizedName() + ' ' + (blockTypeFallback[pointer] == null ? "null" : blockTypeFallback[pointer].getUnlocalizedName()));
+ }
+ return false;
+ }
+ if (dmg != blockMetaFallback[pointer]) {
+ if (DEBUG_MODE) {
+ TecTech.LOGGER.info("Fallback-Struct-meta-id-error " + xyz[0] + ' ' + xyz[1] + ' ' + xyz[2] + " / " + abc[0] + ' ' + abc[1] + ' ' + abc[2] + " / " + dmg + ' ' + blockMetaFallback[pointer]);
+ }
+ return false;
+ }
+ }
+ }
+ }
+ } else if (forceCheck) {
+ return false;
+ }
+ abc[0]++;//block in horizontal layer
+ }
+ }
+ abc[1]++;//horizontal layer
+ }
+ abc[2]++;//depth
+ }
+ return true;
+ }
+
+ @Deprecated
+ public static boolean builder(String[][] structure,//0-9 casing, +- air no air, A... ignore 'A'-CHAR+1 blocks
+ Block[] blockType,//use numbers 0-9 for casing types
+ byte[] blockMeta,//use numbers 0-9 for casing types
+ int horizontalOffset, int verticalOffset, int depthOffset,
+ IGregTechTileEntity tileEntity, ExtendedFacing extendedFacing, boolean hintsOnly) {
+ World world = tileEntity.getWorld();
+ int baseX = tileEntity.getXCoord();
+ int baseY = tileEntity.getYCoord();
+ int baseZ = tileEntity.getZCoord();
+ if (world == null || (!world.isRemote && hintsOnly)) {
+ return false;
+ }
+
+ //TE Rotation
+ int[] xyz = new int[3];
+ int[] abc = new int[3];
+ int pointer;
+
+ //a,b,c - relative to block face!
+ //x,y,z - relative to block position on map!
+
+ //perform your duties
+ abc[2] = -depthOffset;
+ for (String[] _structure : structure) {//front to back
+ abc[1] = -verticalOffset;
+ for (String __structure : _structure) {//top to bottom
+ abc[0] = -horizontalOffset;
+ for (char block : __structure.toCharArray()) {//left to right
+ if (block < ' ') {//Control chars allow skipping
+ abc[1] += block;
+ break;
+ }
+ if (block > '@')//characters allow to skip check a-1 skip, b-2 skips etc.
+ {
+ abc[0] += block - '@';
+ }//else if (block < '+')//used to mark THINGS
+ // a++;
+ else if (block == '.')// this TE
+ {
+ abc[0]++;
+ } else {
+ //get x y z from rotation
+ extendedFacing.getWorldOffset(abc, xyz);
+ xyz[0] += baseX;
+ xyz[1] += baseY;
+ xyz[2] += baseZ;
+
+ //that must be here since in some cases other axis (b,c) controls y
+ if (xyz[1] < 0 || xyz[1] >= 256) {
+ return false;
+ }
+
+ //Check block
+ if (world.blockExists(xyz[0], xyz[1], xyz[2])) {//this actually checks if the chunk is loaded
+ if (hintsOnly) {
+ switch (block) {
+ case '-'://must be air
+ TecTech.proxy.hint_particle(world, xyz[0], xyz[1], xyz[2], TT_Container_Casings.sHintCasingsTT, 13);
+ break;
+ case '+'://must not be air
+ TecTech.proxy.hint_particle(world, xyz[0], xyz[1], xyz[2], TT_Container_Casings.sHintCasingsTT, 14);
+ break;
+ default: //check for block
+ if ((pointer = block - '0') >= 0) {
+ if (world.getBlock(xyz[0], xyz[1], xyz[2]) != blockType[pointer] || blockType[pointer].getDamageValue(world, xyz[0], xyz[1], xyz[2]) != blockMeta[pointer]) {
+ TecTech.proxy.hint_particle(world, xyz[0], xyz[1], xyz[2], blockType[pointer], blockMeta[pointer]);
+ }
+ } else if ((pointer = block - ' ') >= 0) {
+ if (pointer < 12) {
+ TecTech.proxy.hint_particle(world, xyz[0], xyz[1], xyz[2], TT_Container_Casings.sHintCasingsTT, pointer);
+ } else {
+ TecTech.proxy.hint_particle(world, xyz[0], xyz[1], xyz[2], TT_Container_Casings.sHintCasingsTT, 12);
+ }
+ } else {
+ TecTech.proxy.hint_particle(world, xyz[0], xyz[1], xyz[2], TT_Container_Casings.sHintCasingsTT, 15);
+ }
+ }
+ } else {
+ switch (block) {
+ case '-'://must be air
+ world.setBlock(xyz[0], xyz[1], xyz[2], Blocks.air, 0, 2);
+ break;
+ case '+'://must not be air
+ world.setBlock(xyz[0], xyz[1], xyz[2], TT_Container_Casings.sBlockCasingsTT, 14, 2);
+ break;
+ default: //check for block
+ if ((pointer = block - '0') >= 0) {
+ if (blockType[pointer] instanceof ICustomBlockSetting) {
+ ((ICustomBlockSetting) blockType[pointer]).setBlock(world, xyz[0], xyz[1], xyz[2], blockMeta[pointer]);
+ } else {
+ world.setBlock(xyz[0], xyz[1], xyz[2], blockType[pointer], blockMeta[pointer], 2);
+ }
+ }
+ }
+ }
+ }
+ abc[0]++;//block in horizontal layer
+ }
+ }
+ abc[1]++;//horizontal layer
+ }
+ abc[2]++;//depth
+ }
+ return true;
+ }
+}
diff --git a/src/main/java/com/github/technus/tectech/mechanics/structure/StructureDefinition.java b/src/main/java/com/github/technus/tectech/mechanics/structure/StructureDefinition.java
new file mode 100644
index 0000000000..9a1e94d98a
--- /dev/null
+++ b/src/main/java/com/github/technus/tectech/mechanics/structure/StructureDefinition.java
@@ -0,0 +1,288 @@
+package com.github.technus.tectech.mechanics.structure;
+
+import com.github.technus.tectech.util.Vec3Impl;
+
+import java.util.*;
+
+import static com.github.technus.tectech.loader.TecTechConfig.DEBUG_MODE;
+import static com.github.technus.tectech.mechanics.structure.StructureUtility.*;
+
+public class StructureDefinition<T> implements IStructureDefinition<T> {
+ private final Map<Character, IStructureElement<T>> elements;
+ private final Map<String, String> shapes;
+ private final Map<String, IStructureElement<T>[]> structures;
+
+ public static <B> Builder<B> builder() {
+ return new Builder<>();
+ }
+
+ private StructureDefinition(
+ Map<Character, IStructureElement<T>> elements,
+ Map<String, String> shapes,
+ Map<String, IStructureElement<T>[]> structures) {
+ this.elements =elements;
+ this.shapes=shapes;
+ this.structures = structures;
+ }
+
+ public static class Builder<T> {
+ private static final char A='\uA000';
+ private static final char B='\uB000';
+ private static final char C='\uC000';
+ private char d ='\uD000';
+ private final Map<Vec3Impl,Character> navigates;
+ private final Map<Character, IStructureElement<T>> elements;
+ private final Map<String, String> shapes;
+
+ private Builder() {
+ navigates=new HashMap<>();
+ elements = new HashMap<>();
+ shapes = new HashMap<>();
+ }
+
+ public Map<Character, IStructureElement<T>> getElements() {
+ return elements;
+ }
+
+ public Map<String, String> getShapes() {
+ return shapes;
+ }
+
+ /**
+ * Casings go: 0 1 2 3 4 5 6 7 8 9 : ; < = > ?
+ * <br/>
+ * HatchAdders go: space ! " # $ % & ' ( ) *
+ * @param name
+ * @param structurePiece
+ * @return
+ */
+ @Deprecated
+ public Builder<T> addShapeOldApi(String name, String[][] structurePiece) {
+ StringBuilder builder = new StringBuilder();
+ if (structurePiece.length > 0) {
+ for (String[] strings : structurePiece) {
+ if (strings.length > 0) {
+ for (String string : strings) {
+ for (int i = 0; i < string.length(); i++) {
+ char ch = string.charAt(i);
+ if(ch<' '){
+ for (int b = 0; b < ch; b++) {
+ builder.append(B);
+ }
+ }else if(ch>'@'){
+ for (int a = '@'; a < ch; a++) {
+ builder.append(A);
+ }
+ }else if(ch=='.'){
+ builder.append(A);
+ }else{
+ builder.append(ch);
+ }
+ }
+ builder.append(B);
+ }
+ builder.setLength(builder.length() - 1);
+ }
+ builder.append(C);
+ }
+ builder.setLength(builder.length() - 1);
+ }
+ int a=0,b=0,c=0;
+ for (int i = 0; i < builder.length(); i++) {
+ char ch = builder.charAt(i);
+ if(ch==A){
+ a++;
+ }else if(ch==B){
+ a=0;
+ b++;
+ }else if(ch==C){
+ a=0;
+ b=0;
+ c++;
+ }else if(a!=0 || b!=0 || c!=0){
+ Vec3Impl vec3 = new Vec3Impl(a, b, c);
+ Character navigate = navigates.get(vec3);
+ if(navigate==null){
+ navigate= d++;
+ navigates.put(vec3,navigate);
+ addElement(navigate,step(vec3));
+ }
+ builder.setCharAt(i-1,navigate);
+ a=0;
+ b=0;
+ c=0;
+ }
+ }
+
+ String built = builder.toString().replaceAll("[\\uA000\\uB000\\uC000]","");
+
+ if(built.contains("+")){
+ addElement('+',notAir());
+ }
+ if (built.contains("-")) {
+ addElement('-', isAir());
+ }
+ shapes.put(name, built);
+ return this;
+ }
+
+ /**
+ * Adds shape
+ * +- is air/no air checks
+ * space bar is skip
+ * ~ is also skip (but marks controller position, optional and logically it is a space...)
+ * rest needs to be defined
+ *
+ * next char is next block(a)
+ * next string is next line(b)
+ * next string[] is next slice(c)
+ *
+ * char A000-FFFF range is reserved for generated skips
+ * @param name unlocalized/code name
+ * @param structurePiece generated or written struct - DO NOT STORE IT ANYWHERE, or at least set them to null afterwards
+ * @return this builder
+ */
+ public Builder<T> addShape(String name, String[][] structurePiece) {
+ StringBuilder builder = new StringBuilder();
+ if (structurePiece.length > 0) {
+ for (String[] strings : structurePiece) {
+ if (strings.length > 0) {
+ for (String string : strings) {
+ builder.append(string).append(B);
+ }
+ builder.setLength(builder.length() - 1);
+ }
+ builder.append(C);
+ }
+ builder.setLength(builder.length() - 1);
+ }
+ int a=0,b=0,c=0;
+ for (int i = 0; i < builder.length(); i++) {
+ char ch = builder.charAt(i);
+ if(ch ==' ' || ch =='~'){
+ builder.setCharAt(i,A);
+ ch=A;
+ }
+ if(ch==A){
+ a++;
+ }else if(ch==B){
+ a=0;
+ b++;
+ }else if(ch==C){
+ a=0;
+ b=0;
+ c++;
+ }else if(a!=0 || b!=0 || c!=0){
+ Vec3Impl vec3 = new Vec3Impl(a, b, c);
+ Character navigate = navigates.get(vec3);
+ if(navigate==null){
+ navigate=d++;
+ navigates.put(vec3,navigate);
+ addElement(navigate,step(vec3));
+ }
+ builder.setCharAt(i-1,navigate);
+ a=0;
+ b=0;
+ c=0;
+ }
+ }
+
+ String built = builder.toString().replaceAll("[\\uA000\\uB000\\uC000]","");
+
+ if(built.contains("+")){
+ addElement('+',notAir());
+ }
+ if (built.contains("-")) {
+ addElement('-', isAir());
+ }
+ shapes.put(name, built);
+ return this;
+ }
+
+ public Builder<T> addElement(Character name, IStructureElement<T> structurePiece) {
+ elements.putIfAbsent(name, structurePiece);
+ return this;
+ }
+
+ public IStructureDefinition<T> build() {
+ Map<String, IStructureElement<T>[]> structures = compileStructureMap();
+ if(DEBUG_MODE){
+ return new StructureDefinition<>(new HashMap<>(elements), new HashMap<>(shapes), structures);
+ }else {
+ return structures::get;
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ private Map<String, IStructureElement<T>[]> compileElementSetMap() {
+ Set<Integer> missing = new HashSet<>();
+ shapes.values().stream().map(CharSequence::chars).forEach(intStream -> intStream.forEach(c -> {
+ IStructureElement<T> iStructureElement = elements.get((char) c);
+ if (iStructureElement == null) {
+ missing.add(c);
+ }
+ }));
+ if (missing.isEmpty()) {
+ Map<String, IStructureElement<T>[]> map = new HashMap<>();
+ shapes.forEach((key, value) -> {
+ Set<Character> chars=new HashSet<>();
+ for (char c : value.toCharArray()) {
+ chars.add(c);
+ }
+ IStructureElement<T>[] compiled = new IStructureElement[chars.size()];
+ int i=0;
+ for (Character aChar : chars) {
+ compiled[i++]=elements.get(aChar);
+ }
+ map.put(key, compiled);
+ });
+ return map;
+ } else {
+ throw new RuntimeException("Missing Structure Element bindings for (chars as integers): " +
+ Arrays.toString(missing.toArray()));
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ private Map<String, IStructureElement<T>[]> compileStructureMap() {
+ Set<Integer> mising = new HashSet<>();
+ shapes.values().stream().map(CharSequence::chars).forEach(intStream -> intStream.forEach(c -> {
+ IStructureElement<T> iStructureElement = elements.get((char) c);
+ if (iStructureElement == null) {
+ mising.add(c);
+ }
+ }));
+ if (mising.isEmpty()) {
+ Map<String, IStructureElement<T>[]> map = new HashMap<>();
+ shapes.forEach((key, value) -> {
+ IStructureElement<T>[] compiled = new IStructureElement[value.length()];
+ for (int i = 0; i < value.length(); i++) {
+ compiled[i] = elements.get(value.charAt(i));
+ }
+ map.put(key, compiled);
+ });
+ return map;
+ } else {
+ throw new RuntimeException("Missing Structure Element bindings for (chars as integers): " +
+ Arrays.toString(mising.toArray()));
+ }
+ }
+ }
+
+ public Map<Character, IStructureElement<T>> getElements(){
+ return elements;
+ }
+
+ public Map<String, String> getShapes() {
+ return shapes;
+ }
+
+ public Map<String, IStructureElement<T>[]> getStructures() {
+ return structures;
+ }
+
+ @Override
+ public IStructureElement<T>[] getStructureFor(String name) {
+ return structures.get(name);
+ }
+} \ No newline at end of file
diff --git a/src/main/java/com/github/technus/tectech/mechanics/structure/StructureUtility.java b/src/main/java/com/github/technus/tectech/mechanics/structure/StructureUtility.java
new file mode 100644
index 0000000000..a9b88af2f3
--- /dev/null
+++ b/src/main/java/com/github/technus/tectech/mechanics/structure/StructureUtility.java
@@ -0,0 +1,1327 @@
+package com.github.technus.tectech.mechanics.structure;
+
+import com.github.technus.tectech.TecTech;
+import com.github.technus.tectech.mechanics.alignment.enumerable.ExtendedFacing;
+import com.github.technus.tectech.mechanics.structure.adders.IBlockAdder;
+import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder;
+import com.github.technus.tectech.mechanics.structure.adders.ITileAdder;
+import com.github.technus.tectech.util.Vec3Impl;
+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.init.Blocks;
+import net.minecraft.item.ItemStack;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.IIcon;
+import net.minecraft.world.World;
+
+import java.util.*;
+import java.util.function.BiFunction;
+import java.util.function.Consumer;
+import java.util.function.Function;
+import java.util.function.Supplier;
+
+import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sHintCasingsTT;
+
+public class StructureUtility {
+ private static final String NICE_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz=|!@#$%&()[]{};:<>/?_,.*^'`";
+ @SuppressWarnings("rawtypes")
+ private static final Map<Vec3Impl, IStructureNavigate> STEP = new HashMap<>();
+ @SuppressWarnings("rawtypes")
+ private static final IStructureElement AIR = new IStructureElement() {
+ @Override
+ public boolean check(Object t, World world, int x, int y, int z) {
+ return world.getBlock(x, y, z).getMaterial() == Material.air;
+ }
+
+ @Override
+ public boolean spawnHint(Object o, World world, int x, int y, int z, ItemStack trigger) {
+ TecTech.proxy.hint_particle(world, x, y, z, sHintCasingsTT, 13);
+ return true;
+ }
+
+ @Override
+ public boolean placeBlock(Object o, World world, int x, int y, int z, ItemStack trigger) {
+ world.setBlock(x, y, z, Blocks.air, 0, 2);
+ return false;
+ }
+ };
+ @SuppressWarnings("rawtypes")
+ private static final IStructureElement NOT_AIR = new IStructureElement() {
+ @Override
+ public boolean check(Object t, World world, int x, int y, int z) {
+ return world.getBlock(x, y, z).getMaterial() != Material.air;
+ }
+
+ @Override
+ public boolean spawnHint(Object o, World world, int x, int y, int z, ItemStack trigger) {
+ TecTech.proxy.hint_particle(world, x, y, z, sHintCasingsTT, 14);
+ return true;
+ }
+
+ @Override
+ public boolean placeBlock(Object o, World world, int x, int y, int z, ItemStack trigger) {
+ world.setBlock(x, y, z, sHintCasingsTT, 14, 2);
+ return true;
+ }
+ };
+ @SuppressWarnings("rawtypes")
+ private static final IStructureElement ERROR = new IStructureElement() {
+ @Override
+ public boolean check(Object t, World world, int x, int y, int z) {
+ return false;
+ }
+
+ @Override
+ public boolean spawnHint(Object o, World world, int x, int y, int z, ItemStack trigger) {
+ TecTech.proxy.hint_particle(world, x, y, z, sHintCasingsTT, 15);
+ return true;
+ }
+
+ @Override
+ public boolean placeBlock(Object o, World world, int x, int y, int z, ItemStack trigger) {
+ return true;
+ }
+ };
+
+ private StructureUtility() {
+
+ }
+
+ @SuppressWarnings("unchecked")
+ public static <T> IStructureElement<T> isAir() {
+ return AIR;
+ }
+
+ @SuppressWarnings("unchecked")
+ public static <T> IStructureElement<T> notAir() {
+ return NOT_AIR;
+ }
+
+ /**
+ * Check returns false.
+ * Placement is always handled by this and does nothing.
+ * Makes little to no use it in fallback chain.
+ *
+ * @param <T>
+ * @return
+ */
+ @SuppressWarnings("unchecked")
+ public static <T> IStructureElement<T> error() {
+ return ERROR;
+ }
+
+ //region hint only
+
+ /**
+ * Check always returns: true.
+ *
+ * @param dots
+ * @param <T>
+ * @return
+ */
+ public static <T> IStructureElementNoPlacement<T> ofHint(int dots) {
+ int meta = dots - 1;
+ return new IStructureElementNoPlacement<T>() {
+ @Override
+ public boolean check(T t, World world, int x, int y, int z) {
+ return true;
+ }
+
+ @Override
+ public boolean spawnHint(T t, World world, int x, int y, int z, ItemStack trigger) {
+ TecTech.proxy.hint_particle(world, x, y, z, sHintCasingsTT, meta);
+ return false;
+ }
+ };
+ }
+
+ /**
+ * Check always returns: true.
+ *
+ * @param icons
+ * @param <T>
+ * @return
+ */
+ public static <T> IStructureElementNoPlacement<T> ofHintDeferred(Supplier<IIcon[]> icons) {
+ return new IStructureElementNoPlacement<T>() {
+ @Override
+ public boolean check(T t, World world, int x, int y, int z) {
+ return true;
+ }
+
+ @Override
+ public boolean spawnHint(T t, World world, int x, int y, int z, ItemStack trigger) {
+ TecTech.proxy.hint_particle(world, x, y, z, icons.get());
+ return false;
+ }
+ };
+ }
+
+ /**
+ * Check always returns: true.
+ *
+ * @param icons
+ * @param RGBa
+ * @param <T>
+ * @return
+ */
+ public static <T> IStructureElementNoPlacement<T> ofHintDeferred(Supplier<IIcon[]> icons, short[] RGBa) {
+ return new IStructureElementNoPlacement<T>() {
+ @Override
+ public boolean check(T t, World world, int x, int y, int z) {
+ return true;
+ }
+
+ @Override
+ public boolean spawnHint(T t, World world, int x, int y, int z, ItemStack trigger) {
+ TecTech.proxy.hint_particle_tinted(world, x, y, z, icons.get(), RGBa);
+ return false;
+ }
+ };
+ }
+
+ //endregion
+
+ //region block
+
+ /**
+ * Does not allow Block duplicates (with different meta)
+ */
+ public static <T> IStructureElementNoPlacement<T> ofBlocksFlatHint(Map<Block, Integer> blocsMap, Block hintBlock, int hintMeta) {
+ if (blocsMap == null || blocsMap.isEmpty() || hintBlock == null) {
+ throw new IllegalArgumentException();
+ }
+ return new IStructureElementNoPlacement<T>() {
+ @Override
+ public boolean check(T t, World world, int x, int y, int z) {
+ Block worldBlock = world.getBlock(x, y, z);
+ return blocsMap.getOrDefault(worldBlock, -1) == worldBlock.getDamageValue(world, x, y, z);
+ }
+
+ @Override
+ public boolean spawnHint(T t, World world, int x, int y, int z, ItemStack trigger) {
+ TecTech.proxy.hint_particle(world, x, y, z, hintBlock, hintMeta);
+ return true;
+ }
+ };
+ }
+
+ /**
+ * Allows block duplicates (with different meta)
+ */
+ public static <T> IStructureElementNoPlacement<T> ofBlocksMapHint(Map<Block, Set<Integer>> blocsMap, Block hintBlock, int hintMeta) {
+ if (blocsMap == null || blocsMap.isEmpty() || hintBlock == null) {
+ throw new IllegalArgumentException();
+ }
+ for (Set<Integer> value : blocsMap.values()) {
+ if (value.isEmpty()) {
+ throw new IllegalArgumentException();
+ }
+ }
+ return new IStructureElementNoPlacement<T>() {
+ @Override
+ public boolean check(T t, World world, int x, int y, int z) {
+ Block worldBlock = world.getBlock(x, y, z);
+ return blocsMap.getOrDefault(worldBlock, Collections.emptySet()).contains(worldBlock.getDamageValue(world, x, y, z));
+ }
+
+ @Override
+ public boolean spawnHint(T t, World world, int x, int y, int z, ItemStack trigger) {
+ TecTech.proxy.hint_particle(world, x, y, z, hintBlock, hintMeta);
+ return true;
+ }
+ };
+ }
+
+ public static <T> IStructureElementNoPlacement<T> ofBlockHint(Block block, int meta, Block hintBlock, int hintMeta) {
+ if (block == null || hintBlock == null) {
+ throw new IllegalArgumentException();
+ }
+ return new IStructureElementNoPlacement<T>() {
+ @Override
+ public boolean check(T t, World world, int x, int y, int z) {
+ Block worldBlock = world.getBlock(x, y, z);
+ return block == worldBlock && meta == worldBlock.getDamageValue(world, x, y, z);
+ }
+
+ @Override
+ public boolean spawnHint(T t, World world, int x, int y, int z, ItemStack trigger) {
+ TecTech.proxy.hint_particle(world, x, y, z, hintBlock, hintMeta);
+ return true;
+ }
+ };
+ }
+
+ public static <T> IStructureElementNoPlacement<T> ofBlockHint(Block block, int meta) {
+ return ofBlockHint(block, meta, block, meta);
+ }
+
+ public static <T> IStructureElementNoPlacement<T> ofBlockAdderHint(IBlockAdder<T> iBlockAdder, Block hintBlock, int hintMeta) {
+ if (iBlockAdder == null || hintBlock == null) {
+ throw new IllegalArgumentException();
+ }
+ return new IStructureElementNoPlacement<T>() {
+ @Override
+ public boolean check(T t, World world, int x, int y, int z) {
+ Block worldBlock = world.getBlock(x, y, z);
+ return iBlockAdder.apply(t, worldBlock, worldBlock.getDamageValue(world, x, y, z));
+ }
+
+ @Override
+ public boolean spawnHint(T t, World world, int x, int y, int z, ItemStack trigger) {
+ TecTech.proxy.hint_particle(world, x, y, z, hintBlock, hintMeta);
+ return true;
+ }
+ };
+ }
+
+ /**
+ * Does not allow Block duplicates (with different meta)
+ */
+ public static <T> IStructureElement<T> ofBlocksFlat(Map<Block, Integer> blocsMap, Block defaultBlock, int defaultMeta) {
+ if (blocsMap == null || blocsMap.isEmpty() || defaultBlock == null) {
+ throw new IllegalArgumentException();
+ }
+ if(defaultBlock instanceof ICustomBlockSetting){
+ return new IStructureElement<T>() {
+ @Override
+ public boolean check(T t, World world, int x, int y, int z) {
+ Block worldBlock = world.getBlock(x, y, z);
+ return blocsMap.getOrDefault(worldBlock, -1) == worldBlock.getDamageValue(world, x, y, z);
+ }
+
+ @Override
+ public boolean placeBlock(T t, World world, int x, int y, int z, ItemStack trigger) {
+ ((ICustomBlockSetting) defaultBlock).setBlock(world, x, y, z, defaultMeta);
+ return true;
+ }
+
+ @Override
+ public boolean spawnHint(T t, World world, int x, int y, int z, ItemStack trigger) {
+ TecTech.proxy.hint_particle(world, x, y, z, defaultBlock, defaultMeta);
+ return true;
+ }
+ };
+ }else {
+ return new IStructureElement<T>() {
+ @Override
+ public boolean check(T t, World world, int x, int y, int z) {
+ Block worldBlock = world.getBlock(x, y, z);
+ return blocsMap.getOrDefault(worldBlock, -1) == worldBlock.getDamageValue(world, x, y, z);
+ }
+
+ @Override
+ public boolean placeBlock(T t, World world, int x, int y, int z, ItemStack trigger) {
+ world.setBlock(x, y, z, defaultBlock, defaultMeta, 2);
+ return true;
+ }
+
+ @Override
+ public boolean spawnHint(T t, World world, int x, int y, int z, ItemStack trigger) {
+ TecTech.proxy.hint_particle(world, x, y, z, defaultBlock, defaultMeta);
+ return true;
+ }
+ };
+ }
+ }
+
+ /**
+ * Allows block duplicates (with different meta)
+ */
+ public static <T> IStructureElement<T> ofBlocksMap(Map<Block, Set<Integer>> blocsMap, Block defaultBlock, int defaultMeta) {
+ if (blocsMap == null || blocsMap.isEmpty() || defaultBlock == null) {
+ throw new IllegalArgumentException();
+ }
+ for (Set<Integer> value : blocsMap.values()) {
+ if (value.isEmpty()) {
+ throw new IllegalArgumentException();
+ }
+ }
+ if(defaultBlock instanceof ICustomBlockSetting){
+ return new IStructureElement<T>() {
+ @Override
+ public boolean check(T t, World world, int x, int y, int z) {
+ Block worldBlock = world.getBlock(x, y, z);
+ return blocsMap.getOrDefault(worldBlock, Collections.emptySet()).contains(worldBlock.getDamageValue(world, x, y, z));
+ }
+
+ @Override
+ public boolean placeBlock(T t, World world, int x, int y, int z, ItemStack trigger) {
+ ((ICustomBlockSetting) defaultBlock).setBlock(world, x, y, z, defaultMeta);
+ return true;
+ }
+
+ @Override
+ public boolean spawnHint(T t, World world, int x, int y, int z, ItemStack trigger) {
+ TecTech.proxy.hint_particle(world, x, y, z, defaultBlock, defaultMeta);
+ return true;
+ }
+ };
+ }else {
+ return new IStructureElement<T>() {
+ @Override
+ public boolean check(T t, World world, int x, int y, int z) {
+ Block worldBlock = world.getBlock(x, y, z);
+ return blocsMap.getOrDefault(worldBlock, Collections.emptySet()).contains(worldBlock.getDamageValue(world, x, y, z));
+ }
+
+ @Override
+ public boolean placeBlock(T t, World world, int x, int y, int z, ItemStack trigger) {
+ world.setBlock(x, y, z, defaultBlock, defaultMeta, 2);
+ return true;
+ }
+
+ @Override
+ public boolean spawnHint(T t, World world, int x, int y, int z, ItemStack trigger) {
+ TecTech.proxy.hint_particle(world, x, y, z, defaultBlock, defaultMeta);
+ return true;
+ }
+ };
+ }
+ }
+
+ public static <T> IStructureElement<T> ofBlock(Block block, int meta, Block defaultBlock, int defaultMeta) {
+ if (block == null || defaultBlock == null) {
+ throw new IllegalArgumentException();
+ }
+ if(block instanceof ICustomBlockSetting){
+ return new IStructureElement<T>() {
+ @Override
+ public boolean check(T t, World world, int x, int y, int z) {
+ Block worldBlock = world.getBlock(x, y, z);
+ return block == worldBlock && meta == worldBlock.getDamageValue(world, x, y, z);
+ }
+
+ @Override
+ public boolean placeBlock(T t, World world, int x, int y, int z, ItemStack trigger) {
+ ((ICustomBlockSetting) defaultBlock).setBlock(world, x, y, z, defaultMeta);
+ return true;
+ }
+
+ @Override
+ public boolean spawnHint(T t, World world, int x, int y, int z, ItemStack trigger) {
+ TecTech.proxy.hint_particle(world, x, y, z, defaultBlock, defaultMeta);
+ return true;
+ }
+ };
+ } else {
+ return new IStructureElement<T>() {
+ @Override
+ public boolean check(T t, World world, int x, int y, int z) {
+ Block worldBlock = world.getBlock(x, y, z);
+ return block == worldBlock && meta == worldBlock.getDamageValue(world, x, y, z);
+ }
+
+ @Override
+ public boolean placeBlock(T t, World world, int x, int y, int z, ItemStack trigger) {
+ world.setBlock(x, y, z, defaultBlock, defaultMeta, 2);
+ return true;
+ }
+
+ @Override
+ public boolean spawnHint(T t, World world, int x, int y, int z, ItemStack trigger) {
+ TecTech.proxy.hint_particle(world, x, y, z, defaultBlock, defaultMeta);
+ return true;
+ }
+ };
+ }
+ }
+
+ public static <T> IStructureElement<T> ofBlock(Block block, int meta) {
+ return ofBlock(block, meta, block, meta);
+ }
+
+ //endregion
+
+ //region adders
+
+ public static <T> IStructureElement<T> ofBlockAdder(IBlockAdder<T> iBlockAdder, Block defaultBlock, int defaultMeta) {
+ if (iBlockAdder == null || defaultBlock == null) {
+ throw new IllegalArgumentException();
+ }
+ if(defaultBlock instanceof ICustomBlockSetting){
+ return new IStructureElement<T>() {
+ @Override
+ public boolean check(T t, World world, int x, int y, int z) {
+ Block worldBlock = world.getBlock(x, y, z);
+ return iBlockAdder.apply(t, worldBlock, worldBlock.getDamageValue(world, x, y, z));
+ }
+
+ @Override
+ public boolean placeBlock(T t, World world, int x, int y, int z, ItemStack trigger) {
+ ((ICustomBlockSetting) defaultBlock).setBlock(world, x, y, z, defaultMeta);
+ return true;
+ }
+
+ @Override
+ public boolean spawnHint(T t, World world, int x, int y, int z, ItemStack trigger) {
+ TecTech.proxy.hint_particle(world, x, y, z, defaultBlock, defaultMeta);
+ return true;
+ }
+ };
+ }else {
+ return new IStructureElement<T>() {
+ @Override
+ public boolean check(T t, World world, int x, int y, int z) {
+ Block worldBlock = world.getBlock(x, y, z);
+ return iBlockAdder.apply(t, worldBlock, worldBlock.getDamageValue(world, x, y, z));
+ }
+
+ @Override
+ public boolean placeBlock(T t, World world, int x, int y, int z, ItemStack trigger) {
+ world.setBlock(x, y, z, defaultBlock, defaultMeta, 2);
+ return true;
+ }
+
+ @Override
+ public boolean spawnHint(T t, World world, int x, int y, int z, ItemStack trigger) {
+ TecTech.proxy.hint_particle(world, x, y, z, defaultBlock, defaultMeta);
+ return true;
+ }
+ };
+ }
+ }
+
+ public static <T> IStructureElement<T> ofBlockAdder(IBlockAdder<T> iBlockAdder, int dots) {
+ return ofBlockAdder(iBlockAdder, sHintCasingsTT, dots - 1);
+ }
+
+ public static <T> IStructureElementNoPlacement<T> ofTileAdder(ITileAdder<T> iTileAdder, Block hintBlock, int hintMeta) {
+ if (iTileAdder == null || hintBlock == null) {
+ throw new IllegalArgumentException();
+ }
+ return new IStructureElementNoPlacement<T>() {
+ @Override
+ public boolean check(T t, World world, int x, int y, int z) {
+ TileEntity tileEntity = world.getTileEntity(x, y, z);
+ return tileEntity instanceof IGregTechTileEntity && iTileAdder.apply(t, tileEntity);
+ }
+
+ @Override
+ public boolean spawnHint(T t, World world, int x, int y, int z, ItemStack trigger) {
+ TecTech.proxy.hint_particle(world, x, y, z, hintBlock, hintMeta);
+ return true;
+ }
+ };
+ }
+
+ public static <T> IStructureElementNoPlacement<T> ofHatchAdder(IHatchAdder<T> iHatchAdder, int textureIndex, int dots) {
+ return ofHatchAdder(iHatchAdder, textureIndex, sHintCasingsTT, dots - 1);
+ }
+
+ public static <T> IStructureElementNoPlacement<T> ofHatchAdder(IHatchAdder<T> iHatchAdder, int textureIndex, Block hintBlock, int hintMeta) {
+ if (iHatchAdder == null || hintBlock == null) {
+ throw new IllegalArgumentException();
+ }
+ return new IStructureElementNoPlacement<T>() {
+ @Override
+ public boolean check(T t, World world, int x, int y, int z) {
+ TileEntity tileEntity = world.getTileEntity(x, y, z);
+ return tileEntity instanceof IGregTechTileEntity && iHatchAdder.apply(t, (IGregTechTileEntity) tileEntity, (short) textureIndex);
+ }
+
+ @Override
+ public boolean spawnHint(T t, World world, int x, int y, int z, ItemStack trigger) {
+ TecTech.proxy.hint_particle(world, x, y, z, hintBlock, hintMeta);
+ return true;
+ }
+ };
+ }
+
+ public static <T> IStructureElement<T> ofHatchAdderOptional(IHatchAdder<T> iHatchAdder, int textureIndex, int dots, Block placeCasing, int placeCasingMeta) {
+ return ofHatchAdderOptional(iHatchAdder, textureIndex, sHintCasingsTT, dots - 1, placeCasing, placeCasingMeta);
+ }
+
+ public static <T> IStructureElement<T> ofHatchAdderOptional(IHatchAdder<T> iHatchAdder, int textureIndex, Block hintBlock, int hintMeta, Block placeCasing, int placeCasingMeta) {
+ if (iHatchAdder == null || hintBlock == null) {
+ throw new IllegalArgumentException();
+ }
+ if(placeCasing instanceof ICustomBlockSetting){
+ return new IStructureElement<T>() {
+ @Override
+ public boolean check(T t, World world, int x, int y, int z) {
+ TileEntity tileEntity = world.getTileEntity(x, y, z);
+ Block worldBlock = world.getBlock(x, y, z);
+ return (tileEntity instanceof IGregTechTileEntity &&
+ iHatchAdder.apply(t, (IGregTechTileEntity) tileEntity, (short) textureIndex)) ||
+ (worldBlock == placeCasing && worldBlock.getDamageValue(world, x, y, z) == placeCasingMeta);
+ }
+
+ @Override
+ public boolean spawnHint(T t, World world, int x, int y, int z, ItemStack trigger) {
+ TecTech.proxy.hint_particle(world, x, y, z, hintBlock, hintMeta);
+ return true;
+ }
+
+ @Override
+ public boolean placeBlock(T t, World world, int x, int y, int z, ItemStack trigger) {
+ ((ICustomBlockSetting) placeCasing).setBlock(world, x, y, z, placeCasingMeta);
+ return true;
+ }
+ };
+ }else {
+ return new IStructureElement<T>() {
+ @Override
+ public boolean check(T t, World world, int x, int y, int z) {
+ TileEntity tileEntity = world.getTileEntity(x, y, z);
+ Block worldBlock = world.getBlock(x, y, z);
+ return (tileEntity instanceof IGregTechTileEntity &&
+ iHatchAdder.apply(t, (IGregTechTileEntity) tileEntity, (short) textureIndex)) ||
+ (worldBlock == placeCasing && worldBlock.getDamageValue(world, x, y, z) == placeCasingMeta);
+ }
+
+ @Override
+ public boolean spawnHint(T t, World world, int x, int y, int z, ItemStack trigger) {
+ TecTech.proxy.hint_particle(world, x, y, z, hintBlock, hintMeta);
+ return true;
+ }
+
+ @Override
+ public boolean placeBlock(T t, World world, int x, int y, int z, ItemStack trigger) {
+ world.setBlock(x, y, z, placeCasing, placeCasingMeta, 2);
+ return true;
+ }
+ };
+ }
+ }
+
+ //endregion
+
+ //region side effects
+
+ public static <B extends IStructureElement<T>, T> IStructureElement<T> onElementPass(Consumer<T> onCheckPass, B element) {
+ return new IStructureElement<T>() {
+ @Override
+ public boolean check(T t, World world, int x, int y, int z) {
+ boolean check = element.check(t, world, x, y, z);
+ if (check) {
+ onCheckPass.accept(t);
+ }
+ return check;
+ }
+
+ @Override
+ public boolean placeBlock(T t, World world, int x, int y, int z, ItemStack trigger) {
+ return element.placeBlock(t, world, x, y, z, trigger);
+ }
+
+ @Override
+ public boolean spawnHint(T t, World world, int x, int y, int z, ItemStack trigger) {
+ return element.spawnHint(t, world, x, y, z, trigger);
+ }
+ };
+ }
+
+ public static <B extends IStructureElement<T>, T> IStructureElement<T> onElementFail(Consumer<T> onFail, B element) {
+ return new IStructureElement<T>() {
+ @Override
+ public boolean check(T t, World world, int x, int y, int z) {
+ boolean check = element.check(t, world, x, y, z);
+ if (!check) {
+ onFail.accept(t);
+ }
+ return check;
+ }
+
+ @Override
+ public boolean placeBlock(T t, World world, int x, int y, int z, ItemStack trigger) {
+ return element.placeBlock(t, world, x, y, z, trigger);
+ }
+
+ @Override
+ public boolean spawnHint(T t, World world, int x, int y, int z, ItemStack trigger) {
+ return element.spawnHint(t, world, x, y, z, trigger);
+ }
+ };
+ }
+
+ //endregion
+
+ /**
+ * Take care while chaining, as it will try to call every structure element until it returns true.
+ * If none does it will finally return false.
+ *
+ * @param elementChain
+ * @param <T>
+ * @return
+ */
+ @SafeVarargs
+ public static <T> IStructureElementChain<T> ofChain(IStructureElement<T>... elementChain) {
+ if (elementChain == null || elementChain.length == 0) {
+ throw new IllegalArgumentException();
+ }
+ for (IStructureElement<T> iStructureElement : elementChain) {
+ if (iStructureElement == null) {
+ throw new IllegalArgumentException();
+ }
+ }
+ return () -> elementChain;
+ }
+
+ /**
+ * Take care while chaining, as it will try to call every structure element until it returns true.
+ * If none does it will finally return false.
+ *
+ * @param elementChain
+ * @param <T>
+ * @return
+ */
+ @SuppressWarnings("unchecked")
+ public static <T> IStructureElementChain<T> ofChain(List<IStructureElement<T>> elementChain) {
+ return ofChain(elementChain.toArray(new IStructureElement[0]));
+ }
+
+ //region defer
+
+ public static <T> IStructureElementDeferred<T> defer(Supplier<IStructureElement<T>> to) {
+ if (to == null) {
+ throw new IllegalArgumentException();
+ }
+ return new IStructureElementDeferred<T>() {
+ @Override
+ public boolean check(T t, World world, int x, int y, int z) {
+ return to.get().check(t, world, x, y, z);
+ }
+
+ @Override
+ public boolean placeBlock(T t, World world, int x, int y, int z, ItemStack trigger) {
+ return to.get().placeBlock(t, world, x, y, z, trigger);
+ }
+
+ @Override
+ public boolean spawnHint(T t, World world, int x, int y, int z, ItemStack trigger) {
+ return to.get().spawnHint(t, world, x, y, z, trigger);
+ }
+ };
+ }
+
+ public static <T> IStructureElementDeferred<T> defer(Function<T, IStructureElement<T>> to) {
+ if (to == null) {
+ throw new IllegalArgumentException();
+ }
+ return new IStructureElementDeferred<T>() {
+ @Override
+ public boolean check(T t, World world, int x, int y, int z) {
+ return to.apply(t).check(t, world, x, y, z);
+ }
+
+ @Override
+ public boolean placeBlock(T t, World world, int x, int y, int z, ItemStack trigger) {
+ return to.apply(t).placeBlock(t, world, x, y, z, trigger);
+ }
+
+ @Override
+ public boolean spawnHint(T t, World world, int x, int y, int z, ItemStack trigger) {
+ return to.apply(t).spawnHint(t, world, x, y, z, trigger);
+ }
+ };
+ }
+
+ public static <T, K> IStructureElementDeferred<T> defer(Function<T, K> keyExtractor, Map<K, IStructureElement<T>> map) {
+ if (keyExtractor == null || map == null) {
+ throw new IllegalArgumentException();
+ }
+ return new IStructureElementDeferred<T>() {
+ @Override
+ public boolean check(T t, World world, int x, int y, int z) {
+ return map.get(keyExtractor.apply(t)).check(t, world, x, y, z);
+ }
+
+ @Override
+ public boolean placeBlock(T t, World world, int x, int y, int z, ItemStack trigger) {
+ return map.get(keyExtractor.apply(t)).placeBlock(t, world, x, y, z, trigger);
+ }
+
+ @Override
+ public boolean spawnHint(T t, World world, int x, int y, int z, ItemStack trigger) {
+ return map.get(keyExtractor.apply(t)).spawnHint(t, world, x, y, z, trigger);
+ }
+ };
+ }
+
+ public static <T, K> IStructureElementDeferred<T> defer(Function<T, K> keyExtractor, Map<K, IStructureElement<T>> map, IStructureElement<T> defaultElem) {
+ if (keyExtractor == null || map == null) {
+ throw new IllegalArgumentException();
+ }
+ return new IStructureElementDeferred<T>() {
+ @Override
+ public boolean check(T t, World world, int x, int y, int z) {
+ return map.getOrDefault(keyExtractor.apply(t), defaultElem).check(t, world, x, y, z);
+ }
+
+ @Override
+ public boolean placeBlock(T t, World world, int x, int y, int z, ItemStack trigger) {
+ return map.getOrDefault(keyExtractor.apply(t), defaultElem).placeBlock(t, world, x, y, z, trigger);
+ }
+
+ @Override
+ public boolean spawnHint(T t, World world, int x, int y, int z, ItemStack trigger) {
+ return map.getOrDefault(keyExtractor.apply(t), defaultElem).spawnHint(t, world, x, y, z, trigger);
+ }
+ };
+ }
+
+ @SafeVarargs
+ public static <T> IStructureElementDeferred<T> defer(Function<T, Integer> keyExtractor, IStructureElement<T>... array) {
+ if (keyExtractor == null || array == null) {
+ throw new IllegalArgumentException();
+ }
+ return new IStructureElementDeferred<T>() {
+ @Override
+ public boolean check(T t, World world, int x, int y, int z) {
+ return array[keyExtractor.apply(t)].check(t, world, x, y, z);
+ }
+
+ @Override
+ public boolean placeBlock(T t, World world, int x, int y, int z, ItemStack trigger) {
+ return array[keyExtractor.apply(t)].placeBlock(t, world, x, y, z, trigger);
+ }
+
+ @Override
+ public boolean spawnHint(T t, World world, int x, int y, int z, ItemStack trigger) {
+ return array[keyExtractor.apply(t)].spawnHint(t, world, x, y, z, trigger);
+ }
+ };
+ }
+
+ @SuppressWarnings("unchecked")
+ public static <T> IStructureElementDeferred<T> defer(Function<T, Integer> keyExtractor, List<IStructureElement<T>> array) {
+ return defer(keyExtractor, array.toArray(new IStructureElement[0]));
+ }
+
+ public static <T> IStructureElementDeferred<T> defer(BiFunction<T, ItemStack, IStructureElement<T>> to) {
+ if (to == null) {
+ throw new IllegalArgumentException();
+ }
+ return new IStructureElementDeferred<T>() {
+ @Override
+ public boolean check(T t, World world, int x, int y, int z) {
+ return to.apply(t, null).check(t, world, x, y, z);
+ }
+
+ @Override
+ public boolean placeBlock(T t, World world, int x, int y, int z, ItemStack trigger) {
+ return to.apply(t, trigger).placeBlock(t, world, x, y, z, trigger);
+ }
+
+ @Override
+ public boolean spawnHint(T t, World world, int x, int y, int z, ItemStack trigger) {
+ return to.apply(t, trigger).spawnHint(t, world, x, y, z, trigger);
+ }
+ };
+ }
+
+ public static <T, K> IStructureElementDeferred<T> defer(BiFunction<T, ItemStack, K> keyExtractor, Map<K, IStructureElement<T>> map) {
+ if (keyExtractor == null || map == null) {
+ throw new IllegalArgumentException();
+ }
+ return new IStructureElementDeferred<T>() {
+ @Override
+ public boolean check(T t, World world, int x, int y, int z) {
+ return map.get(keyExtractor.apply(t, null)).check(t, world, x, y, z);
+ }
+
+ @Override
+ public boolean placeBlock(T t, World world, int x, int y, int z, ItemStack trigger) {
+ return map.get(keyExtractor.apply(t, trigger)).placeBlock(t, world, x, y, z, trigger);
+ }
+
+ @Override
+ public boolean spawnHint(T t, World world, int x, int y, int z, ItemStack trigger) {
+ return map.get(keyExtractor.apply(t, trigger)).spawnHint(t, world, x, y, z, trigger);
+ }
+ };
+ }
+
+ public static <T, K> IStructureElementDeferred<T> defer(BiFunction<T, ItemStack, K> keyExtractor, Map<K, IStructureElement<T>> map, IStructureElement<T> defaultElem) {
+ if (keyExtractor == null || map == null) {
+ throw new IllegalArgumentException();
+ }
+ return new IStructureElementDeferred<T>() {
+ @Override
+ public boolean check(T t, World world, int x, int y, int z) {
+ return map.getOrDefault(keyExtractor.apply(t, null), defaultElem).check(t, world, x, y, z);
+ }
+
+ @Override
+ public boolean placeBlock(T t, World world, int x, int y, int z, ItemStack trigger) {
+ return map.getOrDefault(keyExtractor.apply(t, trigger), defaultElem).placeBlock(t, world, x, y, z, trigger);
+ }
+
+ @Override
+ public boolean spawnHint(T t, World world, int x, int y, int z, ItemStack trigger) {
+ return map.getOrDefault(keyExtractor.apply(t, trigger), defaultElem).spawnHint(t, world, x, y, z, trigger);
+ }
+ };
+ }
+
+ @SafeVarargs
+ public static <T> IStructureElementDeferred<T> defer(BiFunction<T, ItemStack, Integer> keyExtractor, IStructureElement<T>... array) {
+ if (keyExtractor == null || array == null) {
+ throw new IllegalArgumentException();
+ }
+ return new IStructureElementDeferred<T>() {
+ @Override
+ public boolean check(T t, World world, int x, int y, int z) {
+ return array[keyExtractor.apply(t, null)].check(t, world, x, y, z);
+ }
+
+ @Override
+ public boolean placeBlock(T t, World world, int x, int y, int z, ItemStack trigger) {
+ return array[keyExtractor.apply(t, trigger)].placeBlock(t, world, x, y, z, trigger);
+ }
+
+ @Override
+ public boolean spawnHint(T t, World world, int x, int y, int z, ItemStack trigger) {
+ return array[keyExtractor.apply(t, trigger)].spawnHint(t, world, x, y, z, trigger);
+ }
+ };
+ }
+
+ @SuppressWarnings("unchecked")
+ public static <T> IStructureElementDeferred<T> defer(BiFunction<T, ItemStack, Integer> keyExtractor, List<IStructureElement<T>> array) {
+ return defer(keyExtractor, array.toArray(new IStructureElement[0]));
+ }
+
+ public static <T> IStructureElementDeferred<T> defer(Function<T, IStructureElement<T>> toCheck, BiFunction<T, ItemStack, IStructureElement<T>> to) {
+ if (to == null) {
+ throw new IllegalArgumentException();
+ }
+ return new IStructureElementDeferred<T>() {
+ @Override
+ public boolean check(T t, World world, int x, int y, int z) {
+ return toCheck.apply(t).check(t, world, x, y, z);
+ }
+
+ @Override
+ public boolean placeBlock(T t, World world, int x, int y, int z, ItemStack trigger) {
+ return to.apply(t, trigger).placeBlock(t, world, x, y, z, trigger);
+ }
+
+ @Override
+ public boolean spawnHint(T t, World world, int x, int y, int z, ItemStack trigger) {
+ return to.apply(t, trigger).spawnHint(t, world, x, y, z, trigger);
+ }
+ };
+ }
+
+ public static <T, K> IStructureElementDeferred<T> defer(Function<T, K> keyExtractorCheck, BiFunction<T, ItemStack, K> keyExtractor, Map<K, IStructureElement<T>> map) {
+ if (keyExtractor == null || map == null) {
+ throw new IllegalArgumentException();
+ }
+ return new IStructureElementDeferred<T>() {
+ @Override
+ public boolean check(T t, World world, int x, int y, int z) {
+ return map.get(keyExtractorCheck.apply(t)).check(t, world, x, y, z);
+ }
+
+ @Override
+ public boolean placeBlock(T t, World world, int x, int y, int z, ItemStack trigger) {
+ return map.get(keyExtractor.apply(t, trigger)).placeBlock(t, world, x, y, z, trigger);
+ }
+
+ @Override
+ public boolean spawnHint(T t, World world, int x, int y, int z, ItemStack trigger) {
+ return map.get(keyExtractor.apply(t, trigger)).spawnHint(t, world, x, y, z, trigger);
+ }
+ };
+ }
+
+ public static <T, K> IStructureElementDeferred<T> defer(Function<T, K> keyExtractorCheck, BiFunction<T, ItemStack, K> keyExtractor, Map<K, IStructureElement<T>> map, IStructureElement<T> defaultElem) {
+ if (keyExtractor == null || map == null) {
+ throw new IllegalArgumentException();
+ }
+ return new IStructureElementDeferred<T>() {
+ @Override
+ public boolean check(T t, World world, int x, int y, int z) {
+ return map.getOrDefault(keyExtractorCheck.apply(t), defaultElem).check(t, world, x, y, z);
+ }
+
+ @Override
+ public boolean placeBlock(T t, World world, int x, int y, int z, ItemStack trigger) {
+ return map.getOrDefault(keyExtractor.apply(t, trigger), defaultElem).placeBlock(t, world, x, y, z, trigger);
+ }
+
+ @Override
+ public boolean spawnHint(T t, World world, int x, int y, int z, ItemStack trigger) {
+ return map.getOrDefault(keyExtractor.apply(t, trigger), defaultElem).spawnHint(t, world, x, y, z, trigger);
+ }
+ };
+ }
+
+ @SafeVarargs
+ public static <T> IStructureElementDeferred<T> defer(Function<T, Integer> keyExtractorCheck, BiFunction<T, ItemStack, Integer> keyExtractor, IStructureElement<T>... array) {
+ if (keyExtractor == null || array == null) {
+ throw new IllegalArgumentException();
+ }
+ return new IStructureElementDeferred<T>() {
+ @Override
+ public boolean check(T t, World world, int x, int y, int z) {
+ return array[keyExtractorCheck.apply(t)].check(t, world, x, y, z);
+ }
+
+ @Override
+ public boolean placeBlock(T t, World world, int x, int y, int z, ItemStack trigger) {
+ return array[keyExtractor.apply(t, trigger)].placeBlock(t, world, x, y, z, trigger);
+ }
+
+ @Override
+ public boolean spawnHint(T t, World world, int x, int y, int z, ItemStack trigger) {
+ return array[keyExtractor.apply(t, trigger)].spawnHint(t, world, x, y, z, trigger);
+ }
+ };
+ }
+
+ @SuppressWarnings("unchecked")
+ public static <T> IStructureElementDeferred<T> defer(Function<T, Integer> keyExtractorCheck, BiFunction<T, ItemStack, Integer> keyExtractor, List<IStructureElement<T>> array) {
+ return defer(keyExtractorCheck, keyExtractor, array.toArray(new IStructureElement[0]));
+ }
+
+ //endregion
+
+ /**
+ * Used internally, to generate skips for structure definitions
+ *
+ * @param a
+ * @param b
+ * @param c
+ * @param <T>
+ * @return
+ */
+ public static <T> IStructureNavigate<T> step(int a, int b, int c) {
+ return step(new Vec3Impl(a, b, c));
+ }
+
+ /**
+ * Used internally, to generate skips for structure definitions
+ *
+ * @param step
+ * @param <T>
+ * @return
+ */
+ @SuppressWarnings("unchecked")
+ public static <T> IStructureNavigate<T> step(Vec3Impl step) {
+ if (step == null || step.get0() < 0 || step.get1() < 0 || step.get2() < 0) {
+ throw new IllegalArgumentException();
+ }
+ return STEP.computeIfAbsent(step, vec3 -> {
+ if (vec3.get2() > 0) {
+ return stepC(vec3.get0(), vec3.get1(), vec3.get2());
+ } else if (vec3.get1() > 0) {
+ return stepB(vec3.get0(), vec3.get1(), vec3.get2());
+ } else {
+ return stepA(vec3.get0(), vec3.get1(), vec3.get2());
+ }
+ });
+ }
+
+ private static <T> IStructureNavigate<T> stepA(int a, int b, int c) {
+ return new IStructureNavigate<T>() {
+ @Override
+ public int getStepA() {
+ return a;
+ }
+
+ @Override
+ public int getStepB() {
+ return b;
+ }
+
+ @Override
+ public int getStepC() {
+ return c;
+ }
+ };
+ }
+
+ private static <T> IStructureNavigate<T> stepB(int a, int b, int c) {
+ return new IStructureNavigate<T>() {
+ @Override
+ public int getStepA() {
+ return a;
+ }
+
+ @Override
+ public int getStepB() {
+ return b;
+ }
+
+ @Override
+ public int getStepC() {
+ return c;
+ }
+
+ @Override
+ public boolean resetA() {
+ return true;
+ }
+ };
+ }
+
+ private static <T> IStructureNavigate<T> stepC(int a, int b, int c) {
+ return new IStructureNavigate<T>() {
+ @Override
+ public int getStepA() {
+ return a;
+ }
+
+ @Override
+ public int getStepB() {
+ return b;
+ }
+
+ @Override
+ public int getStepC() {
+ return c;
+ }
+
+ @Override
+ public boolean resetA() {
+ return true;
+ }
+
+ @Override
+ public boolean resetB() {
+ return true;
+ }
+ };
+ }
+
+ /**
+ * Used only to get pseudo code in structure writer...
+ *
+ * @param world
+ * @return
+ */
+ public static String getPseudoJavaCode(World world, ExtendedFacing extendedFacing,
+ int basePositionX, int basePositionY, int basePositionZ,
+ int basePositionA, int basePositionB, int basePositionC,
+ int sizeA, int sizeB, int sizeC, boolean transpose) {
+ Map<Block, Set<Integer>> blocks = new TreeMap<>(Comparator.comparing(Block::getUnlocalizedName));
+ Set<Class<? extends TileEntity>> tiles = new TreeSet<>(Comparator.comparing(Class::getCanonicalName));
+ Set<Class<? extends IMetaTileEntity>> gtTiles = new TreeSet<>(Comparator.comparing(Class::getCanonicalName));
+ iterate(world, extendedFacing, basePositionX, basePositionY, basePositionZ,
+ basePositionA, basePositionB, basePositionC,
+ sizeA, sizeB, sizeC, ((w, x, y, z) -> {
+ TileEntity tileEntity = w.getTileEntity(x, y, z);
+ if (tileEntity == null) {
+ Block block = w.getBlock(x, y, z);
+ if (block != null && block != Blocks.air) {
+ blocks.compute(block, (b, set) -> {
+ if (set == null) {
+ set = new TreeSet<>();
+ }
+ set.add(block.getDamageValue(world, x, y, z));
+ return set;
+ });
+ }
+ } else {
+ if (tileEntity instanceof IGregTechTileEntity) {
+ IMetaTileEntity meta = ((IGregTechTileEntity) tileEntity).getMetaTileEntity();
+ if (meta != null) {
+ gtTiles.add(meta.getClass());
+ } else {
+ tiles.add(tileEntity.getClass());
+ }
+ } else {
+ tiles.add(tileEntity.getClass());
+ }
+ }
+ }));
+ Map<String, Character> map = new HashMap<>();
+ StringBuilder builder = new StringBuilder();
+ {
+ int i = 0;
+ char c;
+ builder.append("\n\nStructure:\n")
+ .append("\nBlocks:\n");
+ for (Map.Entry<Block, Set<Integer>> entry : blocks.entrySet()) {
+ Block block = entry.getKey();
+ Set<Integer> set = entry.getValue();
+ for (Integer meta : set) {
+ c = NICE_CHARS.charAt(i++);
+ if (i > NICE_CHARS.length()) {
+ return "Too complicated for nice chars";
+ }
+ map.put(block.getUnlocalizedName() + '\0' + meta, c);
+ builder.append(c).append(" -> ofBlock...(")
+ .append(block.getUnlocalizedName()).append(", ").append(meta).append(", ...);\n");
+ }
+ }
+ builder.append("\nTiles:\n");
+ for (Class<? extends TileEntity> tile : tiles) {
+ c = NICE_CHARS.charAt(i++);
+ if (i > NICE_CHARS.length()) {
+ return "Too complicated for nice chars";
+ }
+ map.put(tile.getCanonicalName(), c);
+ builder.append(c).append(" -> ofTileAdder(")
+ .append(tile.getCanonicalName()).append(", ...);\n");
+ }
+ builder.append("\nMeta:\n");
+ for (Class<? extends IMetaTileEntity> gtTile : gtTiles) {
+ c = NICE_CHARS.charAt(i++);
+ if (i > NICE_CHARS.length()) {
+ return "Too complicated for nice chars";
+ }
+ map.put(gtTile.getCanonicalName(), c);
+ builder.append(c).append(" -> ofHatchAdder(")
+ .append(gtTile.getCanonicalName()).append(", textureId, ...);\n");
+ }
+ }
+ builder.append("\nOffsets:\n")
+ .append(basePositionA).append(' ').append(basePositionB).append(' ').append(basePositionC).append('\n');
+ if (transpose) {
+ builder.append("\nTransposed Scan:\n")
+ .append("new String[][]{\n")
+ .append(" {\"");
+ iterate(world, extendedFacing, basePositionX, basePositionY, basePositionZ,
+ basePositionA, basePositionB, basePositionC, true,
+ sizeA, sizeB, sizeC, ((w, x, y, z) -> {
+ TileEntity tileEntity = w.getTileEntity(x, y, z);
+ if (tileEntity == null) {
+ Block block = w.getBlock(x, y, z);
+ if (block != null && block != Blocks.air) {
+ builder.append(map.get(block.getUnlocalizedName() + '\0' + block.getDamageValue(world, x, y, z)));
+ } else {
+ builder.append(' ');
+ }
+ } else {
+ if (tileEntity instanceof IGregTechTileEntity) {
+ IMetaTileEntity meta = ((IGregTechTileEntity) tileEntity).getMetaTileEntity();
+ if (meta != null) {
+ builder.append(map.get(meta.getClass().getCanonicalName()));
+ } else {
+ builder.append(map.get(tileEntity.getClass().getCanonicalName()));
+ }
+ } else {
+ builder.append(map.get(tileEntity.getClass().getCanonicalName()));
+ }
+ }
+ }),
+ () -> builder.append("\",\""),
+ () -> {
+ builder.setLength(builder.length() - 2);
+ builder.append("},\n {\"");
+ });
+ builder.setLength(builder.length() - 8);
+ builder.append("\n}\n\n");
+ } else {
+ builder.append("\nNormal Scan:\n")
+ .append("new String[][]{{\n")
+ .append(" \"");
+ iterate(world, extendedFacing, basePositionX, basePositionY, basePositionZ,
+ basePositionA, basePositionB, basePositionC, false,
+ sizeA, sizeB, sizeC, ((w, x, y, z) -> {
+ TileEntity tileEntity = w.getTileEntity(x, y, z);
+ if (tileEntity == null) {
+ Block block = w.getBlock(x, y, z);
+ if (block != null && block != Blocks.air) {
+ builder.append(map.get(block.getUnlocalizedName() + '\0' + block.getDamageValue(world, x, y, z)));
+ } else {
+ builder.append(' ');
+ }
+ } else {
+ if (tileEntity instanceof IGregTechTileEntity) {
+ IMetaTileEntity meta = ((IGregTechTileEntity) tileEntity).getMetaTileEntity();
+ if (meta != null) {
+ builder.append(map.get(meta.getClass().getCanonicalName()));
+ } else {
+ builder.append(map.get(tileEntity.getClass().getCanonicalName()));
+ }
+ } else {
+ builder.append(map.get(tileEntity.getClass().getCanonicalName()));
+ }
+ }
+ }),
+ () -> builder.append("\",\n").append(" \""),
+ () -> {
+ builder.setLength(builder.length() - 7);
+ builder.append("\n").append("},{\n").append(" \"");
+ });
+ builder.setLength(builder.length() - 8);
+ builder.append("}\n\n");
+ }
+ return (builder.toString().replaceAll("\"\"", "E"));
+ }
+
+ public static void iterate(World world, ExtendedFacing extendedFacing,
+ int basePositionX, int basePositionY, int basePositionZ,
+ int basePositionA, int basePositionB, int basePositionC,
+ int sizeA, int sizeB, int sizeC,
+ IBlockPosConsumer iBlockPosConsumer) {
+ sizeA -= basePositionA;
+ sizeB -= basePositionB;
+ sizeC -= basePositionC;
+
+ int[] abc = new int[3];
+ int[] xyz = new int[3];
+
+ for (abc[2] = -basePositionC; abc[2] < sizeC; abc[2]++) {
+ for (abc[1] = -basePositionB; abc[1] < sizeB; abc[1]++) {
+ for (abc[0] = -basePositionA; abc[0] < sizeA; abc[0]++) {
+ extendedFacing.getWorldOffset(abc, xyz);
+ iBlockPosConsumer.consume(world, xyz[0] + basePositionX, xyz[1] + basePositionY, xyz[2] + basePositionZ);
+ }
+
+ }
+ }
+ }
+
+ public static void iterate(World world, ExtendedFacing extendedFacing,
+ int basePositionX, int basePositionY, int basePositionZ,
+ int basePositionA, int basePositionB, int basePositionC,
+ boolean transpose, int sizeA, int sizeB, int sizeC,
+ IBlockPosConsumer iBlockPosConsumer,
+ Runnable nextB,
+ Runnable nextC) {
+ sizeA -= basePositionA;
+ sizeB -= basePositionB;
+ sizeC -= basePositionC;
+
+ int[] abc = new int[3];
+ int[] xyz = new int[3];
+ if (transpose) {
+ for (abc[1] = -basePositionB; abc[1] < sizeB; abc[1]++) {
+ for (abc[2] = -basePositionC; abc[2] < sizeC; abc[2]++) {
+ for (abc[0] = -basePositionA; abc[0] < sizeA; abc[0]++) {
+ extendedFacing.getWorldOffset(abc, xyz);
+ iBlockPosConsumer.consume(world, xyz[0] + basePositionX, xyz[1] + basePositionY, xyz[2] + basePositionZ);
+ }
+ nextB.run();
+ }
+ nextC.run();
+ }
+ } else {
+ for (abc[2] = -basePositionC; abc[2] < sizeC; abc[2]++) {
+ for (abc[1] = -basePositionB; abc[1] < sizeB; abc[1]++) {
+ for (abc[0] = -basePositionA; abc[0] < sizeA; abc[0]++) {
+ extendedFacing.getWorldOffset(abc, xyz);
+ iBlockPosConsumer.consume(world, xyz[0] + basePositionX, xyz[1] + basePositionY, xyz[2] + basePositionZ);
+ }
+ nextB.run();
+ }
+ nextC.run();
+ }
+ }
+ }
+
+ /**
+ * Transposes shape (swaps B and C axis, can be used to un-transpose transposed shape)
+ * WARNING! Do not use on old api...
+ *
+ * @param structurePiece shape (transposed shape)
+ * @return transposed shape (untransposed shape)
+ */
+ public static String[][] transpose(String[][] structurePiece) {
+ String[][] shape = new String[structurePiece[0].length][structurePiece.length];
+ for (int i = 0; i < structurePiece.length; i++) {
+ for (int j = 0; j < structurePiece[i].length; j++) {
+ shape[j][i] = structurePiece[i][j];
+ }
+ }
+ return shape;
+ }
+}
diff --git a/src/main/java/com/github/technus/tectech/mechanics/structure/adders/IBlockAdder.java b/src/main/java/com/github/technus/tectech/mechanics/structure/adders/IBlockAdder.java
new file mode 100644
index 0000000000..908c4c4aca
--- /dev/null
+++ b/src/main/java/com/github/technus/tectech/mechanics/structure/adders/IBlockAdder.java
@@ -0,0 +1,14 @@
+package com.github.technus.tectech.mechanics.structure.adders;
+
+
+import net.minecraft.block.Block;
+
+public interface IBlockAdder<T> {
+ /**
+ * Callback on block added, needs to check if block is valid (and add it)
+ * @param block block attempted to add
+ * @param meta meta of block attempted to add
+ * @return is structure still valid
+ */
+ boolean apply(T t,Block block, Integer meta);
+}
diff --git a/src/main/java/com/github/technus/tectech/mechanics/structure/adders/IHatchAdder.java b/src/main/java/com/github/technus/tectech/mechanics/structure/adders/IHatchAdder.java
new file mode 100644
index 0000000000..a47befc2e8
--- /dev/null
+++ b/src/main/java/com/github/technus/tectech/mechanics/structure/adders/IHatchAdder.java
@@ -0,0 +1,14 @@
+package com.github.technus.tectech.mechanics.structure.adders;
+
+
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+
+public interface IHatchAdder<T> {
+ /**
+ * Callback to add hatch, needs to check if hatch is valid (and add it)
+ * @param iGregTechTileEntity hatch
+ * @param aShort requested texture index, or null if not...
+ * @return managed to add hatch (structure still valid)
+ */
+ boolean apply(T t,IGregTechTileEntity iGregTechTileEntity, Short aShort);
+}
diff --git a/src/main/java/com/github/technus/tectech/mechanics/structure/adders/ITileAdder.java b/src/main/java/com/github/technus/tectech/mechanics/structure/adders/ITileAdder.java
new file mode 100644
index 0000000000..cc3c7dbb7a
--- /dev/null
+++ b/src/main/java/com/github/technus/tectech/mechanics/structure/adders/ITileAdder.java
@@ -0,0 +1,12 @@
+package com.github.technus.tectech.mechanics.structure.adders;
+
+import net.minecraft.tileentity.TileEntity;
+
+public interface ITileAdder<T> {
+ /**
+ * Callback to add hatch, needs to check if tile is valid (and add it)
+ * @param tileEntity tile
+ * @return managed to add hatch (structure still valid)
+ */
+ boolean apply(T t,TileEntity tileEntity);
+}
diff --git a/src/main/java/com/github/technus/tectech/proxy/ClientProxy.java b/src/main/java/com/github/technus/tectech/proxy/ClientProxy.java
index 720460d56b..9e693b7664 100644
--- a/src/main/java/com/github/technus/tectech/proxy/ClientProxy.java
+++ b/src/main/java/com/github/technus/tectech/proxy/ClientProxy.java
@@ -24,6 +24,7 @@ import net.minecraft.client.particle.EntityFX;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.ChatComponentText;
+import net.minecraft.util.IIcon;
import net.minecraft.world.World;
import net.minecraftforge.client.MinecraftForgeClient;
import net.minecraftforge.common.util.ForgeDirection;
@@ -46,6 +47,33 @@ public class ClientProxy extends CommonProxy {
}
@Override
+ public void hint_particle_tinted(World w,int x, int y, int z, IIcon[] icons,short[] RGBa) {
+ Minecraft.getMinecraft().effectRenderer.addEffect(new BlockHint(w,x,y,z,icons).withColorTint(RGBa));
+
+ EntityFX particle = new WeightlessParticleFX(w, x + TecTech.RANDOM.nextFloat() * 0.5F, y + TecTech.RANDOM.nextFloat() * 0.5F, z + TecTech.RANDOM.nextFloat() * 0.5F, 0, 0, 0);
+ particle.setRBGColorF(0, 0.6F * TecTech.RANDOM.nextFloat(), 0.8f);
+ Minecraft.getMinecraft().effectRenderer.addEffect(particle);
+ }
+
+ @Override
+ public void hint_particle_tinted(World w,int x, int y, int z, Block block, int meta,short[] RGBa) {
+ Minecraft.getMinecraft().effectRenderer.addEffect(new BlockHint(w,x,y,z,block,meta).withColorTint(RGBa));
+
+ EntityFX particle = new WeightlessParticleFX(w, x + TecTech.RANDOM.nextFloat() * 0.5F, y + TecTech.RANDOM.nextFloat() * 0.5F, z + TecTech.RANDOM.nextFloat() * 0.5F, 0, 0, 0);
+ particle.setRBGColorF(0, 0.6F * TecTech.RANDOM.nextFloat(), 0.8f);
+ Minecraft.getMinecraft().effectRenderer.addEffect(particle);
+ }
+
+ @Override
+ public void hint_particle(World w,int x, int y, int z, IIcon[] icons) {
+ Minecraft.getMinecraft().effectRenderer.addEffect(new BlockHint(w,x,y,z,icons));
+
+ EntityFX particle = new WeightlessParticleFX(w, x + TecTech.RANDOM.nextFloat() * 0.5F, y + TecTech.RANDOM.nextFloat() * 0.5F, z + TecTech.RANDOM.nextFloat() * 0.5F, 0, 0, 0);
+ particle.setRBGColorF(0, 0.6F * TecTech.RANDOM.nextFloat(), 0.8f);
+ Minecraft.getMinecraft().effectRenderer.addEffect(particle);
+ }
+
+ @Override
public void hint_particle(World w,int x, int y, int z, Block block, int meta) {
Minecraft.getMinecraft().effectRenderer.addEffect(new BlockHint(w,x,y,z,block,meta));
diff --git a/src/main/java/com/github/technus/tectech/proxy/CommonProxy.java b/src/main/java/com/github/technus/tectech/proxy/CommonProxy.java
index 955b664bd1..490cdf1092 100644
--- a/src/main/java/com/github/technus/tectech/proxy/CommonProxy.java
+++ b/src/main/java/com/github/technus/tectech/proxy/CommonProxy.java
@@ -7,12 +7,16 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.server.MinecraftServer;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.ChatComponentText;
+import net.minecraft.util.IIcon;
import net.minecraft.world.World;
import net.minecraft.world.WorldServer;
public class CommonProxy implements IGuiHandler {
public void registerRenderInfo() {}
+ public void hint_particle_tinted(World w,int x, int y, int z, IIcon[] icons,short[] RGBa){}
+ public void hint_particle_tinted(World w,int x, int y, int z, Block block, int meta,short[] RGBa){}
+ public void hint_particle(World w,int x, int y, int z, IIcon[] icons){}
public void hint_particle(World w,int x, int y, int z, Block block, int meta){}
public void em_particle(IGregTechTileEntity aMuffler, byte facing) {}//CUTE!
public void pollutor_particle(IGregTechTileEntity aPollutor, byte facing) {}//CUTE!
diff --git a/src/main/java/com/github/technus/tectech/thing/item/ConstructableTriggerItem.java b/src/main/java/com/github/technus/tectech/thing/item/ConstructableTriggerItem.java
index 4af6b53658..752f2d1bcc 100644
--- a/src/main/java/com/github/technus/tectech/thing/item/ConstructableTriggerItem.java
+++ b/src/main/java/com/github/technus/tectech/thing/item/ConstructableTriggerItem.java
@@ -1,31 +1,18 @@
package com.github.technus.tectech.thing.item;
+import com.github.technus.tectech.mechanics.constructable.ConstructableUtility;
import com.github.technus.tectech.util.CommonValues;
-import com.github.technus.tectech.TecTech;
-import com.github.technus.tectech.mechanics.constructible.IConstructable;
import cpw.mods.fml.common.registry.GameRegistry;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_ElectricBlastFurnace;
-import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
-import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.world.World;
-import net.minecraftforge.common.util.FakePlayer;
-import java.util.HashMap;
import java.util.List;
import static com.github.technus.tectech.Reference.MODID;
-import static com.github.technus.tectech.util.Util.StructureBuilder;
import static com.github.technus.tectech.loader.gui.CreativeTabTecTech.creativeTabTecTech;
-import static gregtech.api.GregTech_API.sBlockCasings1;
import static net.minecraft.util.StatCollector.translateToLocal;
/**
@@ -34,8 +21,6 @@ import static net.minecraft.util.StatCollector.translateToLocal;
public final class ConstructableTriggerItem extends Item {
public static ConstructableTriggerItem INSTANCE;
- private static HashMap<String, IMultiblockInfoContainer> multiblockMap= new HashMap<>();
-
private ConstructableTriggerItem() {
setUnlocalizedName("em.constructable");
setTextureName(MODID + ":itemConstructable");
@@ -44,69 +29,7 @@ public final class ConstructableTriggerItem extends Item {
@Override
public boolean onItemUseFirst(ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) {
- TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
- if(tTileEntity==null || aPlayer instanceof FakePlayer) {
- return aPlayer instanceof EntityPlayerMP;
- }
- if (aPlayer instanceof EntityPlayerMP) {
- //struct gen
- if (aPlayer.isSneaking() && aPlayer.capabilities.isCreativeMode) {
- if (tTileEntity instanceof IGregTechTileEntity) {
- IMetaTileEntity metaTE = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity();
- if (metaTE instanceof IConstructable) {
- ((IConstructable) metaTE).construct(aStack.stackSize, false);
- } else if (multiblockMap.containsKey(metaTE.getClass().getCanonicalName())) {
- multiblockMap.get(metaTE.getClass().getCanonicalName()).construct(aStack.stackSize, false, tTileEntity, ((IGregTechTileEntity) tTileEntity).getFrontFacing());
- }
- } else if (tTileEntity instanceof IConstructable) {
- ((IConstructable) tTileEntity).construct(aStack.stackSize, false);
- } else if (multiblockMap.containsKey(tTileEntity.getClass().getCanonicalName())) {
- multiblockMap.get(tTileEntity.getClass().getCanonicalName()).construct(aStack.stackSize, false, tTileEntity, aSide);
- }
- }
- return true;
- }else if (TecTech.proxy.isThePlayer(aPlayer)){//particles and text client side
- //if ((!aPlayer.isSneaking() || !aPlayer.capabilities.isCreativeMode)) {
- if(tTileEntity instanceof IGregTechTileEntity) {
- IMetaTileEntity metaTE = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity();
- if (metaTE instanceof IConstructable) {
- ((IConstructable) metaTE).construct(aStack.stackSize, true);
- TecTech.proxy.printInchat(((IConstructable) metaTE).getStructureDescription(aStack.stackSize));
- return false;
- } else if(multiblockMap.containsKey(metaTE.getClass().getCanonicalName())){
- multiblockMap.get(metaTE.getClass().getCanonicalName()).construct(aStack.stackSize,true,tTileEntity,((IGregTechTileEntity) tTileEntity).getFrontFacing());
- TecTech.proxy.printInchat(multiblockMap.get(metaTE.getClass().getCanonicalName()).getDescription(aStack.stackSize));
- return false;
- }
- } else if(tTileEntity instanceof IConstructable){
- ((IConstructable) tTileEntity).construct(aStack.stackSize,true);
- TecTech.proxy.printInchat(((IConstructable) tTileEntity).getStructureDescription(aStack.stackSize));
- return false;
- } else if(multiblockMap.containsKey(tTileEntity.getClass().getCanonicalName())){
- multiblockMap.get(tTileEntity.getClass().getCanonicalName()).construct(aStack.stackSize,true,tTileEntity, aSide);
- TecTech.proxy.printInchat(multiblockMap.get(tTileEntity.getClass().getCanonicalName()).getDescription(aStack.stackSize));
- return false;
- }
- //} else {
- // if(tTileEntity instanceof IGregTechTileEntity) {
- // IMetaTileEntity metaTE = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity();
- // if (metaTE instanceof IConstructable) {
- // TecTech.proxy.printInchat(((IConstructable) metaTE).getStructureDescription(aStack.stackSize));
- // return false;
- // } else if(multiblockMap.containsKey(metaTE.getClass().getCanonicalName())){
- // TecTech.proxy.printInchat(multiblockMap.get(metaTE.getClass().getCanonicalName()).getDescription(aStack.stackSize));
- // return false;
- // }
- // } else if(tTileEntity instanceof IConstructable){
- // TecTech.proxy.printInchat(((IConstructable) tTileEntity).getStructureDescription(aStack.stackSize));
- // return false;
- // } else if(multiblockMap.containsKey(tTileEntity.getClass().getCanonicalName())){
- // TecTech.proxy.printInchat(multiblockMap.get(tTileEntity.getClass().getCanonicalName()).getDescription(aStack.stackSize));
- // return false;
- // }
- //}
- }
- return false;
+ return ConstructableUtility.handle(aStack, aPlayer, aWorld, aX, aY, aZ, aSide);
}
@Override
@@ -122,47 +45,5 @@ public final class ConstructableTriggerItem extends Item {
public static void run() {
INSTANCE = new ConstructableTriggerItem();
GameRegistry.registerItem(INSTANCE, INSTANCE.getUnlocalizedName());
-
- registerMetaClass(GT_MetaTileEntity_ElectricBlastFurnace.class, new IMultiblockInfoContainer() {
- //region Structure
- private final String[][] shape = new String[][]{
- {"000","\"\"\"","\"\"\""," . ",},
- {"0!0","\"A\"","\"A\""," ",},
- {"000","\"\"\"","\"\"\""," ",},
- };
- private final Block[] blockType = new Block[]{sBlockCasings1};
- private final byte[] blockMeta = new byte[]{11};
- private final String[] desc=new String[]{
- EnumChatFormatting.AQUA+"Hint Details:",
- "1 - Classic Hatches or Heat Proof Casing",
- "2 - Muffler Hatch",
- "3 - Coil blocks"
- };
- //endregion
-
- @Override
- public void construct(int stackSize, boolean hintsOnly, TileEntity tileEntity, int aSide) {
- StructureBuilder(shape, blockType, blockMeta, 1, 3, 0, tileEntity, aSide, hintsOnly);
- }
-
- @Override
- public String[] getDescription(int stackSize) {
- return desc;
- }
- });
- }
-
- public interface IMultiblockInfoContainer {
- void construct(int stackSize, boolean hintsOnly, TileEntity tileEntity, int aSide);
- @SideOnly(Side.CLIENT)
- String[] getDescription(int stackSize);
- }
-
- public static void registerTileClass(Class<? extends TileEntity> clazz, IMultiblockInfoContainer info){
- multiblockMap.put(clazz.getCanonicalName(),info);
- }
-
- public static void registerMetaClass(Class<? extends IMetaTileEntity> clazz, IMultiblockInfoContainer info){
- multiblockMap.put(clazz.getCanonicalName(),info);
}
}
diff --git a/src/main/java/com/github/technus/tectech/thing/item/EuMeterGT.java b/src/main/java/com/github/technus/tectech/thing/item/EuMeterGT.java
index 8e3d770da1..f4531a248b 100644
--- a/src/main/java/com/github/technus/tectech/thing/item/EuMeterGT.java
+++ b/src/main/java/com/github/technus/tectech/thing/item/EuMeterGT.java
@@ -73,7 +73,7 @@ public class EuMeterGT extends Item {
}
}
if (!(aPlayer instanceof EntityPlayerMP)) {
- GT_Utility.doSoundAtClient(Reference.MODID + ":fx_scan", 1, 1.0F, (double) aX, (double) aY, (double) aZ);
+ GT_Utility.doSoundAtClient(Reference.MODID + ":fx_scan", 1, 1.0F, aX, aY, aZ);
}
return false;
}
diff --git a/src/main/java/com/github/technus/tectech/thing/item/FrontRotationTriggerItem.java b/src/main/java/com/github/technus/tectech/thing/item/FrontRotationTriggerItem.java
index efcfcfb7a3..d71abb34b7 100644
--- a/src/main/java/com/github/technus/tectech/thing/item/FrontRotationTriggerItem.java
+++ b/src/main/java/com/github/technus/tectech/thing/item/FrontRotationTriggerItem.java
@@ -1,18 +1,13 @@
package com.github.technus.tectech.thing.item;
-import com.github.technus.tectech.mechanics.alignment.IAlignment;
+import com.github.technus.tectech.mechanics.alignment.AlignmentUtility;
import com.github.technus.tectech.util.CommonValues;
import cpw.mods.fml.common.registry.GameRegistry;
-import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
-import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.world.World;
-import net.minecraftforge.common.util.FakePlayer;
import java.util.List;
@@ -35,31 +30,7 @@ public final class FrontRotationTriggerItem extends Item {
@Override
public boolean onItemUseFirst(ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) {
- TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
- if(tTileEntity==null || aPlayer instanceof FakePlayer) {
- return aPlayer instanceof EntityPlayerMP;
- }
- if (aPlayer instanceof EntityPlayerMP) {
- if (tTileEntity instanceof IGregTechTileEntity) {
- IMetaTileEntity metaTE = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity();
- if (metaTE instanceof IAlignment) {
- if(aPlayer.isSneaking()){
- ((IAlignment) metaTE).toolSetFlip(null);
- }else {
- ((IAlignment) metaTE).toolSetRotation(null);
- }
- return true;
- }
- } else if (tTileEntity instanceof IAlignment) {
- if(aPlayer.isSneaking()){
- ((IAlignment) tTileEntity).toolSetFlip(null);
- }else {
- ((IAlignment) tTileEntity).toolSetRotation(null);
- }
- return true;
- }
- }
- return false;
+ return AlignmentUtility.handle(aPlayer,aWorld,aX,aY,aZ);
}
@Override
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_DynamoTunnel.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_DynamoTunnel.java
index fb3487bc09..beacf26122 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_DynamoTunnel.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_DynamoTunnel.java
@@ -78,7 +78,7 @@ public class GT_MetaTileEntity_Hatch_DynamoTunnel extends GT_MetaTileEntity_Hatc
@Override
public long maxEUStore() {
- return 512L + V[mTier] * 4L * Amperes;
+ return V[mTier] * 24L * Amperes;
}
@Override
@@ -148,13 +148,12 @@ public class GT_MetaTileEntity_Hatch_DynamoTunnel extends GT_MetaTileEntity_Hatc
return;
} else if (maxEUOutput() == ((GT_MetaTileEntity_Hatch_EnergyTunnel) aMetaTileEntity).maxEUInput()) {
long diff = Math.min(
- Amperes * 20,
+ Amperes * 20L * maxEUOutput(),
Math.min(
((GT_MetaTileEntity_Hatch_EnergyTunnel) aMetaTileEntity).maxEUStore() -
aMetaTileEntity.getBaseMetaTileEntity().getStoredEU(),
- maxEUStore() - aBaseMetaTileEntity.getStoredEU()
- ) / maxEUOutput()
- ) * maxEUOutput();
+ aBaseMetaTileEntity.getStoredEU()
+ ));
setEUVar(aBaseMetaTileEntity.getStoredEU() - diff);
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_EnergyTunnel.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_EnergyTunnel.java
index 2407f2ab0a..2393f4f702 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_EnergyTunnel.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_EnergyTunnel.java
@@ -75,7 +75,7 @@ public class GT_MetaTileEntity_Hatch_EnergyTunnel extends GT_MetaTileEntity_Hatc
@Override
public long maxEUStore() {
- return 512L + V[mTier] * 4L * Amperes;
+ return V[mTier] * 24L * Amperes;
}
@Override
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 d52a3c23f7..584e28a607 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_annihilation.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_annihilation.java
@@ -1,11 +1,12 @@
package com.github.technus.tectech.thing.metaTileEntity.multi;
-import com.github.technus.tectech.util.CommonValues;
+import com.github.technus.tectech.mechanics.constructable.IConstructable;
+import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder;
+import com.github.technus.tectech.mechanics.structure.Structure;
import com.github.technus.tectech.thing.block.QuantumGlassBlock;
-import com.github.technus.tectech.mechanics.constructible.IConstructable;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM;
-import com.github.technus.tectech.thing.metaTileEntity.multi.base.IHatchAdder;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_RenderedExtendedFacingTexture;
+import com.github.technus.tectech.util.CommonValues;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gregtech.api.enums.Textures;
@@ -17,7 +18,7 @@ import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
-import static com.github.technus.tectech.util.Util.StructureBuilderExtreme;
+import static com.github.technus.tectech.mechanics.structure.Structure.adders;
import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset;
import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage;
import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT;
@@ -48,7 +49,9 @@ public class GT_MetaTileEntity_EM_annihilation extends GT_MetaTileEntity_Multibl
};
private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT, QuantumGlassBlock.INSTANCE, sBlockCasingsTT};
private static final byte[] blockMeta = new byte[]{4, 5, 12, 6, 0, 10};
- private final IHatchAdder[] addingMethods = new IHatchAdder[]{this::addClassicToMachineList, this::addElementalToMachineList};
+ private static final IHatchAdder<GT_MetaTileEntity_EM_annihilation>[] addingMethods = adders(
+ GT_MetaTileEntity_EM_annihilation::addClassicToMachineList,
+ GT_MetaTileEntity_EM_annihilation::addElementalToMachineList);
private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 4};
private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT};
private static final byte[] blockMetaFallback = new byte[]{0, 4};
@@ -103,12 +106,12 @@ public class GT_MetaTileEntity_EM_annihilation extends GT_MetaTileEntity_Multibl
}
@Override
- public void construct(int stackSize, boolean hintsOnly) {
- StructureBuilderExtreme(shape, blockType, blockMeta, 5, 5, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly);
+ public void construct(ItemStack stackSize, boolean hintsOnly) {
+ Structure.builder(shape, blockType, blockMeta, 5, 5, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly);
}
@Override
- public String[] getStructureDescription(int stackSize) {
+ 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 74ebae9f57..24fbb9e423 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_bhg.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_bhg.java
@@ -1,23 +1,24 @@
package com.github.technus.tectech.thing.metaTileEntity.multi;
-import com.github.technus.tectech.util.CommonValues;
+import com.github.technus.tectech.mechanics.constructable.IConstructable;
+import com.github.technus.tectech.mechanics.structure.IStructureDefinition;
+import com.github.technus.tectech.mechanics.structure.StructureDefinition;
import com.github.technus.tectech.thing.block.QuantumGlassBlock;
-import com.github.technus.tectech.mechanics.constructible.IConstructable;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM;
-import com.github.technus.tectech.thing.metaTileEntity.multi.base.IHatchAdder;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_RenderedExtendedFacingTexture;
+import com.github.technus.tectech.util.CommonValues;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import net.minecraft.block.Block;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
-import static com.github.technus.tectech.util.Util.StructureBuilderExtreme;
+import static com.github.technus.tectech.mechanics.structure.StructureUtility.ofBlock;
+import static com.github.technus.tectech.mechanics.structure.StructureUtility.ofHatchAdderOptional;
import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset;
import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage;
import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT;
@@ -47,47 +48,95 @@ public class GT_MetaTileEntity_EM_bhg extends GT_MetaTileEntity_MultiblockBase_E
//per dim disable thingies
//region structure actual
- private static final String[][] shape = new String[][]{
- {"\u000B", "M0000000", "L00 00", "L0 0", "L0 !!! 0", "L0 !.! 0", "L0 !!! 0", "L0 0", "L00 00", "M0000000",},
- {"\u0008", "O0A0", "O0A0", "O0A0", "O0A0", "N11111", "M1101011", "I000010010010000", "M1111111", "I000010010010000", "M1101011", "N11111", "O0A0", "O0A0", "O0A0", "O0A0",},
- {"\u0006", "O0A0", "O0A0", "O0A0", "P1", "P1", "M1111111", "L11E11", "L1B222B1", "G000B1A23332A1B000", "J111A23332A111", "G000B1A23332A1B000", "L1B222B1", "L11E11", "M1111111", "P1", "P1", "O0A0", "O0A0", "O0A0",},
- {"\u0005", "O0A0", "O0A0", "P1", "P1", "\u0004", "F00Q00", "H11M11", "F00Q00", "\u0004", "P1", "P1", "O0A0", "O0A0",},
- {"\u0004", "O0A0", "N00000", "P1", "P4", "P4", "\u0003", "F0S0", "E00S00", "F0144M4410", "E00S00", "F0S0", "\u0003", "P4", "P4", "P1", "N00000", "O0A0",},
- {"\u0003", "O0A0", "O0A0", "P1", "M2224222", "\u0004", "G2Q2", "G2Q2", "D00A2Q2A00", "F14Q41", "D00A2Q2A00", "G2Q2", "G2Q2", "\u0004", "M2224222", "P1", "O0A0", "O0A0",},
- {"\u0002", "O0A0", "N00000", "P1", "P4", "\u0006", "D0W0", "C00W00", "D014S410", "C00W00", "D0W0", "\u0006", "P4", "P1", "N00000", "O0A0",},
- {"\u0001", "O0A0", "O0A0", "P1", "M2224222", "\u0006", "E2U2", "E2U2", "B00A2U2A00", "D14U41", "B00A2U2A00", "E2U2", "E2U2", "\u0006", "M2224222", "P1", "O0A0", "O0A0",},
- {"\u0001", "O0A0", "P1", "P4", "\u0009", "B0[0", "C14W41", "B0[0", "\u0009", "P4", "P1", "O0A0",},
- {E, "O0A0", "O0A0", "P1", "P4", "\u0009", "A00[00", "C14W41", "A00[00", "\u0009", "P4", "P1", "O0A0", "O0A0",},
- {E, "O0A0", "P1", "\u000B", "A0]0", "B1[1", "A0]0", "\u000B", "P1", "O0A0",},
- {E, "O0A0", "P1", "\u000B", "A0]0", "B1[1", "A0]0", "\u000B", "P1", "O0A0",},
- {"O0A0", "O0A0", "M1111111", "\u0009", "B1[1", "B1[1", "001[100", "B1[1", "001[100", "B1[1", "B1[1", "\u0009", "M1111111", "O0A0", "O0A0",},
- {"O0A0", "N11111", "L11E11", "\u0001", "G2Q2", E, "E2U2", "\u0003", "B1[1", "B1[1", "A1]1", "01]10", "A1]1", "01]10", "A1]1", "B1[1", "B1[1", "\u0003", "E2U2", E, "G2Q2", "\u0001", "L11E11", "N11111", "O0A0",},
- {"O0A0", "M1101011", "L1B222B1", E, "F0S0", "G2Q2", "D0W0", "E2U2", "\u0003", "B1[1", "A1]1", "A1]1", "002[200", "A12[21", "002[200", "A1]1", "A1]1", "B1[1", "\u0003", "E2U2", "D0W0", "G2Q2", "F0S0", E, "L1B222B1", "M1101011", "O0A0",},
- {"L000000000", "I000010010010000", "G000B1A23332A1B000", "F00Q00", "E00S00", "D00A2Q2A00", "C00W00", "B00A2U2A00", "B0[0", "A00[00", "A0]0", "A0]0", "001[100", "01]10", "002[200", "003[300", "013[310", "003[300", "002[200", "01]10", "001[100", "A0]0", "A0]0", "A00[00", "B0[0", "B00A2U2A00", "C00W00", "D00A2Q2A00", "E00S00", "F00Q00", "G000B1A23332A1B000", "I000010010010000", "L000000000",},
- {"O0A0", "M1111111", "J111A23332A111", "H11M11", "F0144M4410", "F14Q41", "D014S410", "D14U41", "C14W41", "C14W41", "B1[1", "B1[1", "B1[1", "A1]1", "A12[21", "013[310", "A13[31", "013[310", "A12[21", "A1]1", "B1[1", "B1[1", "B1[1", "C14W41", "C14W41", "D14U41", "D014S410", "F14Q41", "F0144M4410", "H11M11", "J111A23332A111", "M1111111", "O0A0",},
- {"L000000000", "I000010010010000", "G000B1A23332A1B000", "F00Q00", "E00S00", "D00A2Q2A00", "C00W00", "B00A2U2A00", "B0[0", "A00[00", "A0]0", "A0]0", "001[100", "01]10", "002[200", "003[300", "013[310", "003[300", "002[200", "01]10", "001[100", "A0]0", "A0]0", "A00[00", "B0[0", "B00A2U2A00", "C00W00", "D00A2Q2A00", "E00S00", "F00Q00", "G000B1A23332A1B000", "I000010010010000", "L000000000",},
- {"O0A0", "M1101011", "L1B222B1", E, "F0S0", "G2Q2", "D0W0", "E2U2", "\u0003", "B1[1", "A1]1", "A1]1", "002[200", "A12[21", "002[200", "A1]1", "A1]1", "B1[1", "\u0003", "E2U2", "D0W0", "G2Q2", "F0S0", E, "L1B222B1", "M1101011", "O0A0",},
- {"O0A0", "N11111", "L11E11", "\u0001", "G2Q2", E, "E2U2", "\u0003", "B1[1", "B1[1", "A1]1", "01]10", "A1]1", "01]10", "A1]1", "B1[1", "B1[1", "\u0003", "E2U2", E, "G2Q2", "\u0001", "L11E11", "N11111", "O0A0",},
- {"O0A0", "O0A0", "M1111111", "\u0009", "B1[1", "B1[1", "001[100", "B1[1", "001[100", "B1[1", "B1[1", "\u0009", "M1111111", "O0A0", "O0A0",},
- {E, "O0A0", "P1", "\u000B", "A0]0", "B1[1", "A0]0", "\u000B", "P1", "O0A0",},
- {E, "O0A0", "P1", "\u000B", "A0]0", "B1[1", "A0]0", "\u000B", "P1", "O0A0",},
- {E, "O0A0", "O0A0", "P1", "P4", "\u0009", "A00[00", "C14W41", "A00[00", "\u0009", "P4", "P1", "O0A0", "O0A0",},
- {"\u0001", "O0A0", "P1", "P4", "\u0009", "B0[0", "C14W41", "B0[0", "\u0009", "P4", "P1", "O0A0",},
- {"\u0001", "O0A0", "O0A0", "P1", "M2224222", "\u0006", "E2U2", "E2U2", "B00A2U2A00", "D14U41", "B00A2U2A00", "E2U2", "E2U2", "\u0006", "M2224222", "P1", "O0A0", "O0A0",},
- {"\u0002", "O0A0", "N00000", "P1", "P4", "\u0006", "D0W0", "C00W00", "D014S410", "C00W00", "D0W0", "\u0006", "P4", "P1", "N00000", "O0A0",},
- {"\u0003", "O0A0", "O0A0", "P1", "M2224222", "\u0004", "G2Q2", "G2Q2", "D00A2Q2A00", "F14Q41", "D00A2Q2A00", "G2Q2", "G2Q2", "\u0004", "M2224222", "P1", "O0A0", "O0A0",},
- {"\u0004", "O0A0", "N00000", "P1", "P4", "P4", "\u0003", "F0S0", "E00S00", "F0144M4410", "E00S00", "F0S0", "\u0003", "P4", "P4", "P1", "N00000", "O0A0",},
- {"\u0005", "O0A0", "O0A0", "P1", "P1", "\u0004", "F00Q00", "H11M11", "F00Q00", "\u0004", "P1", "P1", "O0A0", "O0A0",},
- {"\u0006", "O0A0", "O0A0", "O0A0", "P1", "P1", "M1111111", "L11E11", "L1B222B1", "G000B1A23332A1B000", "J111A23332A111", "G000B1A23332A1B000", "L1B222B1", "L11E11", "M1111111", "P1", "P1", "O0A0", "O0A0", "O0A0",},
- {"\u0008", "O0A0", "O0A0", "O0A0", "O0A0", "N11111", "M1101011", "I000010010010000", "M1111111", "I000010010010000", "M1101011", "N11111", "O0A0", "O0A0", "O0A0", "O0A0",},
- {"\u000B", "O0A0", "O0A0", "O0A0", "L000000000", "O0A0", "L000000000", "O0A0", "O0A0", "O0A0",},
- };
- private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT};
- private static final byte[] blockMeta = new byte[]{12, 13, 14, 10, 11};
- private final IHatchAdder[] addingMethods = new IHatchAdder[]{this::addClassicToMachineList, this::addElementalToMachineList};
- private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 4};
- private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT};
- private static final byte[] blockMetaFallback = new byte[]{0, 4};
+ private static final IStructureDefinition<GT_MetaTileEntity_EM_bhg> STRUCTURE_DEFINITION= StructureDefinition
+ .<GT_MetaTileEntity_EM_bhg>builder()
+ .addShapeOldApi("t1",new String[][]{
+ {"\u000B", "M0000000", "L00 00", "L0 0", "L0 !!! 0", "L0 !.! 0", "L0 !!! 0", "L0 0", "L00 00", "M0000000",},
+ {"\u0008", "O0A0", "O0A0", "O0A0", "O0A0", "N11111", "M1101011", "I000010010010000", "M1111111", "I000010010010000", "M1101011", "N11111", "O0A0", "O0A0", "O0A0", "O0A0",},
+ {"\u0006", "O0A0", "O0A0", "O0A0", "P1", "P1", "M1111111", "L11E11", "L1B222B1", "G000B1A23332A1B000", "J111A23332A111", "G000B1A23332A1B000", "L1B222B1", "L11E11", "M1111111", "P1", "P1", "O0A0", "O0A0", "O0A0",},
+ {"\u0005", "O0A0", "O0A0", "P1", "P1", "\u0004", "F00Q00", "H11M11", "F00Q00", "\u0004", "P1", "P1", "O0A0", "O0A0",},
+ {"\u0004", "O0A0", "N00000", "P1", "P4", "P4", "\u0003", "F0S0", "E00S00", "F0144M4410", "E00S00", "F0S0", "\u0003", "P4", "P4", "P1", "N00000", "O0A0",},
+ {"\u0003", "O0A0", "O0A0", "P1", "M2224222", "\u0004", "G2Q2", "G2Q2", "D00A2Q2A00", "F14Q41", "D00A2Q2A00", "G2Q2", "G2Q2", "\u0004", "M2224222", "P1", "O0A0", "O0A0",},
+ {"\u0002", "O0A0", "N00000", "P1", "P4", "\u0006", "D0W0", "C00W00", "D014S410", "C00W00", "D0W0", "\u0006", "P4", "P1", "N00000", "O0A0",},
+ {"\u0001", "O0A0", "O0A0", "P1", "M2224222", "\u0006", "E2U2", "E2U2", "B00A2U2A00", "D14U41", "B00A2U2A00", "E2U2", "E2U2", "\u0006", "M2224222", "P1", "O0A0", "O0A0",},
+ {"\u0001", "O0A0", "P1", "P4", "\u0009", "B0[0", "C14W41", "B0[0", "\u0009", "P4", "P1", "O0A0",},
+ {E, "O0A0", "O0A0", "P1", "P4", "\u0009", "A00[00", "C14W41", "A00[00", "\u0009", "P4", "P1", "O0A0", "O0A0",},
+ {E, "O0A0", "P1", "\u000B", "A0]0", "B1[1", "A0]0", "\u000B", "P1", "O0A0",},
+ {E, "O0A0", "P1", "\u000B", "A0]0", "B1[1", "A0]0", "\u000B", "P1", "O0A0",},
+ {"O0A0", "O0A0", "M1111111", "\u0009", "B1[1", "B1[1", "001[100", "B1[1", "001[100", "B1[1", "B1[1", "\u0009", "M1111111", "O0A0", "O0A0",},
+ {"O0A0", "N11111", "L11E11", "\u0001", "G2Q2", E, "E2U2", "\u0003", "B1[1", "B1[1", "A1]1", "01]10", "A1]1", "01]10", "A1]1", "B1[1", "B1[1", "\u0003", "E2U2", E, "G2Q2", "\u0001", "L11E11", "N11111", "O0A0",},
+ {"O0A0", "M1101011", "L1B222B1", E, "F0S0", "G2Q2", "D0W0", "E2U2", "\u0003", "B1[1", "A1]1", "A1]1", "002[200", "A12[21", "002[200", "A1]1", "A1]1", "B1[1", "\u0003", "E2U2", "D0W0", "G2Q2", "F0S0", E, "L1B222B1", "M1101011", "O0A0",},
+ {"L000000000", "I000010010010000", "G000B1A23332A1B000", "F00Q00", "E00S00", "D00A2Q2A00", "C00W00", "B00A2U2A00", "B0[0", "A00[00", "A0]0", "A0]0", "001[100", "01]10", "002[200", "003[300", "013[310", "003[300", "002[200", "01]10", "001[100", "A0]0", "A0]0", "A00[00", "B0[0", "B00A2U2A00", "C00W00", "D00A2Q2A00", "E00S00", "F00Q00", "G000B1A23332A1B000", "I000010010010000", "L000000000",},
+ {"O0A0", "M1111111", "J111A23332A111", "H11M11", "F0144M4410", "F14Q41", "D014S410", "D14U41", "C14W41", "C14W41", "B1[1", "B1[1", "B1[1", "A1]1", "A12[21", "013[310", "A13[31", "013[310", "A12[21", "A1]1", "B1[1", "B1[1", "B1[1", "C14W41", "C14W41", "D14U41", "D014S410", "F14Q41", "F0144M4410", "H11M11", "J111A23332A111", "M1111111", "O0A0",},
+ {"L000000000", "I000010010010000", "G000B1A23332A1B000", "F00Q00", "E00S00", "D00A2Q2A00", "C00W00", "B00A2U2A00", "B0[0", "A00[00", "A0]0", "A0]0", "001[100", "01]10", "002[200", "003[300", "013[310", "003[300", "002[200", "01]10", "001[100", "A0]0", "A0]0", "A00[00", "B0[0", "B00A2U2A00", "C00W00", "D00A2Q2A00", "E00S00", "F00Q00", "G000B1A23332A1B000", "I000010010010000", "L000000000",},
+ {"O0A0", "M1101011", "L1B222B1", E, "F0S0", "G2Q2", "D0W0", "E2U2", "\u0003", "B1[1", "A1]1", "A1]1", "002[200", "A12[21", "002[200", "A1]1", "A1]1", "B1[1", "\u0003", "E2U2", "D0W0", "G2Q2", "F0S0", E, "L1B222B1", "M1101011", "O0A0",},
+ {"O0A0", "N11111", "L11E11", "\u0001", "G2Q2", E, "E2U2", "\u0003", "B1[1", "B1[1", "A1]1", "01]10", "A1]1", "01]10", "A1]1", "B1[1", "B1[1", "\u0003", "E2U2", E, "G2Q2", "\u0001", "L11E11", "N11111", "O0A0",},
+ {"O0A0", "O0A0", "M1111111", "\u0009", "B1[1", "B1[1", "001[100", "B1[1", "001[100", "B1[1", "B1[1", "\u0009", "M1111111", "O0A0", "O0A0",},
+ {E, "O0A0", "P1", "\u000B", "A0]0", "B1[1", "A0]0", "\u000B", "P1", "O0A0",},
+ {E, "O0A0", "P1", "\u000B", "A0]0", "B1[1", "A0]0", "\u000B", "P1", "O0A0",},
+ {E, "O0A0", "O0A0", "P1", "P4", "\u0009", "A00[00", "C14W41", "A00[00", "\u0009", "P4", "P1", "O0A0", "O0A0",},
+ {"\u0001", "O0A0", "P1", "P4", "\u0009", "B0[0", "C14W41", "B0[0", "\u0009", "P4", "P1", "O0A0",},
+ {"\u0001", "O0A0", "O0A0", "P1", "M2224222", "\u0006", "E2U2", "E2U2", "B00A2U2A00", "D14U41", "B00A2U2A00", "E2U2", "E2U2", "\u0006", "M2224222", "P1", "O0A0", "O0A0",},
+ {"\u0002", "O0A0", "N00000", "P1", "P4", "\u0006", "D0W0", "C00W00", "D014S410", "C00W00", "D0W0", "\u0006", "P4", "P1", "N00000", "O0A0",},
+ {"\u0003", "O0A0", "O0A0", "P1", "M2224222", "\u0004", "G2Q2", "G2Q2", "D00A2Q2A00", "F14Q41", "D00A2Q2A00", "G2Q2", "G2Q2", "\u0004", "M2224222", "P1", "O0A0", "O0A0",},
+ {"\u0004", "O0A0", "N00000", "P1", "P4", "P4", "\u0003", "F0S0", "E00S00", "F0144M4410", "E00S00", "F0S0", "\u0003", "P4", "P4", "P1", "N00000", "O0A0",},
+ {"\u0005", "O0A0", "O0A0", "P1", "P1", "\u0004", "F00Q00", "H11M11", "F00Q00", "\u0004", "P1", "P1", "O0A0", "O0A0",},
+ {"\u0006", "O0A0", "O0A0", "O0A0", "P1", "P1", "M1111111", "L11E11", "L1B222B1", "G000B1A23332A1B000", "J111A23332A111", "G000B1A23332A1B000", "L1B222B1", "L11E11", "M1111111", "P1", "P1", "O0A0", "O0A0", "O0A0",},
+ {"\u0008", "O0A0", "O0A0", "O0A0", "O0A0", "N11111", "M1101011", "I000010010010000", "M1111111", "I000010010010000", "M1101011", "N11111", "O0A0", "O0A0", "O0A0", "O0A0",},
+ {"\u000B", "O0A0", "O0A0", "O0A0", "L000000000", "O0A0", "L000000000", "O0A0", "O0A0", "O0A0",},
+ })
+ .addShapeOldApi("t2",new String[][]{
+ {"\u000B", "M0000000", "L00 00", "L0 0", "L0 !!! 0", "L0 !.! 0", "L0 !!! 0", "L0 0", "L00 00", "M0000000",},
+ {"\u0008", "O0A0", "M550A055", "L5550A0555", "K55550A05555", "J5555111115555", "J5551101011555", "I000010010010000", "M1111111", "I000010010010000", "J5551101011555", "J5555111115555", "K55550A05555", "L5550A0555", "M550A055", "O0A0",},
+ {"\u0006", "O0A0", "M550A055", "K55550A05555", "J555C1C555", "I555D1D555", "I55B1111111B55", "H55B11E11B55", "H55B1B222B1B55", "G000B1A23332A1B000", "J111A23332A111", "G000B1A23332A1B000", "H55B1B222B1B55", "H55B11E11B55", "I55B1111111B55", "I555D1D555", "J555C1C555", "K55550A05555", "M550A055", "O0A0",},
+ {"\u0005", "O0A0", "L5550A0555", "J555C1C555", "I55E1E55", "H55M55", "H5O5", "G55O55", "G5Q5", "G5Q5", "F00Q00", "H11M11", "F00Q00", "G5Q5", "G5Q5", "G55O55", "H5O5", "H55M55", "I55E1E55", "J555C1C555", "L5550A0555", "O0A0",},
+ {"\u0004", "O0A0", "K55500000555", "I555D1D555", "H55F4F55", "G55G4G55", "G5Q5", "F55Q55", "F5S5", "F5S5", "F0S0", "E00S00", "F0144M4410", "E00S00", "F0S0", "F5S5", "F5S5", "F55Q55", "G5Q5", "G55G4G55", "H55F4F55", "I555D1D555", "K55500000555", "O0A0",},
+ {"\u0003", "O0A0", "J555550A055555", "H555E1E555", "G55D2224222D55", "F55Q55", "F5S5", "E55S55", "E5U5", "E5U5", "E5A2Q2A5", "E5A2Q2A5", "D00A2Q2A00", "F14Q41", "D00A2Q2A00", "E5A2Q2A5", "E5A2Q2A5", "E5U5", "E5U5", "E55S55", "F5S5", "F55Q55", "G55D2224222D55", "H555E1E555", "J555550A055555", "O0A0",},
+ {"\u0002", "O0A0", "K55500000555", "H555E1E555", "G55G4G55", "F5S5", "E55S55", "E5U5", "E5U5", "D5W5", "D5W5", "D5W5", "D0W0", "C00W00", "D014S410", "C00W00", "D0W0", "D5W5", "D5W5", "D5W5", "E5U5", "E5U5", "E55S55", "F5S5", "G55G4G55", "H555E1E555", "K55500000555", "O0A0",},
+ {"\u0001", "O0A0", "L5550A0555", "I555D1D555", "G55D2224222D55", "F5S5", "E5U5", "E5U5", "D5W5", "D5W5", "D5W5", "C5Y5", "C5A2U2A5", "C5A2U2A5", "B00A2U2A00", "D14U41", "B00A2U2A00", "C5A2U2A5", "C5A2U2A5", "C5Y5", "D5W5", "D5W5", "D5W5", "E5U5", "E5U5", "F5S5", "G55D2224222D55", "I555D1D555", "L5550A0555", "O0A0",},
+ {"\u0001", "M550A055", "J555C1C555", "H55F4F55", "F55Q55", "E55S55", "E5U5", "D5W5", "D5W5", "C5Y5", "C5Y5", "C5Y5", "B5[5", "B5[5", "B0[0", "C14W41", "B0[0", "B5[5", "B5[5", "C5Y5", "C5Y5", "C5Y5", "D5W5", "D5W5", "E5U5", "E55S55", "F55Q55", "H55F4F55", "J555C1C555", "M550A055",},
+ {E, "O0A0", "K55550A05555", "I55E1E55", "G55G4G55", "F5S5", "E5U5", "D5W5", "D5W5", "C5Y5", "C5Y5", "B5[5", "B5[5", "B5[5", "B5[5", "A00[00", "C14W41", "A00[00", "B5[5", "B5[5", "B5[5", "B5[5", "C5Y5", "C5Y5", "D5W5", "D5W5", "E5U5", "F5S5", "G55G4G55", "I55E1E55", "K55550A05555", "O0A0",},
+ {E, "M550A055", "J555C1C555", "H55M55", "G5Q5", "E55S55", "E5U5", "D5W5", "C5Y5", "C5Y5", "B5[5", "B5[5", "B5[5", "A5]5", "A5]5", "A0]0", "B1[1", "A0]0", "A5]5", "A5]5", "B5[5", "B5[5", "B5[5", "C5Y5", "C5Y5", "D5W5", "E5U5", "E55S55", "G5Q5", "H55M55", "J555C1C555", "M550A055",},
+ {E, "L5550A0555", "I555D1D555", "H5O5", "F55Q55", "E5U5", "D5W5", "D5W5", "C5Y5", "B5[5", "B5[5", "B5[5", "A5]5", "A5]5", "A5]5", "A0]0", "B1[1", "A0]0", "A5]5", "A5]5", "A5]5", "B5[5", "B5[5", "B5[5", "C5Y5", "D5W5", "D5W5", "E5U5", "F55Q55", "H5O5", "I555D1D555", "L5550A0555",},
+ {"O0A0", "K55550A05555", "I55B1111111B55", "G55O55", "F5S5", "E5U5", "D5W5", "C5Y5", "C5Y5", "B5[5", "B5[5", "A5]5", "A5]5", "A51[15", "A51[15", "001[100", "B1[1", "001[100", "A51[15", "A51[15", "A5]5", "A5]5", "B5[5", "B5[5", "C5Y5", "C5Y5", "D5W5", "E5U5", "F5S5", "G55O55", "I55B1111111B55", "K55550A05555", "O0A0",},
+ {"O0A0", "J5555111115555", "H55B11E11B55", "G5Q5", "F5S5", "E5A2Q2A5", "D5W5", "C5A2U2A5", "B5[5", "B5[5", "A5]5", "A5]5", "A51[15", "A51[15", "A1]1", "01]10", "A1]1", "01]10", "A1]1", "A51[15", "A51[15", "A5]5", "A5]5", "B5[5", "B5[5", "C5A2U2A5", "D5W5", "E5A2Q2A5", "F5S5", "G5Q5", "H55B11E11B55", "J5555111115555", "O0A0",},
+ {"O0A0", "J5551101011555", "H55B1B222B1B55", "G5Q5", "F0S0", "E5A2Q2A5", "D0W0", "C5A2U2A5", "B5[5", "B5[5", "A5]5", "A5]5", "A51[15", "A1]1", "A1]1", "002[200", "A12[21", "002[200", "A1]1", "A1]1", "A51[15", "A5]5", "A5]5", "B5[5", "B5[5", "C5A2U2A5", "D0W0", "E5A2Q2A5", "F0S0", "G5Q5", "H55B1B222B1B55", "J5551101011555", "O0A0",},
+ {"L000000000", "I000010010010000", "G000B1A23332A1B000", "F00Q00", "E00S00", "D00A2Q2A00", "C00W00", "B00A2U2A00", "B0[0", "A00[00", "A0]0", "A0]0", "001[100", "01]10", "002[200", "003[300", "013[310", "003[300", "002[200", "01]10", "001[100", "A0]0", "A0]0", "A00[00", "B0[0", "B00A2U2A00", "C00W00", "D00A2Q2A00", "E00S00", "F00Q00", "G000B1A23332A1B000", "I000010010010000", "L000000000",},
+ {"O0A0", "M1111111", "J111A23332A111", "H11M11", "F0144M4410", "F14Q41", "D014S410", "D14U41", "C14W41", "C14W41", "B1[1", "B1[1", "B1[1", "A1]1", "A12[21", "013[310", "A13[31", "013[310", "A12[21", "A1]1", "B1[1", "B1[1", "B1[1", "C14W41", "C14W41", "D14U41", "D014S410", "F14Q41", "F0144M4410", "H11M11", "J111A23332A111", "M1111111", "O0A0",},
+ {"L000000000", "I000010010010000", "G000B1A23332A1B000", "F00Q00", "E00S00", "D00A2Q2A00", "C00W00", "B00A2U2A00", "B0[0", "A00[00", "A0]0", "A0]0", "001[100", "01]10", "002[200", "003[300", "013[310", "003[300", "002[200", "01]10", "001[100", "A0]0", "A0]0", "A00[00", "B0[0", "B00A2U2A00", "C00W00", "D00A2Q2A00", "E00S00", "F00Q00", "G000B1A23332A1B000", "I000010010010000", "L000000000",},
+ {"O0A0", "J5551101011555", "H55B1B222B1B55", "G5Q5", "F0S0", "E5A2Q2A5", "D0W0", "C5A2U2A5", "B5[5", "B5[5", "A5]5", "A5]5", "A51[15", "A1]1", "A1]1", "002[200", "A12[21", "002[200", "A1]1", "A1]1", "A51[15", "A5]5", "A5]5", "B5[5", "B5[5", "C5A2U2A5", "D0W0", "E5A2Q2A5", "F0S0", "G5Q5", "H55B1B222B1B55", "J5551101011555", "O0A0",},
+ {"O0A0", "J5555111115555", "H55B11E11B55", "G5Q5", "F5S5", "E5A2Q2A5", "D5W5", "C5A2U2A5", "B5[5", "B5[5", "A5]5", "A5]5", "A51[15", "A51[15", "A1]1", "01]10", "A1]1", "01]10", "A1]1", "A51[15", "A51[15", "A5]5", "A5]5", "B5[5", "B5[5", "C5A2U2A5", "D5W5", "E5A2Q2A5", "F5S5", "G5Q5", "H55B11E11B55", "J5555111115555", "O0A0",},
+ {"O0A0", "K55550A05555", "I55B1111111B55", "G55O55", "F5S5", "E5U5", "D5W5", "C5Y5", "C5Y5", "B5[5", "B5[5", "A5]5", "A5]5", "A51[15", "A51[15", "001[100", "B1[1", "001[100", "A51[15", "A51[15", "A5]5", "A5]5", "B5[5", "B5[5", "C5Y5", "C5Y5", "D5W5", "E5U5", "F5S5", "G55O55", "I55B1111111B55", "K55550A05555", "O0A0",},
+ {E, "L5550A0555", "I555D1D555", "H5O5", "F55Q55", "E5U5", "D5W5", "D5W5", "C5Y5", "B5[5", "B5[5", "B5[5", "A5]5", "A5]5", "A5]5", "A0]0", "B1[1", "A0]0", "A5]5", "A5]5", "A5]5", "B5[5", "B5[5", "B5[5", "C5Y5", "D5W5", "D5W5", "E5U5", "F55Q55", "H5O5", "I555D1D555", "L5550A0555",},
+ {E, "M550A055", "J555C1C555", "H55M55", "G5Q5", "E55S55", "E5U5", "D5W5", "C5Y5", "C5Y5", "B5[5", "B5[5", "B5[5", "A5]5", "A5]5", "A0]0", "B1[1", "A0]0", "A5]5", "A5]5", "B5[5", "B5[5", "B5[5", "C5Y5", "C5Y5", "D5W5", "E5U5", "E55S55", "G5Q5", "H55M55", "J555C1C555", "M550A055",},
+ {E, "O0A0", "K55550A05555", "I55E1E55", "G55G4G55", "F5S5", "E5U5", "D5W5", "D5W5", "C5Y5", "C5Y5", "B5[5", "B5[5", "B5[5", "B5[5", "A00[00", "C14W41", "A00[00", "B5[5", "B5[5", "B5[5", "B5[5", "C5Y5", "C5Y5", "D5W5", "D5W5", "E5U5", "F5S5", "G55G4G55", "I55E1E55", "K55550A05555", "O0A0",},
+ {"\u0001", "M550A055", "J555C1C555", "H55F4F55", "F55Q55", "E55S55", "E5U5", "D5W5", "D5W5", "C5Y5", "C5Y5", "C5Y5", "B5[5", "B5[5", "B0[0", "C14W41", "B0[0", "B5[5", "B5[5", "C5Y5", "C5Y5", "C5Y5", "D5W5", "D5W5", "E5U5", "E55S55", "F55Q55", "H55F4F55", "J555C1C555", "M550A055",},
+ {"\u0001", "O0A0", "L5550A0555", "I555D1D555", "G55D2224222D55", "F5S5", "E5U5", "E5U5", "D5W5", "D5W5", "D5W5", "C5Y5", "C5A2U2A5", "C5A2U2A5", "B00A2U2A00", "D14U41", "B00A2U2A00", "C5A2U2A5", "C5A2U2A5", "C5Y5", "D5W5", "D5W5", "D5W5", "E5U5", "E5U5", "F5S5", "G55D2224222D55", "I555D1D555", "L5550A0555", "O0A0",},
+ {"\u0002", "O0A0", "K55500000555", "H555E1E555", "G55G4G55", "F5S5", "E55S55", "E5U5", "E5U5", "D5W5", "D5W5", "D5W5", "D0W0", "C00W00", "D014S410", "C00W00", "D0W0", "D5W5", "D5W5", "D5W5", "E5U5", "E5U5", "E55S55", "F5S5", "G55G4G55", "H555E1E555", "K55500000555", "O0A0",},
+ {"\u0003", "O0A0", "J555550A055555", "H555E1E555", "G55D2224222D55", "F55Q55", "F5S5", "E55S55", "E5U5", "E5U5", "E5A2Q2A5", "E5A2Q2A5", "D00A2Q2A00", "F14Q41", "D00A2Q2A00", "E5A2Q2A5", "E5A2Q2A5", "E5U5", "E5U5", "E55S55", "F5S5", "F55Q55", "G55D2224222D55", "H555E1E555", "J555550A055555", "O0A0",},
+ {"\u0004", "O0A0", "K55500000555", "I555D1D555", "H55F4F55", "G55G4G55", "G5Q5", "F55Q55", "F5S5", "F5S5", "F0S0", "E00S00", "F0144M4410", "E00S00", "F0S0", "F5S5", "F5S5", "F55Q55", "G5Q5", "G55G4G55", "H55F4F55", "I555D1D555", "K55500000555", "O0A0",},
+ {"\u0005", "O0A0", "L5550A0555", "J555C1C555", "I55E1E55", "H55M55", "H5O5", "G55O55", "G5Q5", "G5Q5", "F00Q00", "H11M11", "F00Q00", "G5Q5", "G5Q5", "G55O55", "H5O5", "H55M55", "I55E1E55", "J555C1C555", "L5550A0555", "O0A0",},
+ {"\u0006", "O0A0", "M550A055", "K55550A05555", "J555C1C555", "I555D1D555", "I55B1111111B55", "H55B11E11B55", "H55B1B222B1B55", "G000B1A23332A1B000", "J111A23332A111", "G000B1A23332A1B000", "H55B1B222B1B55", "H55B11E11B55", "I55B1111111B55", "I555D1D555", "J555C1C555", "K55550A05555", "M550A055", "O0A0",},
+ {"\u0008", "O0A0", "M550A055", "L5550A0555", "K55550A05555", "J5555111115555", "J5551101011555", "I000010010010000", "M1111111", "I000010010010000", "J5551101011555", "J5555111115555", "K55550A05555", "L5550A0555", "M550A055", "O0A0",},
+ {"\u000B", "O0A0", "O0A0", "O0A0", "L000000000", "O0A0", "L000000000", "O0A0", "O0A0", "O0A0",},
+ })
+ .addElement('0', ofBlock(sBlockCasingsTT,12))
+ .addElement('1', ofBlock(sBlockCasingsTT,13))
+ .addElement('2', ofBlock(sBlockCasingsTT,14))
+ .addElement('3', ofBlock(sBlockCasingsTT,10))
+ .addElement('4', ofBlock(sBlockCasingsTT,11))
+ .addElement('5', ofBlock(QuantumGlassBlock.INSTANCE,0))
+ .addElement(' ', ofHatchAdderOptional(GT_MetaTileEntity_EM_bhg::addClassicToMachineList,
+ textureOffset,1,sBlockCasingsTT,0))
+ .addElement('!', ofHatchAdderOptional(GT_MetaTileEntity_EM_bhg::addElementalToMachineList,
+ textureOffset + 4,2,sBlockCasingsTT,4))
+ .build();
+
+ @Override
+ public IStructureDefinition<? extends GT_MetaTileEntity_MultiblockBase_EM> getStructure_EM() {
+ return STRUCTURE_DEFINITION;
+ }
+
private static final String[] description = new String[]{
EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":",
translateToLocal("gt.blockmachines.multimachine.em.blackholegenerator.hint.0"),//1 - Classic Hatches or High Power Casing
@@ -95,46 +144,6 @@ public class GT_MetaTileEntity_EM_bhg extends GT_MetaTileEntity_MultiblockBase_E
};
//endregion
- //region structure dank - glass sphere for the looks
- private static final String[][] shape2 = new String[][]{
- {"\u000B", "M0000000", "L00 00", "L0 0", "L0 !!! 0", "L0 !.! 0", "L0 !!! 0", "L0 0", "L00 00", "M0000000",},
- {"\u0008", "O0A0", "M110A011", "L1110A0111", "K11110A01111", "J1111222221111", "J1112202022111", "I000020020020000", "M2222222", "I000020020020000", "J1112202022111", "J1111222221111", "K11110A01111", "L1110A0111", "M110A011", "O0A0",},
- {"\u0006", "O0A0", "M110A011", "K11110A01111", "J111C2C111", "I111D2D111", "I11B2222222B11", "H11B22E22B11", "H11B2B333B2B11", "G000B2A34443A2B000", "J222A34443A222", "G000B2A34443A2B000", "H11B2B333B2B11", "H11B22E22B11", "I11B2222222B11", "I111D2D111", "J111C2C111", "K11110A01111", "M110A011", "O0A0",},
- {"\u0005", "O0A0", "L1110A0111", "J111C2C111", "I11E2E11", "H11M11", "H1O1", "G11O11", "G1Q1", "G1Q1", "F00Q00", "H22M22", "F00Q00", "G1Q1", "G1Q1", "G11O11", "H1O1", "H11M11", "I11E2E11", "J111C2C111", "L1110A0111", "O0A0",},
- {"\u0004", "O0A0", "K11100000111", "I111D2D111", "H11F5F11", "G11G5G11", "G1Q1", "F11Q11", "F1S1", "F1S1", "F0S0", "E00S00", "F0255M5520", "E00S00", "F0S0", "F1S1", "F1S1", "F11Q11", "G1Q1", "G11G5G11", "H11F5F11", "I111D2D111", "K11100000111", "O0A0",},
- {"\u0003", "O0A0", "J111110A011111", "H111E2E111", "G11D3335333D11", "F11Q11", "F1S1", "E11S11", "E1U1", "E1U1", "E1A3Q3A1", "E1A3Q3A1", "D00A3Q3A00", "F25Q52", "D00A3Q3A00", "E1A3Q3A1", "E1A3Q3A1", "E1U1", "E1U1", "E11S11", "F1S1", "F11Q11", "G11D3335333D11", "H111E2E111", "J111110A011111", "O0A0",},
- {"\u0002", "O0A0", "K11100000111", "H111E2E111", "G11G5G11", "F1S1", "E11S11", "E1U1", "E1U1", "D1W1", "D1W1", "D1W1", "D0W0", "C00W00", "D025S520", "C00W00", "D0W0", "D1W1", "D1W1", "D1W1", "E1U1", "E1U1", "E11S11", "F1S1", "G11G5G11", "H111E2E111", "K11100000111", "O0A0",},
- {"\u0001", "O0A0", "L1110A0111", "I111D2D111", "G11D3335333D11", "F1S1", "E1U1", "E1U1", "D1W1", "D1W1", "D1W1", "C1Y1", "C1A3U3A1", "C1A3U3A1", "B00A3U3A00", "D25U52", "B00A3U3A00", "C1A3U3A1", "C1A3U3A1", "C1Y1", "D1W1", "D1W1", "D1W1", "E1U1", "E1U1", "F1S1", "G11D3335333D11", "I111D2D111", "L1110A0111", "O0A0",},
- {"\u0001", "M110A011", "J111C2C111", "H11F5F11", "F11Q11", "E11S11", "E1U1", "D1W1", "D1W1", "C1Y1", "C1Y1", "C1Y1", "B1[1", "B1[1", "B0[0", "C25W52", "B0[0", "B1[1", "B1[1", "C1Y1", "C1Y1", "C1Y1", "D1W1", "D1W1", "E1U1", "E11S11", "F11Q11", "H11F5F11", "J111C2C111", "M110A011",},
- {E, "O0A0", "K11110A01111", "I11E2E11", "G11G5G11", "F1S1", "E1U1", "D1W1", "D1W1", "C1Y1", "C1Y1", "B1[1", "B1[1", "B1[1", "B1[1", "A00[00", "C25W52", "A00[00", "B1[1", "B1[1", "B1[1", "B1[1", "C1Y1", "C1Y1", "D1W1", "D1W1", "E1U1", "F1S1", "G11G5G11", "I11E2E11", "K11110A01111", "O0A0",},
- {E, "M110A011", "J111C2C111", "H11M11", "G1Q1", "E11S11", "E1U1", "D1W1", "C1Y1", "C1Y1", "B1[1", "B1[1", "B1[1", "A1]1", "A1]1", "A0]0", "B2[2", "A0]0", "A1]1", "A1]1", "B1[1", "B1[1", "B1[1", "C1Y1", "C1Y1", "D1W1", "E1U1", "E11S11", "G1Q1", "H11M11", "J111C2C111", "M110A011",},
- {E, "L1110A0111", "I111D2D111", "H1O1", "F11Q11", "E1U1", "D1W1", "D1W1", "C1Y1", "B1[1", "B1[1", "B1[1", "A1]1", "A1]1", "A1]1", "A0]0", "B2[2", "A0]0", "A1]1", "A1]1", "A1]1", "B1[1", "B1[1", "B1[1", "C1Y1", "D1W1", "D1W1", "E1U1", "F11Q11", "H1O1", "I111D2D111", "L1110A0111",},
- {"O0A0", "K11110A01111", "I11B2222222B11", "G11O11", "F1S1", "E1U1", "D1W1", "C1Y1", "C1Y1", "B1[1", "B1[1", "A1]1", "A1]1", "A12[21", "A12[21", "002[200", "B2[2", "002[200", "A12[21", "A12[21", "A1]1", "A1]1", "B1[1", "B1[1", "C1Y1", "C1Y1", "D1W1", "E1U1", "F1S1", "G11O11", "I11B2222222B11", "K11110A01111", "O0A0",},
- {"O0A0", "J1111222221111", "H11B22E22B11", "G1Q1", "F1S1", "E1A3Q3A1", "D1W1", "C1A3U3A1", "B1[1", "B1[1", "A1]1", "A1]1", "A12[21", "A12[21", "A2]2", "02]20", "A2]2", "02]20", "A2]2", "A12[21", "A12[21", "A1]1", "A1]1", "B1[1", "B1[1", "C1A3U3A1", "D1W1", "E1A3Q3A1", "F1S1", "G1Q1", "H11B22E22B11", "J1111222221111", "O0A0",},
- {"O0A0", "J1112202022111", "H11B2B333B2B11", "G1Q1", "F0S0", "E1A3Q3A1", "D0W0", "C1A3U3A1", "B1[1", "B1[1", "A1]1", "A1]1", "A12[21", "A2]2", "A2]2", "003[300", "A23[32", "003[300", "A2]2", "A2]2", "A12[21", "A1]1", "A1]1", "B1[1", "B1[1", "C1A3U3A1", "D0W0", "E1A3Q3A1", "F0S0", "G1Q1", "H11B2B333B2B11", "J1112202022111", "O0A0",},
- {"L000000000", "I000020020020000", "G000B2A34443A2B000", "F00Q00", "E00S00", "D00A3Q3A00", "C00W00", "B00A3U3A00", "B0[0", "A00[00", "A0]0", "A0]0", "002[200", "02]20", "003[300", "004[400", "024[420", "004[400", "003[300", "02]20", "002[200", "A0]0", "A0]0", "A00[00", "B0[0", "B00A3U3A00", "C00W00", "D00A3Q3A00", "E00S00", "F00Q00", "G000B2A34443A2B000", "I000020020020000", "L000000000",},
- {"O0A0", "M2222222", "J222A34443A222", "H22M22", "F0255M5520", "F25Q52", "D025S520", "D25U52", "C25W52", "C25W52", "B2[2", "B2[2", "B2[2", "A2]2", "A23[32", "024[420", "A24[42", "024[420", "A23[32", "A2]2", "B2[2", "B2[2", "B2[2", "C25W52", "C25W52", "D25U52", "D025S520", "F25Q52", "F0255M5520", "H22M22", "J222A34443A222", "M2222222", "O0A0",},
- {"L000000000", "I000020020020000", "G000B2A34443A2B000", "F00Q00", "E00S00", "D00A3Q3A00", "C00W00", "B00A3U3A00", "B0[0", "A00[00", "A0]0", "A0]0", "002[200", "02]20", "003[300", "004[400", "024[420", "004[400", "003[300", "02]20", "002[200", "A0]0", "A0]0", "A00[00", "B0[0", "B00A3U3A00", "C00W00", "D00A3Q3A00", "E00S00", "F00Q00", "G000B2A34443A2B000", "I000020020020000", "L000000000",},
- {"O0A0", "J1112202022111", "H11B2B333B2B11", "G1Q1", "F0S0", "E1A3Q3A1", "D0W0", "C1A3U3A1", "B1[1", "B1[1", "A1]1", "A1]1", "A12[21", "A2]2", "A2]2", "003[300", "A23[32", "003[300", "A2]2", "A2]2", "A12[21", "A1]1", "A1]1", "B1[1", "B1[1", "C1A3U3A1", "D0W0", "E1A3Q3A1", "F0S0", "G1Q1", "H11B2B333B2B11", "J1112202022111", "O0A0",},
- {"O0A0", "J1111222221111", "H11B22E22B11", "G1Q1", "F1S1", "E1A3Q3A1", "D1W1", "C1A3U3A1", "B1[1", "B1[1", "A1]1", "A1]1", "A12[21", "A12[21", "A2]2", "02]20", "A2]2", "02]20", "A2]2", "A12[21", "A12[21", "A1]1", "A1]1", "B1[1", "B1[1", "C1A3U3A1", "D1W1", "E1A3Q3A1", "F1S1", "G1Q1", "H11B22E22B11", "J1111222221111", "O0A0",},
- {"O0A0", "K11110A01111", "I11B2222222B11", "G11O11", "F1S1", "E1U1", "D1W1", "C1Y1", "C1Y1", "B1[1", "B1[1", "A1]1", "A1]1", "A12[21", "A12[21", "002[200", "B2[2", "002[200", "A12[21", "A12[21", "A1]1", "A1]1", "B1[1", "B1[1", "C1Y1", "C1Y1", "D1W1", "E1U1", "F1S1", "G11O11", "I11B2222222B11", "K11110A01111", "O0A0",},
- {E, "L1110A0111", "I111D2D111", "H1O1", "F11Q11", "E1U1", "D1W1", "D1W1", "C1Y1", "B1[1", "B1[1", "B1[1", "A1]1", "A1]1", "A1]1", "A0]0", "B2[2", "A0]0", "A1]1", "A1]1", "A1]1", "B1[1", "B1[1", "B1[1", "C1Y1", "D1W1", "D1W1", "E1U1", "F11Q11", "H1O1", "I111D2D111", "L1110A0111",},
- {E, "M110A011", "J111C2C111", "H11M11", "G1Q1", "E11S11", "E1U1", "D1W1", "C1Y1", "C1Y1", "B1[1", "B1[1", "B1[1", "A1]1", "A1]1", "A0]0", "B2[2", "A0]0", "A1]1", "A1]1", "B1[1", "B1[1", "B1[1", "C1Y1", "C1Y1", "D1W1", "E1U1", "E11S11", "G1Q1", "H11M11", "J111C2C111", "M110A011",},
- {E, "O0A0", "K11110A01111", "I11E2E11", "G11G5G11", "F1S1", "E1U1", "D1W1", "D1W1", "C1Y1", "C1Y1", "B1[1", "B1[1", "B1[1", "B1[1", "A00[00", "C25W52", "A00[00", "B1[1", "B1[1", "B1[1", "B1[1", "C1Y1", "C1Y1", "D1W1", "D1W1", "E1U1", "F1S1", "G11G5G11", "I11E2E11", "K11110A01111", "O0A0",},
- {"\u0001", "M110A011", "J111C2C111", "H11F5F11", "F11Q11", "E11S11", "E1U1", "D1W1", "D1W1", "C1Y1", "C1Y1", "C1Y1", "B1[1", "B1[1", "B0[0", "C25W52", "B0[0", "B1[1", "B1[1", "C1Y1", "C1Y1", "C1Y1", "D1W1", "D1W1", "E1U1", "E11S11", "F11Q11", "H11F5F11", "J111C2C111", "M110A011",},
- {"\u0001", "O0A0", "L1110A0111", "I111D2D111", "G11D3335333D11", "F1S1", "E1U1", "E1U1", "D1W1", "D1W1", "D1W1", "C1Y1", "C1A3U3A1", "C1A3U3A1", "B00A3U3A00", "D25U52", "B00A3U3A00", "C1A3U3A1", "C1A3U3A1", "C1Y1", "D1W1", "D1W1", "D1W1", "E1U1", "E1U1", "F1S1", "G11D3335333D11", "I111D2D111", "L1110A0111", "O0A0",},
- {"\u0002", "O0A0", "K11100000111", "H111E2E111", "G11G5G11", "F1S1", "E11S11", "E1U1", "E1U1", "D1W1", "D1W1", "D1W1", "D0W0", "C00W00", "D025S520", "C00W00", "D0W0", "D1W1", "D1W1", "D1W1", "E1U1", "E1U1", "E11S11", "F1S1", "G11G5G11", "H111E2E111", "K11100000111", "O0A0",},
- {"\u0003", "O0A0", "J111110A011111", "H111E2E111", "G11D3335333D11", "F11Q11", "F1S1", "E11S11", "E1U1", "E1U1", "E1A3Q3A1", "E1A3Q3A1", "D00A3Q3A00", "F25Q52", "D00A3Q3A00", "E1A3Q3A1", "E1A3Q3A1", "E1U1", "E1U1", "E11S11", "F1S1", "F11Q11", "G11D3335333D11", "H111E2E111", "J111110A011111", "O0A0",},
- {"\u0004", "O0A0", "K11100000111", "I111D2D111", "H11F5F11", "G11G5G11", "G1Q1", "F11Q11", "F1S1", "F1S1", "F0S0", "E00S00", "F0255M5520", "E00S00", "F0S0", "F1S1", "F1S1", "F11Q11", "G1Q1", "G11G5G11", "H11F5F11", "I111D2D111", "K11100000111", "O0A0",},
- {"\u0005", "O0A0", "L1110A0111", "J111C2C111", "I11E2E11", "H11M11", "H1O1", "G11O11", "G1Q1", "G1Q1", "F00Q00", "H22M22", "F00Q00", "G1Q1", "G1Q1", "G11O11", "H1O1", "H11M11", "I11E2E11", "J111C2C111", "L1110A0111", "O0A0",},
- {"\u0006", "O0A0", "M110A011", "K11110A01111", "J111C2C111", "I111D2D111", "I11B2222222B11", "H11B22E22B11", "H11B2B333B2B11", "G000B2A34443A2B000", "J222A34443A222", "G000B2A34443A2B000", "H11B2B333B2B11", "H11B22E22B11", "I11B2222222B11", "I111D2D111", "J111C2C111", "K11110A01111", "M110A011", "O0A0",},
- {"\u0008", "O0A0", "M110A011", "L1110A0111", "K11110A01111", "J1111222221111", "J1112202022111", "I000020020020000", "M2222222", "I000020020020000", "J1112202022111", "J1111222221111", "K11110A01111", "L1110A0111", "M110A011", "O0A0",},
- {"\u000B", "O0A0", "O0A0", "O0A0", "L000000000", "O0A0", "L000000000", "O0A0", "O0A0", "O0A0",},
- };
- private static final Block[] blockType2 = new Block[]{sBlockCasingsTT, QuantumGlassBlock.INSTANCE, sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT};
- private static final byte[] blockMeta2 = new byte[]{12, 0, 13, 14, 10, 11};
- //endregion
-
public GT_MetaTileEntity_EM_bhg(int aID, String aName, String aNameRegional) {
super(aID, aName, aNameRegional);
}
@@ -259,11 +268,11 @@ public class GT_MetaTileEntity_EM_bhg extends GT_MetaTileEntity_MultiblockBase_E
@Override
public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) {
- if (structureCheck_EM(shape2, blockType2, blockMeta2, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 16, 16, 0)) {
+ if (structureCheck_EM("t2", 16, 16, 0)) {
glassDome = true;
return true;
}
- if (structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 16, 16, 0)) {
+ if (structureCheck_EM("t1", 16, 16, 0)) {
glassDome = false;
return true;
}
@@ -297,16 +306,12 @@ public class GT_MetaTileEntity_EM_bhg extends GT_MetaTileEntity_MultiblockBase_E
}
@Override
- public void construct(int stackSize, boolean hintsOnly) {
- if ((stackSize & 1) == 1) {
- StructureBuilderExtreme(shape, blockType, blockMeta, 16, 16, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly);
- } else {
- StructureBuilderExtreme(shape2, blockType2, blockMeta2, 16, 16, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly);
- }
+ public void construct(ItemStack stackSize, boolean hintsOnly) {
+ structureBuild_EM((stackSize.stackSize&1)==1?"t1":"t2", 16, 16, 0, hintsOnly,stackSize);
}
@Override
- public String[] getStructureDescription(int stackSize) {
+ 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_collider.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_collider.java
index d37fcfdc4b..8f4e7969ee 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_collider.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_collider.java
@@ -1,9 +1,9 @@
package com.github.technus.tectech.thing.metaTileEntity.multi;
-import com.github.technus.tectech.util.CommonValues;
import com.github.technus.tectech.TecTech;
import com.github.technus.tectech.compatibility.thaumcraft.elementalMatter.definitions.dComplexAspectDefinition;
import com.github.technus.tectech.compatibility.thaumcraft.elementalMatter.definitions.ePrimalAspectDefinition;
+import com.github.technus.tectech.mechanics.constructable.IConstructable;
import com.github.technus.tectech.mechanics.elementalMatter.core.cElementalInstanceStackMap;
import com.github.technus.tectech.mechanics.elementalMatter.core.cElementalMutableDefinitionStackMap;
import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.cElementalInstanceStack;
@@ -11,20 +11,23 @@ import com.github.technus.tectech.mechanics.elementalMatter.core.templates.cElem
import com.github.technus.tectech.mechanics.elementalMatter.definitions.complex.dAtomDefinition;
import com.github.technus.tectech.mechanics.elementalMatter.definitions.complex.dHadronDefinition;
import com.github.technus.tectech.mechanics.elementalMatter.definitions.primitive.eQuarkDefinition;
+import com.github.technus.tectech.mechanics.structure.IStructureDefinition;
+import com.github.technus.tectech.mechanics.structure.StructureDefinition;
import com.github.technus.tectech.thing.block.QuantumGlassBlock;
import com.github.technus.tectech.thing.casing.TT_Container_Casings;
-import com.github.technus.tectech.mechanics.constructible.IConstructable;
import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_InputElemental;
-import com.github.technus.tectech.thing.metaTileEntity.multi.base.*;
+import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM;
+import com.github.technus.tectech.thing.metaTileEntity.multi.base.INameFunction;
+import com.github.technus.tectech.thing.metaTileEntity.multi.base.IStatusFunction;
+import com.github.technus.tectech.thing.metaTileEntity.multi.base.Parameters;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_RenderedExtendedFacingTexture;
+import com.github.technus.tectech.util.CommonValues;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import net.minecraft.block.Block;
-import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
@@ -33,7 +36,7 @@ import net.minecraftforge.common.util.ForgeDirection;
import java.util.HashMap;
-import static com.github.technus.tectech.util.Util.StructureBuilderExtreme;
+import static com.github.technus.tectech.mechanics.structure.StructureUtility.*;
import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset;
import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage;
import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT;
@@ -295,47 +298,49 @@ public class GT_MetaTileEntity_EM_collider extends GT_MetaTileEntity_MultiblockB
//region structure
//use multi A energy inputs, use less power the longer it runs
- private static final String[][] shape = new String[][]{
- {"I0A0A0", "I00000", "I0A0A0",},
- {"H0000000", "G001111100", "H0000000",},
- {"F22223332222", "F41155555114", "F22223332222",},
- {"E2000000000002", "E4155111115514", "E2000000000002",},
- {"D20000E00002", "D41511E11514", "D20000E00002",},
- {"C2000I0002", "C4151I1514", "C2000I0002",},
- {"B2000K0002", "B4151K1514", "B2000K0002",},
- {"B200M002", "A0151M1510", "B200M002",},
- {"A0200M0020", "A0151M1510", "A0200M0020",},
- {"0020O0200", "0151O1510", "0020O0200",},
- {"A030O030", "0151O1510", "A030O030",},
- {"0030O0300", "0151O1510", "0030O0300",},
- {"A030O030", "0151O1510", "A030O030",},
- {"0020O0200", "0151O1510", "0020O0200",},
- {"A0200M0020", "A0151M1510", "A0200M0020",},
- {"B200M002", "A0151M1510", "B200M002",},
- {"B2000K0002", "B4151K1514", "B2000K0002",},
- {"C2000I0002", "C4151I1514", "C2000I0002",},
- {"D200002 200002", "D415112 . 211514", "D200002 200002",},
- {"E20!!22222!!02", "E4155111115514", "E20!!22222!!02",},
- {"F2222#\"#2222", "F41155555114", "F2222#\"#2222",},
- };
- private static final Block[] blockType = new Block[]{
- sBlockCasingsTT,
- sBlockCasingsTT,
- sBlockCasingsTT,
- QuantumGlassBlock.INSTANCE,
- sBlockCasingsTT,
- sBlockCasingsTT
- };
- private static final byte[] blockMeta1 = new byte[]{4, 7, 4, 0, 4, 8};
- private static final byte[] blockMeta2 = new byte[]{4, 7, 5, 0, 6, 9};
- private final IHatchAdder[] addingMethods = new IHatchAdder[]{
- this::addClassicToMachineList,
- this::addElementalInputToMachineList,
- this::addElementalOutputToMachineList,
- this::addElementalMufflerToMachineList};
- private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 4, textureOffset + 4, textureOffset + 4};
- private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT};
- private static final byte[] blockMetaFallback = new byte[]{0, 4, 4, 4};
+ private static final IStructureDefinition<GT_MetaTileEntity_EM_collider> STRUCTURE_DEFINITION= StructureDefinition
+ .<GT_MetaTileEntity_EM_collider>builder()
+ .addShapeOldApi("main",new String[][]{
+ {"I0A0A0", "I00000", "I0A0A0",},
+ {"H0000000", "G001111100", "H0000000",},
+ {"F22223332222", "F41155555114", "F22223332222",},
+ {"E2000000000002", "E4155111115514", "E2000000000002",},
+ {"D20000E00002", "D41511E11514", "D20000E00002",},
+ {"C2000I0002", "C4151I1514", "C2000I0002",},
+ {"B2000K0002", "B4151K1514", "B2000K0002",},
+ {"B200M002", "A0151M1510", "B200M002",},
+ {"A0200M0020", "A0151M1510", "A0200M0020",},
+ {"0020O0200", "0151O1510", "0020O0200",},
+ {"A030O030", "0151O1510", "A030O030",},
+ {"0030O0300", "0151O1510", "0030O0300",},
+ {"A030O030", "0151O1510", "A030O030",},
+ {"0020O0200", "0151O1510", "0020O0200",},
+ {"A0200M0020", "A0151M1510", "A0200M0020",},
+ {"B200M002", "A0151M1510", "B200M002",},
+ {"B2000K0002", "B4151K1514", "B2000K0002",},
+ {"C2000I0002", "C4151I1514", "C2000I0002",},
+ {"D200002&&&200002", "D415112&.&211514", "D200002&&&200002",},
+ {"E20!!22222!!02", "E4155111115514", "E20!!22222!!02",},
+ {"F2222#$#2222", "F41155555114", "F2222#$#2222",},
+ })
+ .addElement('0', ofBlock(sBlockCasingsTT,4))
+ .addElement('1', ofBlock(sBlockCasingsTT,7))
+ .addElement('2', defer(t->(int)t.eTier,(t,item)->2-(item.stackSize&1),
+ error(),ofBlock(sBlockCasingsTT,4),ofBlock(sBlockCasingsTT,5)))
+ .addElement('3', ofBlock(QuantumGlassBlock.INSTANCE,0))
+ .addElement('4', defer(t->(int)t.eTier,(t,item)->2-(item.stackSize&1),
+ error(),ofBlock(sBlockCasingsTT,4),ofBlock(sBlockCasingsTT,6)))
+ .addElement('5', defer(t->(int)t.eTier,(t,item)->2-(item.stackSize&1),
+ error(),ofBlock(sBlockCasingsTT,8),ofBlock(sBlockCasingsTT,9)))
+ .addElement('&', ofHatchAdderOptional(GT_MetaTileEntity_EM_collider::addClassicToMachineList,
+ textureOffset,1,sBlockCasingsTT,0))
+ .addElement('!', ofHatchAdderOptional(GT_MetaTileEntity_EM_collider::addElementalInputToMachineList,
+ textureOffset + 4,2,sBlockCasingsTT,4))
+ .addElement('$', ofHatchAdderOptional(GT_MetaTileEntity_EM_collider::addElementalOutputToMachineList,
+ textureOffset + 4,3,sBlockCasingsTT,4))
+ .addElement('#', ofHatchAdderOptional(GT_MetaTileEntity_EM_collider::addElementalMufflerToMachineList,
+ textureOffset + 4,4,sBlockCasingsTT,4))
+ .build();
private static final String[] description = new String[]{
EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":",
translateToLocal("gt.blockmachines.multimachine.em.collider.hint.0"),//1 - Classic Hatches or High Power Casing
@@ -344,6 +349,12 @@ public class GT_MetaTileEntity_EM_collider extends GT_MetaTileEntity_MultiblockB
translateToLocal("gt.blockmachines.multimachine.em.collider.hint.3"),//4 - Elemental Overflow Hatches or Molecular Casing
translateToLocal("gt.blockmachines.multimachine.em.collider.hint.4"),//General - Another Controller facing opposite direction
};
+
+ @Override
+ public IStructureDefinition<? extends GT_MetaTileEntity_MultiblockBase_EM> getStructure_EM() {
+ return STRUCTURE_DEFINITION;
+ }
+
//endregion
public GT_MetaTileEntity_EM_collider(int aID, String aName, String aNameRegional) {
@@ -465,20 +476,7 @@ public class GT_MetaTileEntity_EM_collider extends GT_MetaTileEntity_MultiblockB
eTier = 0;
return false;
}
-
- boolean test;
- switch (eTier) {
- case 1:
- test = structureCheck_EM(shape, blockType, blockMeta1, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 11, 1, 18);
- break;
- case 2:
- test = structureCheck_EM(shape, blockType, blockMeta2, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 11, 1, 18);
- break;
- default:
- eTier = 0;
- return false;
- }
- if (test) {
+ if (structureCheck_EM("main",11, 1, 18)) {
return true;
}
eTier = 0;
@@ -665,7 +663,7 @@ public class GT_MetaTileEntity_EM_collider extends GT_MetaTileEntity_MultiblockB
}
@Override
- public void construct(int stackSize, boolean hintsOnly) {
+ public void construct(ItemStack stackSize, boolean hintsOnly) {
IGregTechTileEntity iGregTechTileEntity = getBaseMetaTileEntity();
int xDir = ForgeDirection.getOrientation(iGregTechTileEntity.getBackFacing()).offsetX * 4;
int yDir = ForgeDirection.getOrientation(iGregTechTileEntity.getBackFacing()).offsetY * 4;
@@ -676,20 +674,12 @@ public class GT_MetaTileEntity_EM_collider extends GT_MetaTileEntity_MultiblockB
iGregTechTileEntity.getYCoord() + yDir,
iGregTechTileEntity.getZCoord() + zDir,
TT_Container_Casings.sHintCasingsTT, 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);
- }
- }
- if ((stackSize & 1) == 1) {
- StructureBuilderExtreme(shape, blockType, blockMeta1, 11, 1, 18, iGregTechTileEntity, getExtendedFacing(), hintsOnly);
- } else {
- StructureBuilderExtreme(shape, blockType, blockMeta2, 11, 1, 18, iGregTechTileEntity, getExtendedFacing(), hintsOnly);
}
+ structureBuild_EM("main",11, 1, 18,hintsOnly, stackSize);
}
@Override
- public String[] getStructureDescription(int stackSize) {
+ 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 1afbdf66e0..5d88fdfc50 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java
@@ -1,16 +1,18 @@
package com.github.technus.tectech.thing.metaTileEntity.multi;
-import com.github.technus.tectech.util.CommonValues;
import com.github.technus.tectech.TecTech;
-import com.github.technus.tectech.util.Util;
-import com.github.technus.tectech.util.Vec3Impl;
+import com.github.technus.tectech.mechanics.constructable.IConstructable;
import com.github.technus.tectech.mechanics.dataTransport.QuantumDataPacket;
-import com.github.technus.tectech.mechanics.constructible.IConstructable;
+import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder;
+import com.github.technus.tectech.mechanics.structure.Structure;
import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_InputData;
import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_OutputData;
import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_Rack;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.*;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_RenderedExtendedFacingTexture;
+import com.github.technus.tectech.util.CommonValues;
+import com.github.technus.tectech.util.Util;
+import com.github.technus.tectech.util.Vec3Impl;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gregtech.api.enums.Textures;
@@ -28,12 +30,13 @@ import net.minecraft.util.ResourceLocation;
import java.util.ArrayList;
-import static com.github.technus.tectech.util.CommonValues.V;
-import static com.github.technus.tectech.util.Util.StructureBuilderExtreme;
+import static com.github.technus.tectech.mechanics.structure.Structure.adders;
import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset;
import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage;
import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT;
import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStatus.*;
+import static com.github.technus.tectech.util.CommonValues.MULTI_CHECK_AT;
+import static com.github.technus.tectech.util.CommonValues.V;
import static net.minecraft.util.StatCollector.translateToLocal;
/**
@@ -54,7 +57,9 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB
private static final String[][] slice = new String[][]{{"-01", "A!2", "A!2", "-01",},};
private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT};
private static final byte[] blockMeta = new byte[]{2, 1, 3};
- private final IHatchAdder[] addingMethods = new IHatchAdder[]{this::addToMachineList, this::addRackToMachineList};
+ private static final IHatchAdder<GT_MetaTileEntity_EM_computer>[] addingMethods = adders(
+ GT_MetaTileEntity_EM_computer::addToMachineList,
+ GT_MetaTileEntity_EM_computer::addRackToMachineList);
private static final short[] casingTextures = new short[]{textureOffset + 1, textureOffset + 3};
private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT};
private static final byte[] blockMetaFallback = new byte[]{1, 3};
@@ -157,6 +162,23 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB
}
@Override
+ public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
+ super.onPostTick(aBaseMetaTileEntity, aTick);
+ if(aBaseMetaTileEntity.isServerSide() && mMachine && !aBaseMetaTileEntity.isActive() && aTick % 20 == MULTI_CHECK_AT){
+ double maxTemp = 0;
+ for (GT_MetaTileEntity_Hatch_Rack rack : eRacks) {
+ if (!GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(rack)) {
+ continue;
+ }
+ if (rack.heat > maxTemp) {
+ maxTemp = rack.heat;
+ }
+ }
+ maxCurrentTemp.set(maxTemp);
+ }
+ }
+
+ @Override
public boolean checkRecipe_EM(ItemStack itemStack) {
parametrization.setToDefaults(false, true);
eAvailableData = 0;
@@ -335,22 +357,22 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB
}
@Override
- public void construct(int stackSize, boolean hintsOnly) {
+ public void construct(ItemStack stackSize, boolean hintsOnly) {
IGregTechTileEntity igt = getBaseMetaTileEntity();
- StructureBuilderExtreme(front, blockType, blockMeta, 1, 2, 0, igt, getExtendedFacing(), hintsOnly);
- StructureBuilderExtreme(cap, blockType, blockMeta, 1, 2, -1, igt, getExtendedFacing(), hintsOnly);
+ Structure.builder(front, blockType, blockMeta, 1, 2, 0, igt, getExtendedFacing(), hintsOnly);
+ Structure.builder(cap, blockType, blockMeta, 1, 2, -1, igt, getExtendedFacing(), hintsOnly);
byte offset = -2;
- for (int rackSlices = Math.min(stackSize, 12); rackSlices > 0; rackSlices--) {
- StructureBuilderExtreme(slice, blockType, blockMeta, 1, 2, offset--, igt, getExtendedFacing(), hintsOnly);
+ for (int rackSlices = Math.min(stackSize.stackSize, 12); rackSlices > 0; rackSlices--) {
+ Structure.builder(slice, blockType, blockMeta, 1, 2, offset--, igt, getExtendedFacing(), hintsOnly);
}
- StructureBuilderExtreme(cap, blockType, blockMeta, 1, 2, offset--, igt, getExtendedFacing(), hintsOnly);
- StructureBuilderExtreme(terminator, blockType, blockMeta, 1, 2, offset, igt, getExtendedFacing(), hintsOnly);
+ Structure.builder(cap, blockType, blockMeta, 1, 2, offset--, igt, getExtendedFacing(), hintsOnly);
+ Structure.builder(terminator, blockType, blockMeta, 1, 2, offset, igt, getExtendedFacing(), hintsOnly);
}
@Override
- public String[] getStructureDescription(int stackSize) {
+ 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_crafting.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_crafting.java
index 3083f36721..7d8204c07f 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_crafting.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_crafting.java
@@ -1,11 +1,12 @@
package com.github.technus.tectech.thing.metaTileEntity.multi;
-import com.github.technus.tectech.util.CommonValues;
+import com.github.technus.tectech.mechanics.constructable.IConstructable;
+import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder;
+import com.github.technus.tectech.mechanics.structure.Structure;
import com.github.technus.tectech.thing.block.QuantumGlassBlock;
-import com.github.technus.tectech.mechanics.constructible.IConstructable;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM;
-import com.github.technus.tectech.thing.metaTileEntity.multi.base.IHatchAdder;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_RenderedExtendedFacingTexture;
+import com.github.technus.tectech.util.CommonValues;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gregtech.api.enums.Textures;
@@ -17,7 +18,7 @@ import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
-import static com.github.technus.tectech.util.Util.StructureBuilderExtreme;
+import static com.github.technus.tectech.mechanics.structure.Structure.adders;
import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset;
import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage;
import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT;
@@ -50,7 +51,9 @@ public class GT_MetaTileEntity_EM_crafting extends GT_MetaTileEntity_MultiblockB
};
private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT, QuantumGlassBlock.INSTANCE, sBlockCasingsTT, sBlockCasingsTT};
private static final byte[] blockMeta = new byte[]{4, 10, 5, 0, 6, 9};
- private final IHatchAdder[] addingMethods = new IHatchAdder[]{this::addClassicToMachineList, this::addElementalToMachineList};
+ private static final IHatchAdder<GT_MetaTileEntity_EM_crafting>[] addingMethods = adders(
+ GT_MetaTileEntity_EM_crafting::addClassicToMachineList,
+ GT_MetaTileEntity_EM_crafting::addElementalToMachineList);
private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 4};
private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT};
private static final byte[] blockMetaFallback = new byte[]{0, 4};
@@ -105,12 +108,12 @@ public class GT_MetaTileEntity_EM_crafting extends GT_MetaTileEntity_MultiblockB
}
@Override
- public void construct(int stackSize, boolean hintsOnly) {
- StructureBuilderExtreme(shape, blockType, blockMeta, 2, 2, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly);
+ public void construct(ItemStack stackSize, boolean hintsOnly) {
+ Structure.builder(shape, blockType, blockMeta, 2, 2, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly);
}
@Override
- public String[] getStructureDescription(int stackSize) {
+ 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 57ab6d770d..77647a0e20 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dataBank.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dataBank.java
@@ -1,16 +1,17 @@
package com.github.technus.tectech.thing.metaTileEntity.multi;
-import com.github.technus.tectech.util.CommonValues;
import com.github.technus.tectech.Reference;
+import com.github.technus.tectech.mechanics.constructable.IConstructable;
import com.github.technus.tectech.mechanics.dataTransport.InventoryDataPacket;
-import com.github.technus.tectech.mechanics.constructible.IConstructable;
+import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder;
+import com.github.technus.tectech.mechanics.structure.Structure;
import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_InputDataItems;
import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_OutputDataItems;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_Container_MultiMachineEM;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_GUIContainer_MultiMachineEM;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM;
-import com.github.technus.tectech.thing.metaTileEntity.multi.base.IHatchAdder;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_RenderedExtendedFacingTexture;
+import com.github.technus.tectech.util.CommonValues;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gregtech.api.enums.Textures;
@@ -27,12 +28,12 @@ import net.minecraft.util.ResourceLocation;
import java.util.ArrayList;
-import static com.github.technus.tectech.util.CommonValues.V;
-import static com.github.technus.tectech.util.Util.StructureBuilderExtreme;
+import static com.github.technus.tectech.mechanics.structure.Structure.adders;
import static com.github.technus.tectech.recipe.TT_recipeAdder.nullItem;
import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset;
import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage;
import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT;
+import static com.github.technus.tectech.util.CommonValues.V;
import static net.minecraft.util.StatCollector.translateToLocal;
public class GT_MetaTileEntity_EM_dataBank extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable {
@@ -49,7 +50,9 @@ public class GT_MetaTileEntity_EM_dataBank extends GT_MetaTileEntity_MultiblockB
};
private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT};
private static final byte[] blockMeta = new byte[]{2, 1};
- private final IHatchAdder[] addingMethods = new IHatchAdder[]{this::addClassicToMachineList, this::addDataBankHatchToMachineList};
+ private static final IHatchAdder<GT_MetaTileEntity_EM_dataBank>[] addingMethods = adders(
+ GT_MetaTileEntity_EM_dataBank::addClassicToMachineList,
+ GT_MetaTileEntity_EM_dataBank::addDataBankHatchToMachineList);
private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 1};
private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT};
private static final byte[] blockMetaFallback = new byte[]{0, 1};
@@ -170,12 +173,12 @@ public class GT_MetaTileEntity_EM_dataBank extends GT_MetaTileEntity_MultiblockB
}
@Override
- public void construct(int stackSize, boolean hintsOnly) {
- StructureBuilderExtreme(shape, blockType, blockMeta, 2, 1, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly);
+ public void construct(ItemStack stackSize, boolean hintsOnly) {
+ Structure.builder(shape, blockType, blockMeta, 2, 1, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly);
}
@Override
- public String[] getStructureDescription(int stackSize) {
+ 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 ffea7781ee..d8ddc2c5b5 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,13 +1,18 @@
package com.github.technus.tectech.thing.metaTileEntity.multi;
-import com.github.technus.tectech.util.CommonValues;
+import com.github.technus.tectech.mechanics.constructable.IConstructable;
import com.github.technus.tectech.mechanics.elementalMatter.core.cElementalInstanceStackMap;
import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.cElementalInstanceStack;
-import com.github.technus.tectech.mechanics.constructible.IConstructable;
+import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder;
+import com.github.technus.tectech.mechanics.structure.Structure;
import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_EnergyMulti;
import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_InputElemental;
-import com.github.technus.tectech.thing.metaTileEntity.multi.base.*;
+import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM;
+import com.github.technus.tectech.thing.metaTileEntity.multi.base.INameFunction;
+import com.github.technus.tectech.thing.metaTileEntity.multi.base.IStatusFunction;
+import com.github.technus.tectech.thing.metaTileEntity.multi.base.Parameters;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_RenderedExtendedFacingTexture;
+import com.github.technus.tectech.util.CommonValues;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gregtech.api.enums.Textures;
@@ -26,13 +31,13 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import org.apache.commons.lang3.reflect.FieldUtils;
-import static com.github.technus.tectech.util.CommonValues.VN;
-import static com.github.technus.tectech.util.Util.StructureBuilderExtreme;
+import static com.github.technus.tectech.mechanics.structure.Structure.adders;
import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset;
import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage;
import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT;
import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStatus.STATUS_OK;
import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStatus.STATUS_TOO_LOW;
+import static com.github.technus.tectech.util.CommonValues.VN;
import static net.minecraft.util.StatCollector.translateToLocal;
import static net.minecraft.util.StatCollector.translateToLocalFormatted;
@@ -65,7 +70,9 @@ public class GT_MetaTileEntity_EM_decay extends GT_MetaTileEntity_MultiblockBase
};
private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT};
private static final byte[] blockMeta = new byte[]{4, 5, 8, 6};
- private final IHatchAdder[] addingMethods = new IHatchAdder[]{this::addClassicToMachineList, this::addElementalToMachineList};
+ private static final IHatchAdder<GT_MetaTileEntity_EM_decay>[] addingMethods = adders(
+ GT_MetaTileEntity_EM_decay::addClassicToMachineList,
+ GT_MetaTileEntity_EM_decay::addElementalToMachineList);
private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 4};
private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT};
private static final byte[] blockMetaFallback = new byte[]{0, 4};
@@ -243,12 +250,12 @@ public class GT_MetaTileEntity_EM_decay extends GT_MetaTileEntity_MultiblockBase
}
@Override
- public void construct(int stackSize, boolean hintsOnly) {
- StructureBuilderExtreme(shape, blockType, blockMeta, 2, 2, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly);
+ public void construct(ItemStack stackSize, boolean hintsOnly) {
+ Structure.builder(shape, blockType, blockMeta, 2, 2, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly);
}
@Override
- public String[] getStructureDescription(int stackSize) {
+ 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_dequantizer.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dequantizer.java
index cb13abf358..1ba1389c80 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,16 +1,17 @@
package com.github.technus.tectech.thing.metaTileEntity.multi;
-import com.github.technus.tectech.util.CommonValues;
+import com.github.technus.tectech.mechanics.constructable.IConstructable;
import com.github.technus.tectech.mechanics.elementalMatter.core.cElementalInstanceStackMap;
import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.cElementalInstanceStack;
import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.iHasElementalDefinition;
import com.github.technus.tectech.mechanics.elementalMatter.core.transformations.aOredictDequantizationInfo;
import com.github.technus.tectech.mechanics.elementalMatter.core.transformations.iExchangeInfo;
+import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder;
+import com.github.technus.tectech.mechanics.structure.Structure;
import com.github.technus.tectech.thing.block.QuantumGlassBlock;
-import com.github.technus.tectech.mechanics.constructible.IConstructable;
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.IHatchAdder;
+import com.github.technus.tectech.util.CommonValues;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
@@ -24,13 +25,13 @@ import net.minecraftforge.oredict.OreDictionary;
import java.util.ArrayList;
-import static com.github.technus.tectech.util.CommonValues.V;
-import static com.github.technus.tectech.util.Util.StructureBuilderExtreme;
import static com.github.technus.tectech.mechanics.elementalMatter.core.templates.iElementalDefinition.STABLE_RAW_LIFE_TIME;
import static com.github.technus.tectech.mechanics.elementalMatter.definitions.complex.dAtomDefinition.refMass;
import static com.github.technus.tectech.mechanics.elementalMatter.definitions.complex.dAtomDefinition.refUnstableMass;
+import static com.github.technus.tectech.mechanics.structure.Structure.adders;
import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset;
import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT;
+import static com.github.technus.tectech.util.CommonValues.V;
import static net.minecraft.util.StatCollector.translateToLocal;
/**
@@ -47,10 +48,10 @@ public class GT_MetaTileEntity_EM_dequantizer extends GT_MetaTileEntity_Multiblo
};
private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT, QuantumGlassBlock.INSTANCE};
private static final byte[] blockMeta = new byte[]{0, 4, 0};
- private final IHatchAdder[] addingMethods = new IHatchAdder[]{
- this::addClassicToMachineList,
- this::addElementalInputToMachineList,
- this::addElementalMufflerToMachineList};
+ private static final IHatchAdder<GT_MetaTileEntity_EM_dequantizer>[] addingMethods = adders(
+ GT_MetaTileEntity_EM_dequantizer::addClassicToMachineList,
+ GT_MetaTileEntity_EM_dequantizer::addElementalInputToMachineList,
+ GT_MetaTileEntity_EM_dequantizer::addElementalMufflerToMachineList);
private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 4, textureOffset + 4};
private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT};
private static final byte[] blockMetaFallback = new byte[]{0, 4, 4};
@@ -148,12 +149,12 @@ public class GT_MetaTileEntity_EM_dequantizer extends GT_MetaTileEntity_Multiblo
}
@Override
- public void construct(int stackSize, boolean hintsOnly) {
- StructureBuilderExtreme(shape, blockType, blockMeta, 1, 1, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly);
+ public void construct(ItemStack stackSize, boolean hintsOnly) {
+ Structure.builder(shape, blockType, blockMeta, 1, 1, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly);
}
@Override
- public String[] getStructureDescription(int stackSize) {
+ 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_infuser.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_infuser.java
index 23a36f0edb..152d110c8d 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
@@ -1,14 +1,15 @@
package com.github.technus.tectech.thing.metaTileEntity.multi;
import cofh.api.energy.IEnergyContainerItem;
-import com.github.technus.tectech.util.CommonValues;
import com.github.technus.tectech.Reference;
import com.github.technus.tectech.TecTech;
-import com.github.technus.tectech.mechanics.constructible.IConstructable;
+import com.github.technus.tectech.mechanics.constructable.IConstructable;
+import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder;
+import com.github.technus.tectech.mechanics.structure.Structure;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_Container_MultiMachineEM;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_GUIContainer_MultiMachineEM;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM;
-import com.github.technus.tectech.thing.metaTileEntity.multi.base.IHatchAdder;
+import com.github.technus.tectech.util.CommonValues;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
@@ -22,8 +23,8 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.ResourceLocation;
-import static com.github.technus.tectech.util.Util.StructureBuilderExtreme;
import static com.github.technus.tectech.loader.TecTechConfig.DEBUG_MODE;
+import static com.github.technus.tectech.mechanics.structure.Structure.adders;
import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset;
import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT;
import static gregtech.api.GregTech_API.mEUtoRF;
@@ -41,7 +42,8 @@ public class GT_MetaTileEntity_EM_infuser extends GT_MetaTileEntity_MultiblockBa
};
private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT};
private static final byte[] blockMeta = new byte[]{7, 4};
- private final IHatchAdder[] addingMethods = new IHatchAdder[]{this::addClassicToMachineList};
+ private static final IHatchAdder<GT_MetaTileEntity_EM_infuser>[] addingMethods = adders(
+ GT_MetaTileEntity_EM_infuser::addClassicToMachineList);
private static final short[] casingTextures = new short[]{textureOffset};
private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT};
private static final byte[] blockMetaFallback = new byte[]{0};
@@ -182,12 +184,12 @@ public class GT_MetaTileEntity_EM_infuser extends GT_MetaTileEntity_MultiblockBa
}
@Override
- public void construct(int stackSize, boolean hintsOnly) {
- StructureBuilderExtreme(shape, blockType, blockMeta, 1, 2, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly);
+ public void construct(ItemStack stackSize, boolean hintsOnly) {
+ Structure.builder(shape, blockType, blockMeta, 1, 2, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly);
}
@Override
- public String[] getStructureDescription(int stackSize) {
+ 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 448f0a5563..b63079d2dc 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_junction.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_junction.java
@@ -1,10 +1,15 @@
package com.github.technus.tectech.thing.metaTileEntity.multi;
-import com.github.technus.tectech.util.CommonValues;
-import com.github.technus.tectech.mechanics.constructible.IConstructable;
+import com.github.technus.tectech.mechanics.constructable.IConstructable;
+import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder;
+import com.github.technus.tectech.mechanics.structure.Structure;
import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_InputElemental;
import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_OutputElemental;
-import com.github.technus.tectech.thing.metaTileEntity.multi.base.*;
+import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM;
+import com.github.technus.tectech.thing.metaTileEntity.multi.base.INameFunction;
+import com.github.technus.tectech.thing.metaTileEntity.multi.base.IStatusFunction;
+import com.github.technus.tectech.thing.metaTileEntity.multi.base.Parameters;
+import com.github.technus.tectech.util.CommonValues;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.util.GT_Utility;
@@ -12,11 +17,11 @@ import net.minecraft.block.Block;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
-import static com.github.technus.tectech.util.CommonValues.V;
-import static com.github.technus.tectech.util.Util.StructureBuilderExtreme;
+import static com.github.technus.tectech.mechanics.structure.Structure.adders;
import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset;
import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT;
import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStatus.*;
+import static com.github.technus.tectech.util.CommonValues.V;
import static gregtech.api.enums.GT_Values.E;
import static net.minecraft.util.StatCollector.translateToLocal;
@@ -41,7 +46,9 @@ public class GT_MetaTileEntity_EM_junction extends GT_MetaTileEntity_MultiblockB
};
private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT};
private static final byte[] blockMeta = new byte[]{4, 5};
- private final IHatchAdder[] addingMethods = new IHatchAdder[]{this::addClassicToMachineList, this::addElementalToMachineList};
+ private static final IHatchAdder<GT_MetaTileEntity_EM_junction>[] addingMethods = adders(
+ GT_MetaTileEntity_EM_junction::addClassicToMachineList,
+ GT_MetaTileEntity_EM_junction::addElementalToMachineList);
private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 4};
private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT};
private static final byte[] blockMetaFallback = new byte[]{0, 4};
@@ -169,12 +176,12 @@ public class GT_MetaTileEntity_EM_junction extends GT_MetaTileEntity_MultiblockB
}
@Override
- public void construct(int stackSize, boolean hintsOnly) {
- StructureBuilderExtreme(shape, blockType, blockMeta, 1, 1, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly);
+ public void construct(ItemStack stackSize, boolean hintsOnly) {
+ Structure.builder(shape, blockType, blockMeta, 1, 1, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly);
}
@Override
- public String[] getStructureDescription(int stackSize) {
+ 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 4696164979..a04a960bf1 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
@@ -1,8 +1,8 @@
package com.github.technus.tectech.thing.metaTileEntity.multi;
-import com.github.technus.tectech.util.CommonValues;
import com.github.technus.tectech.Reference;
import com.github.technus.tectech.TecTech;
+import com.github.technus.tectech.mechanics.constructable.IConstructable;
import com.github.technus.tectech.mechanics.elementalMatter.core.cElementalInstanceStackMap;
import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.cElementalInstanceStack;
import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.iHasElementalDefinition;
@@ -10,10 +10,11 @@ import com.github.technus.tectech.mechanics.elementalMatter.core.transformations
import com.github.technus.tectech.mechanics.elementalMatter.core.transformations.aItemQuantizationInfo;
import com.github.technus.tectech.mechanics.elementalMatter.core.transformations.aOredictQuantizationInfo;
import com.github.technus.tectech.mechanics.elementalMatter.core.transformations.bTransformationInfo;
+import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder;
+import com.github.technus.tectech.mechanics.structure.Structure;
import com.github.technus.tectech.thing.block.QuantumGlassBlock;
-import com.github.technus.tectech.mechanics.constructible.IConstructable;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM;
-import com.github.technus.tectech.thing.metaTileEntity.multi.base.IHatchAdder;
+import com.github.technus.tectech.util.CommonValues;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gregtech.api.GregTech_API;
@@ -28,18 +29,18 @@ import net.minecraftforge.oredict.OreDictionary;
import java.util.ArrayList;
-import static com.github.technus.tectech.util.CommonValues.V;
-import static com.github.technus.tectech.util.Util.StructureBuilderExtreme;
-import static com.github.technus.tectech.util.Util.isInputEqual;
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.structure.Structure.adders;
import static com.github.technus.tectech.recipe.TT_recipeAdder.nullFluid;
import static com.github.technus.tectech.recipe.TT_recipeAdder.nullItem;
import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset;
import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT;
+import static com.github.technus.tectech.util.CommonValues.V;
+import static com.github.technus.tectech.util.Util.isInputEqual;
import static net.minecraft.util.StatCollector.translateToLocal;
/**
@@ -56,10 +57,10 @@ public class GT_MetaTileEntity_EM_quantizer extends GT_MetaTileEntity_Multiblock
};
private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT, QuantumGlassBlock.INSTANCE};
private static final byte[] blockMeta = new byte[]{4, 0, 0};
- private final IHatchAdder[] addingMethods = new IHatchAdder[]{
- this::addClassicToMachineList,
- this::addElementalOutputToMachineList,
- this::addElementalMufflerToMachineList};
+ private static final IHatchAdder<GT_MetaTileEntity_EM_quantizer>[] addingMethods = adders(
+ GT_MetaTileEntity_EM_quantizer::addClassicToMachineList,
+ GT_MetaTileEntity_EM_quantizer::addElementalOutputToMachineList,
+ GT_MetaTileEntity_EM_quantizer::addElementalMufflerToMachineList);
private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 4, textureOffset + 4};
private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT};
private static final byte[] blockMetaFallback = new byte[]{0, 4, 4};
@@ -197,12 +198,12 @@ public class GT_MetaTileEntity_EM_quantizer extends GT_MetaTileEntity_Multiblock
}
@Override
- public void construct(int stackSize, boolean hintsOnly) {
- StructureBuilderExtreme(shape, blockType, blockMeta, 1, 1, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly);
+ public void construct(ItemStack stackSize, boolean hintsOnly) {
+ Structure.builder(shape, blockType, blockMeta, 1, 1, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly);
}
@Override
- public String[] getStructureDescription(int stackSize) {
+ 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_research.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java
index e9bb65c19f..889b4cfec3 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java
@@ -1,13 +1,14 @@
package com.github.technus.tectech.thing.metaTileEntity.multi;
-import com.github.technus.tectech.util.CommonValues;
+import com.github.technus.tectech.mechanics.constructable.IConstructable;
+import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder;
+import com.github.technus.tectech.mechanics.structure.Structure;
import com.github.technus.tectech.recipe.TT_recipe;
-import com.github.technus.tectech.mechanics.constructible.IConstructable;
import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_EnergyMulti;
import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_Holder;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM;
-import com.github.technus.tectech.thing.metaTileEntity.multi.base.IHatchAdder;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_RenderedExtendedFacingTexture;
+import com.github.technus.tectech.util.CommonValues;
import cpw.mods.fml.common.registry.GameRegistry;
import gregtech.api.enums.ItemList;
import gregtech.api.enums.Textures;
@@ -35,15 +36,15 @@ import org.apache.commons.lang3.reflect.FieldUtils;
import java.util.ArrayList;
import java.util.LinkedHashMap;
-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.StructureBuilderExtreme;
+import static com.github.technus.tectech.mechanics.structure.Structure.adders;
import static com.github.technus.tectech.recipe.TT_recipe.E_RECIPE_ID;
import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset;
import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage;
import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT;
import static com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_EM_crafting.crafter;
import static com.github.technus.tectech.thing.metaTileEntity.multi.em_machine.GT_MetaTileEntity_EM_machine.machine;
+import static com.github.technus.tectech.util.CommonValues.V;
+import static com.github.technus.tectech.util.CommonValues.VN;
import static gregtech.api.enums.GT_Values.E;
import static net.minecraft.util.StatCollector.translateToLocal;
import static net.minecraft.util.StatCollector.translateToLocalFormatted;
@@ -57,6 +58,7 @@ public class GT_MetaTileEntity_EM_research extends GT_MetaTileEntity_MultiblockB
private GT_Recipe.GT_Recipe_AssemblyLine tRecipe;
private TT_recipe.TT_assLineRecipe aRecipe;
private String machineType;
+ private static final String assembly="Assembly line";
private ItemStack holdItem;
private long computationRemaining, computationRequired;
@@ -77,7 +79,9 @@ public class GT_MetaTileEntity_EM_research extends GT_MetaTileEntity_MultiblockB
};
private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT};
private static final byte[] blockMeta = new byte[]{1, 3, 2};
- private final IHatchAdder[] addingMethods = new IHatchAdder[]{this::addClassicToMachineList, this::addHolderToMachineList};
+ private static final IHatchAdder<GT_MetaTileEntity_EM_research>[] addingMethods = adders(
+ GT_MetaTileEntity_EM_research::addClassicToMachineList,
+ GT_MetaTileEntity_EM_research::addHolderToMachineList);
private static final short[] casingTextures = new short[]{textureOffset + 1, textureOffset + 3};
private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, Blocks.air};
private static final byte[] blockMetaFallback = new byte[]{1, 0};
@@ -236,7 +240,7 @@ public class GT_MetaTileEntity_EM_research extends GT_MetaTileEntity_MultiblockB
mEfficiencyIncrease = 10000;
eRequiredData = (short) (ttRecipe.mSpecialValue >>> 16);
eAmpereFlow = (short) (ttRecipe.mSpecialValue & 0xFFFF);
- mEUt = ttRecipe.mEUt;
+ mEUt = Math.min(ttRecipe.mEUt,-ttRecipe.mEUt);
eHolders.get(0).getBaseMetaTileEntity().setActive(true);
return true;
}
@@ -279,6 +283,7 @@ public class GT_MetaTileEntity_EM_research extends GT_MetaTileEntity_MultiblockB
if (ItemList.Tool_DataStick.isStackEqual(itemStack, false, true)) {
for (GT_Recipe.GT_Recipe_AssemblyLine assRecipe : TT_recipe.GT_Recipe_MapTT.sAssemblylineRecipes) {
if (GT_Utility.areStacksEqual(assRecipe.mResearchItem, holdItem, true)) {
+ machineType = assembly;
tRecipe = assRecipe;
//if found
if (iterateRecipes()) return true;
@@ -466,6 +471,7 @@ public class GT_MetaTileEntity_EM_research extends GT_MetaTileEntity_MultiblockB
for (GT_Recipe.GT_Recipe_AssemblyLine tRecipe : TT_recipe.GT_Recipe_MapTT.sAssemblylineRecipes) {
if (GT_Utility.areStacksEqual(tRecipe.mResearchItem, holdItem, true)) {
this.tRecipe = tRecipe;
+ machineType = assembly;
break;
}
}
@@ -552,12 +558,12 @@ public class GT_MetaTileEntity_EM_research extends GT_MetaTileEntity_MultiblockB
}
@Override
- public void construct(int stackSize, boolean hintsOnly) {
- StructureBuilderExtreme(shape, blockType, blockMeta, 1, 3, 4, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly);
+ public void construct(ItemStack stackSize, boolean hintsOnly) {
+ Structure.builder(shape, blockType, blockMeta, 1, 3, 4, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly);
}
@Override
- public String[] getStructureDescription(int stackSize) {
+ public String[] getStructureDescription(ItemStack stackSize) {
return description;
}
}
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 be869b2ba9..b418ec0fa4 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,19 +1,21 @@
package com.github.technus.tectech.thing.metaTileEntity.multi;
-import com.github.technus.tectech.util.CommonValues;
import com.github.technus.tectech.TecTech;
+import com.github.technus.tectech.mechanics.constructable.IConstructable;
import com.github.technus.tectech.mechanics.elementalMatter.core.cElementalInstanceStackMap;
import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.cElementalDefinitionStack;
import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.cElementalInstanceStack;
import com.github.technus.tectech.mechanics.elementalMatter.core.tElementalException;
+import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder;
+import com.github.technus.tectech.mechanics.structure.Structure;
import com.github.technus.tectech.recipe.TT_recipe;
import com.github.technus.tectech.thing.CustomItemList;
import com.github.technus.tectech.thing.block.QuantumGlassBlock;
import com.github.technus.tectech.thing.block.QuantumStuffBlock;
import com.github.technus.tectech.thing.item.ElementalDefinitionScanStorage_EM;
-import com.github.technus.tectech.mechanics.constructible.IConstructable;
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 gregtech.api.enums.ItemList;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
@@ -32,17 +34,17 @@ import net.minecraft.util.EnumChatFormatting;
import net.minecraftforge.common.util.ForgeDirection;
import org.apache.commons.lang3.reflect.FieldUtils;
-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.StructureBuilderExtreme;
-import static com.github.technus.tectech.util.Util.areBitsSet;
import static com.github.technus.tectech.loader.TecTechConfig.DEBUG_MODE;
import static com.github.technus.tectech.mechanics.elementalMatter.definitions.primitive.cPrimitiveDefinition.nbtE__;
+import static com.github.technus.tectech.mechanics.structure.Structure.adders;
import static com.github.technus.tectech.recipe.TT_recipe.E_RECIPE_ID;
import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset;
import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT;
import static com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_EM_crafting.crafter;
import static com.github.technus.tectech.thing.metaTileEntity.multi.em_machine.GT_MetaTileEntity_EM_machine.machine;
+import static com.github.technus.tectech.util.CommonValues.V;
+import static com.github.technus.tectech.util.CommonValues.VN;
+import static com.github.technus.tectech.util.Util.areBitsSet;
import static net.minecraft.util.StatCollector.translateToLocal;
import static net.minecraft.util.StatCollector.translateToLocalFormatted;
@@ -79,11 +81,11 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa
};
private static final Block[] blockType = new Block[]{sBlockCasingsTT, QuantumGlassBlock.INSTANCE, sBlockCasingsTT};
private static final byte[] blockMeta = new byte[]{4, 0, 0};
- private final IHatchAdder[] addingMethods = new IHatchAdder[]{
- this::addClassicToMachineList,
- this::addElementalInputToMachineList,
- this::addElementalOutputToMachineList,
- this::addElementalMufflerToMachineList};
+ private static final IHatchAdder<GT_MetaTileEntity_EM_scanner>[] addingMethods = adders(
+ GT_MetaTileEntity_EM_scanner::addClassicToMachineList,
+ GT_MetaTileEntity_EM_scanner::addElementalInputToMachineList,
+ GT_MetaTileEntity_EM_scanner::addElementalOutputToMachineList,
+ GT_MetaTileEntity_EM_scanner::addElementalMufflerToMachineList);
private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 4, textureOffset + 4, textureOffset + 4};
private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT};
private static final byte[] blockMetaFallback = new byte[]{0, 4, 4, 4};
@@ -513,12 +515,12 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa
}
@Override
- public void construct(int stackSize, boolean hintsOnly) {
- StructureBuilderExtreme(shape, blockType, blockMeta, 2, 2, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly);
+ public void construct(ItemStack stackSize, boolean hintsOnly) {
+ Structure.builder(shape, blockType, blockMeta, 2, 2, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly);
}
@Override
- public String[] getStructureDescription(int stackSize) {
+ 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_stabilizer.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_stabilizer.java
index 9c88c4ecf3..dcd85af99d 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_stabilizer.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_stabilizer.java
@@ -1,17 +1,18 @@
package com.github.technus.tectech.thing.metaTileEntity.multi;
-import com.github.technus.tectech.util.CommonValues;
+import com.github.technus.tectech.mechanics.constructable.IConstructable;
+import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder;
+import com.github.technus.tectech.mechanics.structure.Structure;
import com.github.technus.tectech.thing.block.QuantumGlassBlock;
-import com.github.technus.tectech.mechanics.constructible.IConstructable;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM;
-import com.github.technus.tectech.thing.metaTileEntity.multi.base.IHatchAdder;
+import com.github.technus.tectech.util.CommonValues;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import net.minecraft.block.Block;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
-import static com.github.technus.tectech.util.Util.StructureBuilderExtreme;
+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 net.minecraft.util.StatCollector.translateToLocal;
@@ -30,7 +31,9 @@ public class GT_MetaTileEntity_EM_stabilizer extends GT_MetaTileEntity_Multibloc
};
private static final Block[] blockType = new Block[]{sBlockCasingsTT, QuantumGlassBlock.INSTANCE, sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT};
private static final byte[] blockMeta = new byte[]{4, 0, 5, 6, 9};
- private final IHatchAdder[] addingMethods = new IHatchAdder[]{this::addClassicToMachineList, this::addElementalToMachineList};
+ private static final IHatchAdder<GT_MetaTileEntity_EM_stabilizer>[] addingMethods = adders(
+ GT_MetaTileEntity_EM_stabilizer::addClassicToMachineList,
+ GT_MetaTileEntity_EM_stabilizer::addElementalToMachineList);
private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 4};
private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT};
private static final byte[] blockMetaFallback = new byte[]{0, 4};
@@ -69,12 +72,12 @@ public class GT_MetaTileEntity_EM_stabilizer extends GT_MetaTileEntity_Multibloc
}
@Override
- public void construct(int stackSize, boolean hintsOnly) {
- StructureBuilderExtreme(shape, blockType, blockMeta, 2, 2, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly);
+ public void construct(ItemStack stackSize, boolean hintsOnly) {
+ Structure.builder(shape, blockType, blockMeta, 2, 2, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly);
}
@Override
- public String[] getStructureDescription(int stackSize) {
+ 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 47949ea36e..5ade4ec965 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java
@@ -1,13 +1,18 @@
package com.github.technus.tectech.thing.metaTileEntity.multi;
-import com.github.technus.tectech.util.CommonValues;
import com.github.technus.tectech.Reference;
+import com.github.technus.tectech.mechanics.constructable.IConstructable;
import com.github.technus.tectech.mechanics.dataTransport.QuantumDataPacket;
-import com.github.technus.tectech.mechanics.constructible.IConstructable;
+import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder;
+import com.github.technus.tectech.mechanics.structure.Structure;
import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_InputData;
import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_OutputData;
-import com.github.technus.tectech.thing.metaTileEntity.multi.base.*;
+import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM;
+import com.github.technus.tectech.thing.metaTileEntity.multi.base.INameFunction;
+import com.github.technus.tectech.thing.metaTileEntity.multi.base.IStatusFunction;
+import com.github.technus.tectech.thing.metaTileEntity.multi.base.Parameters;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_RenderedExtendedFacingTexture;
+import com.github.technus.tectech.util.CommonValues;
import com.github.technus.tectech.util.Vec3Impl;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@@ -20,12 +25,12 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.ResourceLocation;
-import static com.github.technus.tectech.util.CommonValues.V;
-import static com.github.technus.tectech.util.Util.StructureBuilderExtreme;
+import static com.github.technus.tectech.mechanics.structure.Structure.adders;
import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset;
import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage;
import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT;
import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStatus.*;
+import static com.github.technus.tectech.util.CommonValues.V;
import static net.minecraft.util.StatCollector.translateToLocal;
/**
@@ -40,7 +45,8 @@ public class GT_MetaTileEntity_EM_switch extends GT_MetaTileEntity_MultiblockBas
};
private static final Block[] blockType = new Block[]{sBlockCasingsTT};
private static final byte[] blockMeta = new byte[]{3};
- private final IHatchAdder[] addingMethods = new IHatchAdder[]{this::addClassicToMachineList};
+ private static final IHatchAdder<GT_MetaTileEntity_EM_switch>[] addingMethods = adders(
+ GT_MetaTileEntity_EM_switch::addClassicToMachineList);
private static final short[] casingTextures = new short[]{textureOffset + 1};
private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT};
private static final byte[] blockMetaFallback = new byte[]{1};
@@ -216,12 +222,12 @@ public class GT_MetaTileEntity_EM_switch extends GT_MetaTileEntity_MultiblockBas
}
@Override
- public void construct(int stackSize, boolean hintsOnly) {
- StructureBuilderExtreme(shape, blockType, blockMeta, 1, 1, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly);
+ public void construct(ItemStack stackSize, boolean hintsOnly) {
+ Structure.builder(shape, blockType, blockMeta, 1, 1, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly);
}
@Override
- public String[] getStructureDescription(int stackSize) {
+ 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 81fd5eb6ad..cdac772541 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_transformer.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_transformer.java
@@ -1,29 +1,30 @@
package com.github.technus.tectech.thing.metaTileEntity.multi;
-import com.github.technus.tectech.util.CommonValues;
import com.github.technus.tectech.Reference;
-import com.github.technus.tectech.mechanics.constructible.IConstructable;
+import com.github.technus.tectech.mechanics.constructable.IConstructable;
+import com.github.technus.tectech.mechanics.structure.IStructureDefinition;
+import com.github.technus.tectech.mechanics.structure.StructureDefinition;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_Container_MultiMachineEM;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_GUIContainer_MultiMachineEM;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM;
-import com.github.technus.tectech.thing.metaTileEntity.multi.base.IHatchAdder;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_RenderedExtendedFacingTexture;
+import com.github.technus.tectech.util.CommonValues;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import net.minecraft.block.Block;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.ResourceLocation;
-import static com.github.technus.tectech.util.Util.StructureBuilderExtreme;
+import static com.github.technus.tectech.mechanics.structure.StructureUtility.*;
import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset;
import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage;
import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT;
+import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sHintCasingsTT;
import static gregtech.api.GregTech_API.sBlockCasings1;
import static net.minecraft.util.StatCollector.translateToLocal;
@@ -32,21 +33,29 @@ import static net.minecraft.util.StatCollector.translateToLocal;
*/
public class GT_MetaTileEntity_EM_transformer extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable {
//region structure
- private static final String[][] shape = new String[][]{
- {" ", " . ", " ",},
- {" ", " 0 ", " ",},
- {" ", " ", " ",},
- };
- private static final Block[] blockType = new Block[]{sBlockCasings1};
- private static final byte[] blockMeta = new byte[]{15};
- private final IHatchAdder[] addingMethods = new IHatchAdder[]{this::addEnergyIOToMachineList};
- private static final short[] casingTextures = new short[]{textureOffset};
- private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT};
- private static final byte[] blockMetaFallback = new byte[]{0};
private static final String[] description = new String[]{
EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":",
translateToLocal("gt.blockmachines.multimachine.em.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()
+ .addShape("main",new String[][]{
+ {"111", "1~1", "111",},
+ {"111", "101", "111",},
+ {"111", "111", "111",},
+ })
+ .addElement('0', ofBlock(sBlockCasings1,15))
+ .addElement('1', ofChain(
+ ofHatchAdder(GT_MetaTileEntity_EM_transformer::addEnergyIOToMachineList,textureOffset,sHintCasingsTT,0),
+ onElementPass(t->t.casingCount++,ofBlock(sBlockCasingsTT,0))
+ ))
+ .build();
+ private int casingCount=0;
+
+ @Override
+ public IStructureDefinition<GT_MetaTileEntity_EM_transformer> getStructure_EM() {
+ return STRUCTURE_DEFINITION;
+ }
//endregion
public GT_MetaTileEntity_EM_transformer(int aID, String aName, String aNameRegional) {
@@ -78,7 +87,8 @@ public class GT_MetaTileEntity_EM_transformer extends GT_MetaTileEntity_Multiblo
@Override
public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) {
- return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 1, 0);
+ casingCount=0;
+ return structureCheck_EM("main", 1, 1, 0) && casingCount>=5;
}
@Override
@@ -149,12 +159,12 @@ public class GT_MetaTileEntity_EM_transformer extends GT_MetaTileEntity_Multiblo
}
@Override
- public void construct(int stackSize, boolean hintsOnly) {
- StructureBuilderExtreme(shape, blockType, blockMeta, 1, 1, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly);
+ public void construct(ItemStack stackSize, boolean hintsOnly) {
+ structureBuild_EM("main", 1, 1, 0, hintsOnly, stackSize);
}
@Override
- public String[] getStructureDescription(int stackSize) {
+ 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 1f9d88e4fd..fa51447e9f 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_wormhole.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_wormhole.java
@@ -1,11 +1,12 @@
package com.github.technus.tectech.thing.metaTileEntity.multi;
-import com.github.technus.tectech.util.CommonValues;
+import com.github.technus.tectech.mechanics.constructable.IConstructable;
+import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder;
+import com.github.technus.tectech.mechanics.structure.Structure;
import com.github.technus.tectech.thing.block.QuantumGlassBlock;
-import com.github.technus.tectech.mechanics.constructible.IConstructable;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM;
-import com.github.technus.tectech.thing.metaTileEntity.multi.base.IHatchAdder;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_RenderedExtendedFacingTexture;
+import com.github.technus.tectech.util.CommonValues;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gregtech.api.enums.Textures;
@@ -17,7 +18,7 @@ import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
-import static com.github.technus.tectech.util.Util.StructureBuilderExtreme;
+import static com.github.technus.tectech.mechanics.structure.Structure.adders;
import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset;
import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage;
import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT;
@@ -49,7 +50,9 @@ public class GT_MetaTileEntity_EM_wormhole extends GT_MetaTileEntity_MultiblockB
};
private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT, QuantumGlassBlock.INSTANCE, sBlockCasingsTT, sBlockCasingsTT};
private static final byte[] blockMeta = new byte[]{12, 10, 0, 5, 11};
- private final IHatchAdder[] addingMethods = new IHatchAdder[]{this::addClassicToMachineList, this::addElementalToMachineList};
+ private static final IHatchAdder<GT_MetaTileEntity_EM_wormhole>[] addingMethods = adders(
+ GT_MetaTileEntity_EM_wormhole::addClassicToMachineList,
+ GT_MetaTileEntity_EM_wormhole::addElementalToMachineList);
private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 4};
private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT};
private static final byte[] blockMetaFallback = new byte[]{0, 4};
@@ -104,12 +107,12 @@ public class GT_MetaTileEntity_EM_wormhole extends GT_MetaTileEntity_MultiblockB
}
@Override
- public void construct(int stackSize, boolean hintsOnly) {
- StructureBuilderExtreme(shape, blockType, blockMeta, 4, 4, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly);
+ public void construct(ItemStack stackSize, boolean hintsOnly) {
+ Structure.builder(shape, blockType, blockMeta, 4, 4, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly);
}
@Override
- public String[] getStructureDescription(int stackSize) {
+ 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 497efd6f71..543c09b72a 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_microwave.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_microwave.java
@@ -1,10 +1,12 @@
package com.github.technus.tectech.thing.metaTileEntity.multi;
-import com.github.technus.tectech.util.CommonValues;
import com.github.technus.tectech.Reference;
-import com.github.technus.tectech.mechanics.constructible.IConstructable;
+import com.github.technus.tectech.mechanics.constructable.IConstructable;
+import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder;
+import com.github.technus.tectech.mechanics.structure.Structure;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.*;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_RenderedExtendedFacingTexture;
+import com.github.technus.tectech.util.CommonValues;
import com.github.technus.tectech.util.Vec3Impl;
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
@@ -24,8 +26,8 @@ import net.minecraft.util.EnumChatFormatting;
import java.util.ArrayList;
import java.util.HashSet;
-import static com.github.technus.tectech.util.Util.StructureBuilderExtreme;
import static com.github.technus.tectech.loader.MainLoader.microwaving;
+import static com.github.technus.tectech.mechanics.structure.Structure.adders;
import static com.github.technus.tectech.recipe.TT_recipeAdder.nullItem;
import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStatus.*;
import static gregtech.api.GregTech_API.sBlockCasings4;
@@ -52,7 +54,8 @@ public class GT_MetaTileEntity_TM_microwave extends GT_MetaTileEntity_Multiblock
private static final Block[] blockType = new Block[]{sBlockCasings4};
private static final byte[] blockMeta = new byte[]{1};
- private final IHatchAdder[] addingMethods = new IHatchAdder[]{this::addClassicToMachineList};
+ private static final IHatchAdder<GT_MetaTileEntity_TM_microwave>[] addingMethods = adders(
+ GT_MetaTileEntity_TM_microwave::addClassicToMachineList);
private static final short[] casingTextures = new short[]{49};
private static final Block[] blockTypeFallback = new Block[]{sBlockCasings4};
private static final byte[] blockMetaFallback = new byte[]{1};
@@ -245,12 +248,12 @@ public class GT_MetaTileEntity_TM_microwave extends GT_MetaTileEntity_Multiblock
}
@Override
- public void construct(int stackSize, boolean hintsOnly) {
- StructureBuilderExtreme(shape, blockType, blockMeta, 2, 2, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly);
+ public void construct(ItemStack stackSize, boolean hintsOnly) {
+ Structure.builder(shape, blockType, blockMeta, 2, 2, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly);
}
@Override
- public String[] getStructureDescription(int stackSize) {
+ 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 bf18a545ef..189eae8205 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_proccessingStack.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_proccessingStack.java
@@ -1,12 +1,12 @@
package com.github.technus.tectech.thing.metaTileEntity.multi;
-import com.github.technus.tectech.util.CommonValues;
-import com.github.technus.tectech.mechanics.constructible.IConstructable;
+import com.github.technus.tectech.mechanics.constructable.IConstructable;
+import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_Container_MultiMachineEM;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_GUIContainer_MultiMachineEM;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM;
-import com.github.technus.tectech.thing.metaTileEntity.multi.base.IHatchAdder;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_RenderedExtendedFacingTexture;
+import com.github.technus.tectech.util.CommonValues;
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
@@ -17,6 +17,7 @@ import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
+import static com.github.technus.tectech.mechanics.structure.Structure.adders;
import static gregtech.api.GregTech_API.sBlockCasings4;
import static net.minecraft.util.StatCollector.translateToLocal;
@@ -45,7 +46,8 @@ public class GT_MetaTileEntity_TM_proccessingStack extends GT_MetaTileEntity_Mul
private static final Block[] blockType = new Block[]{sBlockCasings4};
private static final byte[] blockMeta = new byte[]{1};
- private final IHatchAdder[] addingMethods = new IHatchAdder[]{this::addClassicToMachineList};
+ private static final IHatchAdder<GT_MetaTileEntity_TM_proccessingStack>[] addingMethods = adders(
+ GT_MetaTileEntity_TM_proccessingStack::addClassicToMachineList);
private static final short[] casingTextures = new short[]{49};
private static final Block[] blockTypeFallback = new Block[]{sBlockCasings4};
private static final byte[] blockMetaFallback = new byte[]{1};
@@ -121,12 +123,12 @@ public class GT_MetaTileEntity_TM_proccessingStack extends GT_MetaTileEntity_Mul
}
@Override
- public void construct(int stackSize, boolean hintsOnly) {
+ public void construct(ItemStack stackSize, boolean hintsOnly) {
//StructureBuilderExtreme(shape, blockType, blockMeta, 2, 2, 0, getBaseMetaTileEntity(), this, hintsOnly);
}
@Override
- public String[] getStructureDescription(int stackSize) {
+ public String[] getStructureDescription(ItemStack stackSize) {
return description;
}
} \ No newline at end of file
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java
index 85ccc5d881..89093bdba7 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
@@ -1,20 +1,25 @@
package com.github.technus.tectech.thing.metaTileEntity.multi;
-import com.github.technus.tectech.util.CommonValues;
import com.github.technus.tectech.TecTech;
import com.github.technus.tectech.loader.NetworkDispatcher;
-import com.github.technus.tectech.mechanics.data.RendererMessage;
-import com.github.technus.tectech.mechanics.data.ThaumSpark;
+import com.github.technus.tectech.mechanics.constructable.IConstructable;
+import com.github.technus.tectech.mechanics.spark.RendererMessage;
+import com.github.technus.tectech.mechanics.spark.ThaumSpark;
+import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder;
+import com.github.technus.tectech.mechanics.structure.Structure;
import com.github.technus.tectech.thing.cover.GT_Cover_TM_TeslaCoil;
import com.github.technus.tectech.thing.cover.GT_Cover_TM_TeslaCoil_Ultimate;
-import com.github.technus.tectech.mechanics.constructible.IConstructable;
import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_Capacitor;
import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_DynamoMulti;
import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_EnergyMulti;
import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_Param;
-import com.github.technus.tectech.thing.metaTileEntity.multi.base.*;
+import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM;
+import com.github.technus.tectech.thing.metaTileEntity.multi.base.INameFunction;
+import com.github.technus.tectech.thing.metaTileEntity.multi.base.IStatusFunction;
+import com.github.technus.tectech.thing.metaTileEntity.multi.base.Parameters;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_RenderedExtendedFacingTexture;
import com.github.technus.tectech.thing.metaTileEntity.single.GT_MetaTileEntity_TeslaCoil;
+import com.github.technus.tectech.util.CommonValues;
import com.github.technus.tectech.util.Vec3Impl;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@@ -29,13 +34,18 @@ import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.EnumChatFormatting;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
-import static com.github.technus.tectech.util.CommonValues.V;
-import static com.github.technus.tectech.util.Util.*;
+import static com.github.technus.tectech.mechanics.structure.Structure.adders;
import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage;
import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsBA0;
import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStatus.*;
+import static com.github.technus.tectech.util.CommonValues.V;
+import static com.github.technus.tectech.util.Util.entriesSortedByValues;
+import static com.github.technus.tectech.util.Util.map;
import static gregtech.api.enums.GT_Values.E;
import static java.lang.Math.max;
import static java.lang.Math.min;
@@ -95,7 +105,9 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock
private static final byte[] blockMetaT4 = new byte[]{7, 4, 6, 8};
private static final byte[] blockMetaT5 = new byte[]{7, 5, 6, 8};
private static final byte[][] blockMetas = new byte[][]{blockMetaT0, blockMetaT1, blockMetaT2, blockMetaT3, blockMetaT4, blockMetaT5};
- private final IHatchAdder[] addingMethods = new IHatchAdder[]{this::addCapacitorToMachineList, this::addFrameToMachineList};
+ private static final IHatchAdder<GT_MetaTileEntity_TM_teslaCoil>[] addingMethods = adders(
+ GT_MetaTileEntity_TM_teslaCoil::addCapacitorToMachineList,
+ GT_MetaTileEntity_TM_teslaCoil::addFrameToMachineList);
private static final short[] casingTextures = new short[]{(texturePage << 7) + 16 + 6, 0};
private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsBA0, null};
private static final byte[] blockMetaFallback = new byte[]{6, 0};
@@ -821,12 +833,12 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock
}
@Override
- public void construct(int stackSize, boolean hintsOnly) {
- StructureBuilderExtreme(shape, blockType, blockMetas[(stackSize - 1) % 6], 3, 16, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly);
+ public void construct(ItemStack stackSize, boolean hintsOnly) {
+ Structure.builder(shape, blockType, blockMetas[(stackSize.stackSize - 1) % 6], 3, 16, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly);
}
@Override
- public String[] getStructureDescription(int stackSize) {
+ 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/base/GT_MetaTileEntity_MultiblockBase_EM.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java
index 52bdd3574f..28c90b58d0 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
@@ -2,19 +2,25 @@ package com.github.technus.tectech.thing.metaTileEntity.multi.base;
import com.github.technus.tectech.Reference;
import com.github.technus.tectech.TecTech;
-import com.github.technus.tectech.mechanics.alignment.*;
+import com.github.technus.tectech.loader.NetworkDispatcher;
+import com.github.technus.tectech.mechanics.alignment.AlignmentLimits;
+import com.github.technus.tectech.mechanics.alignment.AlignmentMessage;
+import com.github.technus.tectech.mechanics.alignment.IAlignment;
+import com.github.technus.tectech.mechanics.alignment.IAlignmentLimits;
import com.github.technus.tectech.mechanics.alignment.enumerable.ExtendedFacing;
import com.github.technus.tectech.mechanics.alignment.enumerable.Flip;
import com.github.technus.tectech.mechanics.alignment.enumerable.Rotation;
-import com.github.technus.tectech.util.Util;
-import com.github.technus.tectech.util.Vec3Impl;
-import com.github.technus.tectech.loader.NetworkDispatcher;
import com.github.technus.tectech.mechanics.elementalMatter.core.cElementalInstanceStackMap;
import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.cElementalDefinitionStack;
import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.cElementalInstanceStack;
import com.github.technus.tectech.mechanics.elementalMatter.core.tElementalException;
+import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder;
+import com.github.technus.tectech.mechanics.structure.IStructureDefinition;
+import com.github.technus.tectech.mechanics.structure.Structure;
import com.github.technus.tectech.thing.metaTileEntity.hatch.*;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_RenderedExtendedFacingTexture;
+import com.github.technus.tectech.util.Util;
+import com.github.technus.tectech.util.Vec3Impl;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gregtech.api.enums.Textures;
@@ -40,11 +46,10 @@ import net.minecraftforge.fluids.FluidStack;
import java.util.ArrayList;
-import static com.github.technus.tectech.util.CommonValues.*;
-import static com.github.technus.tectech.util.Util.StructureCheckerExtreme;
-import static com.github.technus.tectech.util.Util.getTier;
import static com.github.technus.tectech.loader.TecTechConfig.DEBUG_MODE;
import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage;
+import static com.github.technus.tectech.util.CommonValues.*;
+import static com.github.technus.tectech.util.Util.getTier;
/**
* Created by danie_000 on 27.10.2016.
@@ -82,6 +87,8 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt
protected ArrayList<GT_MetaTileEntity_Hatch_InputData> eInputData = new ArrayList<>();
protected ArrayList<GT_MetaTileEntity_Hatch_OutputData> eOutputData = new ArrayList<>();
+ //endregion
+
//region parameters
public final Parameters parametrization;
//endregion
@@ -183,8 +190,7 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt
@Override
public boolean isFacingValid(byte aFacing) {
- return getAlignmentLimits()
- .isNewExtendedFacingValid(getExtendedFacing().with(ForgeDirection.getOrientation(aFacing)));
+ return canSetToDirectionAny(ForgeDirection.getOrientation(aFacing));
}
@Override
@@ -192,17 +198,46 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt
toolSetDirection(ForgeDirection.getOrientation(getBaseMetaTileEntity().getFrontFacing()));
}
- public final boolean structureCheck_EM(
+ /**
+ * Gets structure
+ * @return STATIC INSTANCE OF STRUCTURE
+ */
+ public IStructureDefinition<? extends GT_MetaTileEntity_MultiblockBase_EM> getStructure_EM(){
+ throw new NoSuchMethodError("Implement it as STATIC INSTANCE");
+ }
+
+ @SuppressWarnings("unchecked")
+ private IStructureDefinition<GT_MetaTileEntity_MultiblockBase_EM> getStructure_EM_Internal(){
+ return (IStructureDefinition<GT_MetaTileEntity_MultiblockBase_EM>)getStructure_EM();
+ }
+
+ public final boolean structureCheck_EM(String piece,int horizontalOffset, int verticalOffset, int depthOffset) {
+ IGregTechTileEntity baseMetaTileEntity = getBaseMetaTileEntity();
+ return getStructure_EM_Internal().check(this,piece, baseMetaTileEntity.getWorld(),getExtendedFacing(),
+ baseMetaTileEntity.getXCoord(),baseMetaTileEntity.getYCoord(),baseMetaTileEntity.getZCoord(),
+ horizontalOffset,verticalOffset,depthOffset,!mMachine);
+ }
+
+ public final boolean structureBuild_EM(String piece,int horizontalOffset, int verticalOffset, int depthOffset,boolean hintsOnly,ItemStack trigger) {
+ IGregTechTileEntity baseMetaTileEntity = getBaseMetaTileEntity();
+ return getStructure_EM_Internal().buildOrHints(this, trigger, piece, baseMetaTileEntity.getWorld(),
+ getExtendedFacing(), baseMetaTileEntity.getXCoord(), baseMetaTileEntity.getYCoord(),
+ baseMetaTileEntity.getZCoord(), horizontalOffset, verticalOffset, depthOffset, hintsOnly);
+ }
+
+ @Deprecated
+ @SuppressWarnings("unchecked")
+ public final <T extends GT_MetaTileEntity_MultiblockBase_EM> boolean structureCheck_EM(
String[][] structure,//0-9 casing, +- air no air, a-z ignore
Block[] blockType,//use numbers 0-9 for casing types
byte[] blockMeta,//use numbers 0-9 for casing types
- IHatchAdder[] addingMethods,
+ IHatchAdder<T>[] addingMethods,
short[] casingTextures,
Block[] blockTypeFallback,//use numbers 0-9 for casing types
byte[] blockMetaFallback,//use numbers 0-9 for casing types
int horizontalOffset, int verticalOffset, int depthOffset) {
- return StructureCheckerExtreme(structure, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback,
- horizontalOffset, verticalOffset, depthOffset, getBaseMetaTileEntity(), getExtendedFacing(), !mMachine);
+ return Structure.checker(structure, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback,
+ horizontalOffset, verticalOffset, depthOffset, (T)this, getExtendedFacing(), !mMachine);
}
//endregion
@@ -1107,12 +1142,12 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt
}
}
- for (GT_MetaTileEntity_Hatch_DataConnector hatch_data : eOutputData) {
+ for (GT_MetaTileEntity_Hatch_DataConnector<?> hatch_data : eOutputData) {
if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(hatch_data)) {
hatch_data.id = -1;
}
}
- for (GT_MetaTileEntity_Hatch_DataConnector hatch_data : eInputData) {
+ for (GT_MetaTileEntity_Hatch_DataConnector<?> hatch_data : eInputData) {
if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(hatch_data)) {
hatch_data.id = -1;
}
@@ -1176,13 +1211,13 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt
}
id = 1;
- for (GT_MetaTileEntity_Hatch_DataConnector hatch_data : eOutputData) {
+ for (GT_MetaTileEntity_Hatch_DataConnector<?> hatch_data : eOutputData) {
if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(hatch_data)) {
hatch_data.id = id++;
}
}
id = 1;
- for (GT_MetaTileEntity_Hatch_DataConnector hatch_data : eInputData) {
+ for (GT_MetaTileEntity_Hatch_DataConnector<?> hatch_data : eInputData) {
if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(hatch_data)) {
hatch_data.id = id++;
}
@@ -1402,7 +1437,7 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt
if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(tHatch)) {
euVar = tHatch.maxEUOutput();
if (tHatch.getBaseMetaTileEntity().getStoredEU() <= tHatch.maxEUStore() - euVar &&
- aBaseMetaTileEntity.decreaseStoredEnergyUnits(euVar + Math.min(euVar >> 7, 1), false)) {
+ aBaseMetaTileEntity.decreaseStoredEnergyUnits(euVar + Math.max(euVar >> 7, 1), false)) {
tHatch.setEUVar(tHatch.getBaseMetaTileEntity().getStoredEU() + euVar);
}
}
@@ -1411,7 +1446,7 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt
if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(tHatch)) {
euVar = tHatch.maxEUOutput() * tHatch.Amperes;
if (tHatch.getBaseMetaTileEntity().getStoredEU() <= tHatch.maxEUStore() - euVar &&
- aBaseMetaTileEntity.decreaseStoredEnergyUnits(euVar + Math.min(euVar >> 7, tHatch.Amperes), false)) {
+ aBaseMetaTileEntity.decreaseStoredEnergyUnits(euVar + Math.max(euVar >> 7, tHatch.Amperes), false)) {
tHatch.setEUVar(tHatch.getBaseMetaTileEntity().getStoredEU() + euVar);
}
}
@@ -1673,6 +1708,9 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt
}
private boolean drainEnergyInput_EM(long EUtTierVoltage, long EUtEffective, long Amperes) {
+ if(maxEUinputMin==0){
+ return false;
+ }
if (EUtTierVoltage < 0) {
EUtTierVoltage = -EUtTierVoltage;
}
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/IHatchAdder.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/IHatchAdder.java
deleted file mode 100644
index b695472012..0000000000
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/IHatchAdder.java
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.github.technus.tectech.thing.metaTileEntity.multi.base;
-
-
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-
-public interface IHatchAdder {
- Boolean apply(IGregTechTileEntity iGregTechTileEntity, Short aShort);
-}
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/SoundLoop.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/SoundLoop.java
index 338af1626e..e8e1a7eb27 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/SoundLoop.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/SoundLoop.java
@@ -25,7 +25,7 @@ public class SoundLoop extends MovingSound{
zPosF=base.getZCoord();
worldID=base.getWorld().provider.dimensionId;
repeat=true;
- volume=0f;
+ volume= 0.0625f;
}
@Override
@@ -34,14 +34,13 @@ public class SoundLoop extends MovingSound{
return;
}
if(fadeMe) {
- volume-=0.05f;
- if(volume<0){
+ volume-=0.0625f;
+ if(volume<=0){
volume=0;
- }else if(volume==0){
donePlaying=true;
}
}else if(volume<1) {
- volume += 0.05f;
+ volume += 0.0625f;
}
World world=Minecraft.getMinecraft().thePlayer.worldObj;
donePlaying=world.provider.dimensionId!=worldID ||
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/render/TT_RenderedExtendedFacingTexture.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/render/TT_RenderedExtendedFacingTexture.java
index 4ecea706cc..44fa12ebb8 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/render/TT_RenderedExtendedFacingTexture.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/render/TT_RenderedExtendedFacingTexture.java
@@ -1,6 +1,6 @@
package com.github.technus.tectech.thing.metaTileEntity.multi.base.render;
-import com.github.technus.tectech.mechanics.alignment.IAlignment;
+import com.github.technus.tectech.mechanics.alignment.IAlignmentProvider;
import com.github.technus.tectech.mechanics.alignment.enumerable.ExtendedFacing;
import gregtech.api.enums.Dyes;
import gregtech.api.interfaces.IColorModulationContainer;
@@ -881,11 +881,13 @@ public class TT_RenderedExtendedFacingTexture implements ITexture,IColorModulati
TileEntity te = w.getTileEntity(x, y, z);
if (te instanceof IGregTechTileEntity) {
IMetaTileEntity meta = ((IGregTechTileEntity) te).getMetaTileEntity();
- if (meta instanceof IAlignment) {
- return ((IAlignment) meta).getExtendedFacing();
+ if (meta instanceof IAlignmentProvider) {
+ return ((IAlignmentProvider) meta).getAlignment().getExtendedFacing();
}else{
return ExtendedFacing.of(ForgeDirection.getOrientation(meta.getBaseMetaTileEntity().getFrontFacing()));
}
+ } else if (te instanceof IAlignmentProvider) {
+ return ((IAlignmentProvider) te).getAlignment().getExtendedFacing();
}
}
return ExtendedFacing.DEFAULT;
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 dce8f56ce9..6b26132292 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,13 +1,15 @@
package com.github.technus.tectech.thing.metaTileEntity.multi.em_machine;
-import com.github.technus.tectech.util.CommonValues;
import com.github.technus.tectech.TecTech;
-import com.github.technus.tectech.util.Util;
+import com.github.technus.tectech.mechanics.constructable.IConstructable;
import com.github.technus.tectech.mechanics.elementalMatter.core.cElementalInstanceStackMap;
+import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder;
+import com.github.technus.tectech.mechanics.structure.Structure;
import com.github.technus.tectech.thing.block.QuantumGlassBlock;
import com.github.technus.tectech.thing.block.QuantumStuffBlock;
-import com.github.technus.tectech.mechanics.constructible.IConstructable;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.*;
+import com.github.technus.tectech.util.CommonValues;
+import com.github.technus.tectech.util.Util;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import net.minecraft.block.Block;
@@ -21,7 +23,7 @@ import net.minecraftforge.common.util.ForgeDirection;
import java.util.HashMap;
import java.util.function.Supplier;
-import static com.github.technus.tectech.util.Util.StructureBuilderExtreme;
+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.*;
@@ -49,7 +51,9 @@ public class GT_MetaTileEntity_EM_machine extends GT_MetaTileEntity_MultiblockBa
{"B0", "A!!!", "0!!!0", "A!!!", "B0",},};
private static final Block[] blockType = new Block[]{sBlockCasingsTT, QuantumGlassBlock.INSTANCE, sBlockCasingsTT, sBlockCasingsTT};
private static final byte[] blockMeta = new byte[]{4, 0, 5, 6};
- private final IHatchAdder[] addingMethods = new IHatchAdder[]{this::addClassicToMachineList, this::addElementalToMachineList};
+ private static final IHatchAdder<GT_MetaTileEntity_EM_machine>[] addingMethods = adders(
+ GT_MetaTileEntity_EM_machine::addClassicToMachineList,
+ GT_MetaTileEntity_EM_machine::addElementalToMachineList);
private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 4};
private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT};
private static final byte[] blockMetaFallback = new byte[]{0, 4};
@@ -349,12 +353,12 @@ public class GT_MetaTileEntity_EM_machine extends GT_MetaTileEntity_MultiblockBa
}
@Override
- public void construct(int stackSize, boolean hintsOnly) {
- StructureBuilderExtreme(shape, blockType, blockMeta, 2, 2, 1, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly);
+ public void construct(ItemStack stackSize, boolean hintsOnly) {
+ Structure.builder(shape, blockType, blockMeta, 2, 2, 1, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly);
}
@Override
- public String[] getStructureDescription(int stackSize) {
+ 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/pipe/GT_MetaTileEntity_Pipe_Data.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/pipe/GT_MetaTileEntity_Pipe_Data.java
index 7aabff1af4..ee6f469d59 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/pipe/GT_MetaTileEntity_Pipe_Data.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/pipe/GT_MetaTileEntity_Pipe_Data.java
@@ -194,6 +194,7 @@ public class GT_MetaTileEntity_Pipe_Data extends MetaPipeEntity implements IConn
if (meta instanceof IConnectsToDataPipe && meta != source) {
if (meta instanceof GT_MetaTileEntity_Pipe_Data &&
((GT_MetaTileEntity_Pipe_Data) meta).connectionCount == 2) {
+ ((GT_MetaTileEntity_Pipe_Data) meta).markUsed();
return (IConnectsToDataPipe) meta;
}
if (((IConnectsToDataPipe) meta).isDataInputFacing(GT_Utility.getOppositeSide(b))) {
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_DebugPollutor.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_DebugPollutor.java
index 6fef2efbe9..0d5a59a5c1 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_DebugPollutor.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_DebugPollutor.java
@@ -148,7 +148,7 @@ public class GT_MetaTileEntity_DebugPollutor extends GT_MetaTileEntity_TieredMac
CommonValues.TEC_MARK_GENERAL,
translateToLocal("gt.blockmachines.debug.tt.pollutor.desc.0"),//Shit genny broke!
EnumChatFormatting.BLUE + translateToLocal("gt.blockmachines.debug.tt.pollutor.desc.1"),//Infinite Producer/Consumer
- EnumChatFormatting.BLUE + translateToLocal("gt.blockmachines.debug.tt.pollutor.desc.1")//Since i wanted one...
+ EnumChatFormatting.BLUE + translateToLocal("gt.blockmachines.debug.tt.pollutor.desc.2")//Since i wanted one?
};
}
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_DebugStructureWriter.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_DebugStructureWriter.java
index f40752bcf5..3b194c516b 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_DebugStructureWriter.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_DebugStructureWriter.java
@@ -1,10 +1,12 @@
package com.github.technus.tectech.thing.metaTileEntity.single;
-import com.github.technus.tectech.util.CommonValues;
import com.github.technus.tectech.TecTech;
-import com.github.technus.tectech.util.Util;
+import com.github.technus.tectech.mechanics.alignment.enumerable.ExtendedFacing;
+import com.github.technus.tectech.mechanics.structure.StructureUtility;
import com.github.technus.tectech.thing.metaTileEntity.single.gui.GT_Container_DebugStructureWriter;
import com.github.technus.tectech.thing.metaTileEntity.single.gui.GT_GUIContainer_DebugStructureWriter;
+import com.github.technus.tectech.util.CommonValues;
+import com.github.technus.tectech.util.Util;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gregtech.api.enums.Textures;
@@ -19,8 +21,8 @@ import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.EnumChatFormatting;
+import net.minecraftforge.common.util.ForgeDirection;
-import static com.github.technus.tectech.util.Util.StructureWriter;
import static com.github.technus.tectech.thing.metaTileEntity.Textures.MACHINE_CASINGS_TT;
import static net.minecraft.util.StatCollector.translateToLocal;
@@ -105,22 +107,36 @@ public class GT_MetaTileEntity_DebugStructureWriter extends GT_MetaTileEntity_Ti
}
@Override
+ public void onFirstTick(IGregTechTileEntity aBaseMetaTileEntity) {
+ super.onFirstTick(aBaseMetaTileEntity);
+ aBaseMetaTileEntity.disableWorking();
+ }
+
+ @Override
public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
if (aBaseMetaTileEntity.isAllowedToWork()) {
- result = StructureWriter(getBaseMetaTileEntity(), numbers[0], numbers[1], numbers[2], numbers[3], numbers[4], numbers[5], false);
- for (String s : result) {
- TecTech.LOGGER.info(s);
- }
+ String pseudoJavaCode = StructureUtility.getPseudoJavaCode(aBaseMetaTileEntity.getWorld(),
+ ExtendedFacing.of(ForgeDirection.getOrientation(aBaseMetaTileEntity.getFrontFacing())),
+ aBaseMetaTileEntity.getXCoord(), aBaseMetaTileEntity.getYCoord(), aBaseMetaTileEntity.getZCoord(),
+ numbers[0], numbers[1], numbers[2],
+ numbers[3], numbers[4], numbers[5],false);
+ TecTech.LOGGER.info(pseudoJavaCode);
+ result = pseudoJavaCode.split("\\n");
aBaseMetaTileEntity.disableWorking();
}
}
@Override
public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) {
- result = StructureWriter(getBaseMetaTileEntity(), numbers[0], numbers[1], numbers[2], numbers[3], numbers[4], numbers[5], true);
- for (String s : result) {
- TecTech.LOGGER.info(s);
- }
+ IGregTechTileEntity aBaseMetaTileEntity = getBaseMetaTileEntity();
+ String pseudoJavaCode = StructureUtility.getPseudoJavaCode(aBaseMetaTileEntity.getWorld(),
+ ExtendedFacing.of(ForgeDirection.getOrientation(aBaseMetaTileEntity.getFrontFacing())),
+ aBaseMetaTileEntity.getXCoord(), aBaseMetaTileEntity.getYCoord(), aBaseMetaTileEntity.getZCoord(),
+ numbers[0], numbers[1], numbers[2],
+ numbers[3], numbers[4], numbers[5],true);
+ TecTech.LOGGER.info(pseudoJavaCode);
+ result = pseudoJavaCode.split("\\n");
+ aBaseMetaTileEntity.disableWorking();
}
@Override
@@ -129,8 +145,6 @@ public class GT_MetaTileEntity_DebugStructureWriter extends GT_MetaTileEntity_Ti
return true;
}
aBaseMetaTileEntity.openGUI(aPlayer);
- //if (TecTechConfig.DEBUG_MODE && aPlayer.getHeldItem() != null)
- // TecTech.LOGGER.info("UnlocalizedName: " + getUniqueIdentifier(aPlayer.getHeldItem()));
return true;
}
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_TeslaCoil.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_TeslaCoil.java
index 0c282ac94f..ed36dec7cb 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_TeslaCoil.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_TeslaCoil.java
@@ -4,8 +4,8 @@ import com.github.technus.tectech.util.CommonValues;
import com.github.technus.tectech.TecTech;
import com.github.technus.tectech.util.Util;
import com.github.technus.tectech.loader.NetworkDispatcher;
-import com.github.technus.tectech.mechanics.data.RendererMessage;
-import com.github.technus.tectech.mechanics.data.ThaumSpark;
+import com.github.technus.tectech.mechanics.spark.RendererMessage;
+import com.github.technus.tectech.mechanics.spark.ThaumSpark;
import com.github.technus.tectech.thing.cover.GT_Cover_TM_TeslaCoil;
import com.github.technus.tectech.thing.cover.GT_Cover_TM_TeslaCoil_Ultimate;
import com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_TM_teslaCoil;
diff --git a/src/main/java/com/github/technus/tectech/util/Util.java b/src/main/java/com/github/technus/tectech/util/Util.java
index cd055528b1..1843770e3a 100644
--- a/src/main/java/com/github/technus/tectech/util/Util.java
+++ b/src/main/java/com/github/technus/tectech/util/Util.java
@@ -1,22 +1,14 @@
package com.github.technus.tectech.util;
import com.github.technus.tectech.TecTech;
-import com.github.technus.tectech.mechanics.alignment.enumerable.ExtendedFacing;
-import com.github.technus.tectech.thing.casing.TT_Container_Casings;
-import com.github.technus.tectech.thing.metaTileEntity.multi.base.IHatchAdder;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.ObfuscationReflectionHelper;
import cpw.mods.fml.common.registry.GameRegistry;
import gregtech.api.GregTech_API;
-import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_TieredMachineBlock;
import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GT_Utility;
-import net.minecraft.block.Block;
-import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.ICrafting;
@@ -25,14 +17,12 @@ import net.minecraft.item.ItemStack;
import net.minecraft.nbt.CompressedStreamTools;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.server.MinecraftServer;
-import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.ChunkCoordIntPair;
import net.minecraft.world.World;
import net.minecraft.world.chunk.Chunk;
import net.minecraft.world.storage.IPlayerFileData;
import net.minecraft.world.storage.SaveHandler;
-import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.FluidStack;
import org.apache.commons.lang3.StringUtils;
@@ -40,13 +30,8 @@ import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.lang.reflect.Field;
+import java.nio.charset.StandardCharsets;
import java.util.*;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import static com.github.technus.tectech.loader.TecTechConfig.DEBUG_MODE;
-import static gregtech.api.enums.GT_Values.E;
-import static java.nio.charset.Charset.forName;
/**
* Created by Tec on 21.03.2017.
@@ -166,531 +151,6 @@ public final class Util {
return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;
}
- //Check Machine Structure based on string[][] (effectively char[][][]), ond offset of the controller
- //This only checks for REGULAR BLOCKS!
- public static boolean StructureCheckerExtreme(
- String[][] structure,//0-9 casing, +- air no air, A... ignore 'A'-CHAR-1 blocks
- Block[] blockType,//use numbers 0-9 for casing types
- byte[] blockMeta,//use numbers 0-9 for casing types
- IHatchAdder[] addingMethods,
- short[] casingTextures,
- Block[] blockTypeFallback,//use numbers 0-9 for casing types
- byte[] blockMetaFallback,//use numbers 0-9 for casing types
- int horizontalOffset, int verticalOffset, int depthOffset,
- IGregTechTileEntity aBaseMetaTileEntity,
- ExtendedFacing extendedFacing,
- boolean forceCheck) {
- World world = aBaseMetaTileEntity.getWorld();
- if (world.isRemote) {
- return false;
- }
- //TE Rotation
- if(extendedFacing==null){
- extendedFacing=ExtendedFacing.of(ForgeDirection.getOrientation(aBaseMetaTileEntity.getFrontFacing()));
- }
-
- IGregTechTileEntity igt;
- IMetaTileEntity imt = aBaseMetaTileEntity.getMetaTileEntity();
-
- int xyz[]=new int[3];
- int abc[]=new int[3];
- int pointer;
- int baseX = aBaseMetaTileEntity.getXCoord(),
- baseZ = aBaseMetaTileEntity.getZCoord(),
- baseY = aBaseMetaTileEntity.getYCoord();
- //a,b,c - relative to block face!
- //x,y,z - relative to block position on map!
- //yPos - absolute height of checked block
-
- //perform your duties
- abc[2] = -depthOffset;
- for (String[] _structure : structure) {//front to back
- abc[1] = verticalOffset;
- for (String __structure : _structure) {//top to bottom
- abc[0] = -horizontalOffset;
- for (char block : __structure.toCharArray()) {//left to right
- if (block < ' ') {//Control chars allow skipping
- abc[1] -= block;
- break;
- } else if (block > '@') {//characters allow to skip check A-1 skip, B-2 skips etc.
- abc[0] += block - '@';
- }//else if (block < '+')//used to mark THINGS
- // a++;
- else if (block == '.') {
- abc[0]++;
- } else {
- //get x y z from rotation
- extendedFacing.getWorldOffset(abc,xyz);
- xyz[0]+=baseX;
- xyz[1]+=baseY;
- xyz[2]+=baseZ;
-
- //that must be here since in some cases other axis (b,c) controls y
- if (xyz[1] < 0 || xyz[1] >= 256) {
- return false;
- }
-
- //Check block
- if (world.blockExists(xyz[0], xyz[1], xyz[2])) {//this actually checks if the chunk is loaded at this pos
- switch (block) {
- case '-'://must be air
- if (world.getBlock(xyz[0], xyz[1], xyz[2]).getMaterial() != Material.air) {
- return false;
- }
- break;
- case '+'://must not be air
- if (world.getBlock(xyz[0], xyz[1], xyz[2]).getMaterial() == Material.air) {
- return false;
- }
- break;
- default://check for block (countable)
- if ((pointer = block - '0') >= 0) {
- //countable air -> net.minecraft.block.BlockAir
- if (world.getBlock(xyz[0], xyz[1], xyz[2]) != blockType[pointer]) {
- if (DEBUG_MODE) {
- TecTech.LOGGER.info("Struct-block-error " + xyz[0] + ' ' + xyz[1] + ' ' + xyz[2] + " / " + abc[0] + ' ' + abc[1] + ' ' + abc[2] + " / " + world.getBlock(xyz[0], xyz[1], xyz[2]).getUnlocalizedName() + ' ' + blockType[pointer].getUnlocalizedName());
- }
- return false;
- }
- if (world.getBlockMetadata(xyz[0], xyz[1], xyz[2]) != blockMeta[pointer]) {
- if (DEBUG_MODE) {
- TecTech.LOGGER.info("Struct-meta-id-error " + xyz[0] + ' ' + xyz[1] + ' ' + xyz[2] + " / " + abc[0] + ' ' + abc[1] + ' ' + abc[2] + " / " + world.getBlockMetadata(xyz[0], xyz[1], xyz[2]) + ' ' + blockMeta[pointer]);
- }
- return false;
- }
- } else //noinspection ConstantConditions
- if ((pointer = block - ' ') >= 0) {
- igt = aBaseMetaTileEntity.getIGregTechTileEntity(xyz[0], xyz[1], xyz[2]);
- if (igt == null || !addingMethods[pointer].apply(igt, casingTextures[pointer])) {
- if (world.getBlock(xyz[0], xyz[1], xyz[2]) != blockTypeFallback[pointer]) {
- if (DEBUG_MODE) {
- TecTech.LOGGER.info("Fallback-struct-block-error " + xyz[0] + ' ' + xyz[1] + ' ' + xyz[2] + " / " + abc[0] + ' ' + abc[1] + ' ' + abc[2] + " / " + world.getBlock(xyz[0], xyz[1], xyz[2]).getUnlocalizedName() + ' ' + (blockTypeFallback[pointer] == null ? "null" : blockTypeFallback[pointer].getUnlocalizedName()));
- }
- return false;
- }
- if (world.getBlockMetadata(xyz[0], xyz[1], xyz[2]) != blockMetaFallback[pointer]) {
- if (DEBUG_MODE) {
- TecTech.LOGGER.info("Fallback-Struct-meta-id-error " + xyz[0] + ' ' + xyz[1] + ' ' + xyz[2] + " / " + abc[0] + ' ' + abc[1] + ' ' + abc[2] + " / " + world.getBlockMetadata(xyz[0], xyz[1], xyz[2]) + ' ' + blockMetaFallback[pointer]);
- }
- return false;
- }
- }
- }
- }
- } else if (forceCheck) {
- return false;
- }
- abc[0]++;//block in horizontal layer
- }
- }
- abc[1]--;//horizontal layer
- }
- abc[2]++;//depth
- }
- return true;
- }
-
- public static boolean StructureBuilder(String[][] structure,//0-9 casing, +- air no air, A... ignore 'A'-CHAR+1 blocks
- Block[] blockType,//use numbers 0-9 for casing types
- byte[] blockMeta,//use numbers 0-9 for casing types
- int horizontalOffset, int verticalOffset, int depthOffset,
- IGregTechTileEntity aBaseMetaTileEntity, boolean hintsOnly) {
- byte facing = aBaseMetaTileEntity.getFrontFacing();
- return StructureBuilderExtreme(structure, blockType, blockMeta,
- horizontalOffset, verticalOffset, depthOffset,
- aBaseMetaTileEntity.getWorld().getTileEntity(aBaseMetaTileEntity.getXCoord(), aBaseMetaTileEntity.getYCoord(), aBaseMetaTileEntity.getZCoord()), null,
- facing, hintsOnly);
- }
-
- public static boolean StructureBuilderExtreme(String[][] structure,//0-9 casing, +- air no air, A... ignore 'A'-CHAR+1 blocks
- Block[] blockType,//use numbers 0-9 for casing types
- byte[] blockMeta,//use numbers 0-9 for casing types
- int horizontalOffset, int verticalOffset, int depthOffset,
- IGregTechTileEntity aBaseMetaTileEntity, ExtendedFacing extendedFacing, boolean hintsOnly) {
- byte facing = aBaseMetaTileEntity.getFrontFacing();
- return StructureBuilderExtreme(structure, blockType, blockMeta,
- horizontalOffset, verticalOffset, depthOffset,
- aBaseMetaTileEntity.getWorld().getTileEntity(aBaseMetaTileEntity.getXCoord(), aBaseMetaTileEntity.getYCoord(), aBaseMetaTileEntity.getZCoord()), extendedFacing,
- facing, hintsOnly);
- }
-
- public static boolean StructureBuilder(String[][] structure,//0-9 casing, +- air no air, A... ignore 'A'-CHAR+1 blocks
- Block[] blockType,//use numbers 0-9 for casing types
- byte[] blockMeta,//use numbers 0-9 for casing types
- int horizontalOffset, int verticalOffset, int depthOffset,
- TileEntity tileEntity, int facing, boolean hintsOnly) {
- return StructureBuilderExtreme(structure, blockType, blockMeta, horizontalOffset, verticalOffset, depthOffset, tileEntity, null, facing, hintsOnly);
- }
-
- public static boolean StructureBuilderExtreme(String[][] structure,//0-9 casing, +- air no air, A... ignore 'A'-CHAR+1 blocks
- Block[] blockType,//use numbers 0-9 for casing types
- byte[] blockMeta,//use numbers 0-9 for casing types
- int horizontalOffset, int verticalOffset, int depthOffset,
- TileEntity tileEntity, ExtendedFacing extendedFacing, int simpleFacing, boolean hintsOnly) {
- if (!tileEntity.hasWorldObj()) {
- return false;
- }
- World world = tileEntity.getWorldObj();
- if (!world.isRemote && hintsOnly) {
- return false;
- }
-
- //TE Rotation
-
-
- int xyz[]=new int[3];
- int abc[]=new int[3];
- int pointer;
- int
- baseX = tileEntity.xCoord,
- baseZ = tileEntity.zCoord,
- baseY = tileEntity.yCoord;
- //a,b,c - relative to block face!
- //x,y,z - relative to block position on map!
- if (extendedFacing == null) {
- extendedFacing=ExtendedFacing.of(ForgeDirection.getOrientation(simpleFacing));
- }
-
- //perform your duties
- abc[2] = -depthOffset;
- for (String[] _structure : structure) {//front to back
- abc[1] = verticalOffset;
- for (String __structure : _structure) {//top to bottom
- abc[0] = -horizontalOffset;
- for (char block : __structure.toCharArray()) {//left to right
- if (block < ' ') {//Control chars allow skipping
- abc[1] -= block;
- break;
- }
- if (block > '@')//characters allow to skip check a-1 skip, b-2 skips etc.
- {
- abc[0] += block - '@';
- }//else if (block < '+')//used to mark THINGS
- // a++;
- else if (block == '.')// this TE
- {
- abc[0]++;
- } else {
- //get x y z from rotation
- extendedFacing.getWorldOffset(abc,xyz);
- xyz[0]+=baseX;
- xyz[1]+=baseY;
- xyz[2]+=baseZ;
-
- //that must be here since in some cases other axis (b,c) controls y
- if (xyz[1] < 0 || xyz[1] >= 256) {
- return false;
- }
-
- //Check block
- if (world.blockExists(xyz[0], xyz[1], xyz[2])) {//this actually checks if the chunk is loaded
- if (hintsOnly) {
- switch (block) {
- case '-'://must be air
- TecTech.proxy.hint_particle(world, xyz[0], xyz[1], xyz[2], TT_Container_Casings.sHintCasingsTT, 13);
- break;
- case '+'://must not be air
- TecTech.proxy.hint_particle(world, xyz[0], xyz[1], xyz[2], TT_Container_Casings.sHintCasingsTT, 14);
- break;
- default: //check for block
- if ((pointer = block - '0') >= 0) {
- if (world.getBlock(xyz[0], xyz[1], xyz[2]) != blockType[pointer] || world.getBlockMetadata(xyz[0], xyz[1], xyz[2]) != blockMeta[pointer]) {
- TecTech.proxy.hint_particle(world, xyz[0], xyz[1], xyz[2], blockType[pointer], blockMeta[pointer]);
- }
- } else if ((pointer = block - ' ') >= 0) {
- if (pointer >= 0 && pointer < 12) {
- TecTech.proxy.hint_particle(world, xyz[0], xyz[1], xyz[2], TT_Container_Casings.sHintCasingsTT, pointer);
- } else {
- TecTech.proxy.hint_particle(world, xyz[0], xyz[1], xyz[2], TT_Container_Casings.sHintCasingsTT, 12);
- }
- } else {
- TecTech.proxy.hint_particle(world, xyz[0], xyz[1], xyz[2], TT_Container_Casings.sHintCasingsTT, 15);
- }
- }
- } else {
- switch (block) {
- case '-'://must be air
- world.setBlock(xyz[0], xyz[1], xyz[2], Blocks.air, 0, 2);
- break;
- case '+'://must not be air
- world.setBlock(xyz[0], xyz[1], xyz[2], TT_Container_Casings.sBlockCasingsTT, 14, 2);
- break;
- default: //check for block
- if ((pointer = block - '0') >= 0) {
- world.setBlock(xyz[0], xyz[1], xyz[2], blockType[pointer], blockMeta[pointer], 2);
- } else if (block - ' ' < 0) {
- world.setBlock(xyz[0], xyz[1], xyz[2], TT_Container_Casings.sHintCasingsTT, 15, 2);
- } //else {
- //switch(pointer){
- // case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7: case 8: case 9: case 10: case 11:
- // world.setBlock(x, y, z, TT_Container_Casings.sHintCasingsTT, pointer, 2); break;
- // default:world.setBlock(x, y, z, TT_Container_Casings.sHintCasingsTT, 12, 2);
- //}
- //}
- }
- }
- }
- abc[0]++;//block in horizontal layer
- }
- }
- abc[1]--;//horizontal layer
- }
- abc[2]++;//depth
- }
- return true;
- }
-
-
- public static String[] StructureWriter(IGregTechTileEntity aBaseMetaTileEntity,
- int horizontalOffset, int verticalOffset, int depthOffset,
- int horizontalSize, int verticalSize, int depthSize, boolean ignoreAir) {
- //TE Rotation
- byte facing = aBaseMetaTileEntity.getFrontFacing();
- World world = aBaseMetaTileEntity.getWorld();
- if (world.isRemote) {
- return new String[]{"Not at Client m8"};
- }
-
- ItemStack[] array = new ItemStack[10];
-
- int x, y, z, a, b, c;
- int
- baseX = aBaseMetaTileEntity.getXCoord(),
- baseZ = aBaseMetaTileEntity.getZCoord(),
- baseY = aBaseMetaTileEntity.getYCoord();
- //a,b,c - relative to block face!
- //x,y,z - relative to block position on map!
- //yPos - absolute height of checked block
-
- //perform your duties - #1 - count block types
- c = -depthOffset;
- for (int cz = 0; cz < depthSize; cz++) {//front to back
- b = verticalOffset;
- for (int by = 0; by < verticalSize; by++) {//top to bottom
- a = -horizontalOffset;
- for (int az = 0; az < horizontalSize; az++) {//left to right
- //get x y z from rotation
- switch (facing) {//translation
- case 4:
- x = baseX + c;
- z = baseZ + a;
- y = baseY + b;
- break;
- case 3:
- x = baseX + a;
- z = baseZ - c;
- y = baseY + b;
- break;
- case 5:
- x = baseX - c;
- z = baseZ - a;
- y = baseY + b;
- break;
- case 2:
- x = baseX - a;
- z = baseZ + c;
- y = baseY + b;
- break;
- //Things get odd if the block faces up or down...
- case 1:
- x = baseX + a;
- z = baseZ + b;
- y = baseY - c;
- break;//similar to 3
- case 0:
- x = baseX - a;
- z = baseZ - b;
- y = baseY + c;
- break;//similar to 2
- default:
- return new String[]{"Invalid rotation"};
- }
-
- //that must be here since in some cases other axis (b,c) controls y
- if (y < 0 || y >= 256) {
- return new String[]{"Invalid position"};
- }
-
- //Check block
- Block block = world.getBlock(x, y, z);
- int meta = world.getBlockMetadata(x, y, z);
-
- if (!block.hasTileEntity(meta) && block.getMaterial() != Material.air) {
- boolean err = true;
- ItemStack is = new ItemStack(block, 1, meta);
- for (int i = 0; i < array.length; i++) {
- if (array[i] == null) {
- array[i] = is;
- err = false;
- break;
- } else if (is.getItem() == array[i].getItem() && is.getItemDamage() == array[i].getItemDamage()) {
- err = false;
- break;
- }
- }
- if (err) {
- return new String[]{"Too much different blocks"};
- }
- }
-
- a++;//block in horizontal layer
- }
- b--;//horizontal layer
- }
- c++;//depth
- }
-
- List<String> output = new ArrayList<>();
-
- output.add("Offsets: " + horizontalOffset + ' ' + verticalOffset + ' ' + depthOffset);
- output.add("Sizes: " + horizontalSize + ' ' + verticalSize + ' ' + depthSize);
- output.add("");
-
- output.add("ID[]: Name[]");
- output.add("");
- for (int i = 0; i < array.length; i++) {
- if (array[i] != null) {
- output.add(i + ": " + array[i].getDisplayName());
- }
- }
- output.add("");
- output.add("ID[]: Block[] BlockMetaID[]");
- output.add("");
- for (int i = 0; i < array.length; i++) {
- if (array[i] != null) {
- output.add(i + ": " + array[i].getItem().getUnlocalizedName() + ' ' + array[i].getItemDamage());
- }
- }
- output.add("");
- output.add("String[][]");
- //perform your duties - #2 - write strings
- output.add("{");
- c = -depthOffset;
- for (int cz = 0; cz < depthSize; cz++) {//front to back
- b = verticalOffset;
- StringBuilder addMe = new StringBuilder().append('{');
- for (int by = 0; by < verticalSize; by++) {//top to bottom
- a = -horizontalOffset;
- StringBuilder line = new StringBuilder();
- for (int az = 0; az < horizontalSize; az++) {//left to right
- //get x y z from rotation
- switch (facing) {//translation
- case 4:
- x = baseX + c;
- z = baseZ + a;
- y = baseY + b;
- break;
- case 3:
- x = baseX + a;
- z = baseZ - c;
- y = baseY + b;
- break;
- case 5:
- x = baseX - c;
- z = baseZ - a;
- y = baseY + b;
- break;
- case 2:
- x = baseX - a;
- z = baseZ + c;
- y = baseY + b;
- break;
- //Things get odd if the block faces up or down...
- case 1:
- x = baseX + a;
- z = baseZ + b;
- y = baseY - c;
- break;//similar to 3
- case 0:
- x = baseX - a;
- z = baseZ - b;
- y = baseY + c;
- break;//similar to 2
- default:
- return new String[]{"Invalid rotation"};
- }
-
- //Check block
- Block block = world.getBlock(x, y, z);
- int meta = world.getBlockMetadata(x, y, z);
-
- if (a == 0 && b == 0 && c == 0) {
- line.append('.');
- } else if (block.getMaterial() == Material.air) {
- line.append('-');
- } else if (block.hasTileEntity(meta)) {
- line.append('*');
- } else {
- ItemStack stack = new ItemStack(block, 1, meta);
- String str = "?";//OH YEAH NPEs
- for (int i = 0; i < array.length; i++) {
- if (array[i] != null && stack.getItem() == array[i].getItem() && stack.getItemDamage() == array[i].getItemDamage()) {
- str = Integer.toString(i);
- break;
- }
- }
- line.append(str);
- }
- a++;//block in horizontal layer
- }
- if (ignoreAir) {
- StringBuilder builder = new StringBuilder();
- char temp = '@';
- for (char ch : line.toString().toCharArray()) {
- if (ch == '-') {
- temp += 1;
- if (temp == '~') {
- builder.append('~');
- temp = '@';
- }
- } else {
- if (temp > '@') {
- builder.append(temp);
- temp = '@';
- }
- builder.append(ch);
- }
- }
- while (builder.length() > 0 && builder.charAt(builder.length() - 1) == '~') {
- builder.deleteCharAt(builder.length() - 1);
- }
- if (builder.length() == 0) {
- builder.append("E,");
- } else {
- builder.insert(0, '"');
- builder.append('"').append(',');
- }
- addMe.append(builder);
- } else {
- if (line.length() == 0) {
- line.append("E,");
- } else {
- line.insert(0, '"');
- line.append('"').append(',');
- }
- addMe.append(line);
- }
- b--;//horizontal layer
- }
- //region less verbose
- addMe.append('}').append(',');
- String builtStr = addMe.toString().replaceAll("(E,)+(?=})", E/*Remove Empty strings at end*/);
- Matcher matcher = matchE_.matcher(builtStr);
- while (matcher.find()) {
- byte lenEE = (byte) (matcher.group(1).length() >> 1);
- builtStr = builtStr.replaceFirst("E,(E,)+", "\"\\\\u00" + String.format("%02X", lenEE - 1) + "\",");
- //builtStr=builtStr.replaceFirst("E,(E,)+\"","\"\\\\u00"+String.format("%02X", lenEE));
- }
- //endregion
- output.add(builtStr);
- c++;//depth
- }
- output.add("}");
- return output.toArray(new String[0]);
- }
-
- private static final Pattern matchE_ = Pattern.compile("(E,(E,)+)");
-
public static boolean isInputEqual(boolean aDecreaseStacksizeBySuccess, boolean aDontCheckStackSizes, FluidStack[] requiredFluidInputs, ItemStack[] requiredInputs, FluidStack[] givenFluidInputs, ItemStack... givenInputs) {
if (!GregTech_API.sPostloadFinished) {
return false;
@@ -1045,7 +505,7 @@ public final class Util {
String id1=player.getUniqueID().toString();
write(new File(dir, id1 + "."+extension),data);
write(new File(dir, id1 + "."+extension+"_bak"),data);
- String id2=UUID.nameUUIDFromBytes(player.getCommandSenderName().getBytes(forName("UTF-8"))).toString();
+ String id2=UUID.nameUUIDFromBytes(player.getCommandSenderName().getBytes(StandardCharsets.UTF_8)).toString();
write(new File(dir, id2 + "."+extension),data);
write(new File(dir, id2 + "."+extension+"_bak"),data);
}
diff --git a/src/main/java/com/github/technus/tectech/util/Vec3Impl.java b/src/main/java/com/github/technus/tectech/util/Vec3Impl.java
index 84e6497560..9ba96d741a 100644
--- a/src/main/java/com/github/technus/tectech/util/Vec3Impl.java
+++ b/src/main/java/com/github/technus/tectech/util/Vec3Impl.java
@@ -20,20 +20,6 @@ public class Vec3Impl implements Comparable<Vec3Impl> {
this(baseMetaTileEntity.getXCoord(),baseMetaTileEntity.getYCoord(),baseMetaTileEntity.getZCoord());
}
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- } else if (o instanceof Vec3Impl) {
- Vec3Impl vec3i = (Vec3Impl)o;
- return val0 == vec3i.val0 && val1 == vec3i.val1 && val2 == vec3i.val2;
- }
- return false;
- }
-
- public int hashCode() {
- return (val1 + val2 * 31) * 31 + val0;
- }
-
public int compareTo(Vec3Impl o) {
return val1 == o.val1 ? val2 == o.val2 ? val0 - o.val0 : val2 - o.val2 : val1 - o.val1;
}
@@ -143,4 +129,18 @@ public class Vec3Impl implements Comparable<Vec3Impl> {
public Vec3Impl abs() {
return new Vec3Impl(Math.abs(val0),Math.abs(val1),Math.abs(val2));
}
+
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ } else if (o instanceof Vec3Impl) {
+ Vec3Impl vec3i = (Vec3Impl)o;
+ return val0 == vec3i.val0 && val1 == vec3i.val1 && val2 == vec3i.val2;
+ }
+ return false;
+ }
+
+ public int hashCode() {
+ return (val1 + val2 * 31) * 31 + val0;
+ }
} \ No newline at end of file
diff --git a/src/main/resources/assets/tectech/lang/en_US.lang b/src/main/resources/assets/tectech/lang/en_US.lang
index b3ae51a407..3b8bc433ed 100644
--- a/src/main/resources/assets/tectech/lang/en_US.lang
+++ b/src/main/resources/assets/tectech/lang/en_US.lang
@@ -210,69 +210,69 @@ gt.blockmachines.hatch.energymulti64.tier.13.name=UXV 64A Energy Hatch
gt.blockmachines.hatch.energymulti.desc.0=Multiple Ampere Energy Injector for Multiblocks
gt.blockmachines.hatch.energymulti.desc.1=Amperes In
-gt.blockmachines.hatch.energytunnel1.tier.05.name=IV 256/t Laser Target Hatch
-gt.blockmachines.hatch.energytunnel2.tier.05.name=IV 1024/t Laser Target Hatch
-gt.blockmachines.hatch.energytunnel3.tier.05.name=IV 4096/t Laser Target Hatch
-gt.blockmachines.hatch.energytunnel4.tier.05.name=IV 16384/t Laser Target Hatch
-gt.blockmachines.hatch.energytunnel5.tier.05.name=IV 65536/t Laser Target Hatch
-gt.blockmachines.hatch.energytunnel6.tier.05.name=IV 262144/t Laser Target Hatch
-gt.blockmachines.hatch.energytunnel7.tier.05.name=IV 1048576/t Laser Target Hatch
-gt.blockmachines.hatch.energytunnel1.tier.06.name=LuV 256/t Laser Target Hatch
-gt.blockmachines.hatch.energytunnel2.tier.06.name=LuV 1024/t Laser Target Hatch
-gt.blockmachines.hatch.energytunnel3.tier.06.name=LuV 4096/t Laser Target Hatch
-gt.blockmachines.hatch.energytunnel4.tier.06.name=LuV 16384/t Laser Target Hatch
-gt.blockmachines.hatch.energytunnel5.tier.06.name=LuV 65536/t Laser Target Hatch
-gt.blockmachines.hatch.energytunnel6.tier.06.name=LuV 262144/t Laser Target Hatch
-gt.blockmachines.hatch.energytunnel7.tier.06.name=LuV 1048576/t Laser Target Hatch
-gt.blockmachines.hatch.energytunnel1.tier.07.name=ZPM 256/t Laser Target Hatch
-gt.blockmachines.hatch.energytunnel2.tier.07.name=ZPM 1024/t Laser Target Hatch
-gt.blockmachines.hatch.energytunnel3.tier.07.name=ZPM 4096/t Laser Target Hatch
-gt.blockmachines.hatch.energytunnel4.tier.07.name=ZPM 16384/t Laser Target Hatch
-gt.blockmachines.hatch.energytunnel5.tier.07.name=ZPM 65536/t Laser Target Hatch
-gt.blockmachines.hatch.energytunnel6.tier.07.name=ZPM 262144/t Laser Target Hatch
-gt.blockmachines.hatch.energytunnel7.tier.07.name=ZPM 1048576/t Laser Target Hatch
-gt.blockmachines.hatch.energytunnel1.tier.08.name=UV 256/t Laser Target Hatch
-gt.blockmachines.hatch.energytunnel2.tier.08.name=UV 1024/t Laser Target Hatch
-gt.blockmachines.hatch.energytunnel3.tier.08.name=UV 4096/t Laser Target Hatch
-gt.blockmachines.hatch.energytunnel4.tier.08.name=UV 16384/t Laser Target Hatch
-gt.blockmachines.hatch.energytunnel5.tier.08.name=UV 65536/t Laser Target Hatch
-gt.blockmachines.hatch.energytunnel6.tier.08.name=UV 262144/t Laser Target Hatch
-gt.blockmachines.hatch.energytunnel7.tier.08.name=UV 1048576/t Laser Target Hatch
-gt.blockmachines.hatch.energytunnel1.tier.09.name=UHV 256/t Laser Target Hatch
-gt.blockmachines.hatch.energytunnel2.tier.09.name=UHV 1024/t Laser Target Hatch
-gt.blockmachines.hatch.energytunnel3.tier.09.name=UHV 4096/t Laser Target Hatch
-gt.blockmachines.hatch.energytunnel4.tier.09.name=UHV 16384/t Laser Target Hatch
-gt.blockmachines.hatch.energytunnel5.tier.09.name=UHV 65536/t Laser Target Hatch
-gt.blockmachines.hatch.energytunnel6.tier.09.name=UHV 262144/t Laser Target Hatch
-gt.blockmachines.hatch.energytunnel7.tier.09.name=UHV 1048576/t Laser Target Hatch
-gt.blockmachines.hatch.energytunnel1.tier.10.name=UEV 256/t Laser Target Hatch
-gt.blockmachines.hatch.energytunnel2.tier.10.name=UEV 1024/t Laser Target Hatch
-gt.blockmachines.hatch.energytunnel3.tier.10.name=UEV 4096/t Laser Target Hatch
-gt.blockmachines.hatch.energytunnel4.tier.10.name=UEV 16384/t Laser Target Hatch
-gt.blockmachines.hatch.energytunnel5.tier.10.name=UEV 65536/t Laser Target Hatch
-gt.blockmachines.hatch.energytunnel6.tier.10.name=UEV 262144/t Laser Target Hatch
-gt.blockmachines.hatch.energytunnel7.tier.10.name=UEV 1048576/t Laser Target Hatch
-gt.blockmachines.hatch.energytunnel1.tier.11.name=UIV 256/t Laser Target Hatch
-gt.blockmachines.hatch.energytunnel2.tier.11.name=UIV 1024/t Laser Target Hatch
-gt.blockmachines.hatch.energytunnel3.tier.11.name=UIV 4096/t Laser Target Hatch
-gt.blockmachines.hatch.energytunnel4.tier.11.name=UIV 16384/t Laser Target Hatch
-gt.blockmachines.hatch.energytunnel5.tier.11.name=UIV 65536/t Laser Target Hatch
-gt.blockmachines.hatch.energytunnel6.tier.11.name=UIV 262144/t Laser Target Hatch
-gt.blockmachines.hatch.energytunnel7.tier.11.name=UIV 1048576/t Laser Target Hatch
-gt.blockmachines.hatch.energytunnel1.tier.12.name=UMV 256/t Laser Target Hatch
-gt.blockmachines.hatch.energytunnel2.tier.12.name=UMV 1024/t Laser Target Hatch
-gt.blockmachines.hatch.energytunnel3.tier.12.name=UMV 4096/t Laser Target Hatch
-gt.blockmachines.hatch.energytunnel4.tier.12.name=UMV 16384/t Laser Target Hatch
-gt.blockmachines.hatch.energytunnel5.tier.12.name=UMV 65536/t Laser Target Hatch
-gt.blockmachines.hatch.energytunnel6.tier.12.name=UMV 262144/t Laser Target Hatch
-gt.blockmachines.hatch.energytunnel7.tier.12.name=UMV 1048576/t Laser Target Hatch
-gt.blockmachines.hatch.energytunnel1.tier.13.name=UXV 256/t Laser Target Hatch
-gt.blockmachines.hatch.energytunnel2.tier.13.name=UXV 1024/t Laser Target Hatch
-gt.blockmachines.hatch.energytunnel3.tier.13.name=UXV 4096/t Laser Target Hatch
-gt.blockmachines.hatch.energytunnel4.tier.13.name=UXV 16384/t Laser Target Hatch
-gt.blockmachines.hatch.energytunnel5.tier.13.name=UXV 65536/t Laser Target Hatch
-gt.blockmachines.hatch.energytunnel6.tier.13.name=UXV 262144/t Laser Target Hatch
-gt.blockmachines.hatch.energytunnel7.tier.13.name=UXV 1048576/t Laser Target Hatch
+gt.blockmachines.hatch.energytunnel1.tier.05.name=IV 256A/t Laser Target Hatch
+gt.blockmachines.hatch.energytunnel2.tier.05.name=IV 1024A/t Laser Target Hatch
+gt.blockmachines.hatch.energytunnel3.tier.05.name=IV 4096A/t Laser Target Hatch
+gt.blockmachines.hatch.energytunnel4.tier.05.name=IV 16384A/t Laser Target Hatch
+gt.blockmachines.hatch.energytunnel5.tier.05.name=IV 65536A/t Laser Target Hatch
+gt.blockmachines.hatch.energytunnel6.tier.05.name=IV 262144A/t Laser Target Hatch
+gt.blockmachines.hatch.energytunnel7.tier.05.name=IV 1048576A/t Laser Target Hatch
+gt.blockmachines.hatch.energytunnel1.tier.06.name=LuV 256A/t Laser Target Hatch
+gt.blockmachines.hatch.energytunnel2.tier.06.name=LuV 1024A/t Laser Target Hatch
+gt.blockmachines.hatch.energytunnel3.tier.06.name=LuV 4096A/t Laser Target Hatch
+gt.blockmachines.hatch.energytunnel4.tier.06.name=LuV 16384A/t Laser Target Hatch
+gt.blockmachines.hatch.energytunnel5.tier.06.name=LuV 65536A/t Laser Target Hatch
+gt.blockmachines.hatch.energytunnel6.tier.06.name=LuV 262144A/t Laser Target Hatch
+gt.blockmachines.hatch.energytunnel7.tier.06.name=LuV 1048576A/t Laser Target Hatch
+gt.blockmachines.hatch.energytunnel1.tier.07.name=ZPM 256A/t Laser Target Hatch
+gt.blockmachines.hatch.energytunnel2.tier.07.name=ZPM 1024A/t Laser Target Hatch
+gt.blockmachines.hatch.energytunnel3.tier.07.name=ZPM 4096A/t Laser Target Hatch
+gt.blockmachines.hatch.energytunnel4.tier.07.name=ZPM 16384A/t Laser Target Hatch
+gt.blockmachines.hatch.energytunnel5.tier.07.name=ZPM 65536A/t Laser Target Hatch
+gt.blockmachines.hatch.energytunnel6.tier.07.name=ZPM 262144A/t Laser Target Hatch
+gt.blockmachines.hatch.energytunnel7.tier.07.name=ZPM 1048576A/t Laser Target Hatch
+gt.blockmachines.hatch.energytunnel1.tier.08.name=UV 256A/t Laser Target Hatch
+gt.blockmachines.hatch.energytunnel2.tier.08.name=UV 1024A/t Laser Target Hatch
+gt.blockmachines.hatch.energytunnel3.tier.08.name=UV 4096A/t Laser Target Hatch
+gt.blockmachines.hatch.energytunnel4.tier.08.name=UV 16384A/t Laser Target Hatch
+gt.blockmachines.hatch.energytunnel5.tier.08.name=UV 65536A/t Laser Target Hatch
+gt.blockmachines.hatch.energytunnel6.tier.08.name=UV 262144A/t Laser Target Hatch
+gt.blockmachines.hatch.energytunnel7.tier.08.name=UV 1048576A/t Laser Target Hatch
+gt.blockmachines.hatch.energytunnel1.tier.09.name=UHV 256A/t Laser Target Hatch
+gt.blockmachines.hatch.energytunnel2.tier.09.name=UHV 1024A/t Laser Target Hatch
+gt.blockmachines.hatch.energytunnel3.tier.09.name=UHV 4096A/t Laser Target Hatch
+gt.blockmachines.hatch.energytunnel4.tier.09.name=UHV 16384A/t Laser Target Hatch
+gt.blockmachines.hatch.energytunnel5.tier.09.name=UHV 65536A/t Laser Target Hatch
+gt.blockmachines.hatch.energytunnel6.tier.09.name=UHV 262144A/t Laser Target Hatch
+gt.blockmachines.hatch.energytunnel7.tier.09.name=UHV 1048576A/t Laser Target Hatch
+gt.blockmachines.hatch.energytunnel1.tier.10.name=UEV 256A/t Laser Target Hatch
+gt.blockmachines.hatch.energytunnel2.tier.10.name=UEV 1024A/t Laser Target Hatch
+gt.blockmachines.hatch.energytunnel3.tier.10.name=UEV 4096A/t Laser Target Hatch
+gt.blockmachines.hatch.energytunnel4.tier.10.name=UEV 16384A/t Laser Target Hatch
+gt.blockmachines.hatch.energytunnel5.tier.10.name=UEV 65536A/t Laser Target Hatch
+gt.blockmachines.hatch.energytunnel6.tier.10.name=UEV 262144A/t Laser Target Hatch
+gt.blockmachines.hatch.energytunnel7.tier.10.name=UEV 1048576A/t Laser Target Hatch
+gt.blockmachines.hatch.energytunnel1.tier.11.name=UIV 256A/t Laser Target Hatch
+gt.blockmachines.hatch.energytunnel2.tier.11.name=UIV 1024A/t Laser Target Hatch
+gt.blockmachines.hatch.energytunnel3.tier.11.name=UIV 4096A/t Laser Target Hatch
+gt.blockmachines.hatch.energytunnel4.tier.11.name=UIV 16384A/t Laser Target Hatch
+gt.blockmachines.hatch.energytunnel5.tier.11.name=UIV 65536A/t Laser Target Hatch
+gt.blockmachines.hatch.energytunnel6.tier.11.name=UIV 262144A/t Laser Target Hatch
+gt.blockmachines.hatch.energytunnel7.tier.11.name=UIV 1048576A/t Laser Target Hatch
+gt.blockmachines.hatch.energytunnel1.tier.12.name=UMV 256A/t Laser Target Hatch
+gt.blockmachines.hatch.energytunnel2.tier.12.name=UMV 1024A/t Laser Target Hatch
+gt.blockmachines.hatch.energytunnel3.tier.12.name=UMV 4096A/t Laser Target Hatch
+gt.blockmachines.hatch.energytunnel4.tier.12.name=UMV 16384A/t Laser Target Hatch
+gt.blockmachines.hatch.energytunnel5.tier.12.name=UMV 65536A/t Laser Target Hatch
+gt.blockmachines.hatch.energytunnel6.tier.12.name=UMV 262144A/t Laser Target Hatch
+gt.blockmachines.hatch.energytunnel7.tier.12.name=UMV 1048576A/t Laser Target Hatch
+gt.blockmachines.hatch.energytunnel1.tier.13.name=UXV 256A/t Laser Target Hatch
+gt.blockmachines.hatch.energytunnel2.tier.13.name=UXV 1024A/t Laser Target Hatch
+gt.blockmachines.hatch.energytunnel3.tier.13.name=UXV 4096A/t Laser Target Hatch
+gt.blockmachines.hatch.energytunnel4.tier.13.name=UXV 16384A/t Laser Target Hatch
+gt.blockmachines.hatch.energytunnel5.tier.13.name=UXV 65536A/t Laser Target Hatch
+gt.blockmachines.hatch.energytunnel6.tier.13.name=UXV 262144A/t Laser Target Hatch
+gt.blockmachines.hatch.energytunnel7.tier.13.name=UXV 1048576A/t Laser Target Hatch
gt.blockmachines.hatch.energytunnel.tier.14.name=Legendary Laser Target Hatch
gt.blockmachines.hatch.energytunnel.desc.0=Energy injecting terminal for Multiblocks
gt.blockmachines.hatch.energytunnel.desc.1=Throughput
@@ -307,69 +307,69 @@ gt.blockmachines.hatch.dynamomulti64.tier.13.name=IV 64A Dynamo Hatch
gt.blockmachines.hatch.dynamomulti.desc.0=Multiple Ampere Energy Extractor for Multiblocks
gt.blockmachines.hatch.dynamomulti.desc.1=Amperes Out
-gt.blockmachines.hatch.dynamotunnel1.tier.05.name=IV 256/t Laser Source Hatch
-gt.blockmachines.hatch.dynamotunnel2.tier.05.name=IV 1024/t Laser Source Hatch
-gt.blockmachines.hatch.dynamotunnel3.tier.05.name=IV 4096/t Laser Source Hatch
-gt.blockmachines.hatch.dynamotunnel4.tier.05.name=IV 16384/t Laser Source Hatch
-gt.blockmachines.hatch.dynamotunnel5.tier.05.name=IV 65536/t Laser Source Hatch
-gt.blockmachines.hatch.dynamotunnel6.tier.05.name=IV 262144/t Laser Source Hatch
-gt.blockmachines.hatch.dynamotunnel7.tier.05.name=IV 1048576/t Laser Source Hatch
-gt.blockmachines.hatch.dynamotunnel1.tier.06.name=LuV 256/t Laser Source Hatch
-gt.blockmachines.hatch.dynamotunnel2.tier.06.name=LuV 1024/t Laser Source Hatch
-gt.blockmachines.hatch.dynamotunnel3.tier.06.name=LuV 4096/t Laser Source Hatch
-gt.blockmachines.hatch.dynamotunnel4.tier.06.name=LuV 16384/t Laser Source Hatch
-gt.blockmachines.hatch.dynamotunnel5.tier.06.name=LuV 65536/t Laser Source Hatch
-gt.blockmachines.hatch.dynamotunnel6.tier.06.name=LuV 262144/t Laser Source Hatch
-gt.blockmachines.hatch.dynamotunnel7.tier.06.name=LuV 1048576/t Laser Source Hatch
-gt.blockmachines.hatch.dynamotunnel1.tier.07.name=ZPM 256/t Laser Source Hatch
-gt.blockmachines.hatch.dynamotunnel2.tier.07.name=ZPM 1024/t Laser Source Hatch
-gt.blockmachines.hatch.dynamotunnel3.tier.07.name=ZPM 4096/t Laser Source Hatch
-gt.blockmachines.hatch.dynamotunnel4.tier.07.name=ZPM 16384/t Laser Source Hatch
-gt.blockmachines.hatch.dynamotunnel5.tier.07.name=ZPM 65536/t Laser Source Hatch
-gt.blockmachines.hatch.dynamotunnel6.tier.07.name=ZPM 262144/t Laser Source Hatch
-gt.blockmachines.hatch.dynamotunnel7.tier.07.name=ZPM 1048576/t Laser Source Hatch
-gt.blockmachines.hatch.dynamotunnel1.tier.08.name=UV 256/t Laser Source Hatch
-gt.blockmachines.hatch.dynamotunnel2.tier.08.name=UV 1024/t Laser Source Hatch
-gt.blockmachines.hatch.dynamotunnel3.tier.08.name=UV 4096/t Laser Source Hatch
-gt.blockmachines.hatch.dynamotunnel4.tier.08.name=UV 16384/t Laser Source Hatch
-gt.blockmachines.hatch.dynamotunnel5.tier.08.name=UV 65536/t Laser Source Hatch
-gt.blockmachines.hatch.dynamotunnel6.tier.08.name=UV 262144/t Laser Source Hatch
-gt.blockmachines.hatch.dynamotunnel7.tier.08.name=UV 1048576/t Laser Source Hatch
-gt.blockmachines.hatch.dynamotunnel1.tier.09.name=UHV 256/t Laser Source Hatch
-gt.blockmachines.hatch.dynamotunnel2.tier.09.name=UHV 1024/t Laser Source Hatch
-gt.blockmachines.hatch.dynamotunnel3.tier.09.name=UHV 4096/t Laser Source Hatch
-gt.blockmachines.hatch.dynamotunnel4.tier.09.name=UHV 16384/t Laser Source Hatch
-gt.blockmachines.hatch.dynamotunnel5.tier.09.name=UHV 65536/t Laser Source Hatch
-gt.blockmachines.hatch.dynamotunnel6.tier.09.name=UHV 262144/t Laser Source Hatch
-gt.blockmachines.hatch.dynamotunnel7.tier.09.name=UHV 1048576/t Laser Source Hatch
-gt.blockmachines.hatch.dynamotunnel1.tier.10.name=UEV 256/t Laser Source Hatch
-gt.blockmachines.hatch.dynamotunnel2.tier.10.name=UEV 1024/t Laser Source Hatch
-gt.blockmachines.hatch.dynamotunnel3.tier.10.name=UEV 4096/t Laser Source Hatch
-gt.blockmachines.hatch.dynamotunnel4.tier.10.name=UEV 16384/t Laser Source Hatch
-gt.blockmachines.hatch.dynamotunnel5.tier.10.name=UEV 65536/t Laser Source Hatch
-gt.blockmachines.hatch.dynamotunnel6.tier.10.name=UEV 262144/t Laser Source Hatch
-gt.blockmachines.hatch.dynamotunnel7.tier.10.name=UEV 1048576/t Laser Source Hatch
-gt.blockmachines.hatch.dynamotunnel1.tier.11.name=UIV 256/t Laser Source Hatch
-gt.blockmachines.hatch.dynamotunnel2.tier.11.name=UIV 1024/t Laser Source Hatch
-gt.blockmachines.hatch.dynamotunnel3.tier.11.name=UIV 4096/t Laser Source Hatch
-gt.blockmachines.hatch.dynamotunnel4.tier.11.name=UIV 16384/t Laser Source Hatch
-gt.blockmachines.hatch.dynamotunnel5.tier.11.name=UIV 65536/t Laser Source Hatch
-gt.blockmachines.hatch.dynamotunnel6.tier.11.name=UIV 262144/t Laser Source Hatch
-gt.blockmachines.hatch.dynamotunnel7.tier.11.name=UIV 1048576/t Laser Source Hatch
-gt.blockmachines.hatch.dynamotunnel1.tier.12.name=UMV 256/t Laser Source Hatch
-gt.blockmachines.hatch.dynamotunnel2.tier.12.name=UMV 1024/t Laser Source Hatch
-gt.blockmachines.hatch.dynamotunnel3.tier.12.name=UMV 4096/t Laser Source Hatch
-gt.blockmachines.hatch.dynamotunnel4.tier.12.name=UMV 16384/t Laser Source Hatch
-gt.blockmachines.hatch.dynamotunnel5.tier.12.name=UMV 65536/t Laser Source Hatch
-gt.blockmachines.hatch.dynamotunnel6.tier.12.name=UMV 262144/t Laser Source Hatch
-gt.blockmachines.hatch.dynamotunnel7.tier.12.name=UMV 1048576/t Laser Source Hatch
-gt.blockmachines.hatch.dynamotunnel1.tier.13.name=UXV 256/t Laser Source Hatch
-gt.blockmachines.hatch.dynamotunnel2.tier.13.name=UXV 1024/t Laser Source Hatch
-gt.blockmachines.hatch.dynamotunnel3.tier.13.name=UXV 4096/t Laser Source Hatch
-gt.blockmachines.hatch.dynamotunnel4.tier.13.name=UXV 16384/t Laser Source Hatch
-gt.blockmachines.hatch.dynamotunnel5.tier.13.name=UXV 65536/t Laser Source Hatch
-gt.blockmachines.hatch.dynamotunnel6.tier.13.name=UXV 262144/t Laser Source Hatch
-gt.blockmachines.hatch.dynamotunnel7.tier.13.name=UXV 1048576/t Laser Source Hatch
+gt.blockmachines.hatch.dynamotunnel1.tier.05.name=IV 256A/t Laser Source Hatch
+gt.blockmachines.hatch.dynamotunnel2.tier.05.name=IV 1024A/t Laser Source Hatch
+gt.blockmachines.hatch.dynamotunnel3.tier.05.name=IV 4096A/t Laser Source Hatch
+gt.blockmachines.hatch.dynamotunnel4.tier.05.name=IV 16384A/t Laser Source Hatch
+gt.blockmachines.hatch.dynamotunnel5.tier.05.name=IV 65536A/t Laser Source Hatch
+gt.blockmachines.hatch.dynamotunnel6.tier.05.name=IV 262144A/t Laser Source Hatch
+gt.blockmachines.hatch.dynamotunnel7.tier.05.name=IV 1048576A/t Laser Source Hatch
+gt.blockmachines.hatch.dynamotunnel1.tier.06.name=LuV 256A/t Laser Source Hatch
+gt.blockmachines.hatch.dynamotunnel2.tier.06.name=LuV 1024A/t Laser Source Hatch
+gt.blockmachines.hatch.dynamotunnel3.tier.06.name=LuV 4096A/t Laser Source Hatch
+gt.blockmachines.hatch.dynamotunnel4.tier.06.name=LuV 16384A/t Laser Source Hatch
+gt.blockmachines.hatch.dynamotunnel5.tier.06.name=LuV 65536A/t Laser Source Hatch
+gt.blockmachines.hatch.dynamotunnel6.tier.06.name=LuV 262144A/t Laser Source Hatch
+gt.blockmachines.hatch.dynamotunnel7.tier.06.name=LuV 1048576A/t Laser Source Hatch
+gt.blockmachines.hatch.dynamotunnel1.tier.07.name=ZPM 256A/t Laser Source Hatch
+gt.blockmachines.hatch.dynamotunnel2.tier.07.name=ZPM 1024A/t Laser Source Hatch
+gt.blockmachines.hatch.dynamotunnel3.tier.07.name=ZPM 4096A/t Laser Source Hatch
+gt.blockmachines.hatch.dynamotunnel4.tier.07.name=ZPM 16384A/t Laser Source Hatch
+gt.blockmachines.hatch.dynamotunnel5.tier.07.name=ZPM 65536A/t Laser Source Hatch
+gt.blockmachines.hatch.dynamotunnel6.tier.07.name=ZPM 262144A/t Laser Source Hatch
+gt.blockmachines.hatch.dynamotunnel7.tier.07.name=ZPM 1048576A/t Laser Source Hatch
+gt.blockmachines.hatch.dynamotunnel1.tier.08.name=UV 256A/t Laser Source Hatch
+gt.blockmachines.hatch.dynamotunnel2.tier.08.name=UV 1024A/t Laser Source Hatch
+gt.blockmachines.hatch.dynamotunnel3.tier.08.name=UV 4096A/t Laser Source Hatch
+gt.blockmachines.hatch.dynamotunnel4.tier.08.name=UV 16384A/t Laser Source Hatch
+gt.blockmachines.hatch.dynamotunnel5.tier.08.name=UV 65536A/t Laser Source Hatch
+gt.blockmachines.hatch.dynamotunnel6.tier.08.name=UV 262144A/t Laser Source Hatch
+gt.blockmachines.hatch.dynamotunnel7.tier.08.name=UV 1048576A/t Laser Source Hatch
+gt.blockmachines.hatch.dynamotunnel1.tier.09.name=UHV 256A/t Laser Source Hatch
+gt.blockmachines.hatch.dynamotunnel2.tier.09.name=UHV 1024A/t Laser Source Hatch
+gt.blockmachines.hatch.dynamotunnel3.tier.09.name=UHV 4096A/t Laser Source Hatch
+gt.blockmachines.hatch.dynamotunnel4.tier.09.name=UHV 16384A/t Laser Source Hatch
+gt.blockmachines.hatch.dynamotunnel5.tier.09.name=UHV 65536A/t Laser Source Hatch
+gt.blockmachines.hatch.dynamotunnel6.tier.09.name=UHV 262144A/t Laser Source Hatch
+gt.blockmachines.hatch.dynamotunnel7.tier.09.name=UHV 1048576A/t Laser Source Hatch
+gt.blockmachines.hatch.dynamotunnel1.tier.10.name=UEV 256A/t Laser Source Hatch
+gt.blockmachines.hatch.dynamotunnel2.tier.10.name=UEV 1024A/t Laser Source Hatch
+gt.blockmachines.hatch.dynamotunnel3.tier.10.name=UEV 4096A/t Laser Source Hatch
+gt.blockmachines.hatch.dynamotunnel4.tier.10.name=UEV 16384A/t Laser Source Hatch
+gt.blockmachines.hatch.dynamotunnel5.tier.10.name=UEV 65536A/t Laser Source Hatch
+gt.blockmachines.hatch.dynamotunnel6.tier.10.name=UEV 262144A/t Laser Source Hatch
+gt.blockmachines.hatch.dynamotunnel7.tier.10.name=UEV 1048576A/t Laser Source Hatch
+gt.blockmachines.hatch.dynamotunnel1.tier.11.name=UIV 256A/t Laser Source Hatch
+gt.blockmachines.hatch.dynamotunnel2.tier.11.name=UIV 1024A/t Laser Source Hatch
+gt.blockmachines.hatch.dynamotunnel3.tier.11.name=UIV 4096A/t Laser Source Hatch
+gt.blockmachines.hatch.dynamotunnel4.tier.11.name=UIV 16384A/t Laser Source Hatch
+gt.blockmachines.hatch.dynamotunnel5.tier.11.name=UIV 65536A/t Laser Source Hatch
+gt.blockmachines.hatch.dynamotunnel6.tier.11.name=UIV 262144A/t Laser Source Hatch
+gt.blockmachines.hatch.dynamotunnel7.tier.11.name=UIV 1048576A/t Laser Source Hatch
+gt.blockmachines.hatch.dynamotunnel1.tier.12.name=UMV 256A/t Laser Source Hatch
+gt.blockmachines.hatch.dynamotunnel2.tier.12.name=UMV 1024A/t Laser Source Hatch
+gt.blockmachines.hatch.dynamotunnel3.tier.12.name=UMV 4096A/t Laser Source Hatch
+gt.blockmachines.hatch.dynamotunnel4.tier.12.name=UMV 16384A/t Laser Source Hatch
+gt.blockmachines.hatch.dynamotunnel5.tier.12.name=UMV 65536A/t Laser Source Hatch
+gt.blockmachines.hatch.dynamotunnel6.tier.12.name=UMV 262144A/t Laser Source Hatch
+gt.blockmachines.hatch.dynamotunnel7.tier.12.name=UMV 1048576A/t Laser Source Hatch
+gt.blockmachines.hatch.dynamotunnel1.tier.13.name=UXV 256A/t Laser Source Hatch
+gt.blockmachines.hatch.dynamotunnel2.tier.13.name=UXV 1024A/t Laser Source Hatch
+gt.blockmachines.hatch.dynamotunnel3.tier.13.name=UXV 4096A/t Laser Source Hatch
+gt.blockmachines.hatch.dynamotunnel4.tier.13.name=UXV 16384A/t Laser Source Hatch
+gt.blockmachines.hatch.dynamotunnel5.tier.13.name=UXV 65536A/t Laser Source Hatch
+gt.blockmachines.hatch.dynamotunnel6.tier.13.name=UXV 262144A/t Laser Source Hatch
+gt.blockmachines.hatch.dynamotunnel7.tier.13.name=UXV 1048576A/t Laser Source Hatch
gt.blockmachines.hatch.dynamotunnel.tier.14.name=Legendary Laser Source Hatch
gt.blockmachines.hatch.dynamotunnel.desc.0=Energy extracting terminal for Multiblocks
gt.blockmachines.hatch.dynamotunnel.desc.1=Throughput
@@ -762,7 +762,7 @@ gt.blockmachines.machine.tt.tesla.desc.1=Lightning stoves for the rich
gt.blockmachines.debug.tt.pollutor.name=Debug Pollution Generator
gt.blockmachines.debug.tt.pollutor.desc.0=Shit genny broke!
gt.blockmachines.debug.tt.pollutor.desc.1=Infinite Producer/Consumer
-gt.blockmachines.debug.tt.pollutor.desc.2=Since i wanted one...
+gt.blockmachines.debug.tt.pollutor.desc.2=Since i wanted one?
gt.blockmachines.debug.tt.data.name=Debug Data Hatch
gt.blockmachines.debug.tt.data.desc.0=Quantum Data Output
gt.blockmachines.debug.tt.data.desc.1=High speed fibre optics connector.
diff --git a/src/main/resources/assets/tectech/lang/zh_CN.lang b/src/main/resources/assets/tectech/lang/zh_CN.lang
index 16d32829f7..6aae89bb1b 100644
--- a/src/main/resources/assets/tectech/lang/zh_CN.lang
+++ b/src/main/resources/assets/tectech/lang/zh_CN.lang
@@ -210,69 +210,69 @@ gt.blockmachines.hatch.energymulti64.tier.13.name=64安UXV能源仓
gt.blockmachines.hatch.energymulti.desc.0=为多方块机器以高电流输入能源
gt.blockmachines.hatch.energymulti.desc.1=输入电流
-gt.blockmachines.hatch.energytunnel1.tier.05.name=IV 256/t 激光靶仓
-gt.blockmachines.hatch.energytunnel2.tier.05.name=IV 1024/t 激光靶仓
-gt.blockmachines.hatch.energytunnel3.tier.05.name=IV 4096/t 激光靶仓
-gt.blockmachines.hatch.energytunnel4.tier.05.name=IV 16384/t 激光靶仓
-gt.blockmachines.hatch.energytunnel5.tier.05.name=IV 65536/t 激光靶仓
-gt.blockmachines.hatch.energytunnel6.tier.05.name=IV 262144/t 激光靶仓
-gt.blockmachines.hatch.energytunnel7.tier.05.name=IV 1048576/t 激光靶仓
-gt.blockmachines.hatch.energytunnel1.tier.06.name=LuV 256/t 激光靶仓
-gt.blockmachines.hatch.energytunnel2.tier.06.name=LuV 1024/t 激光靶仓
-gt.blockmachines.hatch.energytunnel3.tier.06.name=LuV 4096/t 激光靶仓
-gt.blockmachines.hatch.energytunnel4.tier.06.name=LuV 16384/t 激光靶仓
-gt.blockmachines.hatch.energytunnel5.tier.06.name=LuV 65536/t 激光靶仓
-gt.blockmachines.hatch.energytunnel6.tier.06.name=LuV 262144/t 激光靶仓
-gt.blockmachines.hatch.energytunnel7.tier.06.name=LuV 1048576/t 激光靶仓
-gt.blockmachines.hatch.energytunnel1.tier.07.name=ZPM 256/t 激光靶仓
-gt.blockmachines.hatch.energytunnel2.tier.07.name=ZPM 1024/t 激光靶仓
-gt.blockmachines.hatch.energytunnel3.tier.07.name=ZPM 4096/t 激光靶仓
-gt.blockmachines.hatch.energytunnel4.tier.07.name=ZPM 16384/t 激光靶仓
-gt.blockmachines.hatch.energytunnel5.tier.07.name=ZPM 65536/t 激光靶仓
-gt.blockmachines.hatch.energytunnel6.tier.07.name=ZPM 262144/t 激光靶仓
-gt.blockmachines.hatch.energytunnel7.tier.07.name=ZPM 1048576/t 激光靶仓
-gt.blockmachines.hatch.energytunnel1.tier.08.name=UV 256/t 激光靶仓
-gt.blockmachines.hatch.energytunnel2.tier.08.name=UV 1024/t 激光靶仓
-gt.blockmachines.hatch.energytunnel3.tier.08.name=UV 4096/t 激光靶仓
-gt.blockmachines.hatch.energytunnel4.tier.08.name=UV 16384/t 激光靶仓
-gt.blockmachines.hatch.energytunnel5.tier.08.name=UV 65536/t 激光靶仓
-gt.blockmachines.hatch.energytunnel6.tier.08.name=UV 262144/t 激光靶仓
-gt.blockmachines.hatch.energytunnel7.tier.08.name=UV 1048576/t 激光靶仓
-gt.blockmachines.hatch.energytunnel1.tier.09.name=UHV 256/t 激光靶仓
-gt.blockmachines.hatch.energytunnel2.tier.09.name=UHV 1024/t 激光靶仓
-gt.blockmachines.hatch.energytunnel3.tier.09.name=UHV 4096/t 激光靶仓
-gt.blockmachines.hatch.energytunnel4.tier.09.name=UHV 16384/t 激光靶仓
-gt.blockmachines.hatch.energytunnel5.tier.09.name=UHV 65536/t 激光靶仓
-gt.blockmachines.hatch.energytunnel6.tier.09.name=UHV 262144/t 激光靶仓
-gt.blockmachines.hatch.energytunnel7.tier.09.name=UHV 1048576/t 激光靶仓
-gt.blockmachines.hatch.energytunnel1.tier.10.name=UEV 256/t 激光靶仓
-gt.blockmachines.hatch.energytunnel2.tier.10.name=UEV 1024/t 激光靶仓
-gt.blockmachines.hatch.energytunnel3.tier.10.name=UEV 4096/t 激光靶仓
-gt.blockmachines.hatch.energytunnel4.tier.10.name=UEV 16384/t 激光靶仓
-gt.blockmachines.hatch.energytunnel5.tier.10.name=UEV 65536/t 激光靶仓
-gt.blockmachines.hatch.energytunnel6.tier.10.name=UEV 262144/t 激光靶仓
-gt.blockmachines.hatch.energytunnel7.tier.10.name=UEV 1048576/t 激光靶仓
-gt.blockmachines.hatch.energytunnel1.tier.11.name=UIV 256/t 激光靶仓
-gt.blockmachines.hatch.energytunnel2.tier.11.name=UIV 1024/t 激光靶仓
-gt.blockmachines.hatch.energytunnel3.tier.11.name=UIV 4096/t 激光靶仓
-gt.blockmachines.hatch.energytunnel4.tier.11.name=UIV 16384/t 激光靶仓
-gt.blockmachines.hatch.energytunnel5.tier.11.name=UIV 65536/t 激光靶仓
-gt.blockmachines.hatch.energytunnel6.tier.11.name=UIV 262144/t 激光靶仓
-gt.blockmachines.hatch.energytunnel7.tier.11.name=UIV 1048576/t 激光靶仓
-gt.blockmachines.hatch.energytunnel1.tier.12.name=UMV 256/t 激光靶仓
-gt.blockmachines.hatch.energytunnel2.tier.12.name=UMV 1024/t 激光靶仓
-gt.blockmachines.hatch.energytunnel3.tier.12.name=UMV 4096/t 激光靶仓
-gt.blockmachines.hatch.energytunnel4.tier.12.name=UMV 16384/t 激光靶仓
-gt.blockmachines.hatch.energytunnel5.tier.12.name=UMV 65536/t 激光靶仓
-gt.blockmachines.hatch.energytunnel6.tier.12.name=UMV 262144/t 激光靶仓
-gt.blockmachines.hatch.energytunnel7.tier.12.name=UMV 1048576/t 激光靶仓
-gt.blockmachines.hatch.energytunnel1.tier.13.name=UXV 256/t 激光靶仓
-gt.blockmachines.hatch.energytunnel2.tier.13.name=UXV 1024/t 激光靶仓
-gt.blockmachines.hatch.energytunnel3.tier.13.name=UXV 4096/t 激光靶仓
-gt.blockmachines.hatch.energytunnel4.tier.13.name=UXV 16384/t 激光靶仓
-gt.blockmachines.hatch.energytunnel5.tier.13.name=UXV 65536/t 激光靶仓
-gt.blockmachines.hatch.energytunnel6.tier.13.name=UXV 262144/t 激光靶仓
-gt.blockmachines.hatch.energytunnel7.tier.13.name=UXV 1048576/t 激光靶仓
+gt.blockmachines.hatch.energytunnel1.tier.05.name=IV 256A/t 激光靶仓
+gt.blockmachines.hatch.energytunnel2.tier.05.name=IV 1024A/t 激光靶仓
+gt.blockmachines.hatch.energytunnel3.tier.05.name=IV 4096A/t 激光靶仓
+gt.blockmachines.hatch.energytunnel4.tier.05.name=IV 16384A/t 激光靶仓
+gt.blockmachines.hatch.energytunnel5.tier.05.name=IV 65536A/t 激光靶仓
+gt.blockmachines.hatch.energytunnel6.tier.05.name=IV 262144A/t 激光靶仓
+gt.blockmachines.hatch.energytunnel7.tier.05.name=IV 1048576A/t 激光靶仓
+gt.blockmachines.hatch.energytunnel1.tier.06.name=LuV 256A/t 激光靶仓
+gt.blockmachines.hatch.energytunnel2.tier.06.name=LuV 1024A/t 激光靶仓
+gt.blockmachines.hatch.energytunnel3.tier.06.name=LuV 4096A/t 激光靶仓
+gt.blockmachines.hatch.energytunnel4.tier.06.name=LuV 16384A/t 激光靶仓
+gt.blockmachines.hatch.energytunnel5.tier.06.name=LuV 65536A/t 激光靶仓
+gt.blockmachines.hatch.energytunnel6.tier.06.name=LuV 262144A/t 激光靶仓
+gt.blockmachines.hatch.energytunnel7.tier.06.name=LuV 1048576A/t 激光靶仓
+gt.blockmachines.hatch.energytunnel1.tier.07.name=ZPM 256A/t 激光靶仓
+gt.blockmachines.hatch.energytunnel2.tier.07.name=ZPM 1024A/t 激光靶仓
+gt.blockmachines.hatch.energytunnel3.tier.07.name=ZPM 4096A/t 激光靶仓
+gt.blockmachines.hatch.energytunnel4.tier.07.name=ZPM 16384A/t 激光靶仓
+gt.blockmachines.hatch.energytunnel5.tier.07.name=ZPM 65536A/t 激光靶仓
+gt.blockmachines.hatch.energytunnel6.tier.07.name=ZPM 262144A/t 激光靶仓
+gt.blockmachines.hatch.energytunnel7.tier.07.name=ZPM 1048576A/t 激光靶仓
+gt.blockmachines.hatch.energytunnel1.tier.08.name=UV 256A/t 激光靶仓
+gt.blockmachines.hatch.energytunnel2.tier.08.name=UV 1024A/t 激光靶仓
+gt.blockmachines.hatch.energytunnel3.tier.08.name=UV 4096A/t 激光靶仓
+gt.blockmachines.hatch.energytunnel4.tier.08.name=UV 16384A/t 激光靶仓
+gt.blockmachines.hatch.energytunnel5.tier.08.name=UV 65536A/t 激光靶仓
+gt.blockmachines.hatch.energytunnel6.tier.08.name=UV 262144A/t 激光靶仓
+gt.blockmachines.hatch.energytunnel7.tier.08.name=UV 1048576A/t 激光靶仓
+gt.blockmachines.hatch.energytunnel1.tier.09.name=UHV 256A/t 激光靶仓
+gt.blockmachines.hatch.energytunnel2.tier.09.name=UHV 1024A/t 激光靶仓
+gt.blockmachines.hatch.energytunnel3.tier.09.name=UHV 4096A/t 激光靶仓
+gt.blockmachines.hatch.energytunnel4.tier.09.name=UHV 16384A/t 激光靶仓
+gt.blockmachines.hatch.energytunnel5.tier.09.name=UHV 65536A/t 激光靶仓
+gt.blockmachines.hatch.energytunnel6.tier.09.name=UHV 262144A/t 激光靶仓
+gt.blockmachines.hatch.energytunnel7.tier.09.name=UHV 1048576A/t 激光靶仓
+gt.blockmachines.hatch.energytunnel1.tier.10.name=UEV 256A/t 激光靶仓
+gt.blockmachines.hatch.energytunnel2.tier.10.name=UEV 1024A/t 激光靶仓
+gt.blockmachines.hatch.energytunnel3.tier.10.name=UEV 4096A/t 激光靶仓
+gt.blockmachines.hatch.energytunnel4.tier.10.name=UEV 16384A/t 激光靶仓
+gt.blockmachines.hatch.energytunnel5.tier.10.name=UEV 65536A/t 激光靶仓
+gt.blockmachines.hatch.energytunnel6.tier.10.name=UEV 262144A/t 激光靶仓
+gt.blockmachines.hatch.energytunnel7.tier.10.name=UEV 1048576A/t 激光靶仓
+gt.blockmachines.hatch.energytunnel1.tier.11.name=UIV 256A/t 激光靶仓
+gt.blockmachines.hatch.energytunnel2.tier.11.name=UIV 1024A/t 激光靶仓
+gt.blockmachines.hatch.energytunnel3.tier.11.name=UIV 4096A/t 激光靶仓
+gt.blockmachines.hatch.energytunnel4.tier.11.name=UIV 16384A/t 激光靶仓
+gt.blockmachines.hatch.energytunnel5.tier.11.name=UIV 65536A/t 激光靶仓
+gt.blockmachines.hatch.energytunnel6.tier.11.name=UIV 262144A/t 激光靶仓
+gt.blockmachines.hatch.energytunnel7.tier.11.name=UIV 1048576A/t 激光靶仓
+gt.blockmachines.hatch.energytunnel1.tier.12.name=UMV 256A/t 激光靶仓
+gt.blockmachines.hatch.energytunnel2.tier.12.name=UMV 1024A/t 激光靶仓
+gt.blockmachines.hatch.energytunnel3.tier.12.name=UMV 4096A/t 激光靶仓
+gt.blockmachines.hatch.energytunnel4.tier.12.name=UMV 16384A/t 激光靶仓
+gt.blockmachines.hatch.energytunnel5.tier.12.name=UMV 65536A/t 激光靶仓
+gt.blockmachines.hatch.energytunnel6.tier.12.name=UMV 262144A/t 激光靶仓
+gt.blockmachines.hatch.energytunnel7.tier.12.name=UMV 1048576A/t 激光靶仓
+gt.blockmachines.hatch.energytunnel1.tier.13.name=UXV 256A/t 激光靶仓
+gt.blockmachines.hatch.energytunnel2.tier.13.name=UXV 1024A/t 激光靶仓
+gt.blockmachines.hatch.energytunnel3.tier.13.name=UXV 4096A/t 激光靶仓
+gt.blockmachines.hatch.energytunnel4.tier.13.name=UXV 16384A/t 激光靶仓
+gt.blockmachines.hatch.energytunnel5.tier.13.name=UXV 65536A/t 激光靶仓
+gt.blockmachines.hatch.energytunnel6.tier.13.name=UXV 262144A/t 激光靶仓
+gt.blockmachines.hatch.energytunnel7.tier.13.name=UXV 1048576A/t 激光靶仓
gt.blockmachines.hatch.energytunnel.tier.14.name=传奇激光靶仓
gt.blockmachines.hatch.energytunnel.desc.0=多方块机器的能量输入端
gt.blockmachines.hatch.energytunnel.desc.1=通量
@@ -307,69 +307,69 @@ gt.blockmachines.hatch.dynamomulti64.tier.13.name=64安IV动力仓
gt.blockmachines.hatch.dynamomulti.desc.0=从多方块机器以高电流输出能源
gt.blockmachines.hatch.dynamomulti.desc.1=输出电流
-gt.blockmachines.hatch.dynamotunnel1.tier.05.name=IV 256/t 激光源仓
-gt.blockmachines.hatch.dynamotunnel2.tier.05.name=IV 1024/t 激光源仓
-gt.blockmachines.hatch.dynamotunnel3.tier.05.name=IV 4096/t 激光源仓
-gt.blockmachines.hatch.dynamotunnel4.tier.05.name=IV 16384/t 激光源仓
-gt.blockmachines.hatch.dynamotunnel5.tier.05.name=IV 65536/t 激光源仓
-gt.blockmachines.hatch.dynamotunnel6.tier.05.name=IV 262144/t 激光源仓
-gt.blockmachines.hatch.dynamotunnel7.tier.05.name=IV 1048576/t 激光源仓
-gt.blockmachines.hatch.dynamotunnel1.tier.06.name=LuV 256/t 激光源仓
-gt.blockmachines.hatch.dynamotunnel2.tier.06.name=LuV 1024/t 激光源仓
-gt.blockmachines.hatch.dynamotunnel3.tier.06.name=LuV 4096/t 激光源仓
-gt.blockmachines.hatch.dynamotunnel4.tier.06.name=LuV 16384/t 激光源仓
-gt.blockmachines.hatch.dynamotunnel5.tier.06.name=LuV 65536/t 激光源仓
-gt.blockmachines.hatch.dynamotunnel6.tier.06.name=LuV 262144/t 激光源仓
-gt.blockmachines.hatch.dynamotunnel7.tier.06.name=LuV 1048576/t 激光源仓
-gt.blockmachines.hatch.dynamotunnel1.tier.07.name=ZPM 256/t 激光源仓
-gt.blockmachines.hatch.dynamotunnel2.tier.07.name=ZPM 1024/t 激光源仓
-gt.blockmachines.hatch.dynamotunnel3.tier.07.name=ZPM 4096/t 激光源仓
-gt.blockmachines.hatch.dynamotunnel4.tier.07.name=ZPM 16384/t 激光源仓
-gt.blockmachines.hatch.dynamotunnel5.tier.07.name=ZPM 65536/t 激光源仓
-gt.blockmachines.hatch.dynamotunnel6.tier.07.name=ZPM 262144/t 激光源仓
-gt.blockmachines.hatch.dynamotunnel7.tier.07.name=ZPM 1048576/t 激光源仓
-gt.blockmachines.hatch.dynamotunnel1.tier.08.name=UV 256/t 激光源仓
-gt.blockmachines.hatch.dynamotunnel2.tier.08.name=UV 1024/t 激光源仓
-gt.blockmachines.hatch.dynamotunnel3.tier.08.name=UV 4096/t 激光源仓
-gt.blockmachines.hatch.dynamotunnel4.tier.08.name=UV 16384/t 激光源仓
-gt.blockmachines.hatch.dynamotunnel5.tier.08.name=UV 65536/t 激光源仓
-gt.blockmachines.hatch.dynamotunnel6.tier.08.name=UV 262144/t 激光源仓
-gt.blockmachines.hatch.dynamotunnel7.tier.08.name=UV 1048576/t 激光源仓
-gt.blockmachines.hatch.dynamotunnel1.tier.09.name=UHV 256/t 激光源仓
-gt.blockmachines.hatch.dynamotunnel2.tier.09.name=UHV 1024/t 激光源仓
-gt.blockmachines.hatch.dynamotunnel3.tier.09.name=UHV 4096/t 激光源仓
-gt.blockmachines.hatch.dynamotunnel4.tier.09.name=UHV 16384/t 激光源仓
-gt.blockmachines.hatch.dynamotunnel5.tier.09.name=UHV 65536/t 激光源仓
-gt.blockmachines.hatch.dynamotunnel6.tier.09.name=UHV 262144/t 激光源仓
-gt.blockmachines.hatch.dynamotunnel7.tier.09.name=UHV 1048576/t 激光源仓
-gt.blockmachines.hatch.dynamotunnel1.tier.10.name=UEV 256/t 激光源仓
-gt.blockmachines.hatch.dynamotunnel2.tier.10.name=UEV 1024/t 激光源仓
-gt.blockmachines.hatch.dynamotunnel3.tier.10.name=UEV 4096/t 激光源仓
-gt.blockmachines.hatch.dynamotunnel4.tier.10.name=UEV 16384/t 激光源仓
-gt.blockmachines.hatch.dynamotunnel5.tier.10.name=UEV 65536/t 激光源仓
-gt.blockmachines.hatch.dynamotunnel6.tier.10.name=UEV 262144/t 激光源仓
-gt.blockmachines.hatch.dynamotunnel7.tier.10.name=UEV 1048576/t 激光源仓
-gt.blockmachines.hatch.dynamotunnel1.tier.11.name=UIV 256/t 激光源仓
-gt.blockmachines.hatch.dynamotunnel2.tier.11.name=UIV 1024/t 激光源仓
-gt.blockmachines.hatch.dynamotunnel3.tier.11.name=UIV 4096/t 激光源仓
-gt.blockmachines.hatch.dynamotunnel4.tier.11.name=UIV 16384/t 激光源仓
-gt.blockmachines.hatch.dynamotunnel5.tier.11.name=UIV 65536/t 激光源仓
-gt.blockmachines.hatch.dynamotunnel6.tier.11.name=UIV 262144/t 激光源仓
-gt.blockmachines.hatch.dynamotunnel7.tier.11.name=UIV 1048576/t 激光源仓
-gt.blockmachines.hatch.dynamotunnel1.tier.12.name=UMV 256/t 激光源仓
-gt.blockmachines.hatch.dynamotunnel2.tier.12.name=UMV 1024/t 激光源仓
-gt.blockmachines.hatch.dynamotunnel3.tier.12.name=UMV 4096/t 激光源仓
-gt.blockmachines.hatch.dynamotunnel4.tier.12.name=UMV 16384/t 激光源仓
-gt.blockmachines.hatch.dynamotunnel5.tier.12.name=UMV 65536/t 激光源仓
-gt.blockmachines.hatch.dynamotunnel6.tier.12.name=UMV 262144/t 激光源仓
-gt.blockmachines.hatch.dynamotunnel7.tier.12.name=UMV 1048576/t 激光源仓
-gt.blockmachines.hatch.dynamotunnel1.tier.13.name=UXV 256/t 激光源仓
-gt.blockmachines.hatch.dynamotunnel2.tier.13.name=UXV 1024/t 激光源仓
-gt.blockmachines.hatch.dynamotunnel3.tier.13.name=UXV 4096/t 激光源仓
-gt.blockmachines.hatch.dynamotunnel4.tier.13.name=UXV 16384/t 激光源仓
-gt.blockmachines.hatch.dynamotunnel5.tier.13.name=UXV 65536/t 激光源仓
-gt.blockmachines.hatch.dynamotunnel6.tier.13.name=UXV 262144/t 激光源仓
-gt.blockmachines.hatch.dynamotunnel7.tier.13.name=UXV 1048576/t 激光源仓
+gt.blockmachines.hatch.dynamotunnel1.tier.05.name=IV 256A/t 激光源仓
+gt.blockmachines.hatch.dynamotunnel2.tier.05.name=IV 1024A/t 激光源仓
+gt.blockmachines.hatch.dynamotunnel3.tier.05.name=IV 4096A/t 激光源仓
+gt.blockmachines.hatch.dynamotunnel4.tier.05.name=IV 16384A/t 激光源仓
+gt.blockmachines.hatch.dynamotunnel5.tier.05.name=IV 65536A/t 激光源仓
+gt.blockmachines.hatch.dynamotunnel6.tier.05.name=IV 262144A/t 激光源仓
+gt.blockmachines.hatch.dynamotunnel7.tier.05.name=IV 1048576A/t 激光源仓
+gt.blockmachines.hatch.dynamotunnel1.tier.06.name=LuV 256A/t 激光源仓
+gt.blockmachines.hatch.dynamotunnel2.tier.06.name=LuV 1024A/t 激光源仓
+gt.blockmachines.hatch.dynamotunnel3.tier.06.name=LuV 4096A/t 激光源仓
+gt.blockmachines.hatch.dynamotunnel4.tier.06.name=LuV 16384A/t 激光源仓
+gt.blockmachines.hatch.dynamotunnel5.tier.06.name=LuV 65536A/t 激光源仓
+gt.blockmachines.hatch.dynamotunnel6.tier.06.name=LuV 262144A/t 激光源仓
+gt.blockmachines.hatch.dynamotunnel7.tier.06.name=LuV 1048576A/t 激光源仓
+gt.blockmachines.hatch.dynamotunnel1.tier.07.name=ZPM 256A/t 激光源仓
+gt.blockmachines.hatch.dynamotunnel2.tier.07.name=ZPM 1024A/t 激光源仓
+gt.blockmachines.hatch.dynamotunnel3.tier.07.name=ZPM 4096A/t 激光源仓
+gt.blockmachines.hatch.dynamotunnel4.tier.07.name=ZPM 16384A/t 激光源仓
+gt.blockmachines.hatch.dynamotunnel5.tier.07.name=ZPM 65536A/t 激光源仓
+gt.blockmachines.hatch.dynamotunnel6.tier.07.name=ZPM 262144A/t 激光源仓
+gt.blockmachines.hatch.dynamotunnel7.tier.07.name=ZPM 1048576A/t 激光源仓
+gt.blockmachines.hatch.dynamotunnel1.tier.08.name=UV 256A/t 激光源仓
+gt.blockmachines.hatch.dynamotunnel2.tier.08.name=UV 1024A/t 激光源仓
+gt.blockmachines.hatch.dynamotunnel3.tier.08.name=UV 4096A/t 激光源仓
+gt.blockmachines.hatch.dynamotunnel4.tier.08.name=UV 16384A/t 激光源仓
+gt.blockmachines.hatch.dynamotunnel5.tier.08.name=UV 65536A/t 激光源仓
+gt.blockmachines.hatch.dynamotunnel6.tier.08.name=UV 262144A/t 激光源仓
+gt.blockmachines.hatch.dynamotunnel7.tier.08.name=UV 1048576A/t 激光源仓
+gt.blockmachines.hatch.dynamotunnel1.tier.09.name=UHV 256A/t 激光源仓
+gt.blockmachines.hatch.dynamotunnel2.tier.09.name=UHV 1024A/t 激光源仓
+gt.blockmachines.hatch.dynamotunnel3.tier.09.name=UHV 4096A/t 激光源仓
+gt.blockmachines.hatch.dynamotunnel4.tier.09.name=UHV 16384A/t 激光源仓
+gt.blockmachines.hatch.dynamotunnel5.tier.09.name=UHV 65536A/t 激光源仓
+gt.blockmachines.hatch.dynamotunnel6.tier.09.name=UHV 262144A/t 激光源仓
+gt.blockmachines.hatch.dynamotunnel7.tier.09.name=UHV 1048576A/t 激光源仓
+gt.blockmachines.hatch.dynamotunnel1.tier.10.name=UEV 256A/t 激光源仓
+gt.blockmachines.hatch.dynamotunnel2.tier.10.name=UEV 1024A/t 激光源仓
+gt.blockmachines.hatch.dynamotunnel3.tier.10.name=UEV 4096A/t 激光源仓
+gt.blockmachines.hatch.dynamotunnel4.tier.10.name=UEV 16384A/t 激光源仓
+gt.blockmachines.hatch.dynamotunnel5.tier.10.name=UEV 65536A/t 激光源仓
+gt.blockmachines.hatch.dynamotunnel6.tier.10.name=UEV 262144A/t 激光源仓
+gt.blockmachines.hatch.dynamotunnel7.tier.10.name=UEV 1048576A/t 激光源仓
+gt.blockmachines.hatch.dynamotunnel1.tier.11.name=UIV 256A/t 激光源仓
+gt.blockmachines.hatch.dynamotunnel2.tier.11.name=UIV 1024A/t 激光源仓
+gt.blockmachines.hatch.dynamotunnel3.tier.11.name=UIV 4096A/t 激光源仓
+gt.blockmachines.hatch.dynamotunnel4.tier.11.name=UIV 16384A/t 激光源仓
+gt.blockmachines.hatch.dynamotunnel5.tier.11.name=UIV 65536A/t 激光源仓
+gt.blockmachines.hatch.dynamotunnel6.tier.11.name=UIV 262144A/t 激光源仓
+gt.blockmachines.hatch.dynamotunnel7.tier.11.name=UIV 1048576A/t 激光源仓
+gt.blockmachines.hatch.dynamotunnel1.tier.12.name=UMV 256A/t 激光源仓
+gt.blockmachines.hatch.dynamotunnel2.tier.12.name=UMV 1024A/t 激光源仓
+gt.blockmachines.hatch.dynamotunnel3.tier.12.name=UMV 4096A/t 激光源仓
+gt.blockmachines.hatch.dynamotunnel4.tier.12.name=UMV 16384A/t 激光源仓
+gt.blockmachines.hatch.dynamotunnel5.tier.12.name=UMV 65536A/t 激光源仓
+gt.blockmachines.hatch.dynamotunnel6.tier.12.name=UMV 262144A/t 激光源仓
+gt.blockmachines.hatch.dynamotunnel7.tier.12.name=UMV 1048576A/t 激光源仓
+gt.blockmachines.hatch.dynamotunnel1.tier.13.name=UXV 256A/t 激光源仓
+gt.blockmachines.hatch.dynamotunnel2.tier.13.name=UXV 1024A/t 激光源仓
+gt.blockmachines.hatch.dynamotunnel3.tier.13.name=UXV 4096A/t 激光源仓
+gt.blockmachines.hatch.dynamotunnel4.tier.13.name=UXV 16384A/t 激光源仓
+gt.blockmachines.hatch.dynamotunnel5.tier.13.name=UXV 65536A/t 激光源仓
+gt.blockmachines.hatch.dynamotunnel6.tier.13.name=UXV 262144A/t 激光源仓
+gt.blockmachines.hatch.dynamotunnel7.tier.13.name=UXV 1048576A/t 激光源仓
gt.blockmachines.hatch.dynamotunnel.tier.14.name=传奇激光源仓
gt.blockmachines.hatch.dynamotunnel.desc.0=多方块机器的能量输出端
gt.blockmachines.hatch.dynamotunnel.desc.1=通量
@@ -762,7 +762,7 @@ gt.blockmachines.machine.tt.tesla.desc.1=富人的闪电洪炉
gt.blockmachines.debug.tt.pollutor.name=Debug污染生成机
gt.blockmachines.debug.tt.pollutor.desc.0=该死的genny破产了!
gt.blockmachines.debug.tt.pollutor.desc.1=无限的生产者/消费者
-gt.blockmachines.debug.tt.pollutor.desc.2=我只是想要一个...
+gt.blockmachines.debug.tt.pollutor.desc.2=我只是想要一个?
gt.blockmachines.debug.tt.data.name=Debug数据仓
gt.blockmachines.debug.tt.data.desc.0=量子数据输出
gt.blockmachines.debug.tt.data.desc.1=高速光纤接口
diff --git a/src/main/resources/assets/tectech/sounds/fx_lo_freq.ogg b/src/main/resources/assets/tectech/sounds/fx_lo_freq.ogg
index 8eab2d92e2..f02581ae56 100644
--- a/src/main/resources/assets/tectech/sounds/fx_lo_freq.ogg
+++ b/src/main/resources/assets/tectech/sounds/fx_lo_freq.ogg
Binary files differ
diff --git a/src/main/resources/assets/tectech/sounds/fx_mid_freq.ogg b/src/main/resources/assets/tectech/sounds/fx_mid_freq.ogg
index b16d1297f4..10ac371e19 100644
--- a/src/main/resources/assets/tectech/sounds/fx_mid_freq.ogg
+++ b/src/main/resources/assets/tectech/sounds/fx_mid_freq.ogg
Binary files differ