diff options
author | Sphyix <masifede2@gmail.com> | 2022-01-21 00:30:28 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-21 00:30:28 +0100 |
commit | 3b12f80a256ce557624ed02354e5ad40bb6a7dd8 (patch) | |
tree | 209cceb66e2e4db19a99da18693e50c610e909a1 /src | |
parent | 223bbd822b8656fe4b5d805db71dab4730dc145d (diff) | |
parent | 2f4fc523ab40b1d0bbf8918d2632159d3576c627 (diff) | |
download | GT5-Unofficial-3b12f80a256ce557624ed02354e5ad40bb6a7dd8.tar.gz GT5-Unofficial-3b12f80a256ce557624ed02354e5ad40bb6a7dd8.tar.bz2 GT5-Unofficial-3b12f80a256ce557624ed02354e5ad40bb6a7dd8.zip |
Merge branch 'GTNewHorizons:master' into master
Diffstat (limited to 'src')
80 files changed, 1112 insertions, 827 deletions
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 c95caf742e..5abd11a86d 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 @@ -170,6 +170,23 @@ public class DreamCraftRecipeLoader implements Runnable { getOrDefault("Trinium", Materials.Osmium).getMolten(1296), }, CustomItemList.eM_Coil.get(4), 800, 2000000); + //infinite oil rig + TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.OilDrill3.get(1), + 16777216, 2048, 2000000, 4, new ItemStack[]{ + ItemList.OilDrill3.get(1), + GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Neutronium, 4), + GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Infinite, 4), + ItemList.Electric_Motor_UHV.get(4), + ItemList.Electric_Pump_UHV.get(4), + GT_OreDictUnificator.get(OrePrefixes.gearGt, Materials.Neutronium, 4), + ItemList.Sensor_UHV.get(3), + ItemList.Field_Generator_UHV.get(3), + GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Neutronium, 12) + }, new FluidStack[]{ + Materials.SolderingAlloy.getMolten(1296), + Materials.Neutronium.getMolten(576) + }, ItemList.OilDrillInfinite.get(1), 6000, 2000000); + //Tesla Base GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ GT_OreDictUnificator.get(OrePrefixes.plate, Materials.NickelZincFerrite, 6), @@ -260,9 +277,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.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); + 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(9216), 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(9216), 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(9216), 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); @@ -289,9 +306,9 @@ 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.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); + 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(9216), 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(9216), 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(9216), CustomItemList.eM_energyMulti64_UIV.get(1), 400, 8000000); //Buck Converter IV-UIV if (Loader.isModLoaded("bartworks")) { @@ -711,7 +728,7 @@ public class DreamCraftRecipeLoader implements Runnable { new FluidStack(FluidRegistry.getFluid("ic2coolant"), 2000), }, CustomItemList.Machine_Multi_Infuser.get(1), 8000, 2000000); - //Motor UV-UHV + //Motor UHV-UEV TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.Electric_Motor_UV.get(1L), 24000, 32, 100000, 4, new ItemStack[]{ GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.SamariumMagnetic, 4L), @@ -750,7 +767,7 @@ public class DreamCraftRecipeLoader implements Runnable { Materials.SolderingAlloy.getMolten(5184), Materials.Lubricant.getFluid(8000)}, ItemList.Electric_Motor_UEV.get(1L), 2000, 800000); - //Pumps UV-UHV + //Pumps UHV-UEV TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.Electric_Pump_UV.get(1L), 24000, 32, 100000, 4, new Object[]{ ItemList.Electric_Motor_UHV.get(1L), @@ -777,7 +794,7 @@ public class DreamCraftRecipeLoader implements Runnable { Materials.SolderingAlloy.getMolten(5184), Materials.Lubricant.getFluid(8000)}, ItemList.Electric_Pump_UEV.get(1), 2000, 800000); - //Conveyor Belt UV-UHV + //Conveyor Belt UHV-UEV TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.Conveyor_Module_UV.get(1L), 24000, 32, 100000, 4, new Object[]{ ItemList.Electric_Motor_UHV.get(2L), @@ -801,10 +818,9 @@ public class DreamCraftRecipeLoader implements Runnable { new Object[]{OrePrefixes.plate.get(Materials.AnySyntheticRubber), 16L}}, new FluidStack[]{ Materials.Quantium.getMolten(2592), Materials.SolderingAlloy.getMolten(5184), - Materials.Lubricant.getFluid(8000), - Materials.Silicone.getMolten(11520)}, ItemList.Conveyor_Module_UEV.get(1), 2000, 800000); + Materials.Lubricant.getFluid(8000)}, ItemList.Conveyor_Module_UEV.get(1), 2000, 800000); - //Piston UV-UHV + //Piston UHV-UEV TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.Electric_Piston_UV.get(1L), 24000, 32, 100000, 4, new ItemStack[]{ ItemList.Electric_Motor_UHV.get(1L), @@ -833,7 +849,7 @@ public class DreamCraftRecipeLoader implements Runnable { Materials.SolderingAlloy.getMolten(5184), Materials.Lubricant.getFluid(8000)}, ItemList.Electric_Piston_UEV.get(1), 2000, 800000); - //Robot Arm UV-UHV + //Robot Arm UHV-UEV TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.Robot_Arm_UV.get(1L), 24000, 32, 100000, 4, new Object[]{ GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.CosmicNeutronium, 8L), @@ -864,7 +880,7 @@ public class DreamCraftRecipeLoader implements Runnable { Materials.SolderingAlloy.getMolten(9216), Materials.Lubricant.getFluid(8000)}, ItemList.Robot_Arm_UEV.get(1L), 2000, 800000); - //Emitter UV-UHV + //Emitter UHV-UEV TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.Emitter_UV.get(1L), 24000, 32, 100000, 4, new Object[]{ GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.CosmicNeutronium, 1L), @@ -897,7 +913,7 @@ public class DreamCraftRecipeLoader implements Runnable { Materials.SolderingAlloy.getMolten(9216)}, ItemList.Emitter_UEV.get(1L), 2000, 800000); - //Sensor UV-UHV + //Sensor UHV-UEV TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.Sensor_UV.get(1L), 24000, 32, 100000, 4, new Object[]{ GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.CosmicNeutronium, 1L), @@ -930,7 +946,7 @@ public class DreamCraftRecipeLoader implements Runnable { Materials.SolderingAlloy.getMolten(9216)}, ItemList.Sensor_UEV.get(1L), 2000, 800000); - //Fieldgen UV and UHV + //Fieldgen UHV and UEV TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.Field_Generator_UV.get(1), 48000, 64, 200000, 8, new Object[]{ GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.CosmicNeutronium, 1L), @@ -973,7 +989,7 @@ public class DreamCraftRecipeLoader implements Runnable { Materials.SolderingAlloy.getMolten(9216)}, ItemList.Field_Generator_UEV.get(1L), 4000, 800000); - //UHV Energy Hatch & Dynamo + //UHV-UMV Energy Hatch & Dynamo TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.Hatch_Energy_UV.get(1L), 24000, 16, 50000, 2, new Object[]{ ItemList.Hull_MAX.get(1L), @@ -995,7 +1011,6 @@ public class DreamCraftRecipeLoader implements Runnable { Materials.SolderingAlloy.getMolten(5760), }, ItemList.Hatch_Energy_MAX.get(1L), 1000, 2000000); - //UHV Dynamo Hatch TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.Hatch_Dynamo_UV.get(1L), 48000, 32, 100000, 4, new Object[]{ ItemList.Hull_MAX.get(1L), @@ -1017,7 +1032,6 @@ public class DreamCraftRecipeLoader implements Runnable { Materials.SolderingAlloy.getMolten(5760)}, ItemList.Hatch_Dynamo_MAX.get(1L), 1000, 2000000); - //UEV Energy Hatch TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.Hatch_Energy_MAX.get(1L), 48000, 32, 100000, 4, new Object[]{ getItemContainer("Hull_UEV").get(1L), @@ -1035,7 +1049,6 @@ public class DreamCraftRecipeLoader implements Runnable { Materials.UUMatter.getFluid(8000L)}, getItemContainer("Hatch_Energy_UEV").get(1L), 1000, 8000000); - //UEV Dynamo Hatch TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.Hatch_Dynamo_MAX.get(1L), 96000, 64, 200000, 8, new Object[]{ getItemContainer("Hull_UEV").get(1L), @@ -1053,7 +1066,6 @@ public class DreamCraftRecipeLoader implements Runnable { Materials.UUMatter.getFluid(8000L)}, getItemContainer("Hatch_Dynamo_UEV").get(1L), 1000, 8000000); - //UIV Energy Hatch TT_recipeAdder.addResearchableAssemblylineRecipe(getItemContainer("Hatch_Energy_UEV").get(1L), 96000, 64, 200000, 8, new Object[]{ getItemContainer("Hull_UIV").get(1L), @@ -1074,7 +1086,6 @@ public class DreamCraftRecipeLoader implements Runnable { Materials.UUMatter.getFluid(16000L)}, getItemContainer("Hatch_Energy_UIV").get(1L), 1000, 16000000); - //UIV Dynamo Hatch TT_recipeAdder.addResearchableAssemblylineRecipe(getItemContainer("Hatch_Dynamo_UEV").get(1L), 192000, 128, 400000, 16, new Object[]{ getItemContainer("Hull_UIV").get(1L), @@ -1095,13 +1106,12 @@ public class DreamCraftRecipeLoader implements Runnable { Materials.UUMatter.getFluid(16000L)}, getItemContainer("Hatch_Dynamo_UIV").get(1L), 1000, 16000000); - //UMV Energy Hatch TT_recipeAdder.addResearchableAssemblylineRecipe(getItemContainer("Hatch_Energy_UIV").get(1L), 192000, 128, 400000, 16, new Object[]{ getItemContainer("Hull_UMV").get(1L), GT_OreDictUnificator.get(OrePrefixes.wireGt16, Materials.SuperconductorUHV, 16L), ItemList.Circuit_Chip_QPIC.get(4L), - getItemContainer("PikoCircuit").get(2), + getItemContainer("QuantumCircuit").get(2), ItemList.UHV_Coil.get(16L), ItemList.Reactor_Coolant_Sp_6.get(1L), ItemList.Reactor_Coolant_Sp_6.get(1L), @@ -1119,13 +1129,12 @@ public class DreamCraftRecipeLoader implements Runnable { Materials.UUMatter.getFluid(32000L)}, getItemContainer("Hatch_Energy_UMV").get(1L), 1000, 32000000); - //UMV Dynamo Hatch TT_recipeAdder.addResearchableAssemblylineRecipe(getItemContainer("Hatch_Dynamo_UIV").get(1L), 384000, 256, 800000, 32, new Object[]{ getItemContainer("Hull_UMV").get(1L), GT_OreDictUnificator.get(OrePrefixes.spring, Materials.Longasssuperconductornameforuhvwire, 64L), ItemList.Circuit_Chip_QPIC.get(4L), - getItemContainer("PikoCircuit").get(2), + getItemContainer("QuantumCircuit").get(2), ItemList.UHV_Coil.get(16L), ItemList.Reactor_Coolant_Sp_6.get(1L), ItemList.Reactor_Coolant_Sp_6.get(1L), @@ -1265,28 +1274,28 @@ public class DreamCraftRecipeLoader implements Runnable { //Stargate Recipes if (Loader.isModLoaded("eternalsingularity") && Loader.isModLoaded("SGCraft")) { TT_recipeAdder.addResearchableAssemblylineRecipe(GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Infinity, 1L), - 192000, 512, 2000000, 32, new ItemStack[]{ + 32000000, 8192, 128000000, 1, new ItemStack[]{ GT_ModHandler.getModItem("eternalsingularity", "eternal_singularity", 1L), - ItemList.Sensor_UV.get(16L), + ItemList.Sensor_UEV.get(16L), GT_OreDictUnificator.get(OrePrefixes.block, Materials.Infinity, 16L), GT_OreDictUnificator.get(OrePrefixes.block, Materials.CosmicNeutronium, 16L), GT_OreDictUnificator.get(OrePrefixes.block, Materials.NaquadahAlloy, 64L), GT_OreDictUnificator.get(OrePrefixes.block, Materials.NaquadahAlloy, 64L), GT_OreDictUnificator.get(OrePrefixes.block, Materials.NaquadahAlloy, 64L), - getItemContainer("NanoCircuit").get(1L).splitStack(16) + getItemContainer("QuantumCircuit").get(1L).splitStack(16) }, new FluidStack[]{ Materials.Neutronium.getMolten(36864L), Materials.Tritanium.getMolten(36864L), - Materials.Tetranaquadahdiindiumhexaplatiumosminid.getMolten(36864L), + Materials.Longasssuperconductornameforuhvwire.getMolten(36864L), Materials.Silver.getPlasma(36864L) }, - getItemContainer("StargateShieldingFoil").get(1L), 72000, 2000000); + getItemContainer("StargateShieldingFoil").get(1L), 72000, 500000000); TT_recipeAdder.addResearchableAssemblylineRecipe(getItemContainer("StargateShieldingFoil").get(1L), - 192000, 512, 2000000, 32, new ItemStack[]{ - ItemList.Electric_Piston_UV.get(16L), - ItemList.Electric_Motor_UV.get(64L), + 32000000, 8192, 128000000, 1, new ItemStack[]{ + ItemList.Electric_Piston_UEV.get(16L), + ItemList.Electric_Motor_UEV.get(64L), GT_OreDictUnificator.get(OrePrefixes.block, Materials.Infinity, 16L), GT_OreDictUnificator.get(OrePrefixes.block, Materials.NaquadahAlloy, 64L), GT_OreDictUnificator.get(OrePrefixes.block, Materials.NetherStar, 64L), @@ -1295,18 +1304,18 @@ public class DreamCraftRecipeLoader implements Runnable { GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.Ardite, 8L), GT_OreDictUnificator.get(OrePrefixes.gemExquisite, Materials.Ruby, 16L), GT_OreDictUnificator.get(OrePrefixes.gemExquisite, Materials.Jasper, 16L), - getItemContainer("NanoCircuit").get(1L).splitStack(32) + getItemContainer("QuantumCircuit").get(1L).splitStack(32) }, new FluidStack[]{ Materials.Neutronium.getMolten(9216L), Materials.Tritanium.getMolten(9216L), - Materials.Tetranaquadahdiindiumhexaplatiumosminid.getMolten(9216L), + Materials.Longasssuperconductornameforuhvwire.getMolten(9216L), Materials.Silver.getPlasma(9216L) }, - getItemContainer("StargateChevron").get(1L), 72000, 2000000); + getItemContainer("StargateChevron").get(1L), 72000, 500000000); TT_recipeAdder.addResearchableAssemblylineRecipe(GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.Neutronium, 1L), - 192000, 512, 2000000, 32, new ItemStack[]{ + 32000000, 8192, 128000000, 1, new ItemStack[]{ GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Infinity, 64L), GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.NaquadahAlloy, 64L), GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.CosmicNeutronium, 64L), @@ -1318,7 +1327,7 @@ public class DreamCraftRecipeLoader implements Runnable { Materials.Tritanium.getMolten(73728L), Materials.Concrete.getMolten(73728L) }, - getItemContainer("StargateFramePart").get(1L), 72000, 2000000); + getItemContainer("StargateFramePart").get(1L), 72000, 500000000); } //endregion @@ -1392,7 +1401,7 @@ public class DreamCraftRecipeLoader implements Runnable { ItemList.Circuit_Parts_DiodeASMD.get(64), GT_OreDictUnificator.get(OrePrefixes.wireGt02, Materials.SuperconductorUHV, 64), }, new FluidStack[]{ - Materials.SolderingAlloy.getMolten(3760), + Materials.SolderingAlloy.getMolten(4608), Materials.Naquadria.getMolten(9216), new FluidStack(FluidRegistry.getFluid("ic2coolant"), 32000) }, ItemList.ZPM3.get(1), 4000, 1600000); diff --git a/src/main/java/com/github/technus/tectech/compatibility/gtpp/GtppAtomLoader.java b/src/main/java/com/github/technus/tectech/compatibility/gtpp/GtppAtomLoader.java index 32db2caed9..bf96d61795 100644 --- a/src/main/java/com/github/technus/tectech/compatibility/gtpp/GtppAtomLoader.java +++ b/src/main/java/com/github/technus/tectech/compatibility/gtpp/GtppAtomLoader.java @@ -40,6 +40,14 @@ public class GtppAtomLoader implements Runnable{ } //endregion + private static Method getMethodWithReplacements(Class<?> owner, String name1, String name2, Class<?>... arguments) throws ReflectiveOperationException { + try { + return owner.getMethod(name1, arguments); + } catch (ReflectiveOperationException e) { + return owner.getMethod(name2, arguments); + } + } + @Override public void run() { //region reflect a bit @@ -47,9 +55,9 @@ public class GtppAtomLoader implements Runnable{ ELEMENT=Class.forName("gtPlusPlus.core.material.ELEMENT"); ELEMENT_INSTANCE=ELEMENT.getMethod("getInstance").invoke(null); - Class clazz=Class.forName("gtPlusPlus.core.material.Material"); + Class<?> clazz=Class.forName("gtPlusPlus.core.material.Material"); getUnlocalizedName=clazz.getMethod("getUnlocalizedName"); - getFluid=clazz.getMethod("getFluid", int.class); + getFluid=getMethodWithReplacements(clazz,"getFluidStack", "getFluid", int.class); clazz=Class.forName("gtPlusPlus.core.material.MaterialGenerator"); generate=clazz.getMethod("generate", Class.forName("gtPlusPlus.core.material.Material"), boolean.class, boolean.class); diff --git a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaDequantizer.java b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaDequantizer.java index 87e2660e01..8e8aee4795 100644 --- a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaDequantizer.java +++ b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaDequantizer.java @@ -2,21 +2,20 @@ package com.github.technus.tectech.compatibility.thaumcraft.thing.metaTileEntity import com.github.technus.tectech.TecTech; import com.github.technus.tectech.compatibility.thaumcraft.elementalMatter.definitions.ePrimalAspectDefinition; -import com.github.technus.tectech.mechanics.constructable.IConstructable; import com.github.technus.tectech.mechanics.elementalMatter.core.cElementalInstanceStackMap; import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.cElementalInstanceStack; -import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder; -import com.github.technus.tectech.mechanics.structure.Structure; import com.github.technus.tectech.thing.block.QuantumGlassBlock; import com.github.technus.tectech.thing.casing.TT_Container_Casings; import com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_EM_quantizer; import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; import com.github.technus.tectech.util.CommonValues; +import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable; +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; @@ -25,11 +24,12 @@ import net.minecraft.util.ResourceLocation; import net.minecraftforge.common.util.ForgeDirection; import static com.github.technus.tectech.compatibility.thaumcraft.thing.metaTileEntity.multi.EssentiaCompat.essentiaContainerCompat; -import static com.github.technus.tectech.mechanics.structure.Structure.adders; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; import static com.github.technus.tectech.util.CommonValues.V; -import static gregtech.api.enums.GT_Values.E; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; import static net.minecraft.util.StatCollector.translateToLocal; /** @@ -38,29 +38,32 @@ import static net.minecraft.util.StatCollector.translateToLocal; public class GT_MetaTileEntity_EM_essentiaDequantizer extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable { //region structure //use multi A energy inputs, use less power the longer it runs - private static final String[][] shape = new String[][]{ - {" ", " . ", " ",}, - {"0A0", E, "0A0",}, - {"121", "232", "121",}, - {"\"\"\"", "\"2\"", "\"\"\"",}, - {"202", "0!0", "202",}, - }; - private static final Block[] blockType = new Block[]{QuantumGlassBlock.INSTANCE, sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT}; - private static final byte[] blockMeta = new byte[]{0, 0, 4, 8}; - private static final IHatchAdder<GT_MetaTileEntity_EM_essentiaDequantizer>[] addingMethods = adders( - GT_MetaTileEntity_EM_essentiaDequantizer::addClassicToMachineList, - GT_MetaTileEntity_EM_essentiaDequantizer::addElementalInputToMachineList, - GT_MetaTileEntity_EM_essentiaDequantizer::addElementalMufflerToMachineList); - private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 4, textureOffset + 4}; - private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT}; - private static final byte[] blockMetaFallback = new byte[]{0, 4, 4}; private static final String[] description = new String[]{ EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":", translateToLocal("gt.blockmachines.multimachine.em.emtoessentia.hint.0"),//1 - Classic Hatches or High Power Casing translateToLocal("gt.blockmachines.multimachine.em.emtoessentia.hint.1"),//2 - Elemental Input Hatch - translateToLocal("gt.blockmachines.multimachine.em.emtoessentia.hint.2"),//3 - Elemental Overflow Hatches or Elemental Casing + translateToLocal("gt.blockmachines.multimachine.em.emtoessentia.hint.2"),//3 - Elemental Overflow Hatches or Molecular Casing translateToLocal("gt.blockmachines.multimachine.em.emtoessentia.hint.3"),//General - Some sort of Essentia Storage }; + + private static final IStructureDefinition<GT_MetaTileEntity_EM_essentiaDequantizer> STRUCTURE_DEFINITION = + StructureDefinition.<GT_MetaTileEntity_EM_essentiaDequantizer>builder() + .addShape("main", new String[][]{ + {"DDD", "D~D", "DDD"}, + {"E E", " ", "E E"}, + {"ABA", "BCB", "ABA"}, + {"FFF", "FBF", "FFF"}, + {"BEB", "EGE", "BEB"} + }) + .addElement('A', ofBlock(sBlockCasingsTT, 0)) + .addElement('B', ofBlock(sBlockCasingsTT, 4)) + .addElement('C', ofBlock(sBlockCasingsTT, 8)) + .addElement('D', ofHatchAdderOptional(GT_MetaTileEntity_EM_essentiaDequantizer::addClassicToMachineList, textureOffset, 1, sBlockCasingsTT, 0)) + .addElement('E', ofBlock(QuantumGlassBlock.INSTANCE, 0)) + .addElement('F', ofHatchAdderOptional(GT_MetaTileEntity_EM_essentiaDequantizer::addElementalMufflerToMachineList, textureOffset + 4, 3, sBlockCasingsTT, 4)) + .addElement('G', ofHatchAdder(GT_MetaTileEntity_EM_essentiaDequantizer::addElementalInputToMachineList, textureOffset + 4, 2)) + .build(); + //endregion public GT_MetaTileEntity_EM_essentiaDequantizer(int aID, String aName, String aNameRegional) { @@ -78,7 +81,7 @@ public class GT_MetaTileEntity_EM_essentiaDequantizer extends GT_MetaTileEntity_ @Override public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { - return essentiaContainerCompat.check(this) && structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 1, 0); + return essentiaContainerCompat.check(this) && structureCheck_EM("main", 1, 1, 0); } @Override @@ -140,7 +143,12 @@ public class GT_MetaTileEntity_EM_essentiaDequantizer extends GT_MetaTileEntity_ iGregTechTileEntity.getWorld().setBlock(iGregTechTileEntity.getXCoord() + xDir, iGregTechTileEntity.getYCoord() + yDir, iGregTechTileEntity.getZCoord() + zDir, TT_Container_Casings.sHintCasingsTT, 12, 2); } } - Structure.builder(shape, blockType, blockMeta, 1, 1, 0, iGregTechTileEntity, getExtendedFacing(), hintsOnly); + structureBuild_EM("main", 1, 1, 0, hintsOnly, stackSize); + } + + @Override + public IStructureDefinition<GT_MetaTileEntity_EM_essentiaDequantizer> getStructure_EM() { + return STRUCTURE_DEFINITION; } @Override diff --git a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java index a716420e81..1e23408a0b 100644 --- a/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java +++ b/src/main/java/com/github/technus/tectech/compatibility/thaumcraft/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_essentiaQuantizer.java @@ -2,21 +2,20 @@ package com.github.technus.tectech.compatibility.thaumcraft.thing.metaTileEntity import com.github.technus.tectech.TecTech; import com.github.technus.tectech.compatibility.thaumcraft.elementalMatter.definitions.ePrimalAspectDefinition; -import com.github.technus.tectech.mechanics.constructable.IConstructable; import com.github.technus.tectech.mechanics.elementalMatter.core.cElementalInstanceStackMap; import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.cElementalInstanceStack; -import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder; -import com.github.technus.tectech.mechanics.structure.Structure; import com.github.technus.tectech.thing.block.QuantumGlassBlock; import com.github.technus.tectech.thing.casing.TT_Container_Casings; import com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_EM_quantizer; import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; import com.github.technus.tectech.util.CommonValues; +import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable; +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; @@ -25,11 +24,12 @@ import net.minecraft.util.ResourceLocation; import net.minecraftforge.common.util.ForgeDirection; import static com.github.technus.tectech.compatibility.thaumcraft.thing.metaTileEntity.multi.EssentiaCompat.essentiaContainerCompat; -import static com.github.technus.tectech.mechanics.structure.Structure.adders; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; import static com.github.technus.tectech.util.CommonValues.V; -import static gregtech.api.enums.GT_Values.E; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; import static net.minecraft.util.StatCollector.translateToLocal; /** @@ -38,29 +38,31 @@ import static net.minecraft.util.StatCollector.translateToLocal; public class GT_MetaTileEntity_EM_essentiaQuantizer extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable { //region structure //use multi A energy inputs, use less power the longer it runs - private static final String[][] shape = new String[][]{ - {" ", " . ", " ",}, - {"0A0", E, "0A0",}, - {"121", "232", "121",}, - {"\"\"\"", "\"1\"", "\"\"\"",}, - {"010", "1!1", "010",}, - }; - private static final Block[] blockType = new Block[]{QuantumGlassBlock.INSTANCE, sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT}; - private static final byte[] blockMeta = new byte[]{0, 4, 0, 8}; - private static final IHatchAdder<GT_MetaTileEntity_EM_essentiaQuantizer>[] addingMethods = adders( - GT_MetaTileEntity_EM_essentiaQuantizer::addClassicToMachineList, - GT_MetaTileEntity_EM_essentiaQuantizer::addElementalOutputToMachineList, - GT_MetaTileEntity_EM_essentiaQuantizer::addElementalMufflerToMachineList); - private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 4, textureOffset + 4}; - private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT}; - private static final byte[] blockMetaFallback = new byte[]{0, 4, 4}; private static final String[] description = new String[]{ EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":", translateToLocal("gt.blockmachines.multimachine.em.essentiatoem.hint.0"),//1 - Classic Hatches or High Power Casing translateToLocal("gt.blockmachines.multimachine.em.essentiatoem.hint.1"),//2 - Elemental Output Hatch - translateToLocal("gt.blockmachines.multimachine.em.essentiatoem.hint.2"),//3 - Elemental Overflow Hatches or Elemental Casing + translateToLocal("gt.blockmachines.multimachine.em.essentiatoem.hint.2"),//3 - Elemental Overflow Hatches or Molecular Casing translateToLocal("gt.blockmachines.multimachine.em.essentiatoem.hint.3"),//General - Some sort of Essentia Storage }; + + private static final IStructureDefinition<GT_MetaTileEntity_EM_essentiaQuantizer> STRUCTURE_DEFINITION = + StructureDefinition.<GT_MetaTileEntity_EM_essentiaQuantizer>builder() + .addShape("main", new String[][]{ + {"FFF", "F~F", "FFF"}, + {"E E", " ", "E E"}, + {"BAB", "ACA", "BAB"}, + {"DDD", "DBD", "DDD"}, + {"EBE", "BGB", "EBE"} + }) + .addElement('A', ofBlock(sBlockCasingsTT, 0)) + .addElement('B', ofBlock(sBlockCasingsTT, 4)) + .addElement('C', ofBlock(sBlockCasingsTT, 8)) + .addElement('D', ofHatchAdderOptional(GT_MetaTileEntity_EM_essentiaQuantizer::addElementalMufflerToMachineList, textureOffset + 4, 3, sBlockCasingsTT, 4)) + .addElement('E', ofBlock(QuantumGlassBlock.INSTANCE, 0)) + .addElement('F', ofHatchAdderOptional(GT_MetaTileEntity_EM_essentiaQuantizer::addClassicToMachineList, textureOffset, 1, sBlockCasingsTT, 0)) + .addElement('G', ofHatchAdder(GT_MetaTileEntity_EM_essentiaQuantizer::addElementalOutputToMachineList, textureOffset + 4, 2)) + .build(); //endregion public GT_MetaTileEntity_EM_essentiaQuantizer(int aID, String aName, String aNameRegional) { @@ -78,7 +80,7 @@ public class GT_MetaTileEntity_EM_essentiaQuantizer extends GT_MetaTileEntity_Mu @Override public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { - return essentiaContainerCompat.check(this) && structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 1, 0); + return essentiaContainerCompat.check(this) && structureCheck_EM("main", 1, 1, 0); } @Override @@ -144,7 +146,12 @@ public class GT_MetaTileEntity_EM_essentiaQuantizer extends GT_MetaTileEntity_Mu iGregTechTileEntity.getWorld().setBlock(iGregTechTileEntity.getXCoord() + xDir, iGregTechTileEntity.getYCoord() + yDir, iGregTechTileEntity.getZCoord() + zDir, TT_Container_Casings.sHintCasingsTT, 12, 2); } } - Structure.builder(shape, blockType, blockMeta, 1, 1, 0, iGregTechTileEntity, getExtendedFacing(), hintsOnly); + structureBuild_EM("main", 1, 1, 0, hintsOnly, stackSize); + } + + @Override + public IStructureDefinition<GT_MetaTileEntity_EM_essentiaQuantizer> getStructure_EM() { + return STRUCTURE_DEFINITION; } @Override diff --git a/src/main/java/com/github/technus/tectech/entity/fx/BlockHint.java b/src/main/java/com/github/technus/tectech/entity/fx/BlockHint.java index dd5cd59ac7..3c7f18ff32 100644 --- a/src/main/java/com/github/technus/tectech/entity/fx/BlockHint.java +++ b/src/main/java/com/github/technus/tectech/entity/fx/BlockHint.java @@ -13,6 +13,7 @@ import net.minecraft.world.World; import org.lwjgl.opengl.GL11; @SideOnly(Side.CLIENT) +@Deprecated public class BlockHint extends EntityFX { private IIcon[] icons = new IIcon[6]; private short[] mRGBa = Dyes._NULL.mRGBa; diff --git a/src/main/java/com/github/technus/tectech/entity/fx/WeightlessParticleFX.java b/src/main/java/com/github/technus/tectech/entity/fx/WeightlessParticleFX.java index d1d2ed611c..92fa34990e 100644 --- a/src/main/java/com/github/technus/tectech/entity/fx/WeightlessParticleFX.java +++ b/src/main/java/com/github/technus/tectech/entity/fx/WeightlessParticleFX.java @@ -6,6 +6,7 @@ import net.minecraft.client.particle.EntityFX; import net.minecraft.world.World; @SideOnly(Side.CLIENT) +@Deprecated public class WeightlessParticleFX extends EntityFX { public WeightlessParticleFX(World p_i1205_1_, double p_i1205_2_, double p_i1205_4_, double p_i1205_6_, double p_i1205_8_, double p_i1205_10_, double p_i1205_12_) diff --git a/src/main/java/com/github/technus/tectech/loader/recipe/RecipeLoader.java b/src/main/java/com/github/technus/tectech/loader/recipe/RecipeLoader.java index 5a153ce5f8..a2e2f65384 100644 --- a/src/main/java/com/github/technus/tectech/loader/recipe/RecipeLoader.java +++ b/src/main/java/com/github/technus/tectech/loader/recipe/RecipeLoader.java @@ -55,10 +55,10 @@ public class RecipeLoader implements Runnable { 'S', OrePrefixes.stick.get(Materials.Wood),}); //BLUEprint - GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(ConstructableTriggerItem.INSTANCE, 1), + /*GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(ConstructableTriggerItem.INSTANCE, 1), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{Dyes.dyeBlue, OrePrefixes.plate.get(Materials.Paper), Dyes.dyeBlue, Dyes.dyeWhite}); - + */ //GT EU reader GT_ModHandler.addCraftingRecipe(new ItemStack(EuMeterGT.INSTANCE,1), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, diff --git a/src/main/java/com/github/technus/tectech/mechanics/alignment/AlignmentLimits.java b/src/main/java/com/github/technus/tectech/mechanics/alignment/AlignmentLimits.java index 26a6d80dd8..779406371a 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/alignment/AlignmentLimits.java +++ b/src/main/java/com/github/technus/tectech/mechanics/alignment/AlignmentLimits.java @@ -12,6 +12,7 @@ import java.util.function.Function; import static com.github.technus.tectech.mechanics.alignment.IAlignment.STATES_COUNT; +@Deprecated public class AlignmentLimits implements IAlignmentLimits { protected final boolean[] validStates=new boolean[STATES_COUNT]; diff --git a/src/main/java/com/github/technus/tectech/mechanics/alignment/AlignmentMessage.java b/src/main/java/com/github/technus/tectech/mechanics/alignment/AlignmentMessage.java index 07a3e02c1f..61fc398171 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/alignment/AlignmentMessage.java +++ b/src/main/java/com/github/technus/tectech/mechanics/alignment/AlignmentMessage.java @@ -16,6 +16,7 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import net.minecraftforge.common.DimensionManager; +@Deprecated public class AlignmentMessage implements IMessage { int mPosX; int mPosY; diff --git a/src/main/java/com/github/technus/tectech/mechanics/alignment/AlignmentUtility.java b/src/main/java/com/github/technus/tectech/mechanics/alignment/AlignmentUtility.java index 68e11b77af..af3369465c 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/alignment/AlignmentUtility.java +++ b/src/main/java/com/github/technus/tectech/mechanics/alignment/AlignmentUtility.java @@ -8,6 +8,7 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import net.minecraftforge.common.util.FakePlayer; +@Deprecated public class AlignmentUtility { private AlignmentUtility(){ diff --git a/src/main/java/com/github/technus/tectech/mechanics/alignment/IAlignment.java b/src/main/java/com/github/technus/tectech/mechanics/alignment/IAlignment.java index a2a6301070..0ea202cc98 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/alignment/IAlignment.java +++ b/src/main/java/com/github/technus/tectech/mechanics/alignment/IAlignment.java @@ -8,6 +8,7 @@ import net.minecraftforge.common.util.ForgeDirection; import java.util.Arrays; +@Deprecated public interface IAlignment extends IAlignmentLimits,IAlignmentProvider { int DIRECTIONS_COUNT= Direction.VALUES.length; int ROTATIONS_COUNT= Rotation.VALUES.length; diff --git a/src/main/java/com/github/technus/tectech/mechanics/alignment/IAlignmentLimits.java b/src/main/java/com/github/technus/tectech/mechanics/alignment/IAlignmentLimits.java index 68b4d84dab..a1f505baff 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/alignment/IAlignmentLimits.java +++ b/src/main/java/com/github/technus/tectech/mechanics/alignment/IAlignmentLimits.java @@ -4,6 +4,7 @@ import com.github.technus.tectech.mechanics.alignment.enumerable.Flip; import com.github.technus.tectech.mechanics.alignment.enumerable.Rotation; import net.minecraftforge.common.util.ForgeDirection; +@Deprecated public interface IAlignmentLimits { IAlignmentLimits UNLIMITED= (direction, rotation, flip) -> true; diff --git a/src/main/java/com/github/technus/tectech/mechanics/alignment/IAlignmentProvider.java b/src/main/java/com/github/technus/tectech/mechanics/alignment/IAlignmentProvider.java index 07dc972aac..23bf9ae266 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/alignment/IAlignmentProvider.java +++ b/src/main/java/com/github/technus/tectech/mechanics/alignment/IAlignmentProvider.java @@ -1,5 +1,6 @@ package com.github.technus.tectech.mechanics.alignment; +@Deprecated public interface IAlignmentProvider { IAlignment getAlignment(); }
\ No newline at end of file diff --git a/src/main/java/com/github/technus/tectech/mechanics/alignment/IntegerAxisSwap.java b/src/main/java/com/github/technus/tectech/mechanics/alignment/IntegerAxisSwap.java index 1c44164731..2ec6ea6893 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/alignment/IntegerAxisSwap.java +++ b/src/main/java/com/github/technus/tectech/mechanics/alignment/IntegerAxisSwap.java @@ -7,6 +7,7 @@ import net.minecraftforge.common.util.ForgeDirection; import static com.github.technus.tectech.mechanics.alignment.enumerable.Direction.getAxisVector; import static java.lang.Math.abs; +@Deprecated public class IntegerAxisSwap { private final Vec3Impl forFirstAxis; private final Vec3Impl forSecondAxis; diff --git a/src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/Direction.java b/src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/Direction.java index cc3971fedb..56356b3606 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/Direction.java +++ b/src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/Direction.java @@ -3,6 +3,7 @@ package com.github.technus.tectech.mechanics.alignment.enumerable; import com.github.technus.tectech.util.Vec3Impl; import net.minecraftforge.common.util.ForgeDirection; +@Deprecated public enum Direction { DOWN(ForgeDirection.DOWN), UP(ForgeDirection.UP), diff --git a/src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/ExtendedFacing.java b/src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/ExtendedFacing.java index 5949b432df..8e384e098c 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/ExtendedFacing.java +++ b/src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/ExtendedFacing.java @@ -14,6 +14,7 @@ import static java.lang.Math.abs; import static java.util.Arrays.stream; import static java.util.stream.Collectors.toMap; +@Deprecated public enum ExtendedFacing { DOWN_NORMAL_NONE("down normal none"), DOWN_NORMAL_HORIZONTAL("down normal horizontal"), @@ -137,9 +138,9 @@ public enum ExtendedFacing { ExtendedFacing(String name) { this.name = name; - direction= Direction.VALUES[ordinal()/(ROTATIONS_COUNT*FLIPS_COUNT)].getForgeDirection(); - rotation=Rotation.VALUES[ordinal()/FLIPS_COUNT-direction.ordinal()*ROTATIONS_COUNT]; - flip=Flip.VALUES[ordinal()%FLIPS_COUNT]; + direction= Direction.VALUES[ordinal()/(Rotation.COUNT*Flip.COUNT)].getForgeDirection(); + rotation=Rotation.VALUES[ordinal()/Flip.COUNT-direction.ordinal()*Rotation.COUNT]; + flip=Flip.VALUES[ordinal()%Flip.COUNT]; ForgeDirection a,b,c; switch (direction){ case DOWN: diff --git a/src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/Flip.java b/src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/Flip.java index 4b1dff70ec..400f94f869 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/Flip.java +++ b/src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/Flip.java @@ -9,6 +9,7 @@ import static java.lang.Math.abs; import static java.util.Arrays.stream; import static java.util.stream.Collectors.toMap; +@Deprecated public enum Flip { NONE(3, "none"), HORIZONTAL(2, "horizontal"), @@ -19,6 +20,7 @@ public enum Flip { private final String name; public static final Flip[] VALUES = values(); + public static final int COUNT = VALUES.length; private static final Map<String, Flip> NAME_LOOKUP = stream(VALUES).collect(toMap(Flip::getName2, (flip) -> flip)); Flip(int oppositeIn, String nameIn) { diff --git a/src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/Rotation.java b/src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/Rotation.java index 5d41f54a11..ed4872828a 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/Rotation.java +++ b/src/main/java/com/github/technus/tectech/mechanics/alignment/enumerable/Rotation.java @@ -9,6 +9,7 @@ import static java.lang.Math.abs; import static java.util.Arrays.stream; import static java.util.stream.Collectors.toMap; +@Deprecated public enum Rotation { NORMAL(2, "normal"), CLOCKWISE(3, "clockwise"), @@ -19,6 +20,7 @@ public enum Rotation { private final String name; public static final Rotation[] VALUES = values(); + public static final int COUNT = VALUES.length; private static final Map<String, Rotation> NAME_LOOKUP = stream(VALUES).collect(toMap(Rotation::getName2, (rotation) -> rotation)); Rotation(int oppositeIn, String nameIn) { diff --git a/src/main/java/com/github/technus/tectech/mechanics/constructable/ConstructableUtility.java b/src/main/java/com/github/technus/tectech/mechanics/constructable/ConstructableUtility.java index 2dc74330f9..6d605eef6e 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/constructable/ConstructableUtility.java +++ b/src/main/java/com/github/technus/tectech/mechanics/constructable/ConstructableUtility.java @@ -13,6 +13,7 @@ import net.minecraft.world.World; import net.minecraftforge.common.util.FakePlayer; import net.minecraftforge.common.util.ForgeDirection; +@Deprecated public class ConstructableUtility { private ConstructableUtility(){ diff --git a/src/main/java/com/github/technus/tectech/mechanics/constructable/IConstructable.java b/src/main/java/com/github/technus/tectech/mechanics/constructable/IConstructable.java index 1de0381f1f..ed0cdfbf7d 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/constructable/IConstructable.java +++ b/src/main/java/com/github/technus/tectech/mechanics/constructable/IConstructable.java @@ -7,6 +7,7 @@ import net.minecraft.item.ItemStack; /** * Created by Tec on 24.03.2017. */ +@Deprecated public interface IConstructable { void construct(ItemStack stackSize, boolean hintsOnly); diff --git a/src/main/java/com/github/technus/tectech/mechanics/constructable/IMultiblockInfoContainer.java b/src/main/java/com/github/technus/tectech/mechanics/constructable/IMultiblockInfoContainer.java index 173e0d16ec..da124fcf4d 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/constructable/IMultiblockInfoContainer.java +++ b/src/main/java/com/github/technus/tectech/mechanics/constructable/IMultiblockInfoContainer.java @@ -12,6 +12,7 @@ import java.util.HashMap; /** * To implement IConstructable on not own TileEntities */ +@Deprecated public interface IMultiblockInfoContainer<T> { HashMap<String, IMultiblockInfoContainer<?>> MULTIBLOCK_MAP = new HashMap<>(); diff --git a/src/main/java/com/github/technus/tectech/mechanics/dataTransport/DataPacket.java b/src/main/java/com/github/technus/tectech/mechanics/dataTransport/DataPacket.java index 990a48ac70..f30105f1ee 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/dataTransport/DataPacket.java +++ b/src/main/java/com/github/technus/tectech/mechanics/dataTransport/DataPacket.java @@ -1,6 +1,6 @@ package com.github.technus.tectech.mechanics.dataTransport; -import com.github.technus.tectech.util.Vec3Impl; +import com.gtnewhorizon.structurelib.util.Vec3Impl; import net.minecraft.nbt.NBTTagCompound; import java.util.Collections; diff --git a/src/main/java/com/github/technus/tectech/mechanics/dataTransport/QuantumDataPacket.java b/src/main/java/com/github/technus/tectech/mechanics/dataTransport/QuantumDataPacket.java index 268de6f71c..0fddb53fe9 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/dataTransport/QuantumDataPacket.java +++ b/src/main/java/com/github/technus/tectech/mechanics/dataTransport/QuantumDataPacket.java @@ -1,6 +1,6 @@ package com.github.technus.tectech.mechanics.dataTransport; -import com.github.technus.tectech.util.Vec3Impl; +import com.gtnewhorizon.structurelib.util.Vec3Impl; import net.minecraft.nbt.NBTTagCompound; public class QuantumDataPacket extends DataPacket<Long> { diff --git a/src/main/java/com/github/technus/tectech/mechanics/spark/ThaumSpark.java b/src/main/java/com/github/technus/tectech/mechanics/spark/ThaumSpark.java index e31e63f250..0480cfffd2 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/spark/ThaumSpark.java +++ b/src/main/java/com/github/technus/tectech/mechanics/spark/ThaumSpark.java @@ -1,6 +1,7 @@ package com.github.technus.tectech.mechanics.spark; -import com.github.technus.tectech.util.Vec3Impl; + +import com.gtnewhorizon.structurelib.util.Vec3Impl; import java.io.Serializable; import java.util.Objects; diff --git a/src/main/java/com/github/technus/tectech/mechanics/structure/IBlockPosConsumer.java b/src/main/java/com/github/technus/tectech/mechanics/structure/IBlockPosConsumer.java index c3ea2d3e3f..d37e29c36a 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/structure/IBlockPosConsumer.java +++ b/src/main/java/com/github/technus/tectech/mechanics/structure/IBlockPosConsumer.java @@ -2,6 +2,7 @@ package com.github.technus.tectech.mechanics.structure; import net.minecraft.world.World; +@Deprecated public interface IBlockPosConsumer { void consume(World world, int x, int y, int z); } diff --git a/src/main/java/com/github/technus/tectech/mechanics/structure/ICustomBlockSetting.java b/src/main/java/com/github/technus/tectech/mechanics/structure/ICustomBlockSetting.java index b70e76fbac..10d9dcca73 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/structure/ICustomBlockSetting.java +++ b/src/main/java/com/github/technus/tectech/mechanics/structure/ICustomBlockSetting.java @@ -3,6 +3,7 @@ package com.github.technus.tectech.mechanics.structure; import net.minecraft.block.Block; import net.minecraft.world.World; +@Deprecated public interface ICustomBlockSetting { /** * Default block setting calls {@link World#setBlock(int x, int y, int z, Block block, int meta, int updateType)} like: diff --git a/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureDefinition.java b/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureDefinition.java index c8488d5cea..cb40214eac 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureDefinition.java +++ b/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureDefinition.java @@ -9,6 +9,7 @@ import java.util.Arrays; import static com.github.technus.tectech.loader.TecTechConfig.DEBUG_MODE; +@Deprecated public interface IStructureDefinition<T> { /** * Used internally diff --git a/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElement.java b/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElement.java index f946e71f91..ac5f4f7296 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElement.java +++ b/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElement.java @@ -6,6 +6,7 @@ import net.minecraft.world.World; /** * Use StructureUtility to instantiate */ +@Deprecated public interface IStructureElement<T> { boolean check(T t,World world,int x,int y,int z); diff --git a/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElementChain.java b/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElementChain.java index f9593ee1c5..2051e06c4d 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElementChain.java +++ b/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElementChain.java @@ -6,6 +6,7 @@ import net.minecraft.world.World; /** * Use StructureUtility to instantiate */ +@Deprecated public interface IStructureElementChain<T> extends IStructureElement<T> { IStructureElement<T>[] fallbacks(); diff --git a/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElementCheckOnly.java b/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElementCheckOnly.java index ec15aea53b..a866da828d 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElementCheckOnly.java +++ b/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElementCheckOnly.java @@ -3,6 +3,7 @@ package com.github.technus.tectech.mechanics.structure; import net.minecraft.item.ItemStack; import net.minecraft.world.World; +@Deprecated public interface IStructureElementCheckOnly<T> extends IStructureElement<T> { @Override default boolean placeBlock(T t, World world, int x, int y, int z, ItemStack trigger){ diff --git a/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElementDeferred.java b/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElementDeferred.java index dbb74312a8..e1714e520c 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElementDeferred.java +++ b/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElementDeferred.java @@ -3,5 +3,6 @@ package com.github.technus.tectech.mechanics.structure; /** * Use StructureUtility to instantiate */ +@Deprecated public interface IStructureElementDeferred<T> extends IStructureElement<T> { } diff --git a/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElementNoPlacement.java b/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElementNoPlacement.java index 47e6060878..1ba5dc30f5 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElementNoPlacement.java +++ b/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureElementNoPlacement.java @@ -3,6 +3,7 @@ package com.github.technus.tectech.mechanics.structure; import net.minecraft.item.ItemStack; import net.minecraft.world.World; +@Deprecated public interface IStructureElementNoPlacement<T> extends IStructureElement<T> { @Override default boolean placeBlock(T t, World world, int x, int y, int z, ItemStack trigger){ diff --git a/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureNavigate.java b/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureNavigate.java index d3f4134cea..5e73f25640 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureNavigate.java +++ b/src/main/java/com/github/technus/tectech/mechanics/structure/IStructureNavigate.java @@ -6,6 +6,7 @@ import net.minecraft.world.World; /** * Use StructureUtility to instantiate */ +@Deprecated interface IStructureNavigate<T> extends IStructureElement<T> { @Override default boolean check(T t, World world, int x, int y, int z){ diff --git a/src/main/java/com/github/technus/tectech/mechanics/structure/Structure.java b/src/main/java/com/github/technus/tectech/mechanics/structure/Structure.java index 83951372a2..b37ae0bbda 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/structure/Structure.java +++ b/src/main/java/com/github/technus/tectech/mechanics/structure/Structure.java @@ -1,11 +1,12 @@ package com.github.technus.tectech.mechanics.structure; import com.github.technus.tectech.TecTech; -import com.github.technus.tectech.mechanics.alignment.enumerable.ExtendedFacing; import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder; import com.github.technus.tectech.thing.casing.TT_Container_Casings; +import com.gtnewhorizon.structurelib.alignment.enumerable.ExtendedFacing; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.util.IGT_HatchAdder; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.init.Blocks; @@ -32,7 +33,7 @@ public class Structure { String[][] structure,//0-9 casing, +- air no air, A... ignore 'A'-CHAR-1 blocks Block[] blockType,//use numbers 0-9 for casing types byte[] blockMeta,//use numbers 0-9 for casing types - IHatchAdder<T>[] addingMethods, + IGT_HatchAdder<T>[] addingMethods, short[] casingTextures, Block[] blockTypeFallback,//use numbers 0-9 for casing types byte[] blockMetaFallback,//use numbers 0-9 for casing types diff --git a/src/main/java/com/github/technus/tectech/mechanics/structure/StructureDefinition.java b/src/main/java/com/github/technus/tectech/mechanics/structure/StructureDefinition.java index 9a1e94d98a..ca1dbce77b 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/structure/StructureDefinition.java +++ b/src/main/java/com/github/technus/tectech/mechanics/structure/StructureDefinition.java @@ -7,6 +7,7 @@ import java.util.*; import static com.github.technus.tectech.loader.TecTechConfig.DEBUG_MODE; import static com.github.technus.tectech.mechanics.structure.StructureUtility.*; +@Deprecated public class StructureDefinition<T> implements IStructureDefinition<T> { private final Map<Character, IStructureElement<T>> elements; private final Map<String, String> shapes; diff --git a/src/main/java/com/github/technus/tectech/mechanics/structure/StructureUtility.java b/src/main/java/com/github/technus/tectech/mechanics/structure/StructureUtility.java index 28b72f8ba6..f469925dbc 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/structure/StructureUtility.java +++ b/src/main/java/com/github/technus/tectech/mechanics/structure/StructureUtility.java @@ -30,6 +30,7 @@ import static java.lang.Integer.MIN_VALUE; * * (Just import static this class to have a nice fluent syntax while defining structure definitions) */ +@Deprecated public class StructureUtility { private static final String NICE_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz=|!@#$%&()[]{};:<>/?_,.*^'`"; @SuppressWarnings("rawtypes") diff --git a/src/main/java/com/github/technus/tectech/mechanics/structure/adders/IBlockAdder.java b/src/main/java/com/github/technus/tectech/mechanics/structure/adders/IBlockAdder.java index 908c4c4aca..29229f7902 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/structure/adders/IBlockAdder.java +++ b/src/main/java/com/github/technus/tectech/mechanics/structure/adders/IBlockAdder.java @@ -3,6 +3,7 @@ package com.github.technus.tectech.mechanics.structure.adders; import net.minecraft.block.Block; +@Deprecated public interface IBlockAdder<T> { /** * Callback on block added, needs to check if block is valid (and add it) diff --git a/src/main/java/com/github/technus/tectech/mechanics/structure/adders/IHatchAdder.java b/src/main/java/com/github/technus/tectech/mechanics/structure/adders/IHatchAdder.java index a47befc2e8..197dd2fd45 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/structure/adders/IHatchAdder.java +++ b/src/main/java/com/github/technus/tectech/mechanics/structure/adders/IHatchAdder.java @@ -3,6 +3,7 @@ package com.github.technus.tectech.mechanics.structure.adders; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +@Deprecated public interface IHatchAdder<T> { /** * Callback to add hatch, needs to check if hatch is valid (and add it) diff --git a/src/main/java/com/github/technus/tectech/mechanics/structure/adders/ITileAdder.java b/src/main/java/com/github/technus/tectech/mechanics/structure/adders/ITileAdder.java index cc3c7dbb7a..c262bbb154 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/structure/adders/ITileAdder.java +++ b/src/main/java/com/github/technus/tectech/mechanics/structure/adders/ITileAdder.java @@ -2,6 +2,7 @@ package com.github.technus.tectech.mechanics.structure.adders; import net.minecraft.tileentity.TileEntity; +@Deprecated public interface ITileAdder<T> { /** * Callback to add hatch, needs to check if tile is valid (and add it) diff --git a/src/main/java/com/github/technus/tectech/mechanics/tesla/ITeslaConnectableSimple.java b/src/main/java/com/github/technus/tectech/mechanics/tesla/ITeslaConnectableSimple.java index 3b56b6968c..2adc25bbed 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/tesla/ITeslaConnectableSimple.java +++ b/src/main/java/com/github/technus/tectech/mechanics/tesla/ITeslaConnectableSimple.java @@ -1,6 +1,6 @@ package com.github.technus.tectech.mechanics.tesla; -import com.github.technus.tectech.util.Vec3Impl; +import com.gtnewhorizon.structurelib.util.Vec3Impl; public interface ITeslaConnectableSimple { //-128 to -1 disables capability diff --git a/src/main/java/com/github/technus/tectech/mechanics/tesla/TeslaCoverConnection.java b/src/main/java/com/github/technus/tectech/mechanics/tesla/TeslaCoverConnection.java index 5c6fef6af8..0b84236709 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/tesla/TeslaCoverConnection.java +++ b/src/main/java/com/github/technus/tectech/mechanics/tesla/TeslaCoverConnection.java @@ -1,7 +1,7 @@ package com.github.technus.tectech.mechanics.tesla; -import com.github.technus.tectech.util.Vec3Impl; import com.google.common.base.Objects; +import com.gtnewhorizon.structurelib.util.Vec3Impl; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import static com.github.technus.tectech.mechanics.tesla.ITeslaConnectable.TeslaUtil.teslaSimpleNodeSetAdd; @@ -14,7 +14,10 @@ public class TeslaCoverConnection implements ITeslaConnectableSimple { public TeslaCoverConnection(IGregTechTileEntity IGT, byte teslaReceptionCapability) { this.IGT = IGT; - this.pos = new Vec3Impl(IGT); + this.pos = new Vec3Impl(IGT.getXCoord(), + IGT.getYCoord(), + IGT.getZCoord()); + this.teslaReceptionCapability = teslaReceptionCapability; } diff --git a/src/main/java/com/github/technus/tectech/nei/TT_NEI_ResearchHandler.java b/src/main/java/com/github/technus/tectech/nei/TT_NEI_ResearchHandler.java index 358d55be0e..114dc7399f 100644 --- a/src/main/java/com/github/technus/tectech/nei/TT_NEI_ResearchHandler.java +++ b/src/main/java/com/github/technus/tectech/nei/TT_NEI_ResearchHandler.java @@ -215,18 +215,18 @@ public class TT_NEI_ResearchHandler extends TemplateRecipeHandler { int tSpecial = ((CachedDefaultRecipe) arecipes.get(aRecipeIndex)).mRecipe.mSpecialValue; short ampere=(short) (tSpecial & 0xFFFF),minComputationPerSec=(short)(tSpecial>>>16); if (tEUt != 0) { - drawText(10, 73, trans("152","Max Total: ") + (1+ (computation-minComputationPerSec) /minComputationPerSec) * (long)tEUt * ampere * 20 + " EU", -16777216); - drawText(10, 83, trans("153","Usage: ") + (long)tEUt*ampere + " EU/t", -16777216); + drawText(10, 73, trans("152","Max Total: ") + GT_Utility.formatNumbers((1+ (computation-minComputationPerSec) /minComputationPerSec) * (long)tEUt * ampere * 20) + " EU", -16777216); + drawText(10, 83, trans("153","Usage: ") + GT_Utility.formatNumbers((long)tEUt*ampere) + " EU/t", -16777216); if (mRecipeMap.mShowVoltageAmperageInNEI) { - drawText(10, 93, trans("154","Voltage: ") + tEUt + " EU", -16777216); - drawText(10, 103, trans("155","Amperage: ") + ampere, -16777216); + drawText(10, 93, trans("154","Voltage: ") + GT_Utility.formatNumbers(tEUt) + " EU", -16777216); + drawText(10, 103, trans("155","Amperage: ") + GT_Utility.formatNumbers(ampere), -16777216); } else { drawText(10, 93, trans("156","Voltage: unspecified"), -16777216); drawText(10, 103, trans("157","Amperage: unspecified"), -16777216); } } - drawText(10, 113, "Computation: "+computation, -16777216); - drawText(10, 123, "Min Computation: "+minComputationPerSec + " /s", -16777216); + drawText(10, 113, "Computation: " + GT_Utility.formatNumbers(computation), -16777216); + drawText(10, 123, "Min Computation: " + GT_Utility.formatNumbers(minComputationPerSec) + " /s", -16777216); } else { int i = 0; for (String descLine : recipeDesc) { diff --git a/src/main/java/com/github/technus/tectech/nei/TT_NEI_ScannerHandler.java b/src/main/java/com/github/technus/tectech/nei/TT_NEI_ScannerHandler.java index 0c7651977e..2dc4604fd5 100644 --- a/src/main/java/com/github/technus/tectech/nei/TT_NEI_ScannerHandler.java +++ b/src/main/java/com/github/technus/tectech/nei/TT_NEI_ScannerHandler.java @@ -215,18 +215,18 @@ public class TT_NEI_ScannerHandler extends TemplateRecipeHandler { int tSpecial = ((CachedDefaultRecipe) arecipes.get(aRecipeIndex)).mRecipe.mSpecialValue; short ampere=(short) (tSpecial & 0xFFFF),minComputationPerSec=(short)(tSpecial>>>16); if (tEUt != 0) { - drawText(10, 73, trans("152","Max Total: ") + (1+ (computation-minComputationPerSec) /minComputationPerSec) * (long)tEUt * ampere * 20 + " EU", -16777216); - drawText(10, 83, trans("153","Usage: ") + (long)tEUt*ampere + " EU/t", -16777216); + drawText(10, 73, trans("152","Max Total: ") + GT_Utility.formatNumbers((1+ (computation-minComputationPerSec) /minComputationPerSec) * (long)tEUt * ampere * 20) + " EU", -16777216); + drawText(10, 83, trans("153","Usage: ") + GT_Utility.formatNumbers((long)tEUt*ampere) + " EU/t", -16777216); if (mRecipeMap.mShowVoltageAmperageInNEI) { - drawText(10, 93, trans("154","Voltage: ") + tEUt + " EU", -16777216); - drawText(10, 103, trans("155","Amperage: ") + ampere, -16777216); + drawText(10, 93, trans("154","Voltage: ") + GT_Utility.formatNumbers(tEUt) + " EU", -16777216); + drawText(10, 103, trans("155","Amperage: ") + GT_Utility.formatNumbers(ampere), -16777216); } else { drawText(10, 93, trans("156","Voltage: unspecified"), -16777216); drawText(10, 103, trans("157","Amperage: unspecified"), -16777216); } } - drawText(10, 113, "Computation: "+computation, -16777216); - drawText(10, 123, "Min Computation: "+minComputationPerSec + " /s", -16777216); + drawText(10, 113, "Computation: " + GT_Utility.formatNumbers(computation), -16777216); + drawText(10, 123, "Min Computation: " + GT_Utility.formatNumbers(minComputationPerSec) + " /s", -16777216); } else { int i = 0; for (String descLine : recipeDesc) { diff --git a/src/main/java/com/github/technus/tectech/thing/item/ConstructableTriggerItem.java b/src/main/java/com/github/technus/tectech/thing/item/ConstructableTriggerItem.java index 752f2d1bcc..81fec52ebd 100644 --- a/src/main/java/com/github/technus/tectech/thing/item/ConstructableTriggerItem.java +++ b/src/main/java/com/github/technus/tectech/thing/item/ConstructableTriggerItem.java @@ -18,6 +18,7 @@ import static net.minecraft.util.StatCollector.translateToLocal; /** * Created by Tec on 15.03.2017. */ +@Deprecated public final class ConstructableTriggerItem extends Item { public static ConstructableTriggerItem INSTANCE; diff --git a/src/main/java/com/github/technus/tectech/thing/item/FrontRotationTriggerItem.java b/src/main/java/com/github/technus/tectech/thing/item/FrontRotationTriggerItem.java index d71abb34b7..39193fd598 100644 --- a/src/main/java/com/github/technus/tectech/thing/item/FrontRotationTriggerItem.java +++ b/src/main/java/com/github/technus/tectech/thing/item/FrontRotationTriggerItem.java @@ -18,6 +18,7 @@ import static net.minecraft.util.StatCollector.translateToLocal; /** * Created by Tec on 15.03.2017. */ +@Deprecated public final class FrontRotationTriggerItem extends Item { public static FrontRotationTriggerItem INSTANCE; diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_DataConnector.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_DataConnector.java index 6cbf1e801b..4aa90339cc 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_DataConnector.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_DataConnector.java @@ -160,7 +160,10 @@ public abstract class GT_MetaTileEntity_Hatch_DataConnector<T extends DataPacket @Override public String[] getInfoData() { if (id > 0) { - return new String[]{translateToLocalFormatted("tt.keyword.ID", clientLocale) + ": " + EnumChatFormatting.AQUA + id, translateToLocalFormatted("tt.keyword.Content", clientLocale) + ": " + EnumChatFormatting.AQUA + (q != null ? q.getContentString() : 0), translateToLocalFormatted("tt.keyword.PacketHistory", clientLocale) + ": " + EnumChatFormatting.RED + (q != null ? q.getTraceSize() : 0),}; + return new String[]{ + translateToLocalFormatted("tt.keyword.ID", clientLocale) + ": " + EnumChatFormatting.AQUA + id, + translateToLocalFormatted("tt.keyword.Content", clientLocale) + ": " + EnumChatFormatting.AQUA + (q != null ? q.getContentString() : 0), + translateToLocalFormatted("tt.keyword.PacketHistory", clientLocale) + ": " + EnumChatFormatting.RED + (q != null ? q.getTraceSize() : 0),}; } return new String[]{ translateToLocalFormatted("tt.keyword.Content", clientLocale) + ": " + EnumChatFormatting.AQUA + (q != null ? q.getContentString() : 0), 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 202dc344c2..b015d71b60 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 @@ -111,7 +111,8 @@ public class GT_MetaTileEntity_Hatch_DynamoTunnel extends GT_MetaTileEntity_Hatc return new String[]{ CommonValues.TEC_MARK_GENERAL, mDescription,//TODO NOT PASS DESCRIPTION - translateToLocal("gt.blockmachines.hatch.dynamotunnel.desc.1") + ": " + EnumChatFormatting.YELLOW + (Amperes * maxEUOutput()) + EnumChatFormatting.RESET + " EU/t"//Throughput + translateToLocal("gt.blockmachines.hatch.dynamotunnel.desc.1") + ": " + + EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(Amperes * maxEUOutput()) + EnumChatFormatting.RESET + " EU/t"//Throughput }; } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_EnergyMulti.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_EnergyMulti.java index 4410372d47..0acb9849a7 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_EnergyMulti.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_EnergyMulti.java @@ -6,6 +6,7 @@ import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; +import gregtech.api.util.GT_Utility; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; @@ -116,7 +117,8 @@ public class GT_MetaTileEntity_Hatch_EnergyMulti extends GT_MetaTileEntity_Hatch return new String[]{ CommonValues.TEC_MARK_GENERAL, mDescription, - translateToLocal("gt.blockmachines.hatch.energymulti.desc.1") + ": " + EnumChatFormatting.AQUA + maxAmperesIn() + " A"//Amperes In + translateToLocal("gt.blockmachines.hatch.energymulti.desc.1") + ": " + + EnumChatFormatting.AQUA + GT_Utility.formatNumbers(maxAmperesIn()) + " A"//Amperes In }; } }
\ No newline at end of file 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 854678b79b..d44119e1ab 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 @@ -6,6 +6,7 @@ import com.github.technus.tectech.mechanics.pipe.IConnectsToEnergyTunnel; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.util.GT_Utility; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; @@ -108,7 +109,8 @@ public class GT_MetaTileEntity_Hatch_EnergyTunnel extends GT_MetaTileEntity_Hatc return new String[]{ CommonValues.TEC_MARK_GENERAL, mDescription, - translateToLocal("gt.blockmachines.hatch.energytunnel.desc.1") + ": " + EnumChatFormatting.YELLOW + (Amperes * maxEUInput()) + EnumChatFormatting.RESET + " EU/t"//Throughput + translateToLocal("gt.blockmachines.hatch.energytunnel.desc.1") + ": " + + EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(Amperes * maxEUInput()) + EnumChatFormatting.RESET + " EU/t"//Throughput }; } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_OverflowElemental.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_OverflowElemental.java index a5e6dc4d5d..ff9aca01ee 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_OverflowElemental.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_OverflowElemental.java @@ -12,6 +12,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Utility; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; @@ -90,8 +91,8 @@ public class GT_MetaTileEntity_Hatch_OverflowElemental extends GT_MetaTileEntity return new String[]{ CommonValues.TEC_MARK_EM, mDescription, - translateToLocal("gt.blockmachines.hatch.emmuffler.desc.1") + ": " + EnumChatFormatting.AQUA + String.format(Locale.ENGLISH, "%+.2E", overflowMax) + " eV/c\u00b2", - translateToLocal("gt.blockmachines.hatch.emmuffler.desc.2") + ": " + EnumChatFormatting.AQUA + String.format(Locale.ENGLISH, "%+.2E", overflowDisperse) + " (eV/c\u00b2)/s", + translateToLocal("gt.blockmachines.hatch.emmuffler.desc.1") + ": " + EnumChatFormatting.AQUA + GT_Utility.formatNumbers(overflowMax) + " eV/c\u00b2", + translateToLocal("gt.blockmachines.hatch.emmuffler.desc.2") + ": " + EnumChatFormatting.AQUA + GT_Utility.formatNumbers(overflowDisperse) + " (eV/c\u00b2)/s", translateToLocal("gt.blockmachines.hatch.emmuffler.desc.3") }; } @@ -216,9 +217,10 @@ public class GT_MetaTileEntity_Hatch_OverflowElemental extends GT_MetaTileEntity public String[] getInfoData() { return new String[]{ translateToLocalFormatted("tt.keyphrase.Contained_mass", clientLocale) + ":", - EnumChatFormatting.RED + Double.toString(overflowMatter) + EnumChatFormatting.RESET + " eV/c\u00b2 /", - EnumChatFormatting.GREEN + Double.toString(overflowMax) + EnumChatFormatting.RESET + " eV/c\u00b2", - translateToLocalFormatted("tt.keyphrase.Mass_Disposal_speed", clientLocale) + ": " + EnumChatFormatting.BLUE + overflowDisperse + EnumChatFormatting.RESET + " (eV/c\u00b2)/s" + EnumChatFormatting.RED + GT_Utility.formatNumbers(overflowMatter) + EnumChatFormatting.RESET + " eV/c\u00b2 /", + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(overflowMax) + EnumChatFormatting.RESET + " eV/c\u00b2", + translateToLocalFormatted("tt.keyphrase.Mass_Disposal_speed", clientLocale) + ": " + + EnumChatFormatting.BLUE + GT_Utility.formatNumbers(overflowDisperse) + EnumChatFormatting.RESET + " (eV/c\u00b2)/s" }; } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_annihilation.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_annihilation.java index 584e28a607..05829c89e4 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_annihilation.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_annihilation.java @@ -1,27 +1,28 @@ package com.github.technus.tectech.thing.metaTileEntity.multi; -import com.github.technus.tectech.mechanics.constructable.IConstructable; -import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder; -import com.github.technus.tectech.mechanics.structure.Structure; import com.github.technus.tectech.thing.block.QuantumGlassBlock; import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_RenderedExtendedFacingTexture; import com.github.technus.tectech.util.CommonValues; +import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable; +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; -import static com.github.technus.tectech.mechanics.structure.Structure.adders; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; import static net.minecraft.util.StatCollector.translateToLocal; /** @@ -31,30 +32,6 @@ public class GT_MetaTileEntity_EM_annihilation extends GT_MetaTileEntity_Multibl //region variables private static Textures.BlockIcons.CustomIcon ScreenOFF; private static Textures.BlockIcons.CustomIcon ScreenON; - //endregion - - //region structure - private static final String[][] shape = new String[][]{ - {"\u0002", "D000", "C0 0", "C0 . 0", "C0 0", "D000"}, - {"C01A10", "C01A10", "D1A1", "00B101B00", "11111111111", "C01110", "11111111111", "00B101B00", "D1A1", "C01A10", "C01A10",}, - {"C01A10", "A223222322", "A244242442", "03442424430", "12225252221", "A244222442", "12225252221", "03442424430", "A244242442", "A223222322", "C01A10",}, - {"D111", "A244222442", "A4G4", "A4G4", "12G21", "12G21", "12G21", "A4G4", "A4G4", "A244222442", "D111",}, - {"A0C0C0", "03444244430", "A4G4", "A4G4", "A4G4", "02G20", "A4G4", "A4G4", "A4G4", "03444244430", "A0C0C0",}, - {"00C!C00", "02444544420", "A4G4", "A4G4", "A4G4", "!5G5!", "A4G4", "A4G4", "A4G4", "02444544420", "00C!C00",}, - {"A0C0C0", "03444244430", "A4G4", "A4G4", "A4G4", "02G20", "A4G4", "A4G4", "A4G4", "03444244430", "A0C0C0",}, - {"D111", "A244222442", "A4G4", "A4G4", "12G21", "12G21", "12G21", "A4G4", "A4G4", "A244222442", "D111",}, - {"C01A10", "A223222322", "A244242442", "03442424430", "12225252221", "A244222442", "12225252221", "03442424430", "A244242442", "A223222322", "C01A10",}, - {"C01A10", "C01A10", "D1A1", "00B101B00", "11111111111", "C01110", "11111111111", "00B101B00", "D1A1", "C01A10", "C01A10",}, - {"\u0002", "D000", "C0 0", "C0 0", "C0 0", "D000"}, - }; - private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT, QuantumGlassBlock.INSTANCE, sBlockCasingsTT}; - private static final byte[] blockMeta = new byte[]{4, 5, 12, 6, 0, 10}; - private static final IHatchAdder<GT_MetaTileEntity_EM_annihilation>[] addingMethods = adders( - GT_MetaTileEntity_EM_annihilation::addClassicToMachineList, - GT_MetaTileEntity_EM_annihilation::addElementalToMachineList); - private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 4}; - private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT}; - private static final byte[] blockMetaFallback = new byte[]{0, 4}; private static final String[] description = new String[]{ EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":", translateToLocal("gt.blockmachines.multimachine.em.annihilation.hint.0"),//1 - Classic Hatches or High Power Casing @@ -62,6 +39,33 @@ public class GT_MetaTileEntity_EM_annihilation extends GT_MetaTileEntity_Multibl }; //endregion + //region structure + private static final IStructureDefinition<GT_MetaTileEntity_EM_annihilation> STRUCTURE_DEFINITION = + StructureDefinition.<GT_MetaTileEntity_EM_annihilation>builder() + .addShape("main", transpose(new String[][]{ + {" "," AB BA "," AB BA "," BBB "," A A A ","AA F AA"," A A A "," BBB "," AB BA "," AB BA "," "}, + {" "," AB BA "," EECEEECEE "," EGGEEEGGE ","ACGGGEGGGCA","AEGGGDGGGEA","ACGGGEGGGCA"," EGGEEEGGE "," EECEEECEE "," AB BA "," "}, + {" "," B B "," EGGEGEGGE "," G G "," G G "," G G "," G G "," G G "," EGGEGEGGE "," B B "," "}, + {" AAA ","AA BAB AA","ACGGEGEGGCA"," G G "," G G "," G G "," G G "," G G ","ACGGEGEGGCA","AA BAB AA"," AAA "}, + {" AHHHA ","BBBBBBBBBBB","BEEEDEDEEEB","BE EB"," G G "," G G "," G G ","BE EB","BEEEDEDEEEB","BBBBBBBBBBB"," AHHHA "}, + {" AH~HA "," ABBBA "," EGGEEEGGE ","BE EB","AE EA","FD DF","AE EA","BE EB"," EGGEEEGGE "," ABBBA "," AHHHA "}, + {" AHHHA ","BBBBBBBBBBB","BEEEDEDEEEB","BE EB"," G G "," G G "," G G ","BE EB","BEEEDEDEEEB","BBBBBBBBBBB"," AHHHA "}, + {" AAA ","AA BAB AA","ACGGEGEGGCA"," G G "," G G "," G G "," G G "," G G ","ACGGEGEGGCA","AA BAB AA"," AAA "}, + {" "," B B "," EGGEGEGGE "," G G "," G G "," G G "," G G "," G G "," EGGEGEGGE "," B B "," "}, + {" "," AB BA "," EECEEECEE "," EGGEEEGGE ","ACGGGEGGGCA","AEGGGDGGGEA","ACGGGEGGGCA"," EGGEEEGGE "," EECEEECEE "," AB BA "," "}, + {" "," AB BA "," AB BA "," BBB "," A A A ","AA F AA"," A A A "," BBB "," AB BA "," AB BA "," "} + })) + .addElement('A', ofBlock(sBlockCasingsTT, 4)) + .addElement('B', ofBlock(sBlockCasingsTT, 5)) + .addElement('C', ofBlock(sBlockCasingsTT, 6)) + .addElement('D', ofBlock(sBlockCasingsTT, 10)) + .addElement('E', ofBlock(sBlockCasingsTT, 12)) + .addElement('F', ofHatchAdderOptional(GT_MetaTileEntity_EM_annihilation::addElementalToMachineList, textureOffset + 4,2, sBlockCasingsTT, 4)) + .addElement('G', ofBlock(QuantumGlassBlock.INSTANCE, 0)) + .addElement('H', ofHatchAdderOptional(GT_MetaTileEntity_EM_annihilation::addClassicToMachineList, textureOffset, 1, sBlockCasingsTT, 0)) + .build(); + //endregion + public GT_MetaTileEntity_EM_annihilation(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); } @@ -77,7 +81,7 @@ public class GT_MetaTileEntity_EM_annihilation extends GT_MetaTileEntity_Multibl @Override public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { - return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 5, 5, 0); + return structureCheck_EM("main", 5, 5, 0); } @Override @@ -107,7 +111,12 @@ public class GT_MetaTileEntity_EM_annihilation extends GT_MetaTileEntity_Multibl @Override public void construct(ItemStack stackSize, boolean hintsOnly) { - Structure.builder(shape, blockType, blockMeta, 5, 5, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly); + structureBuild_EM("main", 5, 5, 0, hintsOnly, stackSize); + } + + @Override + public IStructureDefinition<GT_MetaTileEntity_EM_annihilation> getStructure_EM() { + return STRUCTURE_DEFINITION; } @Override diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_bhg.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_bhg.java index 06476fb62e..448c930351 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_bhg.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_bhg.java @@ -1,12 +1,12 @@ package com.github.technus.tectech.thing.metaTileEntity.multi; -import com.github.technus.tectech.mechanics.constructable.IConstructable; -import com.github.technus.tectech.mechanics.structure.IStructureDefinition; -import com.github.technus.tectech.mechanics.structure.StructureDefinition; import com.github.technus.tectech.thing.block.QuantumGlassBlock; import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_RenderedExtendedFacingTexture; import com.github.technus.tectech.util.CommonValues; +import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable; +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.Textures; @@ -17,14 +17,14 @@ import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; -import static com.github.technus.tectech.mechanics.structure.StructureUtility.ofBlock; -import static com.github.technus.tectech.mechanics.structure.StructureUtility.ofHatchAdderOptional; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; import static com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_EM_decay.URANIUM_INGOT_MASS_DIFF; import static com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_EM_decay.URANIUM_MASS_TO_EU_INSTANT; -import static gregtech.api.enums.GT_Values.E; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; import static net.minecraft.util.StatCollector.translateToLocal; /** @@ -49,92 +49,90 @@ public class GT_MetaTileEntity_EM_bhg extends GT_MetaTileEntity_MultiblockBase_E //per dim disable thingies //region structure actual - private static final IStructureDefinition<GT_MetaTileEntity_EM_bhg> STRUCTURE_DEFINITION= StructureDefinition - .<GT_MetaTileEntity_EM_bhg>builder() - .addShapeOldApi("t1",new String[][]{ - {"\u000B", "M0000000", "L00 00", "L0 0", "L0 !!! 0", "L0 !.! 0", "L0 !!! 0", "L0 0", "L00 00", "M0000000",}, - {"\u0008", "O0A0", "O0A0", "O0A0", "O0A0", "N11111", "M1101011", "I000010010010000", "M1111111", "I000010010010000", "M1101011", "N11111", "O0A0", "O0A0", "O0A0", "O0A0",}, - {"\u0006", "O0A0", "O0A0", "O0A0", "P1", "P1", "M1111111", "L11E11", "L1B222B1", "G000B1A23332A1B000", "J111A23332A111", "G000B1A23332A1B000", "L1B222B1", "L11E11", "M1111111", "P1", "P1", "O0A0", "O0A0", "O0A0",}, - {"\u0005", "O0A0", "O0A0", "P1", "P1", "\u0004", "F00Q00", "H11M11", "F00Q00", "\u0004", "P1", "P1", "O0A0", "O0A0",}, - {"\u0004", "O0A0", "N00000", "P1", "P4", "P4", "\u0003", "F0S0", "E00S00", "F0144M4410", "E00S00", "F0S0", "\u0003", "P4", "P4", "P1", "N00000", "O0A0",}, - {"\u0003", "O0A0", "O0A0", "P1", "M2224222", "\u0004", "G2Q2", "G2Q2", "D00A2Q2A00", "F14Q41", "D00A2Q2A00", "G2Q2", "G2Q2", "\u0004", "M2224222", "P1", "O0A0", "O0A0",}, - {"\u0002", "O0A0", "N00000", "P1", "P4", "\u0006", "D0W0", "C00W00", "D014S410", "C00W00", "D0W0", "\u0006", "P4", "P1", "N00000", "O0A0",}, - {"\u0001", "O0A0", "O0A0", "P1", "M2224222", "\u0006", "E2U2", "E2U2", "B00A2U2A00", "D14U41", "B00A2U2A00", "E2U2", "E2U2", "\u0006", "M2224222", "P1", "O0A0", "O0A0",}, - {"\u0001", "O0A0", "P1", "P4", "\u0009", "B0[0", "C14W41", "B0[0", "\u0009", "P4", "P1", "O0A0",}, - {E, "O0A0", "O0A0", "P1", "P4", "\u0009", "A00[00", "C14W41", "A00[00", "\u0009", "P4", "P1", "O0A0", "O0A0",}, - {E, "O0A0", "P1", "\u000B", "A0]0", "B1[1", "A0]0", "\u000B", "P1", "O0A0",}, - {E, "O0A0", "P1", "\u000B", "A0]0", "B1[1", "A0]0", "\u000B", "P1", "O0A0",}, - {"O0A0", "O0A0", "M1111111", "\u0009", "B1[1", "B1[1", "001[100", "B1[1", "001[100", "B1[1", "B1[1", "\u0009", "M1111111", "O0A0", "O0A0",}, - {"O0A0", "N11111", "L11E11", "\u0001", "G2Q2", E, "E2U2", "\u0003", "B1[1", "B1[1", "A1]1", "01]10", "A1]1", "01]10", "A1]1", "B1[1", "B1[1", "\u0003", "E2U2", E, "G2Q2", "\u0001", "L11E11", "N11111", "O0A0",}, - {"O0A0", "M1101011", "L1B222B1", E, "F0S0", "G2Q2", "D0W0", "E2U2", "\u0003", "B1[1", "A1]1", "A1]1", "002[200", "A12[21", "002[200", "A1]1", "A1]1", "B1[1", "\u0003", "E2U2", "D0W0", "G2Q2", "F0S0", E, "L1B222B1", "M1101011", "O0A0",}, - {"L000000000", "I000010010010000", "G000B1A23332A1B000", "F00Q00", "E00S00", "D00A2Q2A00", "C00W00", "B00A2U2A00", "B0[0", "A00[00", "A0]0", "A0]0", "001[100", "01]10", "002[200", "003[300", "013[310", "003[300", "002[200", "01]10", "001[100", "A0]0", "A0]0", "A00[00", "B0[0", "B00A2U2A00", "C00W00", "D00A2Q2A00", "E00S00", "F00Q00", "G000B1A23332A1B000", "I000010010010000", "L000000000",}, - {"O0A0", "M1111111", "J111A23332A111", "H11M11", "F0144M4410", "F14Q41", "D014S410", "D14U41", "C14W41", "C14W41", "B1[1", "B1[1", "B1[1", "A1]1", "A12[21", "013[310", "A13[31", "013[310", "A12[21", "A1]1", "B1[1", "B1[1", "B1[1", "C14W41", "C14W41", "D14U41", "D014S410", "F14Q41", "F0144M4410", "H11M11", "J111A23332A111", "M1111111", "O0A0",}, - {"L000000000", "I000010010010000", "G000B1A23332A1B000", "F00Q00", "E00S00", "D00A2Q2A00", "C00W00", "B00A2U2A00", "B0[0", "A00[00", "A0]0", "A0]0", "001[100", "01]10", "002[200", "003[300", "013[310", "003[300", "002[200", "01]10", "001[100", "A0]0", "A0]0", "A00[00", "B0[0", "B00A2U2A00", "C00W00", "D00A2Q2A00", "E00S00", "F00Q00", "G000B1A23332A1B000", "I000010010010000", "L000000000",}, - {"O0A0", "M1101011", "L1B222B1", E, "F0S0", "G2Q2", "D0W0", "E2U2", "\u0003", "B1[1", "A1]1", "A1]1", "002[200", "A12[21", "002[200", "A1]1", "A1]1", "B1[1", "\u0003", "E2U2", "D0W0", "G2Q2", "F0S0", E, "L1B222B1", "M1101011", "O0A0",}, - {"O0A0", "N11111", "L11E11", "\u0001", "G2Q2", E, "E2U2", "\u0003", "B1[1", "B1[1", "A1]1", "01]10", "A1]1", "01]10", "A1]1", "B1[1", "B1[1", "\u0003", "E2U2", E, "G2Q2", "\u0001", "L11E11", "N11111", "O0A0",}, - {"O0A0", "O0A0", "M1111111", "\u0009", "B1[1", "B1[1", "001[100", "B1[1", "001[100", "B1[1", "B1[1", "\u0009", "M1111111", "O0A0", "O0A0",}, - {E, "O0A0", "P1", "\u000B", "A0]0", "B1[1", "A0]0", "\u000B", "P1", "O0A0",}, - {E, "O0A0", "P1", "\u000B", "A0]0", "B1[1", "A0]0", "\u000B", "P1", "O0A0",}, - {E, "O0A0", "O0A0", "P1", "P4", "\u0009", "A00[00", "C14W41", "A00[00", "\u0009", "P4", "P1", "O0A0", "O0A0",}, - {"\u0001", "O0A0", "P1", "P4", "\u0009", "B0[0", "C14W41", "B0[0", "\u0009", "P4", "P1", "O0A0",}, - {"\u0001", "O0A0", "O0A0", "P1", "M2224222", "\u0006", "E2U2", "E2U2", "B00A2U2A00", "D14U41", "B00A2U2A00", "E2U2", "E2U2", "\u0006", "M2224222", "P1", "O0A0", "O0A0",}, - {"\u0002", "O0A0", "N00000", "P1", "P4", "\u0006", "D0W0", "C00W00", "D014S410", "C00W00", "D0W0", "\u0006", "P4", "P1", "N00000", "O0A0",}, - {"\u0003", "O0A0", "O0A0", "P1", "M2224222", "\u0004", "G2Q2", "G2Q2", "D00A2Q2A00", "F14Q41", "D00A2Q2A00", "G2Q2", "G2Q2", "\u0004", "M2224222", "P1", "O0A0", "O0A0",}, - {"\u0004", "O0A0", "N00000", "P1", "P4", "P4", "\u0003", "F0S0", "E00S00", "F0144M4410", "E00S00", "F0S0", "\u0003", "P4", "P4", "P1", "N00000", "O0A0",}, - {"\u0005", "O0A0", "O0A0", "P1", "P1", "\u0004", "F00Q00", "H11M11", "F00Q00", "\u0004", "P1", "P1", "O0A0", "O0A0",}, - {"\u0006", "O0A0", "O0A0", "O0A0", "P1", "P1", "M1111111", "L11E11", "L1B222B1", "G000B1A23332A1B000", "J111A23332A111", "G000B1A23332A1B000", "L1B222B1", "L11E11", "M1111111", "P1", "P1", "O0A0", "O0A0", "O0A0",}, - {"\u0008", "O0A0", "O0A0", "O0A0", "O0A0", "N11111", "M1101011", "I000010010010000", "M1111111", "I000010010010000", "M1101011", "N11111", "O0A0", "O0A0", "O0A0", "O0A0",}, - {"\u000B", "O0A0", "O0A0", "O0A0", "L000000000", "O0A0", "L000000000", "O0A0", "O0A0", "O0A0",}, - }) - .addShapeOldApi("t2",new String[][]{ - {"\u000B", "M0000000", "L00 00", "L0 0", "L0 !!! 0", "L0 !.! 0", "L0 !!! 0", "L0 0", "L00 00", "M0000000",}, - {"\u0008", "O0A0", "M550A055", "L5550A0555", "K55550A05555", "J5555111115555", "J5551101011555", "I000010010010000", "M1111111", "I000010010010000", "J5551101011555", "J5555111115555", "K55550A05555", "L5550A0555", "M550A055", "O0A0",}, - {"\u0006", "O0A0", "M550A055", "K55550A05555", "J555C1C555", "I555D1D555", "I55B1111111B55", "H55B11E11B55", "H55B1B222B1B55", "G000B1A23332A1B000", "J111A23332A111", "G000B1A23332A1B000", "H55B1B222B1B55", "H55B11E11B55", "I55B1111111B55", "I555D1D555", "J555C1C555", "K55550A05555", "M550A055", "O0A0",}, - {"\u0005", "O0A0", "L5550A0555", "J555C1C555", "I55E1E55", "H55M55", "H5O5", "G55O55", "G5Q5", "G5Q5", "F00Q00", "H11M11", "F00Q00", "G5Q5", "G5Q5", "G55O55", "H5O5", "H55M55", "I55E1E55", "J555C1C555", "L5550A0555", "O0A0",}, - {"\u0004", "O0A0", "K55500000555", "I555D1D555", "H55F4F55", "G55G4G55", "G5Q5", "F55Q55", "F5S5", "F5S5", "F0S0", "E00S00", "F0144M4410", "E00S00", "F0S0", "F5S5", "F5S5", "F55Q55", "G5Q5", "G55G4G55", "H55F4F55", "I555D1D555", "K55500000555", "O0A0",}, - {"\u0003", "O0A0", "J555550A055555", "H555E1E555", "G55D2224222D55", "F55Q55", "F5S5", "E55S55", "E5U5", "E5U5", "E5A2Q2A5", "E5A2Q2A5", "D00A2Q2A00", "F14Q41", "D00A2Q2A00", "E5A2Q2A5", "E5A2Q2A5", "E5U5", "E5U5", "E55S55", "F5S5", "F55Q55", "G55D2224222D55", "H555E1E555", "J555550A055555", "O0A0",}, - {"\u0002", "O0A0", "K55500000555", "H555E1E555", "G55G4G55", "F5S5", "E55S55", "E5U5", "E5U5", "D5W5", "D5W5", "D5W5", "D0W0", "C00W00", "D014S410", "C00W00", "D0W0", "D5W5", "D5W5", "D5W5", "E5U5", "E5U5", "E55S55", "F5S5", "G55G4G55", "H555E1E555", "K55500000555", "O0A0",}, - {"\u0001", "O0A0", "L5550A0555", "I555D1D555", "G55D2224222D55", "F5S5", "E5U5", "E5U5", "D5W5", "D5W5", "D5W5", "C5Y5", "C5A2U2A5", "C5A2U2A5", "B00A2U2A00", "D14U41", "B00A2U2A00", "C5A2U2A5", "C5A2U2A5", "C5Y5", "D5W5", "D5W5", "D5W5", "E5U5", "E5U5", "F5S5", "G55D2224222D55", "I555D1D555", "L5550A0555", "O0A0",}, - {"\u0001", "M550A055", "J555C1C555", "H55F4F55", "F55Q55", "E55S55", "E5U5", "D5W5", "D5W5", "C5Y5", "C5Y5", "C5Y5", "B5[5", "B5[5", "B0[0", "C14W41", "B0[0", "B5[5", "B5[5", "C5Y5", "C5Y5", "C5Y5", "D5W5", "D5W5", "E5U5", "E55S55", "F55Q55", "H55F4F55", "J555C1C555", "M550A055",}, - {E, "O0A0", "K55550A05555", "I55E1E55", "G55G4G55", "F5S5", "E5U5", "D5W5", "D5W5", "C5Y5", "C5Y5", "B5[5", "B5[5", "B5[5", "B5[5", "A00[00", "C14W41", "A00[00", "B5[5", "B5[5", "B5[5", "B5[5", "C5Y5", "C5Y5", "D5W5", "D5W5", "E5U5", "F5S5", "G55G4G55", "I55E1E55", "K55550A05555", "O0A0",}, - {E, "M550A055", "J555C1C555", "H55M55", "G5Q5", "E55S55", "E5U5", "D5W5", "C5Y5", "C5Y5", "B5[5", "B5[5", "B5[5", "A5]5", "A5]5", "A0]0", "B1[1", "A0]0", "A5]5", "A5]5", "B5[5", "B5[5", "B5[5", "C5Y5", "C5Y5", "D5W5", "E5U5", "E55S55", "G5Q5", "H55M55", "J555C1C555", "M550A055",}, - {E, "L5550A0555", "I555D1D555", "H5O5", "F55Q55", "E5U5", "D5W5", "D5W5", "C5Y5", "B5[5", "B5[5", "B5[5", "A5]5", "A5]5", "A5]5", "A0]0", "B1[1", "A0]0", "A5]5", "A5]5", "A5]5", "B5[5", "B5[5", "B5[5", "C5Y5", "D5W5", "D5W5", "E5U5", "F55Q55", "H5O5", "I555D1D555", "L5550A0555",}, - {"O0A0", "K55550A05555", "I55B1111111B55", "G55O55", "F5S5", "E5U5", "D5W5", "C5Y5", "C5Y5", "B5[5", "B5[5", "A5]5", "A5]5", "A51[15", "A51[15", "001[100", "B1[1", "001[100", "A51[15", "A51[15", "A5]5", "A5]5", "B5[5", "B5[5", "C5Y5", "C5Y5", "D5W5", "E5U5", "F5S5", "G55O55", "I55B1111111B55", "K55550A05555", "O0A0",}, - {"O0A0", "J5555111115555", "H55B11E11B55", "G5Q5", "F5S5", "E5A2Q2A5", "D5W5", "C5A2U2A5", "B5[5", "B5[5", "A5]5", "A5]5", "A51[15", "A51[15", "A1]1", "01]10", "A1]1", "01]10", "A1]1", "A51[15", "A51[15", "A5]5", "A5]5", "B5[5", "B5[5", "C5A2U2A5", "D5W5", "E5A2Q2A5", "F5S5", "G5Q5", "H55B11E11B55", "J5555111115555", "O0A0",}, - {"O0A0", "J5551101011555", "H55B1B222B1B55", "G5Q5", "F0S0", "E5A2Q2A5", "D0W0", "C5A2U2A5", "B5[5", "B5[5", "A5]5", "A5]5", "A51[15", "A1]1", "A1]1", "002[200", "A12[21", "002[200", "A1]1", "A1]1", "A51[15", "A5]5", "A5]5", "B5[5", "B5[5", "C5A2U2A5", "D0W0", "E5A2Q2A5", "F0S0", "G5Q5", "H55B1B222B1B55", "J5551101011555", "O0A0",}, - {"L000000000", "I000010010010000", "G000B1A23332A1B000", "F00Q00", "E00S00", "D00A2Q2A00", "C00W00", "B00A2U2A00", "B0[0", "A00[00", "A0]0", "A0]0", "001[100", "01]10", "002[200", "003[300", "013[310", "003[300", "002[200", "01]10", "001[100", "A0]0", "A0]0", "A00[00", "B0[0", "B00A2U2A00", "C00W00", "D00A2Q2A00", "E00S00", "F00Q00", "G000B1A23332A1B000", "I000010010010000", "L000000000",}, - {"O0A0", "M1111111", "J111A23332A111", "H11M11", "F0144M4410", "F14Q41", "D014S410", "D14U41", "C14W41", "C14W41", "B1[1", "B1[1", "B1[1", "A1]1", "A12[21", "013[310", "A13[31", "013[310", "A12[21", "A1]1", "B1[1", "B1[1", "B1[1", "C14W41", "C14W41", "D14U41", "D014S410", "F14Q41", "F0144M4410", "H11M11", "J111A23332A111", "M1111111", "O0A0",}, - {"L000000000", "I000010010010000", "G000B1A23332A1B000", "F00Q00", "E00S00", "D00A2Q2A00", "C00W00", "B00A2U2A00", "B0[0", "A00[00", "A0]0", "A0]0", "001[100", "01]10", "002[200", "003[300", "013[310", "003[300", "002[200", "01]10", "001[100", "A0]0", "A0]0", "A00[00", "B0[0", "B00A2U2A00", "C00W00", "D00A2Q2A00", "E00S00", "F00Q00", "G000B1A23332A1B000", "I000010010010000", "L000000000",}, - {"O0A0", "J5551101011555", "H55B1B222B1B55", "G5Q5", "F0S0", "E5A2Q2A5", "D0W0", "C5A2U2A5", "B5[5", "B5[5", "A5]5", "A5]5", "A51[15", "A1]1", "A1]1", "002[200", "A12[21", "002[200", "A1]1", "A1]1", "A51[15", "A5]5", "A5]5", "B5[5", "B5[5", "C5A2U2A5", "D0W0", "E5A2Q2A5", "F0S0", "G5Q5", "H55B1B222B1B55", "J5551101011555", "O0A0",}, - {"O0A0", "J5555111115555", "H55B11E11B55", "G5Q5", "F5S5", "E5A2Q2A5", "D5W5", "C5A2U2A5", "B5[5", "B5[5", "A5]5", "A5]5", "A51[15", "A51[15", "A1]1", "01]10", "A1]1", "01]10", "A1]1", "A51[15", "A51[15", "A5]5", "A5]5", "B5[5", "B5[5", "C5A2U2A5", "D5W5", "E5A2Q2A5", "F5S5", "G5Q5", "H55B11E11B55", "J5555111115555", "O0A0",}, - {"O0A0", "K55550A05555", "I55B1111111B55", "G55O55", "F5S5", "E5U5", "D5W5", "C5Y5", "C5Y5", "B5[5", "B5[5", "A5]5", "A5]5", "A51[15", "A51[15", "001[100", "B1[1", "001[100", "A51[15", "A51[15", "A5]5", "A5]5", "B5[5", "B5[5", "C5Y5", "C5Y5", "D5W5", "E5U5", "F5S5", "G55O55", "I55B1111111B55", "K55550A05555", "O0A0",}, - {E, "L5550A0555", "I555D1D555", "H5O5", "F55Q55", "E5U5", "D5W5", "D5W5", "C5Y5", "B5[5", "B5[5", "B5[5", "A5]5", "A5]5", "A5]5", "A0]0", "B1[1", "A0]0", "A5]5", "A5]5", "A5]5", "B5[5", "B5[5", "B5[5", "C5Y5", "D5W5", "D5W5", "E5U5", "F55Q55", "H5O5", "I555D1D555", "L5550A0555",}, - {E, "M550A055", "J555C1C555", "H55M55", "G5Q5", "E55S55", "E5U5", "D5W5", "C5Y5", "C5Y5", "B5[5", "B5[5", "B5[5", "A5]5", "A5]5", "A0]0", "B1[1", "A0]0", "A5]5", "A5]5", "B5[5", "B5[5", "B5[5", "C5Y5", "C5Y5", "D5W5", "E5U5", "E55S55", "G5Q5", "H55M55", "J555C1C555", "M550A055",}, - {E, "O0A0", "K55550A05555", "I55E1E55", "G55G4G55", "F5S5", "E5U5", "D5W5", "D5W5", "C5Y5", "C5Y5", "B5[5", "B5[5", "B5[5", "B5[5", "A00[00", "C14W41", "A00[00", "B5[5", "B5[5", "B5[5", "B5[5", "C5Y5", "C5Y5", "D5W5", "D5W5", "E5U5", "F5S5", "G55G4G55", "I55E1E55", "K55550A05555", "O0A0",}, - {"\u0001", "M550A055", "J555C1C555", "H55F4F55", "F55Q55", "E55S55", "E5U5", "D5W5", "D5W5", "C5Y5", "C5Y5", "C5Y5", "B5[5", "B5[5", "B0[0", "C14W41", "B0[0", "B5[5", "B5[5", "C5Y5", "C5Y5", "C5Y5", "D5W5", "D5W5", "E5U5", "E55S55", "F55Q55", "H55F4F55", "J555C1C555", "M550A055",}, - {"\u0001", "O0A0", "L5550A0555", "I555D1D555", "G55D2224222D55", "F5S5", "E5U5", "E5U5", "D5W5", "D5W5", "D5W5", "C5Y5", "C5A2U2A5", "C5A2U2A5", "B00A2U2A00", "D14U41", "B00A2U2A00", "C5A2U2A5", "C5A2U2A5", "C5Y5", "D5W5", "D5W5", "D5W5", "E5U5", "E5U5", "F5S5", "G55D2224222D55", "I555D1D555", "L5550A0555", "O0A0",}, - {"\u0002", "O0A0", "K55500000555", "H555E1E555", "G55G4G55", "F5S5", "E55S55", "E5U5", "E5U5", "D5W5", "D5W5", "D5W5", "D0W0", "C00W00", "D014S410", "C00W00", "D0W0", "D5W5", "D5W5", "D5W5", "E5U5", "E5U5", "E55S55", "F5S5", "G55G4G55", "H555E1E555", "K55500000555", "O0A0",}, - {"\u0003", "O0A0", "J555550A055555", "H555E1E555", "G55D2224222D55", "F55Q55", "F5S5", "E55S55", "E5U5", "E5U5", "E5A2Q2A5", "E5A2Q2A5", "D00A2Q2A00", "F14Q41", "D00A2Q2A00", "E5A2Q2A5", "E5A2Q2A5", "E5U5", "E5U5", "E55S55", "F5S5", "F55Q55", "G55D2224222D55", "H555E1E555", "J555550A055555", "O0A0",}, - {"\u0004", "O0A0", "K55500000555", "I555D1D555", "H55F4F55", "G55G4G55", "G5Q5", "F55Q55", "F5S5", "F5S5", "F0S0", "E00S00", "F0144M4410", "E00S00", "F0S0", "F5S5", "F5S5", "F55Q55", "G5Q5", "G55G4G55", "H55F4F55", "I555D1D555", "K55500000555", "O0A0",}, - {"\u0005", "O0A0", "L5550A0555", "J555C1C555", "I55E1E55", "H55M55", "H5O5", "G55O55", "G5Q5", "G5Q5", "F00Q00", "H11M11", "F00Q00", "G5Q5", "G5Q5", "G55O55", "H5O5", "H55M55", "I55E1E55", "J555C1C555", "L5550A0555", "O0A0",}, - {"\u0006", "O0A0", "M550A055", "K55550A05555", "J555C1C555", "I555D1D555", "I55B1111111B55", "H55B11E11B55", "H55B1B222B1B55", "G000B1A23332A1B000", "J111A23332A111", "G000B1A23332A1B000", "H55B1B222B1B55", "H55B11E11B55", "I55B1111111B55", "I555D1D555", "J555C1C555", "K55550A05555", "M550A055", "O0A0",}, - {"\u0008", "O0A0", "M550A055", "L5550A0555", "K55550A05555", "J5555111115555", "J5551101011555", "I000010010010000", "M1111111", "I000010010010000", "J5551101011555", "J5555111115555", "K55550A05555", "L5550A0555", "M550A055", "O0A0",}, - {"\u000B", "O0A0", "O0A0", "O0A0", "L000000000", "O0A0", "L000000000", "O0A0", "O0A0", "O0A0",}, - }) - .addElement('0', ofBlock(sBlockCasingsTT,12)) - .addElement('1', ofBlock(sBlockCasingsTT,13)) - .addElement('2', ofBlock(sBlockCasingsTT,14)) - .addElement('3', ofBlock(sBlockCasingsTT,10)) - .addElement('4', ofBlock(sBlockCasingsTT,11)) - .addElement('5', ofBlock(QuantumGlassBlock.INSTANCE,0)) - .addElement(' ', ofHatchAdderOptional(GT_MetaTileEntity_EM_bhg::addClassicToMachineList, - textureOffset,1,sBlockCasingsTT,0)) - .addElement('!', ofHatchAdderOptional(GT_MetaTileEntity_EM_bhg::addElementalToMachineList, - textureOffset + 4,2,sBlockCasingsTT,4)) + private static final IStructureDefinition<GT_MetaTileEntity_EM_bhg> STRUCTURE_DEFINITION= + StructureDefinition.<GT_MetaTileEntity_EM_bhg>builder() + .addShape("main_t1", transpose(new String[][]{ + {" "," "," "," "," "," "," "," "," "," "," "," "," C C "," C C "," C C "," CCCCCCCCC "," C C "," CCCCCCCCC "," C C "," C C "," C C "," "," "," "," "," "," "," "," "," "," "," "," "}, + {" "," "," "," "," "," "," "," "," "," C C "," C C "," C C "," C C "," DDDDD "," DDCDCDD "," CCCCDCCDCCDCCCC "," DDDDDDD "," CCCCDCCDCCDCCCC "," DDCDCDD "," DDDDD "," C C "," C C "," C C "," C C "," "," "," "," "," "," "," "," "," "}, + {" "," "," "," "," "," "," "," C C "," C C "," C C "," D "," D "," DDDDDDD "," DD DD "," D EEE D "," CCC D EAAAE D CCC "," DDD EAAAE DDD "," CCC D EAAAE D CCC "," D EEE D "," DD DD "," DDDDDDD "," D "," D "," C C "," C C "," C C "," "," "," "," "," "," "," "}, + {" "," "," "," "," "," "," C C "," C C "," D "," D "," "," "," "," "," "," CC CC "," DD DD "," CC CC "," "," "," "," "," "," D "," D "," C C "," C C "," "," "," "," "," "," "}, + {" "," "," "," "," "," C C "," CCCCC "," D "," B "," B "," "," "," "," "," C C "," CC CC "," CDBB BBDC "," CC CC "," C C "," "," "," "," "," B "," B "," D "," CCCCC "," C C "," "," "," "," "," "}, + {" "," "," "," "," C C "," C C "," D "," EEEBEEE "," "," "," "," "," "," E E "," E E "," CC E E CC "," DB BD "," CC E E CC "," E E "," E E "," "," "," "," "," "," EEEBEEE "," D "," C C "," C C "," "," "," "," "}, + {" "," "," "," C C "," CCCCC "," D "," B "," "," "," "," "," "," "," "," C C "," CC CC "," CDB BDC "," CC CC "," C C "," "," "," "," "," "," "," "," B "," D "," CCCCC "," C C "," "," "," "}, + {" "," "," C C "," C C "," D "," EEEBEEE "," "," "," "," "," "," "," "," E E "," E E "," CC E E CC "," DB BD "," CC E E CC "," E E "," E E "," "," "," "," "," "," "," "," EEEBEEE "," D "," C C "," C C "," "," "}, + {" "," "," C C "," D "," B "," "," "," "," "," "," "," "," "," "," "," C C "," DB BD "," C C "," "," "," "," "," "," "," "," "," "," "," B "," D "," C C "," "," "}, + {" "," C C "," C C "," D "," B "," "," "," "," "," "," "," "," "," "," "," CC CC "," DB BD "," CC CC "," "," "," "," "," "," "," "," "," "," "," B "," D "," C C "," C C "," "}, + {" "," C C "," D "," "," "," "," "," "," "," "," "," "," "," "," "," C C "," D D "," C C "," "," "," "," "," "," "," "," "," "," "," "," "," D "," C C "," "}, + {" "," C C "," D "," "," "," "," "," "," "," "," "," "," "," "," "," C C "," D D "," C C "," "," "," "," "," "," "," "," "," "," "," "," "," D "," C C "," "}, + {" CCCCCCC "," C C "," DDDDDDD "," "," "," "," "," "," "," "," "," "," "," D D "," D D ","CCD DCC"," D D ","CCD DCC"," D D "," D D "," "," "," "," "," "," "," "," "," "," "," DDDDDDD "," C C "," C C "}, + {" CCHHHHHCC "," DDDDD "," DD DD "," "," "," E E "," "," E E "," "," "," "," "," D D "," D D "," D D ","CD DC"," D D ","CD DC"," D D "," D D "," D D "," "," "," "," "," E E "," "," E E "," "," "," DD DD "," DDDDD "," C C "}, + {" CHHHHHHHC "," DDCDCDD "," D EEE D "," "," C C "," E E "," C C "," E E "," "," "," "," "," D D "," D D "," D D ","CCE ECC"," DE ED ","CCE ECC"," D D "," D D "," D D "," "," "," "," "," E E "," C C "," E E "," C C "," "," D EEE D "," DDCDCDD "," C C "}, + {" CHHFFFHHC "," CCCCDCCDCCDCCCC "," CCC D EAAAE D CCC "," CC CC "," CC CC "," CC E E CC "," CC CC "," CC E E CC "," C C "," CC CC "," C C "," C C ","CCD DCC","CD DC","CCE ECC","CCA ACC","CDA ADC","CCA ACC","CCE ECC","CD DC","CCD DCC"," C C "," C C "," CC CC "," C C "," CC E E CC "," CC CC "," CC E E CC "," CC CC "," CC CC "," CCC D EAAAE D CCC "," CCCCDCCDCCDCCCC "," CCCCCCCCC "}, + {" CHHF~FHHC "," DDDDDDD "," DDD EAAAE DDD "," DD DD "," CDBB BBDC "," DB BD "," CDB BDC "," DB BD "," DB BD "," DB BD "," D D "," D D "," D D "," D D "," DE ED ","CDA ADC"," DA AD ","CDA ADC"," DE ED "," D D "," D D "," D D "," D D "," DB BD "," DB BD "," DB BD "," CDB BDC "," DB BD "," CDBB BBDC "," DD DD "," DDD EAAAE DDD "," DDDDDDD "," C C "}, + {" CHHFFFHHC "," CCCCDCCDCCDCCCC "," CCC D EAAAE D CCC "," CC CC "," CC CC "," CC E E CC "," CC CC "," CC E E CC "," C C "," CC CC "," C C "," C C ","CCD DCC","CD DC","CCE ECC","CCA ACC","CDA ADC","CCA ACC","CCE ECC","CD DC","CCD DCC"," C C "," C C "," CC CC "," C C "," CC E E CC "," CC CC "," CC E E CC "," CC CC "," CC CC "," CCC D EAAAE D CCC "," CCCCDCCDCCDCCCC "," CCCCCCCCC "}, + {" CHHHHHHHC "," DDCDCDD "," D EEE D "," "," C C "," E E "," C C "," E E "," "," "," "," "," D D "," D D "," D D ","CCE ECC"," DE ED ","CCE ECC"," D D "," D D "," D D "," "," "," "," "," E E "," C C "," E E "," C C "," "," D EEE D "," DDCDCDD "," C C "}, + {" CCHHHHHCC "," DDDDD "," DD DD "," "," "," E E "," "," E E "," "," "," "," "," D D "," D D "," D D ","CD DC"," D D ","CD DC"," D D "," D D "," D D "," "," "," "," "," E E "," "," E E "," "," "," DD DD "," DDDDD "," C C "}, + {" CCCCCCC "," C C "," DDDDDDD "," "," "," "," "," "," "," "," "," "," "," D D "," D D ","CCD DCC"," D D ","CCD DCC"," D D "," D D "," "," "," "," "," "," "," "," "," "," "," DDDDDDD "," C C "," C C "}, + {" "," C C "," D "," "," "," "," "," "," "," "," "," "," "," "," "," C C "," D D "," C C "," "," "," "," "," "," "," "," "," "," "," "," "," D "," C C "," "}, + {" "," C C "," D "," "," "," "," "," "," "," "," "," "," "," "," "," C C "," D D "," C C "," "," "," "," "," "," "," "," "," "," "," "," "," D "," C C "," "}, + {" "," C C "," C C "," D "," B "," "," "," "," "," "," "," "," "," "," "," CC CC "," DB BD "," CC CC "," "," "," "," "," "," "," "," "," "," "," B "," D "," C C "," C C "," "}, + {" "," "," C C "," D "," B "," "," "," "," "," "," "," "," "," "," "," C C "," DB BD "," C C "," "," "," "," "," "," "," "," "," "," "," B "," D "," C C "," "," "}, + {" "," "," C C "," C C "," D "," EEEBEEE "," "," "," "," "," "," "," "," E E "," E E "," CC E E CC "," DB BD "," CC E E CC "," E E "," E E "," "," "," "," "," "," "," "," EEEBEEE "," D "," C C "," C C "," "," "}, + {" "," "," "," C C "," CCCCC "," D "," B "," "," "," "," "," "," "," "," C C "," CC CC "," CDB BDC "," CC CC "," C C "," "," "," "," "," "," "," "," B "," D "," CCCCC "," C C "," "," "," "}, + {" "," "," "," "," C C "," C C "," D "," EEEBEEE "," "," "," "," "," "," E E "," E E "," CC E E CC "," DB BD "," CC E E CC "," E E "," E E "," "," "," "," "," "," EEEBEEE "," D "," C C "," C C "," "," "," "," "}, + {" "," "," "," "," "," C C "," CCCCC "," D "," B "," B "," "," "," "," "," C C "," CC CC "," CDBB BBDC "," CC CC "," C C "," "," "," "," "," B "," B "," D "," CCCCC "," C C "," "," "," "," "," "}, + {" "," "," "," "," "," "," C C "," C C "," D "," D "," "," "," "," "," "," CC CC "," DD DD "," CC CC "," "," "," "," D "," D "," D "," D "," C C "," C C "," "," "," "," "," "," "}, + {" "," "," "," "," "," "," "," C C "," C C "," C C "," D "," D "," DDDDDDD "," DD DD "," D EEE D "," CCC D EAAAE D CCC "," DDD EAAAE DDD "," CCC D EAAAE D CCC "," D EEE D "," DD DD "," DDDDDDD "," D "," D "," C C "," C C "," C C "," "," "," "," "," "," "," "}, + {" "," "," "," "," "," "," "," "," "," C C "," C C "," C C "," C C "," DDDDD "," DDCDCDD "," CCCCDCCDCCDCCCC "," DDDDDDD "," CCCCDCCDCCDCCCC "," DDCDCDD "," DDDDD "," C C "," C C "," C C "," C C "," "," "," "," "," "," "," "," "," "}, + {" "," "," "," "," "," "," "," "," "," "," "," "," C C "," C C "," C C "," CCCCCCCCC "," C C "," CCCCCCCCC "," C C "," C C "," C C "," "," "," "," "," "," "," "," "," "," "," "," "} + })) + .addShape("main_t2", transpose(new String[][]{ + {" "," "," "," "," "," "," "," "," "," "," "," "," C C "," C C "," C C "," CCCCCCCCC "," C C "," CCCCCCCCC "," C C "," C C "," C C "," "," "," "," "," "," "," "," "," "," "," "," "}, + {" "," "," "," "," "," "," "," "," "," C C "," GGC CGG "," GGGC CGGG "," GGGGC CGGGG "," GGGGDDDDDGGGG "," GGGDDCDCDDGGG "," CCCCDCCDCCDCCCC "," DDDDDDD "," CCCCDCCDCCDCCCC "," GGGDDCDCDDGGG "," GGGGDDDDDGGGG "," GGGGC CGGGG "," GGGC CGGG "," GGC CGG "," C C "," "," "," "," "," "," "," "," "," "}, + {" "," "," "," "," "," "," "," C C "," GGC CGG "," GGGGC CGGGG "," GGG D GGG "," GGG D GGG "," GG DDDDDDD GG "," GG DD DD GG "," GG D EEE D GG "," CCC D EAAAE D CCC "," DDD EAAAE DDD "," CCC D EAAAE D CCC "," GG D EEE D GG "," GG DD DD GG "," GG DDDDDDD GG "," GGG D GGG "," GGG D GGG "," GGGGC CGGGG "," GGC CGG "," C C "," "," "," "," "," "," "," "}, + {" "," "," "," "," "," "," C C "," GGGC CGGG "," GGG D GGG "," GG D GG "," GG GG "," G G "," GG GG "," G G "," G G "," CC CC "," DD DD "," CC CC "," G G "," G G "," GG GG "," G G "," GG GG "," GG D GG "," GGG D GGG "," GGGC CGGG "," C C "," "," "," "," "," "," "}, + {" "," "," "," "," "," C C "," GGGCCCCCGGG "," GGG D GGG "," GG B GG "," GG B GG "," G G "," GG GG "," G G "," G G "," C C "," CC CC "," CDBB BBDC "," CC CC "," C C "," G G "," G G "," GG GG "," G G "," GG B GG "," GG B GG "," GGG D GGG "," GGGCCCCCGGG "," C C "," "," "," "," "," "}, + {" "," "," "," "," C C "," GGGGGC CGGGGG "," GGG D GGG "," GG EEEBEEE GG "," GG GG "," G G "," GG GG "," G G "," G G "," G E E G "," G E E G "," CC E E CC "," DB BD "," CC E E CC "," G E E G "," G E E G "," G G "," G G "," GG GG "," G G "," GG GG "," GG EEEBEEE GG "," GGG D GGG "," GGGGGC CGGGGG "," C C "," "," "," "," "}, + {" "," "," "," C C "," GGGCCCCCGGG "," GGG D GGG "," GG B GG "," G G "," GG GG "," G G "," G G "," G G "," G G "," G G "," C C "," CC CC "," CDB BDC "," CC CC "," C C "," G G "," G G "," G G "," G G "," G G "," GG GG "," G G "," GG B GG "," GGG D GGG "," GGGCCCCCGGG "," C C "," "," "," "}, + {" "," "," C C "," GGGC CGGG "," GGG D GGG "," GG EEEBEEE GG "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G E E G "," G E E G "," CC E E CC "," DB BD "," CC E E CC "," G E E G "," G E E G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," GG EEEBEEE GG "," GGG D GGG "," GGGC CGGG "," C C "," "," "}, + {" "," "," GGC CGG "," GGG D GGG "," GG B GG "," GG GG "," GG GG "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," C C "," DB BD "," C C "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," GG GG "," GG GG "," GG B GG "," GGG D GGG "," GGC CGG "," "," "}, + {" "," C C "," GGGGC CGGGG "," GG D GG "," GG B GG "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," CC CC "," DB BD "," CC CC "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," GG B GG "," GG D GG "," GGGGC CGGGG "," C C "," "}, + {" "," GGC CGG "," GGG D GGG "," GG GG "," G G "," GG GG "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," C C "," D D "," C C "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," GG GG "," G G "," GG GG "," GGG D GGG "," GGC CGG "," "}, + {" "," GGGC CGGG "," GGG D GGG "," G G "," GG GG "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," C C "," D D "," C C "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," GG GG "," G G "," GGG D GGG "," GGGC CGGG "," "}, + {" CCCCCCC "," GGGGC CGGGG "," GG DDDDDDD GG "," GG GG "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," GD DG "," GD DG ","CCD DCC"," D D ","CCD DCC"," GD DG "," GD DG "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," GG GG "," GG DDDDDDD GG "," GGGGC CGGGG "," C C "}, + {" CCHHHHHCC "," GGGGDDDDDGGGG "," GG DD DD GG "," G G "," G G "," G E E G "," G G "," G E E G "," G G "," G G "," G G "," G G "," GD DG "," GD DG "," D D ","CD DC"," D D ","CD DC"," D D "," GD DG "," GD DG "," G G "," G G "," G G "," G G "," G E E G "," G G "," G E E G "," G G "," G G "," GG DD DD GG "," GGGGDDDDDGGGG "," C C "}, + {" CHHHHHHHC "," GGGDDCDCDDGGG "," GG D EEE D GG "," G G "," C C "," G E E G "," C C "," G E E G "," G G "," G G "," G G "," G G "," GD DG "," D D "," D D ","CCE ECC"," DE ED ","CCE ECC"," D D "," D D "," GD DG "," G G "," G G "," G G "," G G "," G E E G "," C C "," G E E G "," C C "," G G "," GG D EEE D GG "," GGGDDCDCDDGGG "," C C "}, + {" CHHFFFHHC "," CCCCDCCDCCDCCCC "," CCC D EAAAE D CCC "," CC CC "," CC CC "," CC E E CC "," CC CC "," CC E E CC "," C C "," CC CC "," C C "," C C ","CCD DCC","CD DC","CCE ECC","CCA ACC","CDA ADC","CCA ACC","CCE ECC","CD DC","CCD DCC"," C C "," C C "," CC CC "," C C "," CC E E CC "," CC CC "," CC E E CC "," CC CC "," CC CC "," CCC D EAAAE D CCC "," CCCCDCCDCCDCCCC "," CCCCCCCCC "}, + {" CHHF~FHHC "," DDDDDDD "," DDD EAAAE DDD "," DD DD "," CDBB BBDC "," DB BD "," CDB BDC "," DB BD "," DB BD "," DB BD "," D D "," D D "," D D "," D D "," DE ED ","CDA ADC"," DA AD ","CDA ADC"," DE ED "," D D "," D D "," D D "," D D "," DB BD "," DB BD "," DB BD "," CDB BDC "," DB BD "," CDBB BBDC "," DD DD "," DDD EAAAE DDD "," DDDDDDD "," C C "}, + {" CHHFFFHHC "," CCCCDCCDCCDCCCC "," CCC D EAAAE D CCC "," CC CC "," CC CC "," CC E E CC "," CC CC "," CC E E CC "," C C "," CC CC "," C C "," C C ","CCD DCC","CD DC","CCE ECC","CCA ACC","CDA ADC","CCA ACC","CCE ECC","CD DC","CCD DCC"," C C "," C C "," CC CC "," C C "," CC E E CC "," CC CC "," CC E E CC "," CC CC "," CC CC "," CCC D EAAAE D CCC "," CCCCDCCDCCDCCCC "," CCCCCCCCC "}, + {" CHHHHHHHC "," GGGDDCDCDDGGG "," GG D EEE D GG "," G G "," C C "," G E E G "," C C "," G E E G "," G G "," G G "," G G "," G G "," GD DG "," D D "," D D ","CCE ECC"," DE ED ","CCE ECC"," D D "," D D "," GD DG "," G G "," G G "," G G "," G G "," G E E G "," C C "," G E E G "," C C "," G G "," GG D EEE D GG "," GGGDDCDCDDGGG "," C C "}, + {" CCHHHHHCC "," GGGGDDDDDGGGG "," GG DD DD GG "," G G "," G G "," G E E G "," G G "," G E E G "," G G "," G G "," G G "," G G "," GD DG "," GD DG "," D D ","CD DC"," D D ","CD DC"," D D "," GD DG "," GD DG "," G G "," G G "," G G "," G G "," G E E G "," G G "," G E E G "," G G "," G G "," GG DD DD GG "," GGGGDDDDDGGGG "," C C "}, + {" CCCCCCC "," GGGGC CGGGG "," GG DDDDDDD GG "," GG GG "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," GD DG "," GD DG ","CCD DCC"," D D ","CCD DCC"," GD DG "," GD DG "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," GG GG "," GG DDDDDDD GG "," GGGGC CGGGG "," C C "}, + {" "," GGGC CGGG "," GGG D GGG "," G G "," GG GG "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," C C "," D D "," C C "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," GG GG "," G G "," GGG D GGG "," GGGC CGGG "," "}, + {" "," GGC CGG "," GGG D GGG "," GG GG "," G G "," GG GG "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," C C "," D D "," C C "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," GG GG "," G G "," GG GG "," GGG D GGG "," GGC CGG "," "}, + {" "," C C "," GGGGC CGGGG "," GG D GG "," GG B GG "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," CC CC "," DB BD "," CC CC "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," GG B GG "," GG D GG "," GGGGC CGGGG "," C C "," "}, + {" "," "," GGC CGG "," GGG D GGG "," GG B GG "," GG GG "," GG GG "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," C C "," DB BD "," C C "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," GG GG "," GG GG "," GG B GG "," GGG D GGG "," GGC CGG "," "," "}, + {" "," "," C C "," GGGC CGGG "," GGG D GGG "," GG EEEBEEE GG "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," G E E G "," G E E G "," CC E E CC "," DB BD "," CC E E CC "," G E E G "," G E E G "," G G "," G G "," G G "," G G "," G G "," G G "," G G "," GG EEEBEEE GG "," GGG D GGG "," GGGC CGGG "," C C "," "," "}, + {" "," "," "," C C "," GGGCCCCCGGG "," GGG D GGG "," GG B GG "," G G "," GG GG "," G G "," G G "," G G "," G G "," G G "," C C "," CC CC "," CDB BDC "," CC CC "," C C "," G G "," G G "," G G "," G G "," G G "," GG GG "," G G "," GG B GG "," GGG D GGG "," GGGCCCCCGGG "," C C "," "," "," "}, + {" "," "," "," "," C C "," GGGGGC CGGGGG "," GGG D GGG "," GG EEEBEEE GG "," GG GG "," G G "," GG GG "," G G "," G G "," G E E G "," G E E G "," CC E E CC "," DB BD "," CC E E CC "," G E E G "," G E E G "," G G "," G G "," GG GG "," G G "," GG GG "," GG EEEBEEE GG "," GGG D GGG "," GGGGGC CGGGGG "," C C "," "," "," "," "}, + {" "," "," "," "," "," C C "," GGGCCCCCGGG "," GGG D GGG "," GG B GG "," GG B GG "," G G "," GG GG "," G G "," G G "," C C "," CC CC "," CDBB BBDC "," CC CC "," C C "," G G "," G G "," GG GG "," G G "," GG B GG "," GG B GG "," GGG D GGG "," GGGCCCCCGGG "," C C "," "," "," "," "," "}, + {" "," "," "," "," "," "," C C "," GGGC CGGG "," GGG D GGG "," GG D GG "," GG GG "," G G "," GG GG "," G G "," G G "," CC CC "," DD DD "," CC CC "," G G "," G G "," GG GG "," G D G "," GG D GG "," GG D GG "," GGG D GGG "," GGGC CGGG "," C C "," "," "," "," "," "," "}, + {" "," "," "," "," "," "," "," C C "," GGC CGG "," GGGGC CGGGG "," GGG D GGG "," GGG D GGG "," GG DDDDDDD GG "," GG DD DD GG "," GG D EEE D GG "," CCC D EAAAE D CCC "," DDD EAAAE DDD "," CCC D EAAAE D CCC "," GG D EEE D GG "," GG DD DD GG "," GG DDDDDDD GG "," GGG D GGG "," GGG D GGG "," GGGGC CGGGG "," GGC CGG "," C C "," "," "," "," "," "," "," "}, + {" "," "," "," "," "," "," "," "," "," C C "," GGC CGG "," GGGC CGGG "," GGGGC CGGGG "," GGGGDDDDDGGGG "," GGGDDCDCDDGGG "," CCCCDCCDCCDCCCC "," DDDDDDD "," CCCCDCCDCCDCCCC "," GGGDDCDCDDGGG "," GGGGDDDDDGGGG "," GGGGC CGGGG "," GGGC CGGG "," GGC CGG "," C C "," "," "," "," "," "," "," "," "," "}, + {" "," "," "," "," "," "," "," "," "," "," "," "," C C "," C C "," C C "," CCCCCCCCC "," C C "," CCCCCCCCC "," C C "," C C "," C C "," "," "," "," "," "," "," "," "," "," "," "," "} + })) + .addElement('A', ofBlock(sBlockCasingsTT, 10)) + .addElement('B', ofBlock(sBlockCasingsTT, 11)) + .addElement('C', ofBlock(sBlockCasingsTT, 12)) + .addElement('D', ofBlock(sBlockCasingsTT, 13)) + .addElement('E', ofBlock(sBlockCasingsTT, 14)) + .addElement('F', ofHatchAdderOptional(GT_MetaTileEntity_EM_bhg::addElementalToMachineList, textureOffset + 4, 2, sBlockCasingsTT, 4)) + .addElement('G', ofBlock(QuantumGlassBlock.INSTANCE, 0)) + .addElement('H', ofHatchAdderOptional(GT_MetaTileEntity_EM_bhg::addClassicToMachineList, textureOffset, 1, sBlockCasingsTT, 0)) .build(); @Override - public IStructureDefinition<? extends GT_MetaTileEntity_MultiblockBase_EM> getStructure_EM() { + public IStructureDefinition<GT_MetaTileEntity_EM_bhg> getStructure_EM() { return STRUCTURE_DEFINITION; } @@ -308,7 +306,12 @@ public class GT_MetaTileEntity_EM_bhg extends GT_MetaTileEntity_MultiblockBase_E @Override public void construct(ItemStack stackSize, boolean hintsOnly) { - structureBuild_EM((stackSize.stackSize&1)==1?"t1":"t2", 16, 16, 0, hintsOnly,stackSize); + try { + structureBuild_EM((stackSize.stackSize & 1) == 1 ? "main_t1" : "main_t2", 16, 16, 0, hintsOnly, stackSize); + } + catch (Exception e) { + e.printStackTrace(); + } } @Override diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_collider.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_collider.java index 329b3cbc14..49c43d6b4e 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_collider.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_collider.java @@ -3,7 +3,6 @@ package com.github.technus.tectech.thing.metaTileEntity.multi; import com.github.technus.tectech.TecTech; import com.github.technus.tectech.compatibility.thaumcraft.elementalMatter.definitions.dComplexAspectDefinition; import com.github.technus.tectech.compatibility.thaumcraft.elementalMatter.definitions.ePrimalAspectDefinition; -import com.github.technus.tectech.mechanics.constructable.IConstructable; import com.github.technus.tectech.mechanics.elementalMatter.core.cElementalDecayResult; import com.github.technus.tectech.mechanics.elementalMatter.core.cElementalInstanceStackMap; import com.github.technus.tectech.mechanics.elementalMatter.core.cElementalMutableDefinitionStackMap; @@ -12,8 +11,6 @@ import com.github.technus.tectech.mechanics.elementalMatter.core.templates.cElem import com.github.technus.tectech.mechanics.elementalMatter.definitions.complex.dAtomDefinition; import com.github.technus.tectech.mechanics.elementalMatter.definitions.complex.dHadronDefinition; import com.github.technus.tectech.mechanics.elementalMatter.definitions.primitive.eQuarkDefinition; -import com.github.technus.tectech.mechanics.structure.IStructureDefinition; -import com.github.technus.tectech.mechanics.structure.StructureDefinition; import com.github.technus.tectech.thing.block.QuantumGlassBlock; import com.github.technus.tectech.thing.casing.TT_Container_Casings; import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_InputElemental; @@ -23,6 +20,9 @@ import com.github.technus.tectech.thing.metaTileEntity.multi.base.IStatusFunctio import com.github.technus.tectech.thing.metaTileEntity.multi.base.Parameters; import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_RenderedExtendedFacingTexture; import com.github.technus.tectech.util.CommonValues; +import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable; +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.Textures; @@ -39,12 +39,13 @@ import java.util.HashMap; import static com.github.technus.tectech.loader.TecTechConfig.DEBUG_MODE; import static com.github.technus.tectech.mechanics.elementalMatter.core.transformations.bTransformationInfo.AVOGADRO_CONSTANT; -import static com.github.technus.tectech.mechanics.structure.StructureUtility.*; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStatus.*; import static com.github.technus.tectech.util.DoubleCount.add; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; import static net.minecraft.util.StatCollector.translateToLocal; /** @@ -302,49 +303,6 @@ public class GT_MetaTileEntity_EM_collider extends GT_MetaTileEntity_MultiblockB //region structure //use multi A energy inputs, use less power the longer it runs - private static final IStructureDefinition<GT_MetaTileEntity_EM_collider> STRUCTURE_DEFINITION = StructureDefinition - .<GT_MetaTileEntity_EM_collider>builder() - .addShapeOldApi("main", new String[][]{ - {"I0A0A0", "I00000", "I0A0A0",}, - {"H0000000", "G001111100", "H0000000",}, - {"F22223332222", "F41155555114", "F22223332222",}, - {"E2000000000002", "E4155111115514", "E2000000000002",}, - {"D20000E00002", "D41511E11514", "D20000E00002",}, - {"C2000I0002", "C4151I1514", "C2000I0002",}, - {"B2000K0002", "B4151K1514", "B2000K0002",}, - {"B200M002", "A0151M1510", "B200M002",}, - {"A0200M0020", "A0151M1510", "A0200M0020",}, - {"0020O0200", "0151O1510", "0020O0200",}, - {"A030O030", "0151O1510", "A030O030",}, - {"0030O0300", "0151O1510", "0030O0300",}, - {"A030O030", "0151O1510", "A030O030",}, - {"0020O0200", "0151O1510", "0020O0200",}, - {"A0200M0020", "A0151M1510", "A0200M0020",}, - {"B200M002", "A0151M1510", "B200M002",}, - {"B2000K0002", "B4151K1514", "B2000K0002",}, - {"C2000I0002", "C4151I1514", "C2000I0002",}, - {"D200002&&&200002", "D415112&.&211514", "D200002&&&200002",}, - {"E20!!22222!!02", "E4155111115514", "E20!!22222!!02",}, - {"F2222#$#2222", "F41155555114", "F2222#$#2222",}, - }) - .addElement('0', ofBlock(sBlockCasingsTT, 4)) - .addElement('1', ofBlock(sBlockCasingsTT, 7)) - .addElement('2', defer(t -> (int) t.eTier, (t, item) -> 2 - (item.stackSize & 1), - error(), ofBlock(sBlockCasingsTT, 4), ofBlock(sBlockCasingsTT, 5))) - .addElement('3', ofBlock(QuantumGlassBlock.INSTANCE, 0)) - .addElement('4', defer(t -> (int) t.eTier, (t, item) -> 2 - (item.stackSize & 1), - error(), ofBlock(sBlockCasingsTT, 4), ofBlock(sBlockCasingsTT, 6))) - .addElement('5', defer(t -> (int) t.eTier, (t, item) -> 2 - (item.stackSize & 1), - error(), ofBlock(sBlockCasingsTT, 8), ofBlock(sBlockCasingsTT, 9))) - .addElement('&', ofHatchAdderOptional(GT_MetaTileEntity_EM_collider::addClassicToMachineList, - textureOffset, 1, sBlockCasingsTT, 0)) - .addElement('!', ofHatchAdderOptional(GT_MetaTileEntity_EM_collider::addElementalInputToMachineList, - textureOffset + 4, 2, sBlockCasingsTT, 4)) - .addElement('$', ofHatchAdderOptional(GT_MetaTileEntity_EM_collider::addElementalOutputToMachineList, - textureOffset + 4, 3, sBlockCasingsTT, 4)) - .addElement('#', ofHatchAdderOptional(GT_MetaTileEntity_EM_collider::addElementalMufflerToMachineList, - textureOffset + 4, 4, sBlockCasingsTT, 4)) - .build(); private static final String[] description = new String[]{ EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":", translateToLocal("gt.blockmachines.multimachine.em.collider.hint.0"),//1 - Classic Hatches or High Power Casing @@ -354,8 +312,27 @@ public class GT_MetaTileEntity_EM_collider extends GT_MetaTileEntity_MultiblockB translateToLocal("gt.blockmachines.multimachine.em.collider.hint.4"),//General - Another Controller facing opposite direction }; + private static final IStructureDefinition<GT_MetaTileEntity_EM_collider> STRUCTURE_DEFINITION = + StructureDefinition.<GT_MetaTileEntity_EM_collider>builder() + .addShape("main", transpose(new String[][]{ + {" A A A "," AAAAAAA "," BBBBIIIBBBB "," BAAAAAAAAAAAB "," BAAAA AAAAB "," BAAA AAAB "," BAAA AAAB "," BAA AAB "," ABAA AABA ","AABA ABAA"," AIA AIA ","AAIA AIAA"," AIA AIA ","AABA ABAA"," ABAA AABA "," BAA AAB "," BAAA AAAB "," BAAA AAAB "," BAAAABJJJBAAAAB "," BAHHBBBBBHHAB "," BBBBGFGBBBB "}, + {" AAAAA "," AADDDDDAA "," CDDEEEEEDDC "," CDEEDDDDDEEDC "," CDEDD DDEDC "," CDED DEDC "," CDED DEDC "," ADED DEDA "," ADED DEDA ","ADED DEDA","ADED DEDA","ADED DEDA","ADED DEDA","ADED DEDA"," ADED DEDA "," ADED DEDA "," CDED DEDC "," CDED DEDC "," CDEDDBJ~JBDDEDC "," CDEEDDDDDEEDC "," CDDEEEEEDDC "}, + {" A A A "," AAAAAAA "," BBBBIIIBBBB "," BAAAAAAAAAAAB "," BAAAA AAAAB "," BAAA AAAB "," BAAA AAAB "," BAA AAB "," ABAA AABA ","AABA ABAA"," AIA AIA ","AAIA AIAA"," AIA AIA ","AABA ABAA"," ABAA AABA "," BAA AAB "," BAAA AAAB "," BAAA AAAB "," BAAAABJJJBAAAAB "," BAHHBBBBBHHAB "," BBBBGFGBBBB "} + })) + .addElement('A', ofBlock(sBlockCasingsTT, 4)) + .addElement('B', defer(t -> (int) t.eTier, (t, item) -> 2 - (item.stackSize & 1), error(), ofBlock(sBlockCasingsTT, 4), ofBlock(sBlockCasingsTT, 5))) + .addElement('C', defer(t -> (int) t.eTier, (t, item) -> 2 - (item.stackSize & 1), error(), ofBlock(sBlockCasingsTT, 4), ofBlock(sBlockCasingsTT, 6))) + .addElement('D', ofBlock(sBlockCasingsTT, 7)) + .addElement('E', defer(t -> (int) t.eTier, (t, item) -> 2 - (item.stackSize & 1), error(), ofBlock(sBlockCasingsTT, 8), ofBlock(sBlockCasingsTT, 9))) + .addElement('F', ofHatchAdderOptional(GT_MetaTileEntity_EM_collider::addElementalOutputToMachineList, textureOffset + 4, 3, sBlockCasingsTT, 4)) + .addElement('G', ofHatchAdderOptional(GT_MetaTileEntity_EM_collider::addElementalMufflerToMachineList, textureOffset + 4, 4, sBlockCasingsTT, 4)) + .addElement('H', ofHatchAdderOptional(GT_MetaTileEntity_EM_collider::addElementalInputToMachineList, textureOffset + 4, 2, sBlockCasingsTT, 4)) + .addElement('I', ofBlock(QuantumGlassBlock.INSTANCE, 0)) + .addElement('J', ofHatchAdderOptional(GT_MetaTileEntity_EM_collider::addClassicToMachineList, textureOffset, 1, sBlockCasingsTT, 0)) + .build(); + @Override - public IStructureDefinition<? extends GT_MetaTileEntity_MultiblockBase_EM> getStructure_EM() { + public IStructureDefinition<GT_MetaTileEntity_EM_collider> getStructure_EM() { return STRUCTURE_DEFINITION; } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java index 6a6a707399..31d41fb39e 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_computer.java @@ -1,10 +1,7 @@ package com.github.technus.tectech.thing.metaTileEntity.multi; import com.github.technus.tectech.TecTech; -import com.github.technus.tectech.mechanics.constructable.IConstructable; import com.github.technus.tectech.mechanics.dataTransport.QuantumDataPacket; -import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder; -import com.github.technus.tectech.mechanics.structure.Structure; import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_InputData; import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_OutputData; import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_Rack; @@ -12,7 +9,10 @@ import com.github.technus.tectech.thing.metaTileEntity.multi.base.*; import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_RenderedExtendedFacingTexture; import com.github.technus.tectech.util.CommonValues; import com.github.technus.tectech.util.Util; -import com.github.technus.tectech.util.Vec3Impl; +import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable; +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; +import com.gtnewhorizon.structurelib.util.Vec3Impl; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.Textures; @@ -22,7 +22,6 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; -import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; @@ -30,13 +29,15 @@ import net.minecraft.util.ResourceLocation; import java.util.ArrayList; -import static com.github.technus.tectech.mechanics.structure.Structure.adders; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStatus.*; import static com.github.technus.tectech.util.CommonValues.MULTI_CHECK_AT; import static com.github.technus.tectech.util.CommonValues.V; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; import static net.minecraft.util.StatCollector.translateToLocal; /** @@ -51,23 +52,44 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB //endregion //region structure - private static final String[][] front = new String[][]{{"A ", "A ", "A. ", "A ",},}; - private static final String[][] terminator = new String[][]{{"A ", "A ", "A ", "A ",},}; - private static final String[][] cap = new String[][]{{"-01", "A22", "A22", "-01",},}; - private static final String[][] slice = new String[][]{{"-01", "A!2", "A!2", "-01",},}; - private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT}; - private static final byte[] blockMeta = new byte[]{2, 1, 3}; - private static final IHatchAdder<GT_MetaTileEntity_EM_computer>[] addingMethods = adders( - GT_MetaTileEntity_EM_computer::addToMachineList, - GT_MetaTileEntity_EM_computer::addRackToMachineList); - private static final short[] casingTextures = new short[]{textureOffset + 1, textureOffset + 3}; - private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT}; - private static final byte[] blockMetaFallback = new byte[]{1, 3}; private static final String[] description = new String[]{ EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":", translateToLocal("gt.blockmachines.multimachine.em.computer.hint.0"),//1 - Classic/Data Hatches or Computer casing translateToLocal("gt.blockmachines.multimachine.em.computer.hint.1"),//2 - Rack Hatches or Advanced computer casing }; + + private static final IStructureDefinition<GT_MetaTileEntity_EM_computer> STRUCTURE_DEFINITION = + StructureDefinition.<GT_MetaTileEntity_EM_computer>builder() + .addShape("front", transpose(new String[][]{ + {" AA"}, + {" AA"}, + {" ~A"}, + {" AA"} + })) + .addShape("cap", transpose(new String[][]{ + {"-CB"}, + {" DD"}, + {" DD"}, + {"-CB"} + })) + .addShape("slice", transpose(new String[][]{ + {"-CB"}, + {" ED"}, + {" ED"}, + {"-CB"} + })) + .addShape("back", transpose(new String[][]{ + {" AA"}, + {" AA"}, + {" AA"}, + {" AA"} + })) + .addElement('A', ofHatchAdderOptional(GT_MetaTileEntity_EM_computer::addToMachineList, textureOffset + 1, 1, sBlockCasingsTT, 1)) + .addElement('B', ofBlock(sBlockCasingsTT, 1)) + .addElement('C', ofBlock(sBlockCasingsTT, 2)) + .addElement('D', ofBlock(sBlockCasingsTT, 3)) + .addElement('E', ofHatchAdderOptional(GT_MetaTileEntity_EM_computer::addRackToMachineList, textureOffset + 3, 2, sBlockCasingsTT, 3)) + .build(); //endregion //region parameters @@ -129,15 +151,15 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB } } eRacks.clear(); - if (!structureCheck_EM(front, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 2, 0)) { + if (!structureCheck_EM("front", 1, 2, 0)) { return false; } - if (!structureCheck_EM(cap, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 2, -1)) { + if (!structureCheck_EM("cap", 1, 2, -1)) { return false; } byte offset = -2, totalLen = 4; while (offset > -16) { - if (!structureCheck_EM(slice, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 2, offset)) { + if (!structureCheck_EM("slice", 1, 2, offset)) { break; } totalLen++; @@ -146,10 +168,10 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB if (totalLen > 17) { return false; } - if (!structureCheck_EM(cap, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 2, ++offset)) { + if (!structureCheck_EM("cap", 1, 2, ++offset)) { return false; } - if (!structureCheck_EM(terminator, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 2, --offset)) { + if (!structureCheck_EM("back", 1, 2, --offset)) { return false; } eCertainMode = (byte) Math.min(totalLen / 3, 5); @@ -246,7 +268,10 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB @Override public void outputAfterRecipe_EM() { if (!eOutputData.isEmpty()) { - Vec3Impl pos = new Vec3Impl(getBaseMetaTileEntity()); + Vec3Impl pos = new Vec3Impl(getBaseMetaTileEntity().getXCoord(), + getBaseMetaTileEntity().getYCoord(), + getBaseMetaTileEntity().getZCoord()); + QuantumDataPacket pack = new QuantumDataPacket(eAvailableData / eOutputData.size()).unifyTraceWith(pos); if (pack == null) { return; @@ -359,16 +384,21 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB @Override public void construct(ItemStack stackSize, boolean hintsOnly) { IGregTechTileEntity igt = getBaseMetaTileEntity(); - Structure.builder(front, blockType, blockMeta, 1, 2, 0, igt, getExtendedFacing(), hintsOnly); - Structure.builder(cap, blockType, blockMeta, 1, 2, -1, igt, getExtendedFacing(), hintsOnly); + structureBuild_EM("front", 1, 2, 0, hintsOnly, stackSize); + structureBuild_EM("cap", 1, 2, -1, hintsOnly, stackSize); byte offset = -2; for (int rackSlices = Math.min(stackSize.stackSize, 12); rackSlices > 0; rackSlices--) { - Structure.builder(slice, blockType, blockMeta, 1, 2, offset--, igt, getExtendedFacing(), hintsOnly); + structureBuild_EM("slice", 1 , 2, offset--, hintsOnly, stackSize); } - Structure.builder(cap, blockType, blockMeta, 1, 2, offset--, igt, getExtendedFacing(), hintsOnly); - Structure.builder(terminator, blockType, blockMeta, 1, 2, offset, igt, getExtendedFacing(), hintsOnly); + structureBuild_EM("cap", 1, 2, offset--, hintsOnly, stackSize); + structureBuild_EM("back", 1, 2, offset, hintsOnly, stackSize); + } + + @Override + public IStructureDefinition<GT_MetaTileEntity_EM_computer> getStructure_EM() { + return STRUCTURE_DEFINITION; } @Override diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_crafting.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_crafting.java index 7d8204c07f..9c631c8af6 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_crafting.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_crafting.java @@ -1,27 +1,28 @@ package com.github.technus.tectech.thing.metaTileEntity.multi; -import com.github.technus.tectech.mechanics.constructable.IConstructable; -import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder; -import com.github.technus.tectech.mechanics.structure.Structure; import com.github.technus.tectech.thing.block.QuantumGlassBlock; import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_RenderedExtendedFacingTexture; import com.github.technus.tectech.util.CommonValues; +import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable; +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; -import static com.github.technus.tectech.mechanics.structure.Structure.adders; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; import static net.minecraft.util.StatCollector.translateToLocal; /** @@ -36,32 +37,30 @@ public class GT_MetaTileEntity_EM_crafting extends GT_MetaTileEntity_MultiblockB //endregion //region structure - private static final String[][] shape = new String[][]{ - {"A000", "0 0", "0 . 0", "0 0", "A000",}, - {"00000", "00000", "00000", "00000", "00000",}, - {"0C0", "A!!!", "A!1!", "A!!!", "0C0",}, - {"22222", "22222", "22122", "22222", "22222",}, - {"23432", "33333", "43134", "33333", "23432",}, - {"23332", "33333", "33533", "33333", "23332",}, - {"23432", "33333", "43134", "33333", "23432",}, - {"22222", "22222", "22122", "22222", "22222",}, - {"0C0", "A!!!", "A!1!", "A!!!", "0C0",}, - {"00000", "00000", "00000", "00000", "00000",}, - {"A000", "0 0", "0 0", "0 0", "A000",}, - }; - private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT, QuantumGlassBlock.INSTANCE, sBlockCasingsTT, sBlockCasingsTT}; - private static final byte[] blockMeta = new byte[]{4, 10, 5, 0, 6, 9}; - private static final IHatchAdder<GT_MetaTileEntity_EM_crafting>[] addingMethods = adders( - GT_MetaTileEntity_EM_crafting::addClassicToMachineList, - GT_MetaTileEntity_EM_crafting::addElementalToMachineList); - private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 4}; - private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT}; - private static final byte[] blockMetaFallback = new byte[]{0, 4}; private static final String[] description = new String[]{ EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":", translateToLocal("gt.blockmachines.multimachine.em.crafter.hint.0"),//1 - Classic Hatches or High Power Casing translateToLocal("gt.blockmachines.multimachine.em.crafter.hint.1"),//2 - Elemental Hatches or Molecular Casing }; + + private static final IStructureDefinition<GT_MetaTileEntity_EM_crafting> STRUCTURE_DEFINITION= StructureDefinition + .<GT_MetaTileEntity_EM_crafting>builder() + .addShape("main", transpose(new String[][]{ + {" AAA ","AAAAA","A A","BBBBB","BGCGB","BGGGB","BGCGB","BBBBB","A A","AAAAA"," AAA "}, + {"AHHHA","AAAAA"," FFF ","BBBBB","GGGGG","GGGGG","GGGGG","BBBBB"," FFF ","AAAAA","AHHHA"}, + {"AH~HA","AAAAA"," FEF ","BBEBB","CGEGC","GGDGG","CGEGC","BBEBB"," FEF ","AAAAA","AHHHA"}, + {"AHHHA","AAAAA"," FFF ","BBBBB","GGGGG","GGGGG","GGGGG","BBBBB"," FFF ","AAAAA","AHHHA"}, + {" AAA ","AAAAA","A A","BBBBB","BGCGB","BGGGB","BGCGB","BBBBB","A A","AAAAA"," AAA "} + })) + .addElement('A', ofBlock(sBlockCasingsTT, 4)) + .addElement('B', ofBlock(sBlockCasingsTT, 5)) + .addElement('C', ofBlock(sBlockCasingsTT, 6)) + .addElement('D', ofBlock(sBlockCasingsTT, 9)) + .addElement('E', ofBlock(sBlockCasingsTT, 10)) + .addElement('F', ofHatchAdderOptional(GT_MetaTileEntity_EM_crafting::addElementalToMachineList, textureOffset + 4, 2, sBlockCasingsTT, 4)) + .addElement('G', ofBlock(QuantumGlassBlock.INSTANCE, 0)) + .addElement('H', ofHatchAdderOptional(GT_MetaTileEntity_EM_crafting::addClassicToMachineList, textureOffset, 1, sBlockCasingsTT, 0)) + .build(); //endregion public GT_MetaTileEntity_EM_crafting(int aID, String aName, String aNameRegional) { @@ -79,7 +78,7 @@ public class GT_MetaTileEntity_EM_crafting extends GT_MetaTileEntity_MultiblockB @Override public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { - return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 2, 2, 0); + return structureCheck_EM("main", 2, 2, 0); } @Override @@ -109,7 +108,12 @@ public class GT_MetaTileEntity_EM_crafting extends GT_MetaTileEntity_MultiblockB @Override public void construct(ItemStack stackSize, boolean hintsOnly) { - Structure.builder(shape, blockType, blockMeta, 2, 2, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly); + structureBuild_EM("main", 2, 2, 0, hintsOnly, stackSize); + } + + @Override + public IStructureDefinition<GT_MetaTileEntity_EM_crafting> getStructure_EM() { + return STRUCTURE_DEFINITION; } @Override diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dataBank.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dataBank.java index 582be290ac..bea2b8a0ba 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dataBank.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dataBank.java @@ -1,10 +1,7 @@ package com.github.technus.tectech.thing.metaTileEntity.multi; import com.github.technus.tectech.Reference; -import com.github.technus.tectech.mechanics.constructable.IConstructable; import com.github.technus.tectech.mechanics.dataTransport.InventoryDataPacket; -import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder; -import com.github.technus.tectech.mechanics.structure.Structure; import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_InputDataItems; import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_OutputDataItems; import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_Container_MultiMachineEM; @@ -12,6 +9,9 @@ import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_GUIContaine import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_RenderedExtendedFacingTexture; import com.github.technus.tectech.util.CommonValues; +import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable; +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.Textures; @@ -20,7 +20,6 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_DataAccess; -import net.minecraft.block.Block; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; @@ -28,12 +27,14 @@ import net.minecraft.util.ResourceLocation; import java.util.ArrayList; -import static com.github.technus.tectech.mechanics.structure.Structure.adders; import static com.github.technus.tectech.recipe.TT_recipeAdder.nullItem; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; import static com.github.technus.tectech.util.CommonValues.V; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; import static net.minecraft.util.StatCollector.translateToLocal; public class GT_MetaTileEntity_EM_dataBank extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable { @@ -43,24 +44,24 @@ public class GT_MetaTileEntity_EM_dataBank extends GT_MetaTileEntity_MultiblockB //endregion //region structure - private static final String[][] shape = new String[][]{ - {"0 0", "0 . 0", "0 0",}, - {"0!!!0", "01110", "0!!!0",}, - {"0!!!0", "0!!!0", "0!!!0",}, - }; - private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT}; - private static final byte[] blockMeta = new byte[]{2, 1}; - private static final IHatchAdder<GT_MetaTileEntity_EM_dataBank>[] addingMethods = adders( - GT_MetaTileEntity_EM_dataBank::addClassicToMachineList, - GT_MetaTileEntity_EM_dataBank::addDataBankHatchToMachineList); - private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 1}; - private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT}; - private static final byte[] blockMetaFallback = new byte[]{0, 1}; private static final String[] description = new String[]{ EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":", translateToLocal("gt.blockmachines.multimachine.em.databank.hint.0"),//1 - Classic Hatches or high power casing translateToLocal("gt.blockmachines.multimachine.em.databank.hint.1"),//2 - Data Access/Data Bank Master Hatches or computer casing }; + + private static final IStructureDefinition<GT_MetaTileEntity_EM_dataBank> STRUCTURE_DEFINITION = + StructureDefinition.<GT_MetaTileEntity_EM_dataBank>builder() + .addShape("main", transpose(new String[][]{ + {"BCCCB","BDDDB","BDDDB"}, + {"BC~CB","BAAAB","BDDDB"}, + {"BCCCB","BDDDB","BDDDB"} + })) + .addElement('A', ofBlock(sBlockCasingsTT, 1)) + .addElement('B', ofBlock(sBlockCasingsTT, 2)) + .addElement('C', ofHatchAdderOptional(GT_MetaTileEntity_EM_dataBank::addClassicToMachineList, textureOffset, 1, sBlockCasingsTT, 0)) + .addElement('D', ofHatchAdderOptional(GT_MetaTileEntity_EM_dataBank::addDataBankHatchToMachineList, textureOffset + 1, 2, sBlockCasingsTT, 1)) + .build(); //endregion public GT_MetaTileEntity_EM_dataBank(int aID, String aName, String aNameRegional) { @@ -80,7 +81,7 @@ public class GT_MetaTileEntity_EM_dataBank extends GT_MetaTileEntity_MultiblockB public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { eDataAccessHatches.clear(); eStacksDataOutputs.clear(); - return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 2, 1, 0); + return structureCheck_EM("main", 2, 1, 0); } @Override @@ -174,7 +175,12 @@ public class GT_MetaTileEntity_EM_dataBank extends GT_MetaTileEntity_MultiblockB @Override public void construct(ItemStack stackSize, boolean hintsOnly) { - Structure.builder(shape, blockType, blockMeta, 2, 1, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly); + structureBuild_EM("main", 2, 1, 0, hintsOnly, stackSize); + } + + @Override + public IStructureDefinition<GT_MetaTileEntity_EM_dataBank> getStructure_EM() { + return STRUCTURE_DEFINITION; } @Override diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_decay.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_decay.java index d534b41fec..3fdf841b52 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_decay.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_decay.java @@ -1,10 +1,7 @@ package com.github.technus.tectech.thing.metaTileEntity.multi; -import com.github.technus.tectech.mechanics.constructable.IConstructable; import com.github.technus.tectech.mechanics.elementalMatter.core.cElementalInstanceStackMap; import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.cElementalInstanceStack; -import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder; -import com.github.technus.tectech.mechanics.structure.Structure; import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_EnergyMulti; import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_InputElemental; import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; @@ -13,6 +10,9 @@ import com.github.technus.tectech.thing.metaTileEntity.multi.base.IStatusFunctio import com.github.technus.tectech.thing.metaTileEntity.multi.base.Parameters; import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_RenderedExtendedFacingTexture; import com.github.technus.tectech.util.CommonValues; +import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable; +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.Textures; @@ -21,9 +21,9 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; +import gregtech.api.util.GT_Utility; import ic2.core.init.MainConfig; import ic2.core.util.ConfigUtil; -import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; @@ -32,13 +32,15 @@ import net.minecraft.util.EnumChatFormatting; import org.apache.commons.lang3.reflect.FieldUtils; import static com.github.technus.tectech.mechanics.elementalMatter.core.transformations.bTransformationInfo.AVOGADRO_CONSTANT; -import static com.github.technus.tectech.mechanics.structure.Structure.adders; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStatus.STATUS_OK; import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStatus.STATUS_TOO_LOW; import static com.github.technus.tectech.util.CommonValues.VN; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; import static net.minecraft.util.StatCollector.translateToLocal; import static net.minecraft.util.StatCollector.translateToLocalFormatted; @@ -58,30 +60,28 @@ public class GT_MetaTileEntity_EM_decay extends GT_MetaTileEntity_MultiblockBase //endregion //region structure - private static final String[][] shape = new String[][]{ - {"0C0", "A ", "A . ", "A ", "0C0",}, - {"00000", "00000", "00000", "00000", "00000",}, - {"0C0", "A!!!", "A!0!", "A!!!", "0C0",}, - {"01110", "12221", "12221", "12221", "01110",}, - {"01310", "12221", "32223", "12221", "01310",}, - {"01110", "12221", "12221", "12221", "01110",}, - {"0C0", "A!!!", "A!0!", "A!!!", "0C0",}, - {"00000", "00000", "00000", "00000", "00000",}, - {"0C0", "A ", "A ", "A ", "0C0",}, - }; - private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT}; - private static final byte[] blockMeta = new byte[]{4, 5, 8, 6}; - private static final IHatchAdder<GT_MetaTileEntity_EM_decay>[] addingMethods = adders( - GT_MetaTileEntity_EM_decay::addClassicToMachineList, - GT_MetaTileEntity_EM_decay::addElementalToMachineList); - private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 4}; - private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT}; - private static final byte[] blockMetaFallback = new byte[]{0, 4}; private static final String[] description = new String[]{ EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":", translateToLocal("gt.blockmachines.multimachine.em.decay.hint.0"),//1 - Classic Hatches or High Power Casing translateToLocal("gt.blockmachines.multimachine.em.decay.hint.1"),//2 - Elemental Hatches or Molecular Casing }; + + private static final IStructureDefinition<GT_MetaTileEntity_EM_decay> STRUCTURE_DEFINITION = + StructureDefinition.<GT_MetaTileEntity_EM_decay>builder() + .addShape("main",transpose(new String[][]{ + {"A A","AAAAA","A A","ABBBA","ABCBA","ABBBA","A A","AAAAA","A A"}, + {" FFF ","AAAAA"," EEE ","BDDDB","BDDDB","BDDDB"," EEE ","AAAAA"," FFF "}, + {" F~F ","AAAAA"," EAE ","BDDDB","CDDDC","BDDDB"," EAE ","AAAAA"," FFF "}, + {" FFF ","AAAAA"," EEE ","BDDDB","BDDDB","BDDDB"," EEE ","AAAAA"," FFF "}, + {"A A","AAAAA","A A","ABBBA","ABCBA","ABBBA","A A","AAAAA","A A"} + })) + .addElement('A', ofBlock(sBlockCasingsTT, 4)) + .addElement('B', ofBlock(sBlockCasingsTT, 5)) + .addElement('C', ofBlock(sBlockCasingsTT, 6)) + .addElement('D', ofBlock(sBlockCasingsTT, 8)) + .addElement('E', ofHatchAdderOptional(GT_MetaTileEntity_EM_decay::addElementalToMachineList, textureOffset + 4, 2, sBlockCasingsTT, 4)) + .addElement('F', ofHatchAdderOptional(GT_MetaTileEntity_EM_decay::addClassicToMachineList, textureOffset, 1, sBlockCasingsTT, 0)) + .build(); //endregion //region parameters @@ -110,7 +110,7 @@ public class GT_MetaTileEntity_EM_decay extends GT_MetaTileEntity_MultiblockBase @Override public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { - return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 2, 2, 0); + return structureCheck_EM("main", 2, 2, 0); } @Override @@ -189,21 +189,30 @@ public class GT_MetaTileEntity_EM_decay extends GT_MetaTileEntity_MultiblockBase return new String[]{ translateToLocalFormatted("tt.keyword.Progress", clientLocale) + ":", - EnumChatFormatting.GREEN + Integer.toString(mProgresstime / 20) + EnumChatFormatting.RESET + " s / " + - EnumChatFormatting.YELLOW + mMaxProgresstime / 20 + EnumChatFormatting.RESET + " s", + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(mProgresstime / 20) + EnumChatFormatting.RESET + " s / " + + EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(mMaxProgresstime / 20) + EnumChatFormatting.RESET + " s", translateToLocalFormatted("tt.keyphrase.Energy_Hatches", clientLocale) + ":", - EnumChatFormatting.GREEN + Long.toString(storedEnergy) + EnumChatFormatting.RESET + " EU / " + - EnumChatFormatting.YELLOW + maxEnergy + EnumChatFormatting.RESET + " EU", + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(storedEnergy) + EnumChatFormatting.RESET + " EU / " + + EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(maxEnergy) + EnumChatFormatting.RESET + " EU", (mEUt <= 0 ? translateToLocalFormatted("tt.keyphrase.Probably_uses", clientLocale) + ": " : translateToLocalFormatted("tt.keyphrase.Probably_makes", clientLocale) + ": ") + - EnumChatFormatting.RED + Math.abs(mEUt) + EnumChatFormatting.RESET + " EU/t at " + - EnumChatFormatting.RED + eAmpereFlow + EnumChatFormatting.RESET + " A", - translateToLocalFormatted("tt.keyphrase.Tier_Rating", clientLocale) + ": " + EnumChatFormatting.YELLOW + VN[getMaxEnergyInputTier_EM()] + EnumChatFormatting.RESET + " / " + EnumChatFormatting.GREEN + VN[getMinEnergyInputTier_EM()] + EnumChatFormatting.RESET + - " " + translateToLocalFormatted("tt.keyphrase.Amp_Rating", clientLocale) + ": " + EnumChatFormatting.GREEN + eMaxAmpereFlow + EnumChatFormatting.RESET + " A", - translateToLocalFormatted("tt.keyword.Problems", clientLocale) + ": " + EnumChatFormatting.RED + (getIdealStatus() - getRepairStatus()) + EnumChatFormatting.RESET + - " " + translateToLocalFormatted("tt.keyword.Efficiency", clientLocale) + ": " + EnumChatFormatting.YELLOW + mEfficiency / 100.0F + EnumChatFormatting.RESET + " %", - translateToLocalFormatted("tt.keyword.PowerPass", clientLocale) + ": " + EnumChatFormatting.BLUE + ePowerPass + EnumChatFormatting.RESET + - " " + translateToLocalFormatted("tt.keyword.SafeVoid", clientLocale) + ": " + EnumChatFormatting.BLUE + eSafeVoid, - translateToLocalFormatted("tt.keyword.Computation", clientLocale) + ": " + EnumChatFormatting.GREEN + eAvailableData + EnumChatFormatting.RESET + " / " + EnumChatFormatting.YELLOW + eRequiredData + EnumChatFormatting.RESET, + EnumChatFormatting.RED + GT_Utility.formatNumbers(Math.abs(mEUt)) + EnumChatFormatting.RESET + " EU/t at " + + EnumChatFormatting.RED + GT_Utility.formatNumbers(eAmpereFlow) + EnumChatFormatting.RESET + " A", + translateToLocalFormatted("tt.keyphrase.Tier_Rating", clientLocale) + ": " + + EnumChatFormatting.YELLOW + VN[getMaxEnergyInputTier_EM()] + EnumChatFormatting.RESET + " / " + + EnumChatFormatting.GREEN + VN[getMinEnergyInputTier_EM()] + EnumChatFormatting.RESET + " " + + translateToLocalFormatted("tt.keyphrase.Amp_Rating", clientLocale) + ": " + + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(eMaxAmpereFlow) + EnumChatFormatting.RESET + " A", + translateToLocalFormatted("tt.keyword.Problems", clientLocale) + ": " + + EnumChatFormatting.RED + (getIdealStatus() - getRepairStatus()) + EnumChatFormatting.RESET + " " + + translateToLocalFormatted("tt.keyword.Efficiency", clientLocale) + ": " + + EnumChatFormatting.YELLOW + mEfficiency / 100.0F + EnumChatFormatting.RESET + " %", + translateToLocalFormatted("tt.keyword.PowerPass", clientLocale) + ": " + + EnumChatFormatting.BLUE + ePowerPass + EnumChatFormatting.RESET + " " + + translateToLocalFormatted("tt.keyword.SafeVoid", clientLocale) + ": " + + EnumChatFormatting.BLUE + eSafeVoid, + translateToLocalFormatted("tt.keyword.Computation", clientLocale) + ": " + + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(eAvailableData) + EnumChatFormatting.RESET + " / " + + EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(eRequiredData) + EnumChatFormatting.RESET, }; } @@ -248,7 +257,12 @@ public class GT_MetaTileEntity_EM_decay extends GT_MetaTileEntity_MultiblockBase @Override public void construct(ItemStack stackSize, boolean hintsOnly) { - Structure.builder(shape, blockType, blockMeta, 2, 2, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly); + structureBuild_EM("main", 2, 2, 0, hintsOnly, stackSize); + } + + @Override + public IStructureDefinition<GT_MetaTileEntity_EM_decay> getStructure_EM() { + return STRUCTURE_DEFINITION; } @Override diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dequantizer.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dequantizer.java index 9814092710..f0dca07f9c 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dequantizer.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_dequantizer.java @@ -1,23 +1,22 @@ package com.github.technus.tectech.thing.metaTileEntity.multi; -import com.github.technus.tectech.mechanics.constructable.IConstructable; import com.github.technus.tectech.mechanics.elementalMatter.core.cElementalInstanceStackMap; import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.cElementalInstanceStack; import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.iHasElementalDefinition; import com.github.technus.tectech.mechanics.elementalMatter.core.transformations.aFluidDequantizationInfo; import com.github.technus.tectech.mechanics.elementalMatter.core.transformations.aItemDequantizationInfo; import com.github.technus.tectech.mechanics.elementalMatter.core.transformations.aOredictDequantizationInfo; -import com.github.technus.tectech.mechanics.structure.Structure; -import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder; import com.github.technus.tectech.thing.block.QuantumGlassBlock; import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_InputElemental; import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; import com.github.technus.tectech.util.CommonValues; +import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable; +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import net.minecraft.block.Block; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.ResourceLocation; @@ -29,10 +28,14 @@ import java.util.ArrayList; import static com.github.technus.tectech.mechanics.elementalMatter.core.templates.iElementalDefinition.STABLE_RAW_LIFE_TIME; import static com.github.technus.tectech.mechanics.elementalMatter.definitions.complex.dAtomDefinition.refMass; import static com.github.technus.tectech.mechanics.elementalMatter.definitions.complex.dAtomDefinition.refUnstableMass; -import static com.github.technus.tectech.mechanics.structure.Structure.adders; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; +import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sHintCasingsTT; import static com.github.technus.tectech.util.CommonValues.V; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; import static net.minecraft.util.StatCollector.translateToLocal; /** @@ -41,21 +44,22 @@ import static net.minecraft.util.StatCollector.translateToLocal; public class GT_MetaTileEntity_EM_dequantizer extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable { //region structure //use multi A energy inputs, use less power the longer it runs - private static final String[][] shape = new String[][]{ - {" ", " . ", " ",}, - {"010", "111", "010",}, - {"\"\"\"", "\"1\"", "\"\"\"",}, - {"121", "2!2", "121",}, - }; - private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT, QuantumGlassBlock.INSTANCE}; - private static final byte[] blockMeta = new byte[]{0, 4, 0}; - private static final IHatchAdder<GT_MetaTileEntity_EM_dequantizer>[] addingMethods = adders( - GT_MetaTileEntity_EM_dequantizer::addClassicToMachineList, - GT_MetaTileEntity_EM_dequantizer::addElementalInputToMachineList, - GT_MetaTileEntity_EM_dequantizer::addElementalMufflerToMachineList); - private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 4, textureOffset + 4}; - private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT}; - private static final byte[] blockMetaFallback = new byte[]{0, 4, 4}; + + private static final IStructureDefinition<GT_MetaTileEntity_EM_dequantizer> STRUCTURE_DEFINITION = + StructureDefinition.<GT_MetaTileEntity_EM_dequantizer>builder() + .addShape("main", transpose(new String[][]{ + {"CCC","ABA","EEE","BDB"}, + {"C~C","BBB","EBE","DFD"}, + {"CCC","ABA","EEE","BDB"} + })) + .addElement('A', ofBlock(sBlockCasingsTT, 0)) + .addElement('B', ofBlock(sBlockCasingsTT, 4)) + .addElement('C', ofHatchAdderOptional(GT_MetaTileEntity_EM_dequantizer::addClassicToMachineList, textureOffset, 1, sBlockCasingsTT, 0)) + .addElement('D', ofBlock(QuantumGlassBlock.INSTANCE, 0)) + .addElement('E', ofHatchAdderOptional(GT_MetaTileEntity_EM_dequantizer::addElementalMufflerToMachineList, textureOffset + 4, 3, sBlockCasingsTT, 4)) + .addElement('F', ofHatchAdder(GT_MetaTileEntity_EM_dequantizer::addElementalInputToMachineList, textureOffset + 4, sHintCasingsTT, 1)) + .build(); + private static final String[] description = new String[]{ EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":", translateToLocal("gt.blockmachines.multimachine.em.emtomatter.hint.0"),//1 - Classic Hatches or High Power Casing" @@ -92,7 +96,7 @@ public class GT_MetaTileEntity_EM_dequantizer extends GT_MetaTileEntity_Multiblo @Override public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { - return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 1, 0); + return structureCheck_EM("main", 1, 1, 0); } @Override @@ -155,7 +159,12 @@ public class GT_MetaTileEntity_EM_dequantizer extends GT_MetaTileEntity_Multiblo @Override public void construct(ItemStack stackSize, boolean hintsOnly) { - Structure.builder(shape, blockType, blockMeta, 1, 1, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly); + structureBuild_EM("main", 1, 1, 0, hintsOnly, stackSize); + } + + @Override + public IStructureDefinition<GT_MetaTileEntity_EM_dequantizer> getStructure_EM() { + return STRUCTURE_DEFINITION; } @Override diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_infuser.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_infuser.java index 82fd2df5ed..18416e70f6 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_infuser.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_infuser.java @@ -3,20 +3,19 @@ package com.github.technus.tectech.thing.metaTileEntity.multi; import cofh.api.energy.IEnergyContainerItem; import com.github.technus.tectech.Reference; import com.github.technus.tectech.TecTech; -import com.github.technus.tectech.mechanics.constructable.IConstructable; -import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder; -import com.github.technus.tectech.mechanics.structure.Structure; import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_Container_MultiMachineEM; import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_GUIContainer_MultiMachineEM; import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; import com.github.technus.tectech.util.CommonValues; +import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable; +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import ic2.api.item.ElectricItem; import ic2.api.item.IElectricItem; -import net.minecraft.block.Block; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -24,10 +23,12 @@ import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.ResourceLocation; import static com.github.technus.tectech.loader.TecTechConfig.DEBUG_MODE; -import static com.github.technus.tectech.mechanics.structure.Structure.adders; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; import static gregtech.api.GregTech_API.mEUtoRF; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; import static net.minecraft.util.StatCollector.translateToLocal; /** @@ -35,22 +36,24 @@ import static net.minecraft.util.StatCollector.translateToLocal; */ public class GT_MetaTileEntity_EM_infuser extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable { //region structure - private static final String[][] shape = new String[][]{ - {" ", "000", "1.1", "000", " ",}, - {" ", "010", "111", "010", " ",}, - {" ", "000", "111", "000", " ",}, - }; - private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT}; - private static final byte[] blockMeta = new byte[]{7, 4}; - private static final IHatchAdder<GT_MetaTileEntity_EM_infuser>[] addingMethods = adders( - GT_MetaTileEntity_EM_infuser::addClassicToMachineList); - private static final short[] casingTextures = new short[]{textureOffset}; - private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT}; - private static final byte[] blockMetaFallback = new byte[]{0}; private static final String[] description = new String[]{ EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":", translateToLocal("gt.blockmachines.multimachine.em.infuser.hint"),//1 - Classic Hatches or High Power Casing }; + + private static final IStructureDefinition<GT_MetaTileEntity_EM_infuser> STRUCTURE_DEFINITION = + StructureDefinition.<GT_MetaTileEntity_EM_infuser>builder() + .addShape("main", transpose(new String[][]{ + {"CCC","CCC","CCC"}, + {"BBB","BAB","BBB"}, + {"A~A","AAA","AAA"}, + {"BBB","BAB","BBB"}, + {"CCC","CCC","CCC"} + })) + .addElement('A', ofBlock(sBlockCasingsTT, 4)) + .addElement('B', ofBlock(sBlockCasingsTT, 7)) + .addElement('C', ofHatchAdderOptional(GT_MetaTileEntity_EM_infuser::addClassicToMachineList, textureOffset, 1, sBlockCasingsTT, 0)) + .build(); //endregion public GT_MetaTileEntity_EM_infuser(int aID, String aName, String aNameRegional) { @@ -114,7 +117,7 @@ public class GT_MetaTileEntity_EM_infuser extends GT_MetaTileEntity_MultiblockBa @Override public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { - return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 2, 0); + return structureCheck_EM("main", 1, 2, 0); } @Override @@ -185,7 +188,12 @@ public class GT_MetaTileEntity_EM_infuser extends GT_MetaTileEntity_MultiblockBa @Override public void construct(ItemStack stackSize, boolean hintsOnly) { - Structure.builder(shape, blockType, blockMeta, 1, 2, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly); + structureBuild_EM("main", 1, 2, 0, hintsOnly, stackSize); + } + + @Override + public IStructureDefinition<GT_MetaTileEntity_EM_infuser> getStructure_EM() { + return STRUCTURE_DEFINITION; } @Override diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_junction.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_junction.java index b63079d2dc..53cf072293 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_junction.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_junction.java @@ -1,8 +1,5 @@ package com.github.technus.tectech.thing.metaTileEntity.multi; -import com.github.technus.tectech.mechanics.constructable.IConstructable; -import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder; -import com.github.technus.tectech.mechanics.structure.Structure; import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_InputElemental; import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_OutputElemental; import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; @@ -10,19 +7,21 @@ import com.github.technus.tectech.thing.metaTileEntity.multi.base.INameFunction; import com.github.technus.tectech.thing.metaTileEntity.multi.base.IStatusFunction; import com.github.technus.tectech.thing.metaTileEntity.multi.base.Parameters; import com.github.technus.tectech.util.CommonValues; +import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable; +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.util.GT_Utility; -import net.minecraft.block.Block; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; -import static com.github.technus.tectech.mechanics.structure.Structure.adders; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStatus.*; import static com.github.technus.tectech.util.CommonValues.V; -import static gregtech.api.enums.GT_Values.E; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; import static net.minecraft.util.StatCollector.translateToLocal; /** @@ -31,32 +30,32 @@ import static net.minecraft.util.StatCollector.translateToLocal; public class GT_MetaTileEntity_EM_junction extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable { //region structure //use multi A energy inputs, use less power the longer it runs - private static final String[][] shape = new String[][]{ - {" ", " . ", " ",}, - {"000", "000", "000",}, - {"!!!", "!0!", "!!!",}, - {"!!!", "!!!", "!!!",}, - }; - private static final String[][] shapeBig = new String[][]{ - {E, "A ", "A . ", "A ",}, - {"A!!!", "!000!", "!010!", "!000!", "A!!!",}, - {"!!!!!", "!000!", "!000!", "!000!", "!!!!!",}, - {"A!!!", "!000!", "!000!", "!000!", "A!!!",}, - {"A!!!", "!!!!!", "!!!!!", "!!!!!", "A!!!",}, - }; - private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT}; - private static final byte[] blockMeta = new byte[]{4, 5}; - private static final IHatchAdder<GT_MetaTileEntity_EM_junction>[] addingMethods = adders( - GT_MetaTileEntity_EM_junction::addClassicToMachineList, - GT_MetaTileEntity_EM_junction::addElementalToMachineList); - private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 4}; - private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT}; - private static final byte[] blockMetaFallback = new byte[]{0, 4}; private static final String[] description = new String[]{ EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":", translateToLocal("gt.blockmachines.multimachine.em.junction.hint.0"),//1 - Classic Hatches or High Power Casing translateToLocal("gt.blockmachines.multimachine.em.junction.hint.1"),//2 - Elemental Hatches or Molecular Casing }; + + private static final IStructureDefinition<GT_MetaTileEntity_EM_junction> STRUCTURE_DEFINITION = + StructureDefinition.<GT_MetaTileEntity_EM_junction>builder() + .addShape("main", new String[][]{ + {"CCC", "C~C", "CCC"}, + {"AAA", "AAA", "AAA"}, + {"DDD", "DAD", "DDD"}, + {"DDD", "DDD", "DDD"} + }) + .addShape("mainBig", new String[][]{ + {" ", " CCC ", " C~C ", " CCC ", " "}, + {" DDD ", "DAAAD", "DABAD", "DAAAD", " DDD "}, + {"DDDDD", "DAAAD", "DAAAD", "DAAAD", "DDDDD"}, + {" DDD ", "DAAAD", "DAAAD", "DAAAD", " DDD "}, + {" DDD ", "DDDDD", "DDDDD", "DDDDD", " DDD "} + }) + .addElement('A', ofBlock(sBlockCasingsTT, 4)) + .addElement('B', ofBlock(sBlockCasingsTT, 5)) + .addElement('C', ofHatchAdderOptional(GT_MetaTileEntity_EM_junction::addClassicToMachineList, textureOffset, 1, sBlockCasingsTT, 0)) + .addElement('D', ofHatchAdderOptional(GT_MetaTileEntity_EM_junction::addElementalToMachineList, textureOffset + 4, 2, sBlockCasingsTT, 4)) + .build(); //endregion //region parameters @@ -106,9 +105,9 @@ public class GT_MetaTileEntity_EM_junction extends GT_MetaTileEntity_MultiblockB public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { int meta = iGregTechTileEntity.getMetaIDAtSide(GT_Utility.getOppositeSide(iGregTechTileEntity.getFrontFacing())); if (meta == 4) { - return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 1, 0); + return structureCheck_EM("main", 1, 1, 0); } else if (meta == 5) { - return structureCheck_EM(shapeBig, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 2, 2, 0); + return structureCheck_EM("mainBig", 2, 2, 0); } return false; } @@ -177,7 +176,16 @@ public class GT_MetaTileEntity_EM_junction extends GT_MetaTileEntity_MultiblockB @Override public void construct(ItemStack stackSize, boolean hintsOnly) { - Structure.builder(shape, blockType, blockMeta, 1, 1, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly); + if ((stackSize.stackSize & 1) == 1) { + structureBuild_EM("main", 1, 1, 0, hintsOnly, stackSize); + } else { + structureBuild_EM("mainBig", 2, 2, 0, hintsOnly, stackSize); + } + } + + @Override + public IStructureDefinition<GT_MetaTileEntity_EM_junction> getStructure_EM() { + return STRUCTURE_DEFINITION; } @Override diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_quantizer.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_quantizer.java index d6ab35cd4b..5b6b2c18e7 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_quantizer.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_quantizer.java @@ -2,7 +2,6 @@ package com.github.technus.tectech.thing.metaTileEntity.multi; import com.github.technus.tectech.Reference; import com.github.technus.tectech.TecTech; -import com.github.technus.tectech.mechanics.constructable.IConstructable; import com.github.technus.tectech.mechanics.elementalMatter.core.cElementalInstanceStackMap; import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.cElementalInstanceStack; import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.iHasElementalDefinition; @@ -10,17 +9,17 @@ import com.github.technus.tectech.mechanics.elementalMatter.core.transformations import com.github.technus.tectech.mechanics.elementalMatter.core.transformations.aItemQuantizationInfo; import com.github.technus.tectech.mechanics.elementalMatter.core.transformations.aOredictQuantizationInfo; import com.github.technus.tectech.mechanics.elementalMatter.core.transformations.bTransformationInfo; -import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder; -import com.github.technus.tectech.mechanics.structure.Structure; import com.github.technus.tectech.thing.block.QuantumGlassBlock; import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; import com.github.technus.tectech.util.CommonValues; +import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable; +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.GregTech_API; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import net.minecraft.block.Block; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.ResourceLocation; @@ -34,13 +33,16 @@ import static com.github.technus.tectech.mechanics.elementalMatter.core.template import static com.github.technus.tectech.mechanics.elementalMatter.core.templates.iElementalDefinition.STABLE_RAW_LIFE_TIME; import static com.github.technus.tectech.mechanics.elementalMatter.definitions.complex.dAtomDefinition.refMass; import static com.github.technus.tectech.mechanics.elementalMatter.definitions.complex.dAtomDefinition.refUnstableMass; -import static com.github.technus.tectech.mechanics.structure.Structure.adders; import static com.github.technus.tectech.recipe.TT_recipeAdder.nullFluid; import static com.github.technus.tectech.recipe.TT_recipeAdder.nullItem; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; import static com.github.technus.tectech.util.CommonValues.V; import static com.github.technus.tectech.util.Util.isInputEqual; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; import static net.minecraft.util.StatCollector.translateToLocal; /** @@ -49,21 +51,21 @@ import static net.minecraft.util.StatCollector.translateToLocal; public class GT_MetaTileEntity_EM_quantizer extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable { //region structure //use multi A energy inputs, use less power the longer it runs - private static final String[][] shape = new String[][]{ - {" ", " . ", " ",}, - {"010", "101", "010",}, - {"\"\"\"", "\"0\"", "\"\"\"",}, - {"202", "0!0", "202",}, - }; - private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT, QuantumGlassBlock.INSTANCE}; - private static final byte[] blockMeta = new byte[]{4, 0, 0}; - private static final IHatchAdder<GT_MetaTileEntity_EM_quantizer>[] addingMethods = adders( - GT_MetaTileEntity_EM_quantizer::addClassicToMachineList, - GT_MetaTileEntity_EM_quantizer::addElementalOutputToMachineList, - GT_MetaTileEntity_EM_quantizer::addElementalMufflerToMachineList); - private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 4, textureOffset + 4}; - private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT}; - private static final byte[] blockMetaFallback = new byte[]{0, 4, 4}; + private static final IStructureDefinition<GT_MetaTileEntity_EM_quantizer> STRUCTURE_DEFINITION = + StructureDefinition.<GT_MetaTileEntity_EM_quantizer>builder() + .addShape("main", transpose(new String[][]{ + {"CCC","BAB","EEE","DBD"}, + {"C~C","ABA","EBE","BFB"}, + {"CCC","BAB","EEE","DBD"} + })) + .addElement('A', ofBlock(sBlockCasingsTT, 0)) + .addElement('B', ofBlock(sBlockCasingsTT, 4)) + .addElement('C', ofHatchAdderOptional(GT_MetaTileEntity_EM_quantizer::addClassicToMachineList, textureOffset, 1, sBlockCasingsTT, 0)) + .addElement('D', ofBlock(QuantumGlassBlock.INSTANCE, 0)) + .addElement('E', ofHatchAdderOptional(GT_MetaTileEntity_EM_quantizer::addElementalMufflerToMachineList, textureOffset + 4, 3, sBlockCasingsTT, 4)) + .addElement('F', ofHatchAdder(GT_MetaTileEntity_EM_quantizer::addElementalOutputToMachineList,textureOffset + 4, 2)) + .build(); + private static final String[] description = new String[]{ EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":", translateToLocal("gt.blockmachines.multimachine.em.mattertoem.hint.0"),//1 - Classic Hatches or High Power Casing @@ -87,7 +89,7 @@ public class GT_MetaTileEntity_EM_quantizer extends GT_MetaTileEntity_Multiblock @Override public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { - return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 1, 0); + return structureCheck_EM("main", 1, 1, 0); } @Override @@ -199,7 +201,12 @@ public class GT_MetaTileEntity_EM_quantizer extends GT_MetaTileEntity_Multiblock @Override public void construct(ItemStack stackSize, boolean hintsOnly) { - Structure.builder(shape, blockType, blockMeta, 1, 1, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly); + structureBuild_EM("main", 1, 1, 0, hintsOnly, stackSize); + } + + @Override + public IStructureDefinition<GT_MetaTileEntity_EM_quantizer> getStructure_EM() { + return STRUCTURE_DEFINITION; } @Override diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java index 889b4cfec3..f5fc1fa3af 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java @@ -1,14 +1,14 @@ package com.github.technus.tectech.thing.metaTileEntity.multi; -import com.github.technus.tectech.mechanics.constructable.IConstructable; -import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder; -import com.github.technus.tectech.mechanics.structure.Structure; import com.github.technus.tectech.recipe.TT_recipe; import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_EnergyMulti; import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_Holder; import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_RenderedExtendedFacingTexture; import com.github.technus.tectech.util.CommonValues; +import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable; +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; import cpw.mods.fml.common.registry.GameRegistry; import gregtech.api.enums.ItemList; import gregtech.api.enums.Textures; @@ -22,10 +22,8 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockB import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; -import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; @@ -36,7 +34,6 @@ import org.apache.commons.lang3.reflect.FieldUtils; import java.util.ArrayList; import java.util.LinkedHashMap; -import static com.github.technus.tectech.mechanics.structure.Structure.adders; import static com.github.technus.tectech.recipe.TT_recipe.E_RECIPE_ID; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage; @@ -45,7 +42,10 @@ import static com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileE import static com.github.technus.tectech.thing.metaTileEntity.multi.em_machine.GT_MetaTileEntity_EM_machine.machine; import static com.github.technus.tectech.util.CommonValues.V; import static com.github.technus.tectech.util.CommonValues.VN; -import static gregtech.api.enums.GT_Values.E; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; import static net.minecraft.util.StatCollector.translateToLocal; import static net.minecraft.util.StatCollector.translateToLocalFormatted; @@ -64,32 +64,33 @@ public class GT_MetaTileEntity_EM_research extends GT_MetaTileEntity_MultiblockB private static LinkedHashMap<String, String> lServerNames; - private String clientLocale = "en_US"; - //endregion - - //region structure - private static final String[][] shape = new String[][]{ - {E, "000", E, E, E, "000"/*,E,*/}, - {"A0", "010", "A1", "A!", "A1", "010", "A0",}, - {"A0", "010", E, E, E, "010", "A0",}, - {"000", "010", E, E, E, "010", "000",}, - {"000", "212", "010", "0.0", "010", "212", "000",}, - {"000", "212", "111", "111", "111", "212", "000",}, - {"000", "222", " ", " ", " ", "222", "000",}, - }; - private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT}; - private static final byte[] blockMeta = new byte[]{1, 3, 2}; - private static final IHatchAdder<GT_MetaTileEntity_EM_research>[] addingMethods = adders( - GT_MetaTileEntity_EM_research::addClassicToMachineList, - GT_MetaTileEntity_EM_research::addHolderToMachineList); - private static final short[] casingTextures = new short[]{textureOffset + 1, textureOffset + 3}; - private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, Blocks.air}; - private static final byte[] blockMetaFallback = new byte[]{1, 0}; private static final String[] description = new String[]{ EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":", translateToLocal("gt.blockmachines.multimachine.em.research.hint.0"),//1 - Classic/Data Hatches or Computer casing translateToLocal("gt.blockmachines.multimachine.em.research.hint.1"),//2 - Holder Hatch }; + + private String clientLocale = "en_US"; + //endregion + + //region structure + private static final IStructureDefinition<GT_MetaTileEntity_EM_research> STRUCTURE_DEFINITION = + StructureDefinition.<GT_MetaTileEntity_EM_research>builder() + .addShape("main", transpose(new String[][]{ + {" ", " A ", " A ", "AAA", "AAA", "AAA", "AAA"}, + {"AAA", "ACA", "ACA", "ACA", "BCB", "BCB", "BBB"}, + {" ", " C ", " ", " ", "ACA", "CCC", "DDD"}, + {" ", " E ", " ", " ", "A~A", "CCC", "DDD"}, + {" ", " C ", " ", " ", "ACA", "CCC", "DDD"}, + {"AAA", "ACA", "ACA", "ACA", "BCB", "BCB", "BBB"}, + {" ", " A ", " A ", "AAA", "AAA", "AAA", "AAA"} + })) + .addElement('A', ofBlock(sBlockCasingsTT, 1)) + .addElement('B', ofBlock(sBlockCasingsTT, 2)) + .addElement('C', ofBlock(sBlockCasingsTT, 3)) + .addElement('D', ofHatchAdderOptional(GT_MetaTileEntity_EM_research::addClassicToMachineList, textureOffset + 1,1, sBlockCasingsTT,1)) + .addElement('E', ofHatchAdder(GT_MetaTileEntity_EM_research::addHolderToMachineList, 3, 2)) + .build(); //endregion public GT_MetaTileEntity_EM_research(int aID, String aName, String aNameRegional) { @@ -262,7 +263,7 @@ public class GT_MetaTileEntity_EM_research extends GT_MetaTileEntity_MultiblockB } eHolders.clear(); - if (!structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 3, 4)) { + if (!structureCheck_EM("main", 1, 3, 4)) { return false; } @@ -378,21 +379,31 @@ public class GT_MetaTileEntity_EM_research extends GT_MetaTileEntity_MultiblockB return new String[]{ translateToLocalFormatted("tt.keyphrase.Energy_Hatches", clientLocale) + ":", - EnumChatFormatting.GREEN + Long.toString(storedEnergy) + EnumChatFormatting.RESET + " EU / " + - EnumChatFormatting.YELLOW + maxEnergy + EnumChatFormatting.RESET + " EU", + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(storedEnergy) + EnumChatFormatting.RESET + " EU / " + + EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(maxEnergy) + EnumChatFormatting.RESET + " EU", (mEUt <= 0 ? translateToLocalFormatted("tt.keyphrase.Probably_uses", clientLocale) + ": " : translateToLocalFormatted("tt.keyphrase.Probably_makes", clientLocale) + ": ") + - EnumChatFormatting.RED + Math.abs(mEUt) + EnumChatFormatting.RESET + " EU/t " + translateToLocalFormatted("tt.keyword.at", clientLocale) + " " + - EnumChatFormatting.RED + eAmpereFlow + EnumChatFormatting.RESET + " A", - translateToLocalFormatted("tt.keyphrase.Tier_Rating", clientLocale) + ": " + EnumChatFormatting.YELLOW + VN[getMaxEnergyInputTier_EM()] + EnumChatFormatting.RESET + " / " + EnumChatFormatting.GREEN + VN[getMinEnergyInputTier_EM()] + EnumChatFormatting.RESET + - " " + translateToLocalFormatted("tt.keyphrase.Amp_Rating", clientLocale) + ": " + EnumChatFormatting.GREEN + eMaxAmpereFlow + EnumChatFormatting.RESET + " A", - translateToLocalFormatted("tt.keyword.Problems", clientLocale) + ": " + EnumChatFormatting.RED + (getIdealStatus() - getRepairStatus()) + EnumChatFormatting.RESET + - " " + translateToLocalFormatted("tt.keyword.Efficiency", clientLocale) + ": " + EnumChatFormatting.YELLOW + mEfficiency / 100.0F + EnumChatFormatting.RESET + " %", - translateToLocalFormatted("tt.keyword.PowerPass", clientLocale) + ": " + EnumChatFormatting.BLUE + ePowerPass + EnumChatFormatting.RESET + - " " + translateToLocalFormatted("tt.keyword.SafeVoid", clientLocale) + ": " + EnumChatFormatting.BLUE + eSafeVoid, - translateToLocalFormatted("tt.keyphrase.Computation_Available", clientLocale) + ": " + EnumChatFormatting.GREEN + eAvailableData + EnumChatFormatting.RESET + " / " + EnumChatFormatting.YELLOW + eRequiredData + EnumChatFormatting.RESET, + EnumChatFormatting.RED + GT_Utility.formatNumbers(Math.abs(mEUt)) + EnumChatFormatting.RESET + " EU/t " + + translateToLocalFormatted("tt.keyword.at", clientLocale) + " " + + EnumChatFormatting.RED + GT_Utility.formatNumbers(eAmpereFlow) + EnumChatFormatting.RESET + " A", + translateToLocalFormatted("tt.keyphrase.Tier_Rating", clientLocale) + ": " + + EnumChatFormatting.YELLOW + VN[getMaxEnergyInputTier_EM()] + EnumChatFormatting.RESET + " / " + + EnumChatFormatting.GREEN + VN[getMinEnergyInputTier_EM()] + EnumChatFormatting.RESET + " " + + translateToLocalFormatted("tt.keyphrase.Amp_Rating", clientLocale) + ": " + + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(eMaxAmpereFlow) + EnumChatFormatting.RESET + " A", + translateToLocalFormatted("tt.keyword.Problems", clientLocale) + ": " + + EnumChatFormatting.RED + (getIdealStatus() - getRepairStatus()) + EnumChatFormatting.RESET + " " + + translateToLocalFormatted("tt.keyword.Efficiency", clientLocale) + ": " + + EnumChatFormatting.YELLOW + mEfficiency / 100.0F + EnumChatFormatting.RESET + " %", + translateToLocalFormatted("tt.keyword.PowerPass", clientLocale) + ": " + + EnumChatFormatting.BLUE + ePowerPass + EnumChatFormatting.RESET + " " + + translateToLocalFormatted("tt.keyword.SafeVoid", clientLocale) + ": " + + EnumChatFormatting.BLUE + eSafeVoid, + translateToLocalFormatted("tt.keyphrase.Computation_Available", clientLocale) + ": " + + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(eAvailableData) + EnumChatFormatting.RESET + " / " + + EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(eRequiredData) + EnumChatFormatting.RESET, translateToLocalFormatted("tt.keyphrase.Computation_Remaining", clientLocale) + ":", - EnumChatFormatting.GREEN + Long.toString(computationRemaining / 20L) + EnumChatFormatting.RESET + " / " + - EnumChatFormatting.YELLOW + computationRequired / 20L + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(computationRemaining / 20L) + EnumChatFormatting.RESET + " / " + + EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(computationRequired / 20L) }; } @@ -559,7 +570,12 @@ public class GT_MetaTileEntity_EM_research extends GT_MetaTileEntity_MultiblockB @Override public void construct(ItemStack stackSize, boolean hintsOnly) { - Structure.builder(shape, blockType, blockMeta, 1, 3, 4, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly); + structureBuild_EM("main", 1, 3, 4, hintsOnly, stackSize); + } + + @Override + public IStructureDefinition<GT_MetaTileEntity_EM_research> getStructure_EM() { + return STRUCTURE_DEFINITION; } @Override diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_scanner.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_scanner.java index b418ec0fa4..8c545b50c5 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_scanner.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_scanner.java @@ -1,13 +1,10 @@ package com.github.technus.tectech.thing.metaTileEntity.multi; import com.github.technus.tectech.TecTech; -import com.github.technus.tectech.mechanics.constructable.IConstructable; import com.github.technus.tectech.mechanics.elementalMatter.core.cElementalInstanceStackMap; import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.cElementalDefinitionStack; import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.cElementalInstanceStack; import com.github.technus.tectech.mechanics.elementalMatter.core.tElementalException; -import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder; -import com.github.technus.tectech.mechanics.structure.Structure; import com.github.technus.tectech.recipe.TT_recipe; import com.github.technus.tectech.thing.CustomItemList; import com.github.technus.tectech.thing.block.QuantumGlassBlock; @@ -16,6 +13,9 @@ import com.github.technus.tectech.thing.item.ElementalDefinitionScanStorage_EM; import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_EnergyMulti; import com.github.technus.tectech.thing.metaTileEntity.multi.base.*; import com.github.technus.tectech.util.CommonValues; +import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable; +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; import gregtech.api.enums.ItemList; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; @@ -23,6 +23,7 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Utility; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.entity.player.EntityPlayer; @@ -36,7 +37,6 @@ import org.apache.commons.lang3.reflect.FieldUtils; import static com.github.technus.tectech.loader.TecTechConfig.DEBUG_MODE; import static com.github.technus.tectech.mechanics.elementalMatter.definitions.primitive.cPrimitiveDefinition.nbtE__; -import static com.github.technus.tectech.mechanics.structure.Structure.adders; import static com.github.technus.tectech.recipe.TT_recipe.E_RECIPE_ID; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; @@ -45,6 +45,10 @@ import static com.github.technus.tectech.thing.metaTileEntity.multi.em_machine.G import static com.github.technus.tectech.util.CommonValues.V; import static com.github.technus.tectech.util.CommonValues.VN; import static com.github.technus.tectech.util.Util.areBitsSet; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; import static net.minecraft.util.StatCollector.translateToLocal; import static net.minecraft.util.StatCollector.translateToLocalFormatted; @@ -69,26 +73,6 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa //endregion //region structure - private static final String[][] shape = new String[][]{ - {" ", " 222 ", " 2.2 ", " 222 ", " ",}, - {"00000", "00000", "00000", "00000", "00000",}, - {"00100", "01110", "11111", "01110", "00100",}, - {"01110", "1---1", "1---1", "1---1", "01110",}, - {"01110", "1---1", "1-A-1", "1---1", "01110",}, - {"01110", "1---1", "1---1", "1---1", "01110",}, - {"00100", "01110", "11\"11", "01110", "00100",}, - {"#####", "#000#", "#0!0#", "#000#", "#####",}, - }; - private static final Block[] blockType = new Block[]{sBlockCasingsTT, QuantumGlassBlock.INSTANCE, sBlockCasingsTT}; - private static final byte[] blockMeta = new byte[]{4, 0, 0}; - private static final IHatchAdder<GT_MetaTileEntity_EM_scanner>[] addingMethods = adders( - GT_MetaTileEntity_EM_scanner::addClassicToMachineList, - GT_MetaTileEntity_EM_scanner::addElementalInputToMachineList, - GT_MetaTileEntity_EM_scanner::addElementalOutputToMachineList, - GT_MetaTileEntity_EM_scanner::addElementalMufflerToMachineList); - private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 4, textureOffset + 4, textureOffset + 4}; - private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT}; - private static final byte[] blockMetaFallback = new byte[]{0, 4, 4, 4}; private static final String[] description = new String[]{ EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":", translateToLocal("gt.blockmachines.multimachine.em.scanner.hint.0"),//1 - Classic Hatches or High Power Casing @@ -96,6 +80,24 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa translateToLocal("gt.blockmachines.multimachine.em.scanner.hint.2"),//3 - Elemental Output Hatches or Molecular Casing translateToLocal("gt.blockmachines.multimachine.em.scanner.hint.3"),//4 - Elemental Overflow Hatches or Molecular Casing }; + + private static final IStructureDefinition<GT_MetaTileEntity_EM_scanner> STRUCTURE_DEFINITION = + StructureDefinition.<GT_MetaTileEntity_EM_scanner>builder() + .addShape("main", transpose(new String[][]{ + {"CCCCC","BBBBB","BBDBB","BDDDB","BDDDB","BDDDB","BBDBB","EEEEE"}, + {"CAAAC","BBBBB","BDDDB","D---D","D---D","D---D","BDDDB","EBBBE"}, + {"CA~AC","BBBBB","DDDDD","D---D","D---D","D---D","DDGDD","EBFBE"}, + {"CAAAC","BBBBB","BDDDB","D---D","D---D","D---D","BDDDB","EBBBE"}, + {"CCCCC","BBBBB","BBDBB","BDDDB","BDDDB","BDDDB","BBDBB","EEEEE"} + })) + .addElement('A', ofBlock(sBlockCasingsTT, 0)) + .addElement('B', ofBlock(sBlockCasingsTT, 4)) + .addElement('C', ofHatchAdderOptional(GT_MetaTileEntity_EM_scanner::addClassicToMachineList, textureOffset, 1, sBlockCasingsTT, 0)) + .addElement('D', ofBlock(QuantumGlassBlock.INSTANCE, 0)) + .addElement('E', ofHatchAdderOptional(GT_MetaTileEntity_EM_scanner::addElementalMufflerToMachineList, textureOffset + 4, 4, sBlockCasingsTT, 4)) + .addElement('F', ofHatchAdder(GT_MetaTileEntity_EM_scanner::addElementalInputToMachineList, textureOffset + 4, 2)) + .addElement('G', ofHatchAdder(GT_MetaTileEntity_EM_scanner::addElementalOutputToMachineList, textureOffset + 4, 3)) + .build(); //endregion //region parameters @@ -108,9 +110,12 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa return LedStatus.STATUS_WRONG; } v = (int) v; - if (v == 0) return LedStatus.STATUS_NEUTRAL; - if (v >= SCAN_GET_CLASS_TYPE) return LedStatus.STATUS_TOO_HIGH; - if (v < 0) return LedStatus.STATUS_TOO_LOW; + if (v == 0) + return LedStatus.STATUS_NEUTRAL; + if (v >= SCAN_GET_CLASS_TYPE) + return LedStatus.STATUS_TOO_HIGH; + if (v < 0) + return LedStatus.STATUS_TOO_LOW; return LedStatus.STATUS_OK; }; protected Parameters.Group.ParameterIn[] scanConfiguration; @@ -209,7 +214,7 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa @Override public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { - if (!structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 2, 2, 0)) { + if (!structureCheck_EM("main", 2, 2, 0)) { return false; } return eInputHatches.size() == 1 && eOutputHatches.size() == 1 && eOutputHatches.get(0).getBaseMetaTileEntity().getFrontFacing() == iGregTechTileEntity.getFrontFacing(); @@ -347,21 +352,31 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa return new String[]{ translateToLocalFormatted("tt.keyphrase.Energy_Hatches", clientLocale) + ":", - EnumChatFormatting.GREEN + Long.toString(storedEnergy) + EnumChatFormatting.RESET + " EU / " + - EnumChatFormatting.YELLOW + maxEnergy + EnumChatFormatting.RESET + " EU", + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(storedEnergy) + EnumChatFormatting.RESET + " EU / " + + EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(maxEnergy) + EnumChatFormatting.RESET + " EU", (mEUt <= 0 ? translateToLocalFormatted("tt.keyphrase.Probably_uses", clientLocale) + ": " : translateToLocalFormatted("tt.keyphrase.Probably_makes", clientLocale) + ": ") + - EnumChatFormatting.RED + Math.abs(mEUt) + EnumChatFormatting.RESET + " EU/t " + translateToLocalFormatted("tt.keyword.at", clientLocale) + " " + - EnumChatFormatting.RED + eAmpereFlow + EnumChatFormatting.RESET + " A", - translateToLocalFormatted("tt.keyphrase.Tier_Rating", clientLocale) + ": " + EnumChatFormatting.YELLOW + VN[getMaxEnergyInputTier_EM()] + EnumChatFormatting.RESET + " / " + EnumChatFormatting.GREEN + VN[getMinEnergyInputTier_EM()] + EnumChatFormatting.RESET + - " " + translateToLocalFormatted("tt.keyphrase.Amp_Rating", clientLocale) + ": " + EnumChatFormatting.GREEN + eMaxAmpereFlow + EnumChatFormatting.RESET + " A", - translateToLocalFormatted("tt.keyword.Problems", clientLocale) + ": " + EnumChatFormatting.RED + (getIdealStatus() - getRepairStatus()) + EnumChatFormatting.RESET + - " " + translateToLocalFormatted("tt.keyword.Efficiency", clientLocale) + ": " + EnumChatFormatting.YELLOW + mEfficiency / 100.0F + EnumChatFormatting.RESET + " %", - translateToLocalFormatted("tt.keyword.PowerPass", clientLocale) + ": " + EnumChatFormatting.BLUE + ePowerPass + EnumChatFormatting.RESET + - " " + translateToLocalFormatted("tt.keyword.SafeVoid", clientLocale) + ": " + EnumChatFormatting.BLUE + eSafeVoid, - translateToLocalFormatted("tt.keyphrase.Computation_Available", clientLocale) + ": " + EnumChatFormatting.GREEN + eAvailableData + EnumChatFormatting.RESET + " / " + EnumChatFormatting.YELLOW + eRequiredData + EnumChatFormatting.RESET, + EnumChatFormatting.RED + GT_Utility.formatNumbers(Math.abs(mEUt)) + EnumChatFormatting.RESET + " EU/t " + + translateToLocalFormatted("tt.keyword.at", clientLocale) + " " + + EnumChatFormatting.RED + GT_Utility.formatNumbers(eAmpereFlow) + EnumChatFormatting.RESET + " A", + translateToLocalFormatted("tt.keyphrase.Tier_Rating", clientLocale) + ": " + + EnumChatFormatting.YELLOW + VN[getMaxEnergyInputTier_EM()] + EnumChatFormatting.RESET + " / " + + EnumChatFormatting.GREEN + VN[getMinEnergyInputTier_EM()] + EnumChatFormatting.RESET + " " + + translateToLocalFormatted("tt.keyphrase.Amp_Rating", clientLocale) + ": " + + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(eMaxAmpereFlow) + EnumChatFormatting.RESET + " A", + translateToLocalFormatted("tt.keyword.Problems", clientLocale) + ": " + + EnumChatFormatting.RED + (getIdealStatus() - getRepairStatus()) + EnumChatFormatting.RESET + " " + + translateToLocalFormatted("tt.keyword.Efficiency", clientLocale) + ": " + + EnumChatFormatting.YELLOW + mEfficiency / 100.0F + EnumChatFormatting.RESET + " %", + translateToLocalFormatted("tt.keyword.PowerPass", clientLocale) + ": " + + EnumChatFormatting.BLUE + ePowerPass + EnumChatFormatting.RESET + " " + + translateToLocalFormatted("tt.keyword.SafeVoid", clientLocale) + ": " + + EnumChatFormatting.BLUE + eSafeVoid, + translateToLocalFormatted("tt.keyphrase.Computation_Available", clientLocale) + ": " + + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(eAvailableData) + EnumChatFormatting.RESET + " / " + + EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(eRequiredData) + EnumChatFormatting.RESET, translateToLocalFormatted("tt.keyphrase.Computation_Remaining", clientLocale) + ":", - EnumChatFormatting.GREEN + Long.toString(computationRemaining / 20L) + EnumChatFormatting.RESET + " / " + - EnumChatFormatting.YELLOW + computationRequired / 20L + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(computationRemaining / 20L) + EnumChatFormatting.RESET + " / " + + EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(computationRequired / 20L) }; } @@ -516,7 +531,12 @@ public class GT_MetaTileEntity_EM_scanner extends GT_MetaTileEntity_MultiblockBa @Override public void construct(ItemStack stackSize, boolean hintsOnly) { - Structure.builder(shape, blockType, blockMeta, 2, 2, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly); + structureBuild_EM("main", 2, 2, 0, hintsOnly, stackSize); + } + + @Override + public IStructureDefinition<GT_MetaTileEntity_EM_scanner> getStructure_EM() { + return STRUCTURE_DEFINITION; } @Override diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_stabilizer.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_stabilizer.java index dcd85af99d..0ff238e4c3 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_stabilizer.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_stabilizer.java @@ -1,20 +1,21 @@ package com.github.technus.tectech.thing.metaTileEntity.multi; -import com.github.technus.tectech.mechanics.constructable.IConstructable; -import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder; -import com.github.technus.tectech.mechanics.structure.Structure; import com.github.technus.tectech.thing.block.QuantumGlassBlock; import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; import com.github.technus.tectech.util.CommonValues; +import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable; +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import net.minecraft.block.Block; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; -import static com.github.technus.tectech.mechanics.structure.Structure.adders; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; import static net.minecraft.util.StatCollector.translateToLocal; /** @@ -22,26 +23,29 @@ import static net.minecraft.util.StatCollector.translateToLocal; */ public class GT_MetaTileEntity_EM_stabilizer extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable { //region structure - private static final String[][] shape = new String[][]{ - {"A010", "0 0", "1 . 1", "0 0", "A010",}, - {"23232", "32223", "22222", "32223", "23232",}, - {"12!21", "22422", "!444!", "22422", "12!21",}, - {"23232", "32223", "22222", "32223", "23232",}, - {"A010", "0 0", "1 1", "0 0", "A010",}, - }; - private static final Block[] blockType = new Block[]{sBlockCasingsTT, QuantumGlassBlock.INSTANCE, sBlockCasingsTT, sBlockCasingsTT, sBlockCasingsTT}; - private static final byte[] blockMeta = new byte[]{4, 0, 5, 6, 9}; - private static final IHatchAdder<GT_MetaTileEntity_EM_stabilizer>[] addingMethods = adders( - GT_MetaTileEntity_EM_stabilizer::addClassicToMachineList, - GT_MetaTileEntity_EM_stabilizer::addElementalToMachineList); - private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 4}; - private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT}; - private static final byte[] blockMetaFallback = new byte[]{0, 4}; private static final String[] description = new String[]{ EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":", translateToLocal("gt.blockmachines.multimachine.em.stabilizer.hint.0"),//1 - Classic Hatches or High Power Casing translateToLocal("gt.blockmachines.multimachine.em.stabilizer.hint.1"),//2 - Elemental Hatches or Molecular Casing }; + + private static final IStructureDefinition<GT_MetaTileEntity_EM_stabilizer> STRUCTURE_DEFINITION = + StructureDefinition.<GT_MetaTileEntity_EM_stabilizer>builder() + .addShape("main", transpose(new String[][]{ + {" AFA ","BCBCB","FBGBF","BCBCB"," AFA "}, + {"AEEEA","CBBBC","BBDBB","CBBBC","AEEEA"}, + {"FE~EF","BBBBB","GDDDG","BBBBB","FEEEF"}, + {"AEEEA","CBBBC","BBDBB","CBBBC","AEEEA"}, + {" AFA ","BCBCB","FBGBF","BCBCB"," AFA "} + })) + .addElement('A', ofBlock(sBlockCasingsTT, 4)) + .addElement('B', ofBlock(sBlockCasingsTT, 5)) + .addElement('C', ofBlock(sBlockCasingsTT, 6)) + .addElement('D', ofBlock(sBlockCasingsTT, 9)) + .addElement('E', ofHatchAdderOptional(GT_MetaTileEntity_EM_stabilizer::addClassicToMachineList, textureOffset, 1, sBlockCasingsTT, 0)) + .addElement('F', ofBlock(QuantumGlassBlock.INSTANCE, 0)) + .addElement('G', ofHatchAdderOptional(GT_MetaTileEntity_EM_stabilizer::addElementalToMachineList, textureOffset + 4, 2, sBlockCasingsTT, 4)) + .build(); //endregion public GT_MetaTileEntity_EM_stabilizer(int aID, String aName, String aNameRegional) { @@ -59,7 +63,7 @@ public class GT_MetaTileEntity_EM_stabilizer extends GT_MetaTileEntity_Multibloc @Override public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { - return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 2, 2, 0); + return structureCheck_EM("main", 2, 2, 0); } @Override @@ -73,7 +77,12 @@ public class GT_MetaTileEntity_EM_stabilizer extends GT_MetaTileEntity_Multibloc @Override public void construct(ItemStack stackSize, boolean hintsOnly) { - Structure.builder(shape, blockType, blockMeta, 2, 2, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly); + structureBuild_EM("main", 2, 2, 0, hintsOnly, stackSize); + } + + @Override + public IStructureDefinition<GT_MetaTileEntity_EM_stabilizer> getStructure_EM() { + return STRUCTURE_DEFINITION; } @Override diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java index 5ade4ec965..1ca125977d 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_switch.java @@ -1,10 +1,7 @@ package com.github.technus.tectech.thing.metaTileEntity.multi; import com.github.technus.tectech.Reference; -import com.github.technus.tectech.mechanics.constructable.IConstructable; import com.github.technus.tectech.mechanics.dataTransport.QuantumDataPacket; -import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder; -import com.github.technus.tectech.mechanics.structure.Structure; import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_InputData; import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_OutputData; import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; @@ -13,24 +10,28 @@ import com.github.technus.tectech.thing.metaTileEntity.multi.base.IStatusFunctio import com.github.technus.tectech.thing.metaTileEntity.multi.base.Parameters; import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_RenderedExtendedFacingTexture; import com.github.technus.tectech.util.CommonValues; -import com.github.technus.tectech.util.Vec3Impl; +import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable; +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; +import com.gtnewhorizon.structurelib.util.Vec3Impl; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import net.minecraft.block.Block; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.ResourceLocation; -import static com.github.technus.tectech.mechanics.structure.Structure.adders; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStatus.*; import static com.github.technus.tectech.util.CommonValues.V; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; import static net.minecraft.util.StatCollector.translateToLocal; /** @@ -38,22 +39,21 @@ import static net.minecraft.util.StatCollector.translateToLocal; */ public class GT_MetaTileEntity_EM_switch extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable { //region structure - private static final String[][] shape = new String[][]{ - {" ", " . ", " ",}, - {" ", " 0 ", " ",}, - {" ", " ", " ",}, - }; - private static final Block[] blockType = new Block[]{sBlockCasingsTT}; - private static final byte[] blockMeta = new byte[]{3}; - private static final IHatchAdder<GT_MetaTileEntity_EM_switch>[] addingMethods = adders( - GT_MetaTileEntity_EM_switch::addClassicToMachineList); - private static final short[] casingTextures = new short[]{textureOffset + 1}; - private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT}; - private static final byte[] blockMetaFallback = new byte[]{1}; private static final String[] description = new String[]{ EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":", "1 - Classic/Data Hatches or Computer casing",//1 - Classic/Data Hatches or Computer casing }; + + private static final IStructureDefinition<GT_MetaTileEntity_EM_switch> STRUCTURE_DEFINITION = + StructureDefinition.<GT_MetaTileEntity_EM_switch>builder() + .addShape("main", transpose(new String[][]{ + {"BBB","BBB","BBB"}, + {"B~B","BAB","BBB"}, + {"BBB","BBB","BBB"} + })) + .addElement('A', ofBlock(sBlockCasingsTT, 3)) + .addElement('B', ofHatchAdderOptional(GT_MetaTileEntity_EM_switch::addClassicToMachineList, textureOffset + 1, 1, sBlockCasingsTT, 1)) + .build(); //endregion //region parameters @@ -99,7 +99,7 @@ public class GT_MetaTileEntity_EM_switch extends GT_MetaTileEntity_MultiblockBas @Override public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { - return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 1, 1, 0); + return structureCheck_EM("main", 1, 1, 0); } @Override @@ -134,7 +134,10 @@ public class GT_MetaTileEntity_EM_switch extends GT_MetaTileEntity_MultiblockBas } } - Vec3Impl pos = new Vec3Impl(getBaseMetaTileEntity()); + Vec3Impl pos = new Vec3Impl(getBaseMetaTileEntity().getXCoord(), + getBaseMetaTileEntity().getYCoord(), + getBaseMetaTileEntity().getZCoord()); + QuantumDataPacket pack = new QuantumDataPacket(0L).unifyTraceWith(pos); if (pack == null) { return; @@ -223,7 +226,12 @@ public class GT_MetaTileEntity_EM_switch extends GT_MetaTileEntity_MultiblockBas @Override public void construct(ItemStack stackSize, boolean hintsOnly) { - Structure.builder(shape, blockType, blockMeta, 1, 1, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly); + structureBuild_EM("main", 1, 1, 0, hintsOnly, stackSize); + } + + @Override + public IStructureDefinition<GT_MetaTileEntity_EM_switch> getStructure_EM() { + return STRUCTURE_DEFINITION; } @Override diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_transformer.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_transformer.java index 3e288ccafa..b2f7da7bc3 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_transformer.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_transformer.java @@ -1,14 +1,14 @@ package com.github.technus.tectech.thing.metaTileEntity.multi; import com.github.technus.tectech.Reference; -import com.github.technus.tectech.mechanics.constructable.IConstructable; -import com.github.technus.tectech.mechanics.structure.IStructureDefinition; -import com.github.technus.tectech.mechanics.structure.StructureDefinition; import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_Container_MultiMachineEM; import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_GUIContainer_MultiMachineEM; import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_RenderedExtendedFacingTexture; import com.github.technus.tectech.util.CommonValues; +import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable; +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.Textures; @@ -20,12 +20,13 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.ResourceLocation; -import static com.github.technus.tectech.mechanics.structure.StructureUtility.*; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sHintCasingsTT; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; import static gregtech.api.GregTech_API.sBlockCasings1; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; import static net.minecraft.util.StatCollector.translateToLocal; /** diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_wormhole.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_wormhole.java index fa51447e9f..7b85d3406a 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_wormhole.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_wormhole.java @@ -1,28 +1,28 @@ package com.github.technus.tectech.thing.metaTileEntity.multi; -import com.github.technus.tectech.mechanics.constructable.IConstructable; -import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder; -import com.github.technus.tectech.mechanics.structure.Structure; import com.github.technus.tectech.thing.block.QuantumGlassBlock; import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_RenderedExtendedFacingTexture; import com.github.technus.tectech.util.CommonValues; +import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable; +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; -import static com.github.technus.tectech.mechanics.structure.Structure.adders; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; -import static gregtech.api.enums.GT_Values.E; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; import static net.minecraft.util.StatCollector.translateToLocal; /** @@ -35,32 +35,33 @@ public class GT_MetaTileEntity_EM_wormhole extends GT_MetaTileEntity_MultiblockB //endregion //region structure - private static final String[][] shape = new String[][]{ - {E, E, E, "C ", "C . ", "C "/*,E,E,E,*/}, - {E, E, "D0", "C000", "B00100", "C000", "D0"/*,E,E,*/}, - {E, E, "D0", "C2A2", "B0C0", "C2A2", "D0"/*,E,E,*/}, - {E, "D0", "D0", E, "A00C00", E, "D0", "D0"/*,E,*/}, - {E, "D0", E, E, "A0E0", E, E, "D0"/*,E,*/}, - {"D0", "D0", E, E, "00E00", E, E, "D0", "D0",}, - {"B00000", "A0033300", "003C300", "03E30", "03E30", "03E30", "003C300", "A0033300", "B00000",}, - {"B0!!!0", "A 31113 ", "031222130", "!12C21!", "!12C21!", "!12C21!", "031222130", "A 31113 ", "B0!!!0",}, - {"B0!!!0", "A 31113 ", "031444130", "!14C41!", "!14C41!", "!14C41!", "031444130", "A 31113 ", "B0!!!0",}, - {"B0!!!0", "A 31113 ", "031222130", "!12C21!", "!12C21!", "!12C21!", "031222130", "A 31113 ", "B0!!!0",}, - {"B00000", "A0033300", "003C300", "03E30", "03E30", "03E30", "003C300", "A0033300", "B00000",}, - }; - private static final Block[] blockType = new Block[]{sBlockCasingsTT, sBlockCasingsTT, QuantumGlassBlock.INSTANCE, sBlockCasingsTT, sBlockCasingsTT}; - private static final byte[] blockMeta = new byte[]{12, 10, 0, 5, 11}; - private static final IHatchAdder<GT_MetaTileEntity_EM_wormhole>[] addingMethods = adders( - GT_MetaTileEntity_EM_wormhole::addClassicToMachineList, - GT_MetaTileEntity_EM_wormhole::addElementalToMachineList); - private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 4}; - private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT}; - private static final byte[] blockMetaFallback = new byte[]{0, 4}; private static final String[] description = new String[]{ EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":", translateToLocal("gt.blockmachines.multimachine.em.wormhole.hint.0"),//1 - Classic Hatches or High Power Casing translateToLocal("gt.blockmachines.multimachine.em.wormhole.hint.1"),//2 - Elemental Hatches or Molecular Casing }; + + private static final IStructureDefinition<GT_MetaTileEntity_EM_wormhole> STRUCTURE_DEFINITION = + StructureDefinition.<GT_MetaTileEntity_EM_wormhole>builder() + .addShape("main", transpose(new String[][]{ + {" "," "," "," "," "," D "," DDDDD "," DGGGD "," DGGGD "," DGGGD "," DDDDD "}, + {" "," "," "," D "," D "," D "," DDAAADD "," EABBBAE "," EABBBAE "," EABBBAE "," DDAAADD "}, + {" "," D "," D "," D "," "," ","DDA ADD","DABFFFBAD","DABCCCBAD","DABFFFBAD","DDA ADD"}, + {" EEE "," DDD "," F F "," "," "," ","DA AD","GBF FBG","GBC CBG","GBF FBG","DA AD"}, + {" E~E "," DDBDD "," D D "," DD DD "," D D ","DD DD","DA AD","GBF FBG","GBC CBG","GBF FBG","DA AD"}, + {" EEE "," DDD "," F F "," "," "," ","DA AD","GBF FBG","GBC CBG","GBF FBG","DA AD"}, + {" "," D "," D "," D "," "," ","DDA ADD","DABFFFBAD","DABCCCBAD","DABFFFBAD","DDA ADD"}, + {" "," "," "," D "," D "," D "," DDAAADD "," EABBBAE "," EABBBAE "," EABBBAE "," DDAAADD "}, + {" "," "," "," "," "," D "," DDDDD "," DGGGD "," DGGGD "," DGGGD "," DDDDD "} + })) + .addElement('A', ofBlock(sBlockCasingsTT, 5)) + .addElement('B', ofBlock(sBlockCasingsTT, 10)) + .addElement('C', ofBlock(sBlockCasingsTT, 11)) + .addElement('D', ofBlock(sBlockCasingsTT, 12)) + .addElement('E', ofHatchAdderOptional(GT_MetaTileEntity_EM_wormhole::addClassicToMachineList, textureOffset, 1, sBlockCasingsTT, 0)) + .addElement('F', ofBlock(QuantumGlassBlock.INSTANCE, 0)) + .addElement('G', ofHatchAdderOptional(GT_MetaTileEntity_EM_wormhole::addElementalToMachineList, textureOffset + 4, 2, sBlockCasingsTT, 4)) + .build(); //endregion public GT_MetaTileEntity_EM_wormhole(int aID, String aName, String aNameRegional) { @@ -78,7 +79,7 @@ public class GT_MetaTileEntity_EM_wormhole extends GT_MetaTileEntity_MultiblockB @Override public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { - return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 4, 4, 0); + return structureCheck_EM("main", 4, 4, 0); } @Override @@ -108,7 +109,12 @@ public class GT_MetaTileEntity_EM_wormhole extends GT_MetaTileEntity_MultiblockB @Override public void construct(ItemStack stackSize, boolean hintsOnly) { - Structure.builder(shape, blockType, blockMeta, 4, 4, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly); + structureBuild_EM("main", 4, 4, 0, hintsOnly, stackSize); + } + + @Override + public IStructureDefinition<GT_MetaTileEntity_EM_wormhole> getStructure_EM() { + return STRUCTURE_DEFINITION; } @Override diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_microwave.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_microwave.java index 674ffe8c3e..b99ed26f5b 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_microwave.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_microwave.java @@ -1,20 +1,19 @@ package com.github.technus.tectech.thing.metaTileEntity.multi; import com.github.technus.tectech.Reference; -import com.github.technus.tectech.mechanics.constructable.IConstructable; -import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder; -import com.github.technus.tectech.mechanics.structure.Structure; import com.github.technus.tectech.thing.metaTileEntity.multi.base.*; import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_RenderedExtendedFacingTexture; import com.github.technus.tectech.util.CommonValues; -import com.github.technus.tectech.util.Vec3Impl; +import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable; +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; +import com.gtnewhorizon.structurelib.util.Vec3Impl; import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; -import net.minecraft.block.Block; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.item.EntityItem; @@ -27,10 +26,12 @@ import java.util.ArrayList; import java.util.HashSet; import static com.github.technus.tectech.loader.MainLoader.microwaving; -import static com.github.technus.tectech.mechanics.structure.Structure.adders; import static com.github.technus.tectech.recipe.TT_recipeAdder.nullItem; import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStatus.*; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; import static gregtech.api.GregTech_API.sBlockCasings4; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; import static net.minecraft.util.AxisAlignedBB.getBoundingBox; import static net.minecraft.util.StatCollector.translateToLocal; @@ -44,26 +45,23 @@ public class GT_MetaTileEntity_TM_microwave extends GT_MetaTileEntity_Multiblock //region structure //use multi A energy inputs, use less power the longer it runs - private static final String[][] shape = new String[][]{ - {"00000", "00000", "00.00", "0 0",}, - {"0---0", "0---0", "0---0", " 000 ",}, - {"0---0", "0---0", "0---0", " 000 ",}, - {"0---0", "0---0", "0---0", " 000 ",}, - {"00000", "00000", "00000", "0 0",}, - }; - private static final Block[] blockType = new Block[]{sBlockCasings4}; - private static final byte[] blockMeta = new byte[]{1}; - - private static final IHatchAdder<GT_MetaTileEntity_TM_microwave>[] addingMethods = adders( - GT_MetaTileEntity_TM_microwave::addClassicToMachineList); - private static final short[] casingTextures = new short[]{49}; - private static final Block[] blockTypeFallback = new Block[]{sBlockCasings4}; - private static final byte[] blockMetaFallback = new byte[]{1}; private static final String[] description = new String[]{ EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":", translateToLocal("gt.blockmachines.multimachine.tm.microwave.hint.0"),//1 - Classic Hatches or Clean Stainless Steel Casing translateToLocal("gt.blockmachines.multimachine.tm.microwave.hint.1"),//Also acts like a hopper so give it an Output Bus }; + + private static final IStructureDefinition<GT_MetaTileEntity_TM_microwave> STRUCTURE_DEFINITION = + StructureDefinition.<GT_MetaTileEntity_TM_microwave>builder() + .addShape("main", transpose(new String[][]{ + {"AAAAA","A---A","A---A","A---A","AAAAA"}, + {"AAAAA","A---A","A---A","A---A","AAAAA"}, + {"AA~AA","A---A","A---A","A---A","AAAAA"}, + {"ABBBA","BAAAB","BAAAB","BAAAB","ABBBA"} + })) + .addElement('A', ofBlock(sBlockCasings4, 1)) + .addElement('B', ofHatchAdderOptional(GT_MetaTileEntity_TM_microwave::addClassicToMachineList, 49, 1, sBlockCasings4, 1)) + .build(); //endregion //region parameters @@ -101,7 +99,7 @@ public class GT_MetaTileEntity_TM_microwave extends GT_MetaTileEntity_Multiblock @Override public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { - return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 2, 2, 0); + return structureCheck_EM("main", 2, 2, 0); } @Override @@ -249,7 +247,12 @@ public class GT_MetaTileEntity_TM_microwave extends GT_MetaTileEntity_Multiblock @Override public void construct(ItemStack stackSize, boolean hintsOnly) { - Structure.builder(shape, blockType, blockMeta, 2, 2, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly); + structureBuild_EM("main", 2, 2, 0, hintsOnly, stackSize); + } + + @Override + public IStructureDefinition<GT_MetaTileEntity_TM_microwave> getStructure_EM() { + return STRUCTURE_DEFINITION; } @Override diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_proccessingStack.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_proccessingStack.java index 38e14b9a6f..3a1a5a5418 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_proccessingStack.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_proccessingStack.java @@ -1,27 +1,32 @@ package com.github.technus.tectech.thing.metaTileEntity.multi; import com.github.technus.tectech.mechanics.constructable.IConstructable; -import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder; -import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_Container_MultiMachineEM; -import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_GUIContainer_MultiMachineEM; import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; -import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_RenderedExtendedFacingTexture; -import com.github.technus.tectech.util.CommonValues; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.util.GT_Utility; -import net.minecraft.block.Block; -import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumChatFormatting; - -import static com.github.technus.tectech.mechanics.structure.Structure.adders; -import static gregtech.api.GregTech_API.sBlockCasings4; -import static net.minecraft.util.StatCollector.translateToLocal; +@Deprecated public class GT_MetaTileEntity_TM_proccessingStack extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable { + protected GT_MetaTileEntity_TM_proccessingStack(int aID, String aName, String aNameRegional) { + super(aID, aName, aNameRegional); + } + + @Override + public void construct(ItemStack stackSize, boolean hintsOnly) { + + } + + @Override + public String[] getStructureDescription(ItemStack stackSize) { + return new String[0]; + } + + @Override + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return null; + } + /* //region variables private boolean hasBeenPausedThisCycle = false; //endregion @@ -131,4 +136,5 @@ public class GT_MetaTileEntity_TM_proccessingStack extends GT_MetaTileEntity_Mul public String[] getStructureDescription(ItemStack stackSize) { return description; } + */ }
\ No newline at end of file diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java index c2f475888f..cbc20143b3 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java @@ -2,11 +2,8 @@ package com.github.technus.tectech.thing.metaTileEntity.multi; import com.github.technus.tectech.TecTech; import com.github.technus.tectech.loader.NetworkDispatcher; -import com.github.technus.tectech.mechanics.constructable.IConstructable; import com.github.technus.tectech.mechanics.spark.RendererMessage; import com.github.technus.tectech.mechanics.spark.ThaumSpark; -import com.github.technus.tectech.mechanics.structure.Structure; -import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder; import com.github.technus.tectech.mechanics.tesla.ITeslaConnectable; import com.github.technus.tectech.mechanics.tesla.ITeslaConnectableSimple; import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_Capacitor; @@ -19,10 +16,12 @@ import com.github.technus.tectech.thing.metaTileEntity.multi.base.IStatusFunctio import com.github.technus.tectech.thing.metaTileEntity.multi.base.Parameters; import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_RenderedExtendedFacingTexture; import com.github.technus.tectech.util.CommonValues; -import com.github.technus.tectech.util.Vec3Impl; -import com.google.common.collect.ArrayListMultimap; import com.google.common.collect.Multimap; import com.google.common.collect.MultimapBuilder; +import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable; +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; +import com.gtnewhorizon.structurelib.util.Vec3Impl; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.Materials; @@ -31,7 +30,6 @@ import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.*; -import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; @@ -41,14 +39,15 @@ import net.minecraftforge.fluids.FluidStack; import java.util.ArrayList; import java.util.HashSet; -import static com.github.technus.tectech.mechanics.structure.Structure.adders; import static com.github.technus.tectech.mechanics.tesla.ITeslaConnectable.TeslaUtil.*; +import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsBA0; import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStatus.*; import static com.github.technus.tectech.util.CommonValues.V; -import static gregtech.api.enums.GT_Values.E; -import static java.lang.Math.*; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; +import static gregtech.api.util.GT_StructureUtility.*; +import static java.lang.Math.min; import static net.minecraft.util.StatCollector.translateToLocal; public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable, ITeslaConnectable { @@ -100,35 +99,44 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock //endregion //region structure - private static final String[][] shape = new String[][]{//3 16 0 - {"\u000F", "A . ",}, - {E, "B000", "B000", "B000", "\u0001", "B000", E, "B000", E, "B000", E, "B000", "\u0001", "B111", " 22222 ",}, - {"B000", "A00000", "A00000", "A00000", "B000", E, "A0A!A0", E, "A0A!A0", E, "A0A!A0", E, "A0A!A0", "\u0001", "A1C1", " 21112 ",}, - {"B000", "A00000", "A00000", "A00000", "B030", "C3", "A0!3!0", "C3", "A0!3!0", "C3", "A0!3!0", "C3", "A0!3!0", "C3", "C3", "A1A3A1", " 21212 ",}, - {"B000", "A00000", "A00000", "A00000", "B000", E, "A0A!A0", E, "A0A!A0", E, "A0A!A0", E, "A0A!A0", "\u0001", "A1C1", " 21112 ",}, - {E, "B000", "B000", "B000", "\u0001", "B000", E, "B000", E, "B000", E, "B000", "\u0001", "B111", " 22222 ",}, - {"\u000F", "A ",}, - }; - private static final Block[] blockType = new Block[]{sBlockCasingsBA0, sBlockCasingsBA0, sBlockCasingsBA0, sBlockCasingsBA0}; - private static final byte[] blockMetaT0 = new byte[]{7, 0, 6, 8}; - private static final byte[] blockMetaT1 = new byte[]{7, 1, 6, 8}; - private static final byte[] blockMetaT2 = new byte[]{7, 2, 6, 8}; - private static final byte[] blockMetaT3 = new byte[]{7, 3, 6, 8}; - private static final byte[] blockMetaT4 = new byte[]{7, 4, 6, 8}; - private static final byte[] blockMetaT5 = new byte[]{7, 5, 6, 8}; - private static final byte[] blockMetaT6 = new byte[]{7, 9, 6, 8}; - private static final byte[][] blockMetas = new byte[][]{blockMetaT0, blockMetaT1, blockMetaT2, blockMetaT3, blockMetaT4, blockMetaT5, blockMetaT6}; - private static final IHatchAdder<GT_MetaTileEntity_TM_teslaCoil>[] addingMethods = adders( - GT_MetaTileEntity_TM_teslaCoil::addCapacitorToMachineList, - GT_MetaTileEntity_TM_teslaCoil::addFrameToMachineList); - private static final short[] casingTextures = new short[]{(texturePage << 7) + 16 + 6, 0}; - private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsBA0, null}; - private static final byte[] blockMetaFallback = new byte[]{6, 0}; private static final String[] description = new String[]{ EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":", translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.hint.0"),//1 - Classic Hatches, Capacitor Hatches or Tesla Base Casing - translateToLocal("gt.blockmachines.multimachine.tm.teslaCoil.hint.1"),//2 - Titanium Frames }; + + private static final IStructureDefinition<GT_MetaTileEntity_TM_teslaCoil> STRUCTURE_DEFINITION = + StructureDefinition.<GT_MetaTileEntity_TM_teslaCoil>builder() + .addShape("main", transpose(new String[][]{ + {" "," "," BBB "," BBB "," BBB "," "," "}, + {" "," BBB "," BBBBB "," BBBBB "," BBBBB "," BBB "," "}, + {" "," BBB "," BBBBB "," BBBBB "," BBBBB "," BBB "," "}, + {" "," BBB "," BBBBB "," BBBBB "," BBBBB "," BBB "," "}, + {" "," "," BBB "," BCB "," BBB "," "," "}, + {" "," "," "," C "," "," "," "}, + {" "," BBB "," B F B "," BFCFB "," B F B "," BBB "," "}, + {" "," "," "," C "," "," "," "}, + {" "," BBB "," B F B "," BFCFB "," B F B "," BBB "," "}, + {" "," "," "," C "," "," "," "}, + {" "," BBB "," B F B "," BFCFB "," B F B "," BBB "," "}, + {" "," "," "," C "," "," "," "}, + {" "," BBB "," B F B "," BFCFB "," B F B "," BBB "," "}, + {" "," "," "," C "," "," "," "}, + {" "," "," "," C "," "," "," "}, + {" "," DDD "," D D "," D C D "," D D "," DDD "," "}, + {" EE~EE ","EAAAAAE","EADDDAE","EADADAE","EADDDAE"," AAAAAE"," EEEEE "} + })) + .addElement('A', ofBlock(sBlockCasingsBA0, 6)) + .addElement('B', ofBlock(sBlockCasingsBA0, 7)) + .addElement('C', ofBlock(sBlockCasingsBA0, 8)) + .addElement('D', defer(t -> ofBlock(sBlockCasingsBA0, t.getCoilWindingMeta()))) + .addElement('E', ofHatchAdderOptional(GT_MetaTileEntity_TM_teslaCoil::addCapacitorToMachineList, textureOffset + 16 + 6, 1, sBlockCasingsBA0, 6)) + .addElement('F', ofFrame(Materials.get("Titanium"))) + .build(); + + public int getCoilWindingMeta() { + Vec3Impl xyzOffsets = getExtendedFacing().getWorldOffset(new Vec3Impl(0, -1, 1)); + return this.getBaseMetaTileEntity().getMetaIDOffset(xyzOffsets.get0(), xyzOffsets.get1(), xyzOffsets.get2()); + } //endregion //region parameters @@ -348,7 +356,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock mTier = 6; }//Hacky remap because the ZPM coils were added later - if (structureCheck_EM(shape, blockType, blockMetas[mTier], addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 3, 16, 0) && eCapacitorHatches.size() > 0) { + if (structureCheck_EM("main", 3, 16, 0)) { for (GT_MetaTileEntity_Hatch_Capacitor cap : eCapacitorHatches) { if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(cap)) { cap.getBaseMetaTileEntity().setActive(iGregTechTileEntity.isActive()); @@ -360,11 +368,15 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock oldRotation = (byte) getExtendedFacing().ordinal(); oldOrientation = iGregTechTileEntity.getFrontFacing(); + Vec3Impl posBMTE = new Vec3Impl(getBaseMetaTileEntity().getXCoord(), + getBaseMetaTileEntity().getYCoord(), + getBaseMetaTileEntity().getZCoord()); + //Calculate coordinates of the middle bottom - posTop = getExtendedFacing().getWorldOffset(new Vec3Impl(0, 0, 2)).add(getBaseMetaTileEntity()); + posTop = getExtendedFacing().getWorldOffset(new Vec3Impl(0, 0, 2)).add(posBMTE); //Calculate coordinates of the top sphere - posTop = getExtendedFacing().getWorldOffset(new Vec3Impl(0, -14, 2)).add(getBaseMetaTileEntity()); + posTop = getExtendedFacing().getWorldOffset(new Vec3Impl(0, -14, 2)).add(posBMTE); } return true; } @@ -681,8 +693,13 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock } @Override + public IStructureDefinition<GT_MetaTileEntity_TM_teslaCoil> getStructure_EM() { + return STRUCTURE_DEFINITION; + } + + @Override public void construct(ItemStack stackSize, boolean hintsOnly) { - Structure.builder(shape, blockType, blockMetas[(stackSize.stackSize - 1) % 7], 3, 16, 0, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly); + structureBuild_EM("main", 3, 16, 0, hintsOnly, stackSize); } @Override diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java index 9ba6235c83..a0755b947b 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,25 +2,26 @@ package com.github.technus.tectech.thing.metaTileEntity.multi.base; import com.github.technus.tectech.Reference; import com.github.technus.tectech.TecTech; -import com.github.technus.tectech.loader.NetworkDispatcher; -import com.github.technus.tectech.mechanics.alignment.AlignmentLimits; -import com.github.technus.tectech.mechanics.alignment.AlignmentMessage; -import com.github.technus.tectech.mechanics.alignment.IAlignment; -import com.github.technus.tectech.mechanics.alignment.IAlignmentLimits; -import com.github.technus.tectech.mechanics.alignment.enumerable.ExtendedFacing; -import com.github.technus.tectech.mechanics.alignment.enumerable.Flip; -import com.github.technus.tectech.mechanics.alignment.enumerable.Rotation; + +import com.github.technus.tectech.mechanics.structure.Structure; +import com.gtnewhorizon.structurelib.StructureLibAPI; +import com.gtnewhorizon.structurelib.alignment.IAlignment; +import com.gtnewhorizon.structurelib.alignment.IAlignmentLimits; +import com.gtnewhorizon.structurelib.alignment.IAlignmentProvider; +import com.gtnewhorizon.structurelib.alignment.enumerable.ExtendedFacing; +import com.gtnewhorizon.structurelib.alignment.enumerable.Flip; +import com.gtnewhorizon.structurelib.alignment.enumerable.Rotation; +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.util.Vec3Impl; +import cpw.mods.fml.common.network.NetworkRegistry; + import com.github.technus.tectech.mechanics.elementalMatter.core.cElementalInstanceStackMap; import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.cElementalDefinitionStack; import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.cElementalInstanceStack; import com.github.technus.tectech.mechanics.elementalMatter.core.tElementalException; -import com.github.technus.tectech.mechanics.structure.IStructureDefinition; -import com.github.technus.tectech.mechanics.structure.Structure; -import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder; import com.github.technus.tectech.thing.metaTileEntity.hatch.*; import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_RenderedExtendedFacingTexture; import com.github.technus.tectech.util.Util; -import com.github.technus.tectech.util.Vec3Impl; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.Textures; @@ -32,6 +33,7 @@ import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.*; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; +import gregtech.api.util.IGT_HatchAdder; import gregtech.common.GT_Pollution; import net.minecraft.block.Block; import net.minecraft.client.Minecraft; @@ -144,7 +146,7 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt private boolean explodedThisTick = false; //front rotation val - private IAlignmentLimits alignmentLimits = AlignmentLimits.UNLIMITED; + private IAlignmentLimits alignmentLimits = IAlignmentLimits.UNLIMITED; private ExtendedFacing extendedFacing = ExtendedFacing.DEFAULT; //endregion @@ -175,9 +177,12 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt IGregTechTileEntity base = getBaseMetaTileEntity(); mMachine = false; if (getBaseMetaTileEntity().isServerSide()) { - NetworkDispatcher.INSTANCE.sendToAllAround(new AlignmentMessage.AlignmentData(this), - base.getWorld().provider.dimensionId, - base.getXCoord(), base.getYCoord(), base.getZCoord(), 512); + //NetworkDispatcher.INSTANCE.sendToAllAround(new AlignmentMessage.AlignmentData(this), + // base.getWorld().provider.dimensionId, + // base.getXCoord(), base.getYCoord(), base.getZCoord(), 512); + StructureLibAPI.sendAlignment((IAlignmentProvider) base, + new NetworkRegistry.TargetPoint(base.getWorld().provider.dimensionId, + base.getXCoord(), base.getYCoord(), base.getZCoord(), 512)); }else{ base.issueTextureUpdate(); } @@ -190,11 +195,6 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt } @Override - public void setAlignmentLimits(IAlignmentLimits limits) { - alignmentLimits=limits; - } - - @Override public boolean isFacingValid(byte aFacing) { return canSetToDirectionAny(ForgeDirection.getOrientation(aFacing)); } @@ -237,7 +237,7 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt String[][] structure,//0-9 casing, +- air no air, a-z ignore Block[] blockType,//use numbers 0-9 for casing types byte[] blockMeta,//use numbers 0-9 for casing types - IHatchAdder<T>[] addingMethods, + IGT_HatchAdder<T>[] addingMethods, short[] casingTextures, Block[] blockTypeFallback,//use numbers 0-9 for casing types byte[] blockMetaFallback,//use numbers 0-9 for casing types @@ -387,21 +387,23 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt return new String[]{ "Progress:", - EnumChatFormatting.GREEN + Integer.toString(mProgresstime / 20) + EnumChatFormatting.RESET + " s / " + - EnumChatFormatting.YELLOW + mMaxProgresstime / 20 + EnumChatFormatting.RESET + " s", + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(mProgresstime / 20) + EnumChatFormatting.RESET + " s / " + + EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(mMaxProgresstime / 20) + EnumChatFormatting.RESET + " s", "Energy Hatches:", - EnumChatFormatting.GREEN + Long.toString(storedEnergy) + EnumChatFormatting.RESET + " EU / " + - EnumChatFormatting.YELLOW + maxEnergy + EnumChatFormatting.RESET + " EU", + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(storedEnergy) + EnumChatFormatting.RESET + " EU / " + + EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(maxEnergy) + EnumChatFormatting.RESET + " EU", (mEUt * eAmpereFlow <= 0 ? "Probably uses: " : "Probably makes: ") + - EnumChatFormatting.RED + Math.abs(mEUt) + EnumChatFormatting.RESET + " EU/t at " + - EnumChatFormatting.RED + eAmpereFlow + EnumChatFormatting.RESET + " A", - "Tier Rating: " + EnumChatFormatting.YELLOW + VN[getMaxEnergyInputTier_EM()] + EnumChatFormatting.RESET + " / " + EnumChatFormatting.GREEN + VN[getMinEnergyInputTier_EM()] + EnumChatFormatting.RESET + - " Amp Rating: " + EnumChatFormatting.GREEN + eMaxAmpereFlow + EnumChatFormatting.RESET + " A", + EnumChatFormatting.RED + GT_Utility.formatNumbers(Math.abs(mEUt)) + EnumChatFormatting.RESET + " EU/t at " + + EnumChatFormatting.RED + GT_Utility.formatNumbers(eAmpereFlow) + EnumChatFormatting.RESET + " A", + "Tier Rating: " + EnumChatFormatting.YELLOW + VN[getMaxEnergyInputTier_EM()] + EnumChatFormatting.RESET + " / " + + EnumChatFormatting.GREEN + VN[getMinEnergyInputTier_EM()] + EnumChatFormatting.RESET + + " Amp Rating: " + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(eMaxAmpereFlow) + EnumChatFormatting.RESET + " A", "Problems: " + EnumChatFormatting.RED + (getIdealStatus() - getRepairStatus()) + EnumChatFormatting.RESET + " Efficiency: " + EnumChatFormatting.YELLOW + mEfficiency / 100.0F + EnumChatFormatting.RESET + " %", "PowerPass: " + EnumChatFormatting.BLUE + ePowerPass + EnumChatFormatting.RESET + " SafeVoid: " + EnumChatFormatting.BLUE + eSafeVoid, - "Computation: " + EnumChatFormatting.GREEN + eAvailableData + EnumChatFormatting.RESET + " / " + EnumChatFormatting.YELLOW + eRequiredData + EnumChatFormatting.RESET + "Computation: " + EnumChatFormatting.GREEN + GT_Utility.formatNumbers(eAvailableData) + EnumChatFormatting.RESET + " / " + + EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(eRequiredData) + EnumChatFormatting.RESET }; } @@ -648,7 +650,9 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt */ protected long getAvailableData_EM() { long result = 0; - Vec3Impl pos = new Vec3Impl(getBaseMetaTileEntity()); + Vec3Impl pos = new Vec3Impl(getBaseMetaTileEntity().getXCoord(), + getBaseMetaTileEntity().getYCoord(), + getBaseMetaTileEntity().getZCoord()); for (GT_MetaTileEntity_Hatch_InputData in : eInputData) { if (in.q != null) { Long value = in.q.contentIfNotInTrace(pos); @@ -1095,7 +1099,7 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt public final void onFirstTick(IGregTechTileEntity aBaseMetaTileEntity) { isFacingValid(aBaseMetaTileEntity.getFrontFacing()); if (getBaseMetaTileEntity().isClientSide()) { - NetworkDispatcher.INSTANCE.sendToServer(new AlignmentMessage.AlignmentQuery(this)); + StructureLibAPI.queryAlignment((IAlignmentProvider) aBaseMetaTileEntity); } onFirstTick_EM(aBaseMetaTileEntity); } @@ -1675,7 +1679,7 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt addEnergyOutput_EM((long) mEUt * (long) mEfficiency / getMaxEfficiency(aStack), eAmpereFlow); } else if (euFlow < 0) { if (!drainEnergyInput_EM(mEUt, (long) mEUt * getMaxEfficiency(aStack) / Math.max(1000L, mEfficiency), eAmpereFlow)) { - stopMachine(); + criticalStopMachine(); return false; } } @@ -1688,7 +1692,7 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt addEnergyOutput_EM((long) mEUt * (long) mEfficiency / getMaxEfficiency(aStack), eAmpereFlow); } else if (euFlow < 0) { if (!drainEnergyInput((long) mEUt * getMaxEfficiency(aStack) / Math.max(1000L, mEfficiency), eAmpereFlow)) { - stopMachine(); + criticalStopMachine(); return false; } } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/render/TT_RenderedExtendedFacingTexture.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/render/TT_RenderedExtendedFacingTexture.java index 44bfa4445d..5ed53634de 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/render/TT_RenderedExtendedFacingTexture.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/render/TT_RenderedExtendedFacingTexture.java @@ -1,8 +1,8 @@ package com.github.technus.tectech.thing.metaTileEntity.multi.base.render; -import com.github.technus.tectech.mechanics.alignment.IAlignmentProvider; -import com.github.technus.tectech.mechanics.alignment.enumerable.ExtendedFacing; import com.github.technus.tectech.util.LightingHelper; +import com.gtnewhorizon.structurelib.alignment.IAlignmentProvider; +import com.gtnewhorizon.structurelib.alignment.enumerable.ExtendedFacing; import gregtech.api.enums.Dyes; import gregtech.api.interfaces.IColorModulationContainer; import gregtech.api.interfaces.IIconContainer; diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/GT_MetaTileEntity_EM_machine.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/GT_MetaTileEntity_EM_machine.java index 6b26132292..a43bf2b128 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/GT_MetaTileEntity_EM_machine.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/em_machine/GT_MetaTileEntity_EM_machine.java @@ -3,13 +3,13 @@ package com.github.technus.tectech.thing.metaTileEntity.multi.em_machine; import com.github.technus.tectech.TecTech; import com.github.technus.tectech.mechanics.constructable.IConstructable; import com.github.technus.tectech.mechanics.elementalMatter.core.cElementalInstanceStackMap; -import com.github.technus.tectech.mechanics.structure.adders.IHatchAdder; -import com.github.technus.tectech.mechanics.structure.Structure; import com.github.technus.tectech.thing.block.QuantumGlassBlock; import com.github.technus.tectech.thing.block.QuantumStuffBlock; import com.github.technus.tectech.thing.metaTileEntity.multi.base.*; import com.github.technus.tectech.util.CommonValues; import com.github.technus.tectech.util.Util; +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import net.minecraft.block.Block; @@ -23,10 +23,11 @@ import net.minecraftforge.common.util.ForgeDirection; import java.util.HashMap; import java.util.function.Supplier; -import static com.github.technus.tectech.mechanics.structure.Structure.adders; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.textureOffset; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsTT; import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStatus.*; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; import static net.minecraft.util.StatCollector.translateToLocal; /** @@ -41,26 +42,28 @@ public class GT_MetaTileEntity_EM_machine extends GT_MetaTileEntity_MultiblockBa //endregion //region structure - private static final String[][] shape = new String[][]{ - {"B0", "A ", "0 - 0", "A ", "B0",}, - {"A000", "00000", "00.00", "00000", "A000",}, - {"A121", "1---1", "2---2", "1---1", "A121",}, - {"A131", "1---1", "3-A-3", "1---1", "A131",}, - {"A121", "1---1", "2---2", "1---1", "A121",}, - {"A000", "00000", "00-00", "00000", "A000",}, - {"B0", "A!!!", "0!!!0", "A!!!", "B0",},}; - private static final Block[] blockType = new Block[]{sBlockCasingsTT, QuantumGlassBlock.INSTANCE, sBlockCasingsTT, sBlockCasingsTT}; - private static final byte[] blockMeta = new byte[]{4, 0, 5, 6}; - private static final IHatchAdder<GT_MetaTileEntity_EM_machine>[] addingMethods = adders( - GT_MetaTileEntity_EM_machine::addClassicToMachineList, - GT_MetaTileEntity_EM_machine::addElementalToMachineList); - private static final short[] casingTextures = new short[]{textureOffset, textureOffset + 4}; - private static final Block[] blockTypeFallback = new Block[]{sBlockCasingsTT, sBlockCasingsTT}; - private static final byte[] blockMetaFallback = new byte[]{0, 4}; private static final String[] description = new String[]{ EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":", translateToLocal("gt.blockmachines.multimachine.em.processing.hint.0"),//1 - Classic Hatches or High Power Casing - translateToLocal("gt.blockmachines.multimachine.em.processing.hint.1"),};//2 - Elemental Hatches or Molecular Casing + translateToLocal("gt.blockmachines.multimachine.em.processing.hint.1"),//2 - Elemental Hatches or Molecular Casing + }; + + private static final IStructureDefinition<GT_MetaTileEntity_EM_machine> STRUCTURE_DEFINITION = + StructureDefinition.<GT_MetaTileEntity_EM_machine>builder() + .addShape("main", new String[][]{ + {" A "," AAA "," EBE "," ECE "," EBE "," AAA "," A "}, + {" DDD ","AAAAA","E---E","E---E","E---E","AAAAA"," FFF "}, + {"AD-DA","AA~AA","B---B","C---C","B---B","AA-AA","AFFFA"}, + {" DDD ","AAAAA","E---E","E---E","E---E","AAAAA"," FFF "}, + {" A "," AAA "," EBE "," ECE "," EBE "," AAA "," A "} + }) + .addElement('A', ofBlock(sBlockCasingsTT, 4)) + .addElement('B', ofBlock(sBlockCasingsTT, 5)) + .addElement('C', ofBlock(sBlockCasingsTT, 6)) + .addElement('D', ofHatchAdderOptional(GT_MetaTileEntity_EM_machine::addClassicToMachineList, textureOffset, 1, sBlockCasingsTT, 0)) + .addElement('E', ofBlock(QuantumGlassBlock.INSTANCE, 0)) + .addElement('F', ofHatchAdderOptional(GT_MetaTileEntity_EM_machine::addElementalToMachineList, textureOffset + 4, 2, sBlockCasingsTT, 4)) + .build(); //endregion //region parameters @@ -190,7 +193,7 @@ public class GT_MetaTileEntity_EM_machine extends GT_MetaTileEntity_MultiblockBa @Override public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { - return structureCheck_EM(shape, blockType, blockMeta, addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, 2, 2, 1); + return structureCheck_EM("main", 2, 2, 1); } @Override @@ -354,7 +357,12 @@ public class GT_MetaTileEntity_EM_machine extends GT_MetaTileEntity_MultiblockBa @Override public void construct(ItemStack stackSize, boolean hintsOnly) { - Structure.builder(shape, blockType, blockMeta, 2, 2, 1, getBaseMetaTileEntity(), getExtendedFacing(), hintsOnly); + structureBuild_EM("main", 2, 2, 1, hintsOnly, stackSize); + } + + @Override + public IStructureDefinition<GT_MetaTileEntity_EM_machine> getStructure_EM() { + return STRUCTURE_DEFINITION; } @Override diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_DataReader.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_DataReader.java index d942786916..748b680faa 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_DataReader.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_DataReader.java @@ -272,11 +272,11 @@ public class GT_MetaTileEntity_DataReader extends GT_MetaTileEntity_BasicMachine int time=itemStack.stackTagCompound.getInteger("time"); int EUt=itemStack.stackTagCompound.getInteger("eu"); font.drawString("Assembly Line Recipe", 7, 8, 0x80a0ff); - font.drawString(GT_Utility.trans("152","Total: ") + ((long)time * EUt) + " EU",7,93, 0x80a0ff); - font.drawString(GT_Utility.trans("153","Usage: ") + EUt + " EU/t",7,103, 0x80a0ff); - font.drawString(GT_Utility.trans("154","Voltage: ") + EUt + " EU",7,113, 0x80a0ff); + font.drawString(GT_Utility.trans("152","Total: ") + GT_Utility.formatNumbers((long)time * EUt) + " EU",7,93, 0x80a0ff); + font.drawString(GT_Utility.trans("153","Usage: ") + GT_Utility.formatNumbers(EUt) + " EU/t",7,103, 0x80a0ff); + font.drawString(GT_Utility.trans("154","Voltage: ") + GT_Utility.formatNumbers(EUt) + " EU",7,113, 0x80a0ff); font.drawString(GT_Utility.trans("155","Amperage: ") + 1 ,7,123, 0x80a0ff); - font.drawString( GT_Utility.trans("158","Time: ")+String.format("%.2f " + GT_Utility.trans("161"," secs"), 0.05F * time), 7,133, 0x80a0ff); + font.drawString( GT_Utility.trans("158","Time: ") + GT_Utility.formatNumbers(0.05d * time) + GT_Utility.trans("161"," secs"), 7,133, 0x80a0ff); for(Map.Entry<GT_Slot_Holo,ItemStack> entry:slots.entrySet()){ gui.renderItemSimple(entry.getKey(),entry.getValue()); diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_DebugStructureWriter.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_DebugStructureWriter.java index 3b194c516b..01d5e2321e 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_DebugStructureWriter.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_DebugStructureWriter.java @@ -1,12 +1,12 @@ package com.github.technus.tectech.thing.metaTileEntity.single; import com.github.technus.tectech.TecTech; -import com.github.technus.tectech.mechanics.alignment.enumerable.ExtendedFacing; -import com.github.technus.tectech.mechanics.structure.StructureUtility; import com.github.technus.tectech.thing.metaTileEntity.single.gui.GT_Container_DebugStructureWriter; import com.github.technus.tectech.thing.metaTileEntity.single.gui.GT_GUIContainer_DebugStructureWriter; import com.github.technus.tectech.util.CommonValues; import com.github.technus.tectech.util.Util; +import com.gtnewhorizon.structurelib.alignment.enumerable.ExtendedFacing; +import com.gtnewhorizon.structurelib.structure.StructureUtility; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.Textures; @@ -20,9 +20,13 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumChatFormatting; import net.minecraftforge.common.util.ForgeDirection; +import java.util.Comparator; +import java.util.function.Function; + import static com.github.technus.tectech.thing.metaTileEntity.Textures.MACHINE_CASINGS_TT; import static net.minecraft.util.StatCollector.translateToLocal; @@ -115,11 +119,18 @@ public class GT_MetaTileEntity_DebugStructureWriter extends GT_MetaTileEntity_Ti @Override public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { if (aBaseMetaTileEntity.isAllowedToWork()) { - String pseudoJavaCode = StructureUtility.getPseudoJavaCode(aBaseMetaTileEntity.getWorld(), - ExtendedFacing.of(ForgeDirection.getOrientation(aBaseMetaTileEntity.getFrontFacing())), +// String pseudoJavaCode = StructureUtility.getPseudoJavaCode(aBaseMetaTileEntity.getWorld(), +// ExtendedFacing.of(ForgeDirection.getOrientation(aBaseMetaTileEntity.getFrontFacing())), +// aBaseMetaTileEntity.getXCoord(), aBaseMetaTileEntity.getYCoord(), aBaseMetaTileEntity.getZCoord(), +// numbers[0], numbers[1], numbers[2], +// numbers[3], numbers[4], numbers[5],false); + String pseudoJavaCode = StructureUtility.getPseudoJavaCode( + aBaseMetaTileEntity.getWorld(), ExtendedFacing.of(ForgeDirection.getOrientation(aBaseMetaTileEntity.getFrontFacing())), aBaseMetaTileEntity.getXCoord(), aBaseMetaTileEntity.getYCoord(), aBaseMetaTileEntity.getZCoord(), numbers[0], numbers[1], numbers[2], - numbers[3], numbers[4], numbers[5],false); + te -> te.getClass().getCanonicalName(), + numbers[3], numbers[4], numbers[5], + false); TecTech.LOGGER.info(pseudoJavaCode); result = pseudoJavaCode.split("\\n"); aBaseMetaTileEntity.disableWorking(); @@ -129,11 +140,18 @@ public class GT_MetaTileEntity_DebugStructureWriter extends GT_MetaTileEntity_Ti @Override public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { IGregTechTileEntity aBaseMetaTileEntity = getBaseMetaTileEntity(); - String pseudoJavaCode = StructureUtility.getPseudoJavaCode(aBaseMetaTileEntity.getWorld(), - ExtendedFacing.of(ForgeDirection.getOrientation(aBaseMetaTileEntity.getFrontFacing())), +// String pseudoJavaCode = StructureUtility.getPseudoJavaCode(aBaseMetaTileEntity.getWorld(), +// ExtendedFacing.of(ForgeDirection.getOrientation(aBaseMetaTileEntity.getFrontFacing())), +// aBaseMetaTileEntity.getXCoord(), aBaseMetaTileEntity.getYCoord(), aBaseMetaTileEntity.getZCoord(), +// numbers[0], numbers[1], numbers[2], +// numbers[3], numbers[4], numbers[5],true); + String pseudoJavaCode = StructureUtility.getPseudoJavaCode( + aBaseMetaTileEntity.getWorld(), ExtendedFacing.of(ForgeDirection.getOrientation(aBaseMetaTileEntity.getFrontFacing())), aBaseMetaTileEntity.getXCoord(), aBaseMetaTileEntity.getYCoord(), aBaseMetaTileEntity.getZCoord(), numbers[0], numbers[1], numbers[2], - numbers[3], numbers[4], numbers[5],true); + te -> te.getClass().getCanonicalName(), + numbers[3], numbers[4], numbers[5], + false); TecTech.LOGGER.info(pseudoJavaCode); result = pseudoJavaCode.split("\\n"); aBaseMetaTileEntity.disableWorking(); diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_TeslaCoil.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_TeslaCoil.java index 274389b01a..3b240e4c56 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_TeslaCoil.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_TeslaCoil.java @@ -8,10 +8,10 @@ import com.github.technus.tectech.loader.NetworkDispatcher; import com.github.technus.tectech.mechanics.spark.RendererMessage;
import com.github.technus.tectech.mechanics.spark.ThaumSpark;
import com.github.technus.tectech.util.Util;
-import com.github.technus.tectech.util.Vec3Impl;
import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.Multimap;
import com.google.common.collect.MultimapBuilder;
+import com.gtnewhorizon.structurelib.util.Vec3Impl;
import eu.usrv.yamcore.auxiliary.PlayerChatHelper;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
@@ -333,7 +333,9 @@ public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryB @Override
public Vec3Impl getTeslaPosition() {
- return new Vec3Impl(this.getBaseMetaTileEntity());
+ return new Vec3Impl(this.getBaseMetaTileEntity().getXCoord(),
+ this.getBaseMetaTileEntity().getYCoord(),
+ this.getBaseMetaTileEntity().getZCoord());
}
@Override
diff --git a/src/main/java/com/github/technus/tectech/util/Vec3Impl.java b/src/main/java/com/github/technus/tectech/util/Vec3Impl.java index 9ba96d741a..56a9176767 100644 --- a/src/main/java/com/github/technus/tectech/util/Vec3Impl.java +++ b/src/main/java/com/github/technus/tectech/util/Vec3Impl.java @@ -4,6 +4,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import net.minecraft.dispenser.IPosition; import net.minecraftforge.common.util.ForgeDirection; +@Deprecated public class Vec3Impl implements Comparable<Vec3Impl> { public static final Vec3Impl NULL_VECTOR = new Vec3Impl(0, 0, 0); private final int val0; diff --git a/src/main/resources/assets/tectech/lang/en_US.lang b/src/main/resources/assets/tectech/lang/en_US.lang index 668f010410..adec911faa 100644 --- a/src/main/resources/assets/tectech/lang/en_US.lang +++ b/src/main/resources/assets/tectech/lang/en_US.lang @@ -313,9 +313,9 @@ gt.blockmachines.hatch.dynamomulti64.tier.11.name=UIV 64A Dynamo Hatch gt.blockmachines.hatch.dynamomulti04.tier.12.name=UMV 4A Dynamo Hatch gt.blockmachines.hatch.dynamomulti16.tier.12.name=UMV 16A Dynamo Hatch gt.blockmachines.hatch.dynamomulti64.tier.12.name=UMV 64A Dynamo Hatch -gt.blockmachines.hatch.dynamomulti04.tier.13.name=IV 4A Dynamo Hatch -gt.blockmachines.hatch.dynamomulti16.tier.13.name=IV 16A Dynamo Hatch -gt.blockmachines.hatch.dynamomulti64.tier.13.name=IV 64A Dynamo Hatch +gt.blockmachines.hatch.dynamomulti04.tier.13.name=UXV 4A Dynamo Hatch +gt.blockmachines.hatch.dynamomulti16.tier.13.name=UXV 16A Dynamo Hatch +gt.blockmachines.hatch.dynamomulti64.tier.13.name=UXV 64A Dynamo Hatch gt.blockmachines.hatch.dynamomulti.desc.0=Multiple Ampere Energy Extractor for Multiblocks gt.blockmachines.hatch.dynamomulti.desc.1=Amperes Out diff --git a/src/main/resources/assets/tectech/lang/zh_CN.lang b/src/main/resources/assets/tectech/lang/zh_CN.lang index c01c8f2757..2d594ffb8e 100644 --- a/src/main/resources/assets/tectech/lang/zh_CN.lang +++ b/src/main/resources/assets/tectech/lang/zh_CN.lang @@ -50,8 +50,8 @@ item.em.EuMeterGT.desc.1=只需右键方块. item.em.frontRotate.name=正面旋转扳手 item.em.frontRotate.desc.0=触发正面旋转界面 -item.em.frontRotate.desc.1=仅旋转前面板, -item.em.frontRotate.desc.2=允许结构旋转. +item.em.frontRotate.desc.1=可以旋转多方块控制器, +item.em.frontRotate.desc.2=从而使整个结构可以旋转. item.em.parametrizerMemoryCard.name=数据化储存卡 item.em.parametrizerMemoryCard.desc.0=存储参数 @@ -87,6 +87,16 @@ item.tm.teslaCover.desc.4=到底谁在用电缆? item.tm.teslaStaff.name=特斯拉权杖 item.tm.teslaStaff.desc=狂妄之人窃取了众神的权柄! +item.tm.enderfluidlinkcover.name=末影流体覆盖板 +item.tm.enderfluidlinkcover.desc.0=在机器间无线传输流体! +item.tm.enderfluidlinkcover.desc.1=可贴在储罐/机器/管道的任意面以将其与末影相连 +item.tm.enderfluidlinkcover.desc.2=末影储罐太逊了! -来自Chads-of-NH的Bot + +item.tm.powerpassupgradecover.name=导能升级覆盖板 +item.tm.powerpassupgradecover.desc.0=为TecTech多方块机器添加导能功能 +item.tm.powerpassupgradecover.desc.1=罐中的有源变压器?? +item.tm.powerpassupgradecover.desc.2=将它们像圣诞彩灯一样串起来! + #Death Messages death.attack.microwaving=%1$s被辐射脱水。 death.attack.microwaving.player=%1$s在与%2$s的战斗中被辐射脱水。 @@ -303,9 +313,9 @@ gt.blockmachines.hatch.dynamomulti64.tier.11.name=64安UIV动力仓 gt.blockmachines.hatch.dynamomulti04.tier.12.name=4安UMV动力仓 gt.blockmachines.hatch.dynamomulti16.tier.12.name=16安UMV动力仓 gt.blockmachines.hatch.dynamomulti64.tier.12.name=64安UMV动力仓 -gt.blockmachines.hatch.dynamomulti04.tier.13.name=4安IV动力仓 -gt.blockmachines.hatch.dynamomulti16.tier.13.name=16安IV动力仓 -gt.blockmachines.hatch.dynamomulti64.tier.13.name=64安IV动力仓 +gt.blockmachines.hatch.dynamomulti04.tier.13.name=4安UXV动力仓 +gt.blockmachines.hatch.dynamomulti16.tier.13.name=16安UXV动力仓 +gt.blockmachines.hatch.dynamomulti64.tier.13.name=64安UXV动力仓 gt.blockmachines.hatch.dynamomulti.desc.0=从多方块机器以高电流输出能源 gt.blockmachines.hatch.dynamomulti.desc.1=输出电流 @@ -771,7 +781,7 @@ gt.blockmachines.debug.tt.data.desc.0=量子数据输出 gt.blockmachines.debug.tt.data.desc.1=高速光纤接口 gt.blockmachines.debug.tt.data.desc.2=启用前必须涂色 gt.blockmachines.debug.tt.maintenance.name=Debug维护仓 -gt.blockmachines.debug.tt.maintenance.desc.0=用于维护多方块 +gt.blockmachines.debug.tt.maintenance.desc.0=自动维护多方块机器 gt.blockmachines.debug.tt.maintenance.desc.1=它能修好一切,除了自己. gt.blockmachines.debug.tt.maintenance.desc.2=为人民服务! gt.blockmachines.debug.tt.genny.name=Debug发电机 diff --git a/src/main/resources/mcmod.info b/src/main/resources/mcmod.info index f7fc68f278..21ecee23f8 100644 --- a/src/main/resources/mcmod.info +++ b/src/main/resources/mcmod.info @@ -1,10 +1,10 @@ [ { - "modid": "tectech", - "name": "TecTech", + "modid": "${modId}", + "name": "${modName}", "description": "TecTech - Tec Technology Interdimensional! Replace UUMatter with something overly complicated and annoying! (GT5u Addon)", - "version": "${version}", - "mcversion": "${mcversion}", + "version": "${modVersion}", + "mcversion": "${minecraftVersion}", "url": "", "updateUrl": "", "authorList": ["_Technus_"], |