diff options
25 files changed, 1774 insertions, 683 deletions
diff --git a/.gitignore b/.gitignore index 406c4db8dc..4b05cbe9e4 100644 --- a/.gitignore +++ b/.gitignore @@ -23,6 +23,7 @@ SetupDevWorkspaces.bat *.db *.log .idea/ +\.directory asm/ config/ saves/ diff --git a/build.gradle b/build.gradle index 3933a94c35..6fccbe64e8 100644 --- a/build.gradle +++ b/build.gradle @@ -91,10 +91,10 @@ task getGregTech(type: Download) { mustRunAfter "repackMinecraft" } -//tasks.setupCIWorkspace.dependsOn getGregTech -//tasks.setupDevWorkspace.dependsOn getGregTech -//tasks.setupDecompWorkspace.dependsOn getGregTech -//tasks.compileJava.dependsOn getGregTech +tasks.setupCIWorkspace.dependsOn getGregTech +tasks.setupDevWorkspace.dependsOn getGregTech +tasks.setupDecompWorkspace.dependsOn getGregTech +tasks.compileJava.dependsOn getGregTech processResources { diff --git a/build.properties b/build.properties index 6a9a79e5d7..41f3ddc150 100644 --- a/build.properties +++ b/build.properties @@ -1,13 +1,13 @@ minecraft.version=1.7.10 forge.version=1.7.10-10.13.4.1614-1.7.10 -tectech.version=3.6.8 +tectech.version=3.6.10 ic2.version=2.2.790-experimental codechickenlib.version=1.1.3.140 codechickencore.version=1.0.7.47 nei.version=1.0.5.120 -gregtech.jenkinsbuild=241 -gregtech.version=5.09.33.10 +gregtech.jenkinsbuild=261 +gregtech.version=5.09.33.11 cofhcore.version=[1.7.10]3.1.4-329-dev cofhlib.version=[1.7.10]1.0.3-175-dev diff --git a/src/main/java/com/github/technus/tectech/CommonValues.java b/src/main/java/com/github/technus/tectech/CommonValues.java index 8ac6188b63..9564643fbe 100644 --- a/src/main/java/com/github/technus/tectech/CommonValues.java +++ b/src/main/java/com/github/technus/tectech/CommonValues.java @@ -18,6 +18,10 @@ public final class CommonValues { EnumChatFormatting.BLUE + "Tec" + EnumChatFormatting.DARK_BLUE + "Tech" + EnumChatFormatting.BLUE + ": Theta Movement"; + public static final String COSMIC_MARK = + EnumChatFormatting.BLUE + "Tec" + + EnumChatFormatting.DARK_BLUE + "Tech" + + EnumChatFormatting.BLUE + ": Cosmic";//TODO get a better name than cosmic for *UNDEFINED* thing public static final byte DECAY_AT = 0;// hatches compute decays public static final byte MULTI_PURGE_1_AT = 2;// multiblocks clean their hatches 1 diff --git a/src/main/java/com/github/technus/tectech/Util.java b/src/main/java/com/github/technus/tectech/Util.java index 09aeae6a6b..f15c07cd19 100644 --- a/src/main/java/com/github/technus/tectech/Util.java +++ b/src/main/java/com/github/technus/tectech/Util.java @@ -25,8 +25,9 @@ import net.minecraftforge.fluids.FluidStack; import org.apache.commons.lang3.StringUtils; import java.lang.reflect.Field; -import java.util.ArrayList; -import java.util.List; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.util.*; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -40,6 +41,18 @@ public final class Util { private Util() { } + @SuppressWarnings("ComparatorMethodParameterNotUsed") + public static <K, V extends Comparable<? super V>> SortedSet<Map.Entry<K, V>> entriesSortedByValues(Map<K, V> map) { + SortedSet<Map.Entry<K, V>> sortedEntries = new TreeSet<Map.Entry<K, V>>( + (e1, e2) -> { + int res = e1.getValue().compareTo(e2.getValue()); + return res != 0 ? res : 1; // Special fix to preserve items with equal values + } + ); + sortedEntries.addAll(map.entrySet()); + return sortedEntries; + } + public static String intBitsToString(int number) { StringBuilder result = new StringBuilder(16); @@ -1363,7 +1376,7 @@ public final class Util { field.setAccessible(true); field.set(me,(byte)tier); }catch (Exception e){ - //e.printStackTrace(); + e.printStackTrace(); } } 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 73aef326b7..d9ddb3d0e0 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 @@ -511,7 +511,7 @@ public class DreamCraftRecipeLoader implements Runnable { GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.Bedrockium, 2L)}, new FluidStack[]{ Materials.Naquadria.getMolten(2592), Materials.SolderingAlloy.getMolten(2592), - Materials.Lubricant.getFluid(4000)}, ItemList.Electric_Pump_UHV.get(1, new Object[]{}), 1000, 200000); + Materials.Lubricant.getFluid(4000)}, ItemList.Electric_Pump_UHV.get(1), 1000, 200000); TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.Electric_Pump_UHV.get(1L), 48000, 64, 200000, 8, new ItemStack[]{ @@ -524,7 +524,7 @@ public class DreamCraftRecipeLoader implements Runnable { GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.Draconium, 2L)}, new FluidStack[]{ Materials.Quantium.getMolten(2592), Materials.SolderingAlloy.getMolten(5184), - Materials.Lubricant.getFluid(8000)}, ItemList.Electric_Pump_UEV.get(1, new Object[]{}), 2000, 800000); + Materials.Lubricant.getFluid(8000)}, ItemList.Electric_Pump_UEV.get(1), 2000, 800000); //Conveyor Belt UV-UHV TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.Conveyor_Module_UV.get(1L), @@ -537,7 +537,7 @@ public class DreamCraftRecipeLoader implements Runnable { Materials.Naquadria.getMolten(2592), Materials.SolderingAlloy.getMolten(2592), Materials.Lubricant.getFluid(4000), - Materials.Silicone.getMolten(5760)}, ItemList.Conveyor_Module_UHV.get(1, new Object[]{}), 1000, 200000); + Materials.Silicone.getMolten(5760)}, ItemList.Conveyor_Module_UHV.get(1), 1000, 200000); TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.Conveyor_Module_UHV.get(1L), 48000, 64, 200000, 8, new ItemStack[]{ @@ -549,7 +549,7 @@ public class DreamCraftRecipeLoader implements Runnable { Materials.Quantium.getMolten(2592), Materials.SolderingAlloy.getMolten(5184), Materials.Lubricant.getFluid(8000), - Materials.Silicone.getMolten(11520)}, ItemList.Conveyor_Module_UEV.get(1, new Object[]{}), 2000, 800000); + Materials.Silicone.getMolten(11520)}, ItemList.Conveyor_Module_UEV.get(1), 2000, 800000); //Piston UV-UHV TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.Electric_Piston_UV.get(1L), @@ -564,7 +564,7 @@ public class DreamCraftRecipeLoader implements Runnable { GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.Bedrockium, 4L)}, new FluidStack[]{ Materials.Naquadria.getMolten(2592), Materials.SolderingAlloy.getMolten(2592), - Materials.Lubricant.getFluid(4000)}, ItemList.Electric_Piston_UHV.get(1, new Object[]{}), 1000, 200000); + Materials.Lubricant.getFluid(4000)}, ItemList.Electric_Piston_UHV.get(1), 1000, 200000); TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.Electric_Piston_UHV.get(1L), 48000, 64, 200000, 8, new ItemStack[]{ @@ -578,7 +578,7 @@ public class DreamCraftRecipeLoader implements Runnable { GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.Draconium, 4L)}, new FluidStack[]{ Materials.Quantium.getMolten(2592), Materials.SolderingAlloy.getMolten(5184), - Materials.Lubricant.getFluid(8000)}, ItemList.Electric_Piston_UEV.get(1, new Object[]{}), 2000, 800000); + Materials.Lubricant.getFluid(8000)}, ItemList.Electric_Piston_UEV.get(1), 2000, 800000); //Robot Arm UV-UHV TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.Robot_Arm_UV.get(1L), @@ -906,12 +906,12 @@ public class DreamCraftRecipeLoader implements Runnable { ItemList.Electric_Motor_UV.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), GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.Ardite, 8L), GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.Ardite, 8L), GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.Ardite, 8L), - GT_OreDictUnificator.get(OrePrefixes.plateDense, Materials.Ardite, 8L), - GT_OreDictUnificator.get(OrePrefixes.gemExquisite, Materials.Ruby, 64L), - GT_OreDictUnificator.get(OrePrefixes.gemExquisite, Materials.Jasper, 64L), + GT_OreDictUnificator.get(OrePrefixes.gemExquisite, Materials.Ruby, 16L), + GT_OreDictUnificator.get(OrePrefixes.gemExquisite, Materials.Jasper, 16L), getItemContainer("NanoCircuit").get(1L).splitStack(32) }, new FluidStack[]{ @@ -944,7 +944,7 @@ public class DreamCraftRecipeLoader implements Runnable { new Object[]{OrePrefixes.circuit.get(Materials.Infinite), 1L}, new Object[]{OrePrefixes.circuit.get(Materials.Infinite), 1L}, new Object[]{OrePrefixes.circuit.get(Materials.Infinite), 1L}, - ItemList.Energy_Cluster.get(8L, new Object[0]), + ItemList.Energy_Cluster.get(8L), ItemList.Field_Generator_UV.get(2), ItemList.Circuit_Wafer_HPIC.get(64), ItemList.Circuit_Wafer_HPIC.get(64), @@ -957,10 +957,10 @@ public class DreamCraftRecipeLoader implements Runnable { TT_recipeAdder.addResearchableAssemblylineRecipe(ItemList.ZPM2.get(1L),24000,64,200000,6,new Object[]{ GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Neutronium, 64L), - new Object[]{OrePrefixes.circuit, Materials.Bio, 1L}, - new Object[]{OrePrefixes.circuit, Materials.Bio, 1L}, - new Object[]{OrePrefixes.circuit, Materials.Bio, 1L}, - new Object[]{OrePrefixes.circuit, Materials.Bio, 1L}, + new Object[]{OrePrefixes.circuit.get(Materials.Bio), 1L}, + new Object[]{OrePrefixes.circuit.get(Materials.Bio), 1L}, + new Object[]{OrePrefixes.circuit.get(Materials.Bio), 1L}, + new Object[]{OrePrefixes.circuit.get(Materials.Bio), 1L}, ItemList.ZPM2.get(8), ItemList.Field_Generator_UHV.get(4), ItemList.Circuit_Wafer_UHPIC.get(64), diff --git a/src/main/java/com/github/technus/tectech/loader/MainLoader.java b/src/main/java/com/github/technus/tectech/loader/MainLoader.java index de53fb225f..3c9eeac800 100644 --- a/src/main/java/com/github/technus/tectech/loader/MainLoader.java +++ b/src/main/java/com/github/technus/tectech/loader/MainLoader.java @@ -12,6 +12,7 @@ import com.github.technus.tectech.loader.gui.ModGuiHandler; import com.github.technus.tectech.loader.mechanics.ElementalLoader; import com.github.technus.tectech.loader.recipe.RecipeLoader; import com.github.technus.tectech.loader.thing.ComponentLoader; +import com.github.technus.tectech.loader.thing.CoverLoader; import com.github.technus.tectech.loader.thing.MachineLoader; import com.github.technus.tectech.loader.thing.ThingsLoader; import com.github.technus.tectech.thing.casing.TT_Container_Casings; @@ -74,7 +75,7 @@ public final class MainLoader { } public static void load() { - ProgressManager.ProgressBar progressBarLoad = ProgressManager.push("TecTech Loader", 8); + ProgressManager.ProgressBar progressBarLoad = ProgressManager.push("TecTech Loader", 9); progressBarLoad.step("Elemental Things"); new ElementalLoader().run(); @@ -96,6 +97,10 @@ public final class MainLoader { new MachineLoader().run(); LOGGER.info("Machine Init Done"); + progressBarLoad.step("Cover Things"); + new CoverLoader().run(); + LOGGER.info("Cover Init Done"); + progressBarLoad.step("Register entities"); new EntityLoader().run(); LOGGER.info("Entities registered"); diff --git a/src/main/java/com/github/technus/tectech/loader/thing/CoverLoader.java b/src/main/java/com/github/technus/tectech/loader/thing/CoverLoader.java new file mode 100644 index 0000000000..e71489339e --- /dev/null +++ b/src/main/java/com/github/technus/tectech/loader/thing/CoverLoader.java @@ -0,0 +1,19 @@ +package com.github.technus.tectech.loader.thing; + +import com.github.technus.tectech.TecTech; + +import com.github.technus.tectech.thing.cover.GT_Cover_TM_TeslaCoil; +import com.github.technus.tectech.thing.cover.GT_Cover_TM_TeslaCoil_Ultimate; +import com.github.technus.tectech.thing.item.TeslaCoilCover; +import com.github.technus.tectech.thing.item.TeslaCoilCoverUltimate; +import gregtech.api.GregTech_API; +import gregtech.api.enums.Textures; +import gregtech.api.objects.GT_RenderedTexture; +import net.minecraft.item.ItemStack; +public class CoverLoader implements Runnable { + public void run(){ + GregTech_API.registerCover(new ItemStack(TeslaCoilCover.INSTANCE, 1), new GT_RenderedTexture(Textures.BlockIcons.VENT_NORMAL), new GT_Cover_TM_TeslaCoil()); + GregTech_API.registerCover(new ItemStack(TeslaCoilCoverUltimate.INSTANCE, 1), new GT_RenderedTexture(Textures.BlockIcons.VENT_ADVANCED), new GT_Cover_TM_TeslaCoil_Ultimate()); + TecTech.LOGGER.info("Cover functionality registered"); + } +} diff --git a/src/main/java/com/github/technus/tectech/loader/thing/MachineLoader.java b/src/main/java/com/github/technus/tectech/loader/thing/MachineLoader.java index 86b3beac8d..30751bc961 100644 --- a/src/main/java/com/github/technus/tectech/loader/thing/MachineLoader.java +++ b/src/main/java/com/github/technus/tectech/loader/thing/MachineLoader.java @@ -1,326 +1,360 @@ -package com.github.technus.tectech.loader.thing; - -import com.github.technus.tectech.Reference; -import com.github.technus.tectech.compatibility.dreamcraft.NoDreamCraftMachineLoader; -import com.github.technus.tectech.compatibility.thaumcraft.thing.metaTileEntity.multi.GT_MetaTileEntity_EM_essentiaDequantizer; -import com.github.technus.tectech.compatibility.thaumcraft.thing.metaTileEntity.multi.GT_MetaTileEntity_EM_essentiaQuantizer; -import com.github.technus.tectech.thing.metaTileEntity.hatch.*; -import com.github.technus.tectech.thing.metaTileEntity.multi.*; -import com.github.technus.tectech.thing.metaTileEntity.multi.em_machine.GT_MetaTileEntity_EM_machine; -import com.github.technus.tectech.thing.metaTileEntity.pipe.GT_MetaTileEntity_Pipe_Data; -import com.github.technus.tectech.thing.metaTileEntity.pipe.GT_MetaTileEntity_Pipe_EM; -import com.github.technus.tectech.thing.metaTileEntity.single.*; -import cpw.mods.fml.common.Loader; - -import static com.github.technus.tectech.thing.CustomItemList.*; - -/** - * Created by danie_000 on 16.11.2016. - */ -public class MachineLoader implements Runnable { - @Override - public void run() { - // =================================================================================================== - // eM IN - // =================================================================================================== - - eM_in_UV.set(new GT_MetaTileEntity_Hatch_InputElemental( - 15000, "hatch.emin.tier.08", "UV Elemental Input Hatch", 8).getStackForm(1L)); - - eM_in_UHV.set(new GT_MetaTileEntity_Hatch_InputElemental( - 15001, "hatch.emin.tier.09", "UHV Elemental Input Hatch", 9).getStackForm(1L)); - - eM_in_UEV.set(new GT_MetaTileEntity_Hatch_InputElemental( - 15002, "hatch.emin.tier.10", "UEV Elemental Input Hatch", 10).getStackForm(1L)); - - eM_in_UIV.set(new GT_MetaTileEntity_Hatch_InputElemental( - 15003, "hatch.emin.tier.11", "UIV Elemental Input Hatch", 11).getStackForm(1L)); - - eM_in_UMV.set(new GT_MetaTileEntity_Hatch_InputElemental( - 15004, "hatch.emin.tier.12", "UMV Elemental Input Hatch", 12).getStackForm(1L)); - - eM_in_UXV.set(new GT_MetaTileEntity_Hatch_InputElemental( - 15005, "hatch.emin.tier.13", "UXV Elemental Input Hatch", 13).getStackForm(1L)); - - // =================================================================================================== - // eM OUT - // =================================================================================================== - - eM_out_UV.set(new GT_MetaTileEntity_Hatch_OutputElemental( - 15010, "hatch.emout.tier.08", "UV Elemental Output Hatch", 8).getStackForm(1L)); - - eM_out_UHV.set(new GT_MetaTileEntity_Hatch_OutputElemental( - 15011, "hatch.emout.tier.09", "UHV Elemental Output Hatch", 9).getStackForm(1L)); - - eM_out_UEV.set(new GT_MetaTileEntity_Hatch_OutputElemental( - 15012, "hatch.emout.tier.10", "UEV Elemental Output Hatch", 10).getStackForm(1L)); - - eM_out_UIV.set(new GT_MetaTileEntity_Hatch_OutputElemental( - 15013, "hatch.emout.tier.11", "UIV Elemental Output Hatch", 11).getStackForm(1L)); - - eM_out_UMV.set(new GT_MetaTileEntity_Hatch_OutputElemental( - 15014, "hatch.emout.tier.12", "UMV Elemental Output Hatch", 12).getStackForm(1L)); - - eM_out_UXV.set(new GT_MetaTileEntity_Hatch_OutputElemental( - 15015, "hatch.emout.tier.13", "UXV Elemental Output Hatch", 13).getStackForm(1L)); - - // =================================================================================================== - // eM Waste OUT - // =================================================================================================== - - eM_muffler_UV.set(new GT_MetaTileEntity_Hatch_OverflowElemental( - 15020, "hatch.emmuffler.tier.08", "UV Overflow Output Hatch", 8, 1e10f).getStackForm(1L)); - - eM_muffler_UHV.set(new GT_MetaTileEntity_Hatch_OverflowElemental( - 15021, "hatch.emmuffler.tier.09", "UHV Overflow Output Hatch", 9, 5e10f).getStackForm(1L)); - - eM_muffler_UEV.set(new GT_MetaTileEntity_Hatch_OverflowElemental( - 15022, "hatch.emmuffler.tier.10", "UEV Overflow Output Hatch", 10, 25e10f).getStackForm(1L)); - - eM_muffler_UIV.set(new GT_MetaTileEntity_Hatch_OverflowElemental( - 15023, "hatch.emmuffler.tier.11", "UIV Overflow Output Hatch", 11, 125e10f).getStackForm(1L)); - - eM_muffler_UMV.set(new GT_MetaTileEntity_Hatch_OverflowElemental( - 15024, "hatch.emmuffler.tier.12", "UMV Overflow Output Hatch", 12, 125e11f).getStackForm(1L)); - - eM_muffler_UXV.set(new GT_MetaTileEntity_Hatch_OverflowElemental( - 15025, "hatch.emmuffler.tier.13", "UXV Overflow Output Hatch", 13, 125e12f).getStackForm(1L)); - - // =================================================================================================== - // Multi AMP Power INPUTS - // =================================================================================================== - - eM_energymulti4_IV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( - 15100, "hatch.energymulti04.tier.05", "IV 4A Energy Hatch", 5, 4).getStackForm(1L)); - eM_energymulti16_IV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( - 15110, "hatch.energymulti16.tier.05", "IV 16A Energy Hatch", 5, 16).getStackForm(1L)); - eM_energymulti64_IV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( - 15120, "hatch.energymulti64.tier.05", "IV 64A Energy Hatch", 5, 64).getStackForm(1L)); - - eM_energymulti4_LuV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( - 15101, "hatch.energymulti04.tier.06", "LuV 4A Energy Hatch", 6, 4).getStackForm(1L)); - eM_energymulti16_LuV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( - 15111, "hatch.energymulti16.tier.06", "LuV 16A Energy Hatch", 6, 16).getStackForm(1L)); - eM_energymulti64_LuV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( - 15121, "hatch.energymulti64.tier.06", "LuV 64A Energy Hatch", 6, 64).getStackForm(1L)); - - eM_energymulti4_ZPM.set(new GT_MetaTileEntity_Hatch_EnergyMulti( - 15102, "hatch.energymulti04.tier.07", "ZPM 4A Energy Hatch", 7, 4).getStackForm(1L)); - eM_energymulti16_ZPM.set(new GT_MetaTileEntity_Hatch_EnergyMulti( - 15112, "hatch.energymulti16.tier.07", "ZPM 16A Energy Hatch", 7, 16).getStackForm(1L)); - eM_energymulti64_ZPM.set(new GT_MetaTileEntity_Hatch_EnergyMulti( - 15122, "hatch.energymulti64.tier.07", "ZPM 64A Energy Hatch", 7, 64).getStackForm(1L)); - - eM_energymulti4_UV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( - 15103, "hatch.energymulti04.tier.08", "UV 4A Energy Hatch", 8, 4).getStackForm(1L)); - eM_energymulti16_UV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( - 15113, "hatch.energymulti16.tier.08", "UV 16A Energy Hatch", 8, 16).getStackForm(1L)); - eM_energymulti64_UV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( - 15123, "hatch.energymulti64.tier.08", "UV 64A Energy Hatch", 8, 64).getStackForm(1L)); - - eM_energymulti4_UHV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( - 15104, "hatch.energymulti04.tier.09", "UHV 4A Energy Hatch", 9, 4).getStackForm(1L)); - eM_energymulti16_UHV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( - 15114, "hatch.energymulti16.tier.09", "UHV 16A Energy Hatch", 9, 16).getStackForm(1L)); - eM_energymulti64_UHV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( - 15124, "hatch.energymulti64.tier.09", "UHV 64A Energy Hatch", 9, 64).getStackForm(1L)); - - eM_energymulti4_UEV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( - 15105, "hatch.energymulti04.tier.10", "UEV 4A Energy Hatch", 10, 4).getStackForm(1L)); - eM_energymulti16_UEV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( - 15115, "hatch.energymulti16.tier.10", "UEV 16A Energy Hatch", 10, 16).getStackForm(1L)); - eM_energymulti64_UEV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( - 15125, "hatch.energymulti64.tier.10", "UEV 64A Energy Hatch", 10, 64).getStackForm(1L)); - - eM_energymulti4_UIV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( - 15106, "hatch.energymulti04.tier.11", "UIV 4A Energy Hatch", 11, 4).getStackForm(1L)); - eM_energymulti16_UIV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( - 15116, "hatch.energymulti16.tier.11", "UIV 16A Energy Hatch", 11, 16).getStackForm(1L)); - eM_energymulti64_UIV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( - 15126, "hatch.energymulti64.tier.11", "UIV 64A Energy Hatch", 11, 64).getStackForm(1L)); - - eM_energymulti4_UMV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( - 15107, "hatch.energymulti04.tier.12", "UMV 4A Energy Hatch", 12, 4).getStackForm(1L)); - eM_energymulti16_UMV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( - 15117, "hatch.energymulti16.tier.12", "UMV 16A Energy Hatch", 12, 16).getStackForm(1L)); - eM_energymulti64_UMV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( - 15127, "hatch.energymulti64.tier.12", "UMV 64A Energy Hatch", 12, 64).getStackForm(1L)); - - eM_energymulti4_UXV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( - 15108, "hatch.energymulti04.tier.13", "UXV 4A Energy Hatch", 13, 4).getStackForm(1L)); - eM_energymulti16_UXV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( - 15118, "hatch.energymulti16.tier.13", "UXV 16A Energy Hatch", 13, 16).getStackForm(1L)); - eM_energymulti64_UXV.set(new GT_MetaTileEntity_Hatch_EnergyMulti( - 15128, "hatch.energymulti64.tier.13", "UXV 64A Energy Hatch", 13, 64).getStackForm(1L)); - - // =================================================================================================== - // Multi AMP Power OUTPUTS - // =================================================================================================== - - - eM_dynamomulti4_IV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( - 15200, "hatch.dynamomulti04.tier.05", "IV 4A Dynamo Hatch", 5, 4).getStackForm(1L)); - eM_dynamomulti16_IV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( - 15210, "hatch.dynamomulti16.tier.05", "IV 16A Dynamo Hatch", 5, 16).getStackForm(1L)); - eM_dynamomulti64_IV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( - 15220, "hatch.dynamomulti64.tier.05", "IV 64A Dynamo Hatch", 5, 64).getStackForm(1L)); - - eM_dynamomulti4_LuV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( - 15201, "hatch.dynamomulti04.tier.06", "LuV 4A Dynamo Hatch", 6, 4).getStackForm(1L)); - eM_dynamomulti16_LuV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( - 15211, "hatch.dynamomulti16.tier.06", "LuV 16A Dynamo Hatch", 6, 16).getStackForm(1L)); - eM_dynamomulti64_LuV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( - 15221, "hatch.dynamomulti64.tier.06", "LuV 64A Dynamo Hatch", 6, 64).getStackForm(1L)); - - eM_dynamomulti4_ZPM.set(new GT_MetaTileEntity_Hatch_DynamoMulti( - 15202, "hatch.dynamomulti04.tier.07", "ZPM 4A Dynamo Hatch", 7, 4).getStackForm(1L)); - eM_dynamomulti16_ZPM.set(new GT_MetaTileEntity_Hatch_DynamoMulti( - 15212, "hatch.dynamomulti16.tier.07", "ZPM 16A Dynamo Hatch", 7, 16).getStackForm(1L)); - eM_dynamomulti64_ZPM.set(new GT_MetaTileEntity_Hatch_DynamoMulti( - 15222, "hatch.dynamomulti64.tier.07", "ZPM 64A Dynamo Hatch", 7, 64).getStackForm(1L)); - - eM_dynamomulti4_UV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( - 15203, "hatch.dynamomulti04.tier.08", "UV 4A Dynamo Hatch", 8, 4).getStackForm(1L)); - eM_dynamomulti16_UV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( - 15213, "hatch.dynamomulti16.tier.08", "UV 16A Dynamo Hatch", 8, 16).getStackForm(1L)); - eM_dynamomulti64_UV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( - 15223, "hatch.dynamomulti64.tier.08", "UV 64A Dynamo Hatch", 8, 64).getStackForm(1L)); - - eM_dynamomulti4_UHV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( - 15204, "hatch.dynamomulti04.tier.09", "UHV 4A Dynamo Hatch", 9, 4).getStackForm(1L)); - eM_dynamomulti16_UHV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( - 15214, "hatch.dynamomulti16.tier.09", "UHV 16A Dynamo Hatch", 9, 16).getStackForm(1L)); - eM_dynamomulti64_UHV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( - 15224, "hatch.dynamomulti64.tier.09", "UHV 64A Dynamo Hatch", 9, 64).getStackForm(1L)); - - eM_dynamomulti4_UEV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( - 15205, "hatch.dynamomulti04.tier.10", "UEV 4A Dynamo Hatch", 10, 4).getStackForm(1L)); - eM_dynamomulti16_UEV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( - 15215, "hatch.dynamomulti16.tier.10", "UEV 16A Dynamo Hatch", 10, 16).getStackForm(1L)); - eM_dynamomulti64_UEV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( - 15225, "hatch.dynamomulti64.tier.10", "UEV 64A Dynamo Hatch", 10, 64).getStackForm(1L)); - - eM_dynamomulti4_UIV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( - 15206, "hatch.dynamomulti04.tier.11", "UIV 4A Dynamo Hatch", 11, 4).getStackForm(1L)); - eM_dynamomulti16_UIV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( - 15216, "hatch.dynamomulti16.tier.11", "UIV 16A Dynamo Hatch", 11, 16).getStackForm(1L)); - eM_dynamomulti64_UIV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( - 15226, "hatch.dynamomulti64.tier.11", "UIV 64A Dynamo Hatch", 11, 64).getStackForm(1L)); - - eM_dynamomulti4_UMV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( - 15207, "hatch.dynamomulti04.tier.12", "UMV 4A Dynamo Hatch", 12, 4).getStackForm(1L)); - eM_dynamomulti16_UMV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( - 15217, "hatch.dynamomulti16.tier.12", "UMV 16A Dynamo Hatch", 12, 16).getStackForm(1L)); - eM_dynamomulti64_UMV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( - 15227, "hatch.dynamomulti64.tier.12", "UMV 64A Dynamo Hatch", 12, 64).getStackForm(1L)); - - eM_dynamomulti4_UXV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( - 15208, "hatch.dynamomulti04.tier.13", "UXV 4A Dynamo Hatch", 13, 4).getStackForm(1L)); - eM_dynamomulti16_UXV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( - 15218, "hatch.dynamomulti16.tier.13", "UXV 16A Dynamo Hatch", 13, 16).getStackForm(1L)); - eM_dynamomulti64_UXV.set(new GT_MetaTileEntity_Hatch_DynamoMulti( - 15228, "hatch.dynamomulti64.tier.13", "UXV 64A Dynamo Hatch", 13, 64).getStackForm(1L)); - - // =================================================================================================== - // MULTIBLOCKS - // =================================================================================================== - - Machine_Multi_Transformer.set(new GT_MetaTileEntity_EM_transformer(15300, "multimachine.em.transformer", "Active Transformer").getStackForm(1L)); - - Machine_Multi_Switch.set(new GT_MetaTileEntity_EM_switch(15310, "multimachine.em.switch", "Network Switch With QoS").getStackForm(1L)); - Machine_Multi_Computer.set(new GT_MetaTileEntity_EM_computer(15311, "multimachine.em.computer", "Quantum Computer").getStackForm(1L)); - Machine_Multi_Microwave.set(new GT_MetaTileEntity_TM_microwave(15312, "multimachine.tm.microwave", "Microwave Grinder").getStackForm(1L)); - Machine_Multi_DataBank.set(new GT_MetaTileEntity_EM_dataBank(15313, "multimachine.em.databank", "Data Bank").getStackForm(1L)); - Machine_Multi_teslaCoil.set(new GT_MetaTileEntity_TM_teslaCoil(15314, "multimachine.tm.teslaCoil", "Tesla Coil").getStackForm(1L)); - - Machine_Multi_EMjunction.set(new GT_MetaTileEntity_EM_junction(15320, "multimachine.em.junction", "Matter Junction").getStackForm(1L)); - Machine_Multi_MatterToEM.set(new GT_MetaTileEntity_EM_quantizer(15321, "multimachine.em.mattertoem", "Matter Quantizer").getStackForm(1L)); - Machine_Multi_EMToMatter.set(new GT_MetaTileEntity_EM_dequantizer(15322, "multimachine.em.emtomatter", "Matter Dequantizer").getStackForm(1L)); - - // COMPAT - Machine_Multi_EssentiaToEM.set(new GT_MetaTileEntity_EM_essentiaQuantizer(15323, "multimachine.em.essentiatoem", "Essentia Quantizer").getStackForm(1L)); - Machine_Multi_EMToEssentia.set(new GT_MetaTileEntity_EM_essentiaDequantizer(15324, "multimachine.em.emtoessentia", "Essentia Dequantizer").getStackForm(1L)); - - Machine_Multi_Scanner.set(new GT_MetaTileEntity_EM_scanner(15330, "multimachine.em.scanner", "Elemental Scanner").getStackForm(1L)); - Machine_Multi_Research.set(new GT_MetaTileEntity_EM_research(15331, "multimachine.em.research", "Research station").getStackForm(1L)); - - Machine_Multi_Collider.set(new GT_MetaTileEntity_EM_collider(15340, "multimachine.em.collider", "Matter Collider").getStackForm(1L)); - - Machine_Multi_Infuser.set(new GT_MetaTileEntity_EM_infuser(15350, "multimachine.em.infuser", "Energy Infuser").getStackForm(1)); - - Machine_Multi_EMmachine.set(new GT_MetaTileEntity_EM_machine(15360, "multimachine.em.processing", "Quantum Processing Machine").getStackForm(1L)); - - Machine_Multi_EMCrafter.set(new GT_MetaTileEntity_EM_crafting(15370, "multimachine.em.crafter", "Matter Assembler").getStackForm(1L)); - - Machine_Multi_Stabilizer.set(new GT_MetaTileEntity_EM_stabilizer(15380, "multimachine.em.stabilizer", "Elemental Stabilizer").getStackForm(1L)); - - Machine_Multi_Wormhole.set(new GT_MetaTileEntity_EM_wormhole(15390, "multimachine.em.wormhole", "Wormhole").getStackForm(1L)); - - Machine_Multi_Decay.set(new GT_MetaTileEntity_EM_decay(15400, "multimachine.em.decay", "Decay Generator").getStackForm(1L)); - Machine_Multi_Annihilation.set(new GT_MetaTileEntity_EM_annihilation(15405, "multimachine.em.annihilation", "Annihilation Generator").getStackForm(1L)); - Machine_Multi_BHG.set(new GT_MetaTileEntity_EM_bhg(15410, "multimachine.em.blackholegenerator", "Black Hole Generator").getStackForm(1L)); - - // =================================================================================================== - // Hatches - // =================================================================================================== - - Parametrizer_Hatch.set(new GT_MetaTileEntity_Hatch_Param(15420, "hatch.param.tier.07", "Parametrizer", 7).getStackForm(1L)); - ParametrizerX_Hatch.set(new GT_MetaTileEntity_Hatch_Param(15421, "hatch.param.tier.10", "Parametrizer X", 10).getStackForm(1L)); - - Uncertainty_Hatch.set(new GT_MetaTileEntity_Hatch_Uncertainty(15430, "hatch.certain.tier.07", "Uncertainty Resolver", 7).getStackForm(1L)); - UncertaintyX_Hatch.set(new GT_MetaTileEntity_Hatch_Uncertainty(15431, "hatch.certain.tier.10", "Uncertainty Resolver X", 10).getStackForm(1L)); - - dataIn_Hatch.set(new GT_MetaTileEntity_Hatch_InputData(15440, "hatch.datain.tier.07", "Optical Slave Connector", 7).getStackForm(1L)); - dataOut_Hatch.set(new GT_MetaTileEntity_Hatch_OutputData(15441, "hatch.dataout.tier.07", "Optical Master Connector", 7).getStackForm(1L)); - dataInAss_Hatch.set(new GT_MetaTileEntity_Hatch_InputDataItems(15442, "hatch.datainass.tier.07", "Assembly line Slave Connector", 7).getStackForm(1L)); - dataOutAss_Hatch.set(new GT_MetaTileEntity_Hatch_OutputDataItems(15443, "hatch.dataoutass.tier.07", "Data Bank Master Connector", 7).getStackForm(1L)); - - rack_Hatch.set(new GT_MetaTileEntity_Hatch_Rack(15450, "hatch.rack.tier.08", "Computer Rack", 8, "4 Slot Rack").getStackForm(1L)); - holder_Hatch.set(new GT_MetaTileEntity_Hatch_Holder(15451, "hatch.holder.tier.09", "Object Holder", 8, "For Research Station").getStackForm(1L)); - - capacitor_Hatch.set(new GT_MetaTileEntity_Hatch_Capacitor(15452, "hatch.capacitor.tier.05", "Capacitor Hatch", 5, "For Tesla Coil").getStackForm(1L)); - - // =================================================================================================== - // Pipes - // =================================================================================================== - - EMpipe.set(new GT_MetaTileEntity_Pipe_EM(15460, "pipe.elementalmatter", "Quantum \"Tunnel\"").getStackForm(1L)); - - DATApipe.set(new GT_MetaTileEntity_Pipe_Data(15470, "pipe.datastream", "Optical Fiber Cable").getStackForm(1L)); - - // =================================================================================================== - // Single Blocks - // =================================================================================================== - - Machine_OwnerDetector.set(new GT_MetaTileEntity_OwnerDetector(15480, "machine.tt.ownerdetector", "Owner detector", 3).getStackForm(1L)); - Machine_DataReader.set(new GT_MetaTileEntity_DataReader(15481, "machine.tt.datareader", "Data Reader", 5).getStackForm(1L)); - - Machine_BuckConverter_IV.set(new GT_MetaTileEntity_BuckConverter(15485, "machine.tt.buck.05", "Insane Buck Converter", 5).getStackForm(1L)); - Machine_BuckConverter_LuV.set(new GT_MetaTileEntity_BuckConverter(15486, "machine.tt.buck.06", "Ludicrous Buck Converter", 6).getStackForm(1L)); - Machine_BuckConverter_ZPM.set(new GT_MetaTileEntity_BuckConverter(15487, "machine.tt.buck.07", "ZPM Voltage Buck Converter", 7).getStackForm(1L)); - Machine_BuckConverter_UV.set(new GT_MetaTileEntity_BuckConverter(15488, "machine.tt.buck.08", "Ultimate Power Buck Converter", 8).getStackForm(1L)); - Machine_BuckConverter_UHV.set(new GT_MetaTileEntity_BuckConverter(15489, "machine.tt.buck.09", "Highly Ultimate Buck Converter", 9).getStackForm(1L)); - Machine_BuckConverter_UEV.set(new GT_MetaTileEntity_BuckConverter(15490, "machine.tt.buck.10", "Extremely Ultimate Buck Converter", 10).getStackForm(1L)); - Machine_BuckConverter_UIV.set(new GT_MetaTileEntity_BuckConverter(15491, "machine.tt.buck.11", "Insanely Ultimate Buck Converter", 11).getStackForm(1L)); - Machine_BuckConverter_UMV.set(new GT_MetaTileEntity_BuckConverter(15492, "machine.tt.buck.12", "Mega Ultimate Buck Converter", 12).getStackForm(1L)); - Machine_BuckConverter_UXV.set(new GT_MetaTileEntity_BuckConverter(15493, "machine.tt.buck.13", "Extended Mega Ultimate Buck Converter", 13).getStackForm(1L)); - - // =================================================================================================== - // Debug Stuff - // =================================================================================================== - hatch_CreativeMaitenance.set(new GT_MetaTileEntity_Hatch_CreativeMaintenance(15497, "debug.tt.maintenance", "Debug Maintenance Hatch", 15).getStackForm(1L)); - Machine_DebugGenny.set(new GT_MetaTileEntity_DebugPowerGenerator(15498, "debug.tt.genny", "Debug Power Generator", 15).getStackForm(1L)); - Machine_DebugWriter.set(new GT_MetaTileEntity_DebugStructureWriter(15499, "debug.tt.writer", "Debug Structure Writer", 15).getStackForm(1L)); - - // =================================================================================================== - // MetaTE init - // =================================================================================================== - - GT_MetaTileEntity_Hatch_Rack.run(); - GT_MetaTileEntity_DataReader.run(); - - if (!Loader.isModLoaded(Reference.DREAMCRAFT)) { - new NoDreamCraftMachineLoader().run(); - } - } -} +package com.github.technus.tectech.loader.thing;
+
+import com.github.technus.tectech.Reference;
+import com.github.technus.tectech.compatibility.dreamcraft.NoDreamCraftMachineLoader;
+import com.github.technus.tectech.compatibility.thaumcraft.thing.metaTileEntity.multi.GT_MetaTileEntity_EM_essentiaDequantizer;
+import com.github.technus.tectech.compatibility.thaumcraft.thing.metaTileEntity.multi.GT_MetaTileEntity_EM_essentiaQuantizer;
+import com.github.technus.tectech.thing.metaTileEntity.hatch.*;
+import com.github.technus.tectech.thing.metaTileEntity.multi.*;
+import com.github.technus.tectech.thing.metaTileEntity.multi.em_machine.GT_MetaTileEntity_EM_machine;
+import com.github.technus.tectech.thing.metaTileEntity.pipe.GT_MetaTileEntity_Pipe_Data;
+import com.github.technus.tectech.thing.metaTileEntity.pipe.GT_MetaTileEntity_Pipe_EM;
+import com.github.technus.tectech.thing.metaTileEntity.single.*;
+import cpw.mods.fml.common.Loader;
+
+import static com.github.technus.tectech.thing.CustomItemList.*;
+
+/**
+ * Created by danie_000 on 16.11.2016.
+ */
+public class MachineLoader implements Runnable {
+ @Override
+ public void run() {
+ // ===================================================================================================
+ // eM IN
+ // ===================================================================================================
+
+ eM_in_UV.set(new GT_MetaTileEntity_Hatch_InputElemental(
+ 15000, "hatch.emin.tier.08", "UV Elemental Input Hatch", 8).getStackForm(1L));
+
+ eM_in_UHV.set(new GT_MetaTileEntity_Hatch_InputElemental(
+ 15001, "hatch.emin.tier.09", "UHV Elemental Input Hatch", 9).getStackForm(1L));
+
+ eM_in_UEV.set(new GT_MetaTileEntity_Hatch_InputElemental(
+ 15002, "hatch.emin.tier.10", "UEV Elemental Input Hatch", 10).getStackForm(1L));
+
+ eM_in_UIV.set(new GT_MetaTileEntity_Hatch_InputElemental(
+ 15003, "hatch.emin.tier.11", "UIV Elemental Input Hatch", 11).getStackForm(1L));
+
+ eM_in_UMV.set(new GT_MetaTileEntity_Hatch_InputElemental(
+ 15004, "hatch.emin.tier.12", "UMV Elemental Input Hatch", 12).getStackForm(1L));
+
+ eM_in_UXV.set(new GT_MetaTileEntity_Hatch_InputElemental(
+ 15005, "hatch.emin.tier.13", "UXV Elemental Input Hatch", 13).getStackForm(1L));
+
+ // ===================================================================================================
+ // eM OUT
+ // ===================================================================================================
+
+ eM_out_UV.set(new GT_MetaTileEntity_Hatch_OutputElemental(
+ 15010, "hatch.emout.tier.08", "UV Elemental Output Hatch", 8).getStackForm(1L));
+
+ eM_out_UHV.set(new GT_MetaTileEntity_Hatch_OutputElemental(
+ 15011, "hatch.emout.tier.09", "UHV Elemental Output Hatch", 9).getStackForm(1L));
+
+ eM_out_UEV.set(new GT_MetaTileEntity_Hatch_OutputElemental(
+ 15012, "hatch.emout.tier.10", "UEV Elemental Output Hatch", 10).getStackForm(1L));
+
+ eM_out_UIV.set(new GT_MetaTileEntity_Hatch_OutputElemental(
+ 15013, "hatch.emout.tier.11", "UIV Elemental Output Hatch", 11).getStackForm(1L));
+
+ eM_out_UMV.set(new GT_MetaTileEntity_Hatch_OutputElemental(
+ 15014, "hatch.emout.tier.12", "UMV Elemental Output Hatch", 12).getStackForm(1L));
+
+ eM_out_UXV.set(new GT_MetaTileEntity_Hatch_OutputElemental(
+ 15015, "hatch.emout.tier.13", "UXV Elemental Output Hatch", 13).getStackForm(1L));
+
+ // ===================================================================================================
+ // eM Waste OUT
+ // ===================================================================================================
+
+ eM_muffler_UV.set(new GT_MetaTileEntity_Hatch_OverflowElemental(
+ 15020, "hatch.emmuffler.tier.08", "UV Overflow Output Hatch", 8, 1e10f).getStackForm(1L));
+
+ eM_muffler_UHV.set(new GT_MetaTileEntity_Hatch_OverflowElemental(
+ 15021, "hatch.emmuffler.tier.09", "UHV Overflow Output Hatch", 9, 5e10f).getStackForm(1L));
+
+ eM_muffler_UEV.set(new GT_MetaTileEntity_Hatch_OverflowElemental(
+ 15022, "hatch.emmuffler.tier.10", "UEV Overflow Output Hatch", 10, 25e10f).getStackForm(1L));
+
+ eM_muffler_UIV.set(new GT_MetaTileEntity_Hatch_OverflowElemental(
+ 15023, "hatch.emmuffler.tier.11", "UIV Overflow Output Hatch", 11, 125e10f).getStackForm(1L));
+
+ eM_muffler_UMV.set(new GT_MetaTileEntity_Hatch_OverflowElemental(
+ 15024, "hatch.emmuffler.tier.12", "UMV Overflow Output Hatch", 12, 125e11f).getStackForm(1L));
+
+ eM_muffler_UXV.set(new GT_MetaTileEntity_Hatch_OverflowElemental(
+ 15025, "hatch.emmuffler.tier.13", "UXV Overflow Output Hatch", 13, 125e12f).getStackForm(1L));
+
+ // ===================================================================================================
+ // Multi AMP Power INPUTS
+ // ===================================================================================================
+
+ eM_energymulti4_IV.set(new GT_MetaTileEntity_Hatch_EnergyMulti(
+ 15100, "hatch.energymulti04.tier.05", "IV 4A Energy Hatch", 5, 4).getStackForm(1L));
+ eM_energymulti16_IV.set(new GT_MetaTileEntity_Hatch_EnergyMulti(
+ 15110, "hatch.energymulti16.tier.05", "IV 16A Energy Hatch", 5, 16).getStackForm(1L));
+ eM_energymulti64_IV.set(new GT_MetaTileEntity_Hatch_EnergyMulti(
+ 15120, "hatch.energymulti64.tier.05", "IV 64A Energy Hatch", 5, 64).getStackForm(1L));
+
+ eM_energymulti4_LuV.set(new GT_MetaTileEntity_Hatch_EnergyMulti(
+ 15101, "hatch.energymulti04.tier.06", "LuV 4A Energy Hatch", 6, 4).getStackForm(1L));
+ eM_energymulti16_LuV.set(new GT_MetaTileEntity_Hatch_EnergyMulti(
+ 15111, "hatch.energymulti16.tier.06", "LuV 16A Energy Hatch", 6, 16).getStackForm(1L));
+ eM_energymulti64_LuV.set(new GT_MetaTileEntity_Hatch_EnergyMulti(
+ 15121, "hatch.energymulti64.tier.06", "LuV 64A Energy Hatch", 6, 64).getStackForm(1L));
+
+ eM_energymulti4_ZPM.set(new GT_MetaTileEntity_Hatch_EnergyMulti(
+ 15102, "hatch.energymulti04.tier.07", "ZPM 4A Energy Hatch", 7, 4).getStackForm(1L));
+ eM_energymulti16_ZPM.set(new GT_MetaTileEntity_Hatch_EnergyMulti(
+ 15112, "hatch.energymulti16.tier.07", "ZPM 16A Energy Hatch", 7, 16).getStackForm(1L));
+ eM_energymulti64_ZPM.set(new GT_MetaTileEntity_Hatch_EnergyMulti(
+ 15122, "hatch.energymulti64.tier.07", "ZPM 64A Energy Hatch", 7, 64).getStackForm(1L));
+
+ eM_energymulti4_UV.set(new GT_MetaTileEntity_Hatch_EnergyMulti(
+ 15103, "hatch.energymulti04.tier.08", "UV 4A Energy Hatch", 8, 4).getStackForm(1L));
+ eM_energymulti16_UV.set(new GT_MetaTileEntity_Hatch_EnergyMulti(
+ 15113, "hatch.energymulti16.tier.08", "UV 16A Energy Hatch", 8, 16).getStackForm(1L));
+ eM_energymulti64_UV.set(new GT_MetaTileEntity_Hatch_EnergyMulti(
+ 15123, "hatch.energymulti64.tier.08", "UV 64A Energy Hatch", 8, 64).getStackForm(1L));
+
+ eM_energymulti4_UHV.set(new GT_MetaTileEntity_Hatch_EnergyMulti(
+ 15104, "hatch.energymulti04.tier.09", "UHV 4A Energy Hatch", 9, 4).getStackForm(1L));
+ eM_energymulti16_UHV.set(new GT_MetaTileEntity_Hatch_EnergyMulti(
+ 15114, "hatch.energymulti16.tier.09", "UHV 16A Energy Hatch", 9, 16).getStackForm(1L));
+ eM_energymulti64_UHV.set(new GT_MetaTileEntity_Hatch_EnergyMulti(
+ 15124, "hatch.energymulti64.tier.09", "UHV 64A Energy Hatch", 9, 64).getStackForm(1L));
+
+ eM_energymulti4_UEV.set(new GT_MetaTileEntity_Hatch_EnergyMulti(
+ 15105, "hatch.energymulti04.tier.10", "UEV 4A Energy Hatch", 10, 4).getStackForm(1L));
+ eM_energymulti16_UEV.set(new GT_MetaTileEntity_Hatch_EnergyMulti(
+ 15115, "hatch.energymulti16.tier.10", "UEV 16A Energy Hatch", 10, 16).getStackForm(1L));
+ eM_energymulti64_UEV.set(new GT_MetaTileEntity_Hatch_EnergyMulti(
+ 15125, "hatch.energymulti64.tier.10", "UEV 64A Energy Hatch", 10, 64).getStackForm(1L));
+
+ eM_energymulti4_UIV.set(new GT_MetaTileEntity_Hatch_EnergyMulti(
+ 15106, "hatch.energymulti04.tier.11", "UIV 4A Energy Hatch", 11, 4).getStackForm(1L));
+ eM_energymulti16_UIV.set(new GT_MetaTileEntity_Hatch_EnergyMulti(
+ 15116, "hatch.energymulti16.tier.11", "UIV 16A Energy Hatch", 11, 16).getStackForm(1L));
+ eM_energymulti64_UIV.set(new GT_MetaTileEntity_Hatch_EnergyMulti(
+ 15126, "hatch.energymulti64.tier.11", "UIV 64A Energy Hatch", 11, 64).getStackForm(1L));
+
+ eM_energymulti4_UMV.set(new GT_MetaTileEntity_Hatch_EnergyMulti(
+ 15107, "hatch.energymulti04.tier.12", "UMV 4A Energy Hatch", 12, 4).getStackForm(1L));
+ eM_energymulti16_UMV.set(new GT_MetaTileEntity_Hatch_EnergyMulti(
+ 15117, "hatch.energymulti16.tier.12", "UMV 16A Energy Hatch", 12, 16).getStackForm(1L));
+ eM_energymulti64_UMV.set(new GT_MetaTileEntity_Hatch_EnergyMulti(
+ 15127, "hatch.energymulti64.tier.12", "UMV 64A Energy Hatch", 12, 64).getStackForm(1L));
+
+ eM_energymulti4_UXV.set(new GT_MetaTileEntity_Hatch_EnergyMulti(
+ 15108, "hatch.energymulti04.tier.13", "UXV 4A Energy Hatch", 13, 4).getStackForm(1L));
+ eM_energymulti16_UXV.set(new GT_MetaTileEntity_Hatch_EnergyMulti(
+ 15118, "hatch.energymulti16.tier.13", "UXV 16A Energy Hatch", 13, 16).getStackForm(1L));
+ eM_energymulti64_UXV.set(new GT_MetaTileEntity_Hatch_EnergyMulti(
+ 15128, "hatch.energymulti64.tier.13", "UXV 64A Energy Hatch", 13, 64).getStackForm(1L));
+
+ // ===================================================================================================
+ // Multi AMP Power OUTPUTS
+ // ===================================================================================================
+
+
+ eM_dynamomulti4_IV.set(new GT_MetaTileEntity_Hatch_DynamoMulti(
+ 15200, "hatch.dynamomulti04.tier.05", "IV 4A Dynamo Hatch", 5, 4).getStackForm(1L));
+ eM_dynamomulti16_IV.set(new GT_MetaTileEntity_Hatch_DynamoMulti(
+ 15210, "hatch.dynamomulti16.tier.05", "IV 16A Dynamo Hatch", 5, 16).getStackForm(1L));
+ eM_dynamomulti64_IV.set(new GT_MetaTileEntity_Hatch_DynamoMulti(
+ 15220, "hatch.dynamomulti64.tier.05", "IV 64A Dynamo Hatch", 5, 64).getStackForm(1L));
+
+ eM_dynamomulti4_LuV.set(new GT_MetaTileEntity_Hatch_DynamoMulti(
+ 15201, "hatch.dynamomulti04.tier.06", "LuV 4A Dynamo Hatch", 6, 4).getStackForm(1L));
+ eM_dynamomulti16_LuV.set(new GT_MetaTileEntity_Hatch_DynamoMulti(
+ 15211, "hatch.dynamomulti16.tier.06", "LuV 16A Dynamo Hatch", 6, 16).getStackForm(1L));
+ eM_dynamomulti64_LuV.set(new GT_MetaTileEntity_Hatch_DynamoMulti(
+ 15221, "hatch.dynamomulti64.tier.06", "LuV 64A Dynamo Hatch", 6, 64).getStackForm(1L));
+
+ eM_dynamomulti4_ZPM.set(new GT_MetaTileEntity_Hatch_DynamoMulti(
+ 15202, "hatch.dynamomulti04.tier.07", "ZPM 4A Dynamo Hatch", 7, 4).getStackForm(1L));
+ eM_dynamomulti16_ZPM.set(new GT_MetaTileEntity_Hatch_DynamoMulti(
+ 15212, "hatch.dynamomulti16.tier.07", "ZPM 16A Dynamo Hatch", 7, 16).getStackForm(1L));
+ eM_dynamomulti64_ZPM.set(new GT_MetaTileEntity_Hatch_DynamoMulti(
+ 15222, "hatch.dynamomulti64.tier.07", "ZPM 64A Dynamo Hatch", 7, 64).getStackForm(1L));
+
+ eM_dynamomulti4_UV.set(new GT_MetaTileEntity_Hatch_DynamoMulti(
+ 15203, "hatch.dynamomulti04.tier.08", "UV 4A Dynamo Hatch", 8, 4).getStackForm(1L));
+ eM_dynamomulti16_UV.set(new GT_MetaTileEntity_Hatch_DynamoMulti(
+ 15213, "hatch.dynamomulti16.tier.08", "UV 16A Dynamo Hatch", 8, 16).getStackForm(1L));
+ eM_dynamomulti64_UV.set(new GT_MetaTileEntity_Hatch_DynamoMulti(
+ 15223, "hatch.dynamomulti64.tier.08", "UV 64A Dynamo Hatch", 8, 64).getStackForm(1L));
+
+ eM_dynamomulti4_UHV.set(new GT_MetaTileEntity_Hatch_DynamoMulti(
+ 15204, "hatch.dynamomulti04.tier.09", "UHV 4A Dynamo Hatch", 9, 4).getStackForm(1L));
+ eM_dynamomulti16_UHV.set(new GT_MetaTileEntity_Hatch_DynamoMulti(
+ 15214, "hatch.dynamomulti16.tier.09", "UHV 16A Dynamo Hatch", 9, 16).getStackForm(1L));
+ eM_dynamomulti64_UHV.set(new GT_MetaTileEntity_Hatch_DynamoMulti(
+ 15224, "hatch.dynamomulti64.tier.09", "UHV 64A Dynamo Hatch", 9, 64).getStackForm(1L));
+
+ eM_dynamomulti4_UEV.set(new GT_MetaTileEntity_Hatch_DynamoMulti(
+ 15205, "hatch.dynamomulti04.tier.10", "UEV 4A Dynamo Hatch", 10, 4).getStackForm(1L));
+ eM_dynamomulti16_UEV.set(new GT_MetaTileEntity_Hatch_DynamoMulti(
+ 15215, "hatch.dynamomulti16.tier.10", "UEV 16A Dynamo Hatch", 10, 16).getStackForm(1L));
+ eM_dynamomulti64_UEV.set(new GT_MetaTileEntity_Hatch_DynamoMulti(
+ 15225, "hatch.dynamomulti64.tier.10", "UEV 64A Dynamo Hatch", 10, 64).getStackForm(1L));
+
+ eM_dynamomulti4_UIV.set(new GT_MetaTileEntity_Hatch_DynamoMulti(
+ 15206, "hatch.dynamomulti04.tier.11", "UIV 4A Dynamo Hatch", 11, 4).getStackForm(1L));
+ eM_dynamomulti16_UIV.set(new GT_MetaTileEntity_Hatch_DynamoMulti(
+ 15216, "hatch.dynamomulti16.tier.11", "UIV 16A Dynamo Hatch", 11, 16).getStackForm(1L));
+ eM_dynamomulti64_UIV.set(new GT_MetaTileEntity_Hatch_DynamoMulti(
+ 15226, "hatch.dynamomulti64.tier.11", "UIV 64A Dynamo Hatch", 11, 64).getStackForm(1L));
+
+ eM_dynamomulti4_UMV.set(new GT_MetaTileEntity_Hatch_DynamoMulti(
+ 15207, "hatch.dynamomulti04.tier.12", "UMV 4A Dynamo Hatch", 12, 4).getStackForm(1L));
+ eM_dynamomulti16_UMV.set(new GT_MetaTileEntity_Hatch_DynamoMulti(
+ 15217, "hatch.dynamomulti16.tier.12", "UMV 16A Dynamo Hatch", 12, 16).getStackForm(1L));
+ eM_dynamomulti64_UMV.set(new GT_MetaTileEntity_Hatch_DynamoMulti(
+ 15227, "hatch.dynamomulti64.tier.12", "UMV 64A Dynamo Hatch", 12, 64).getStackForm(1L));
+
+ eM_dynamomulti4_UXV.set(new GT_MetaTileEntity_Hatch_DynamoMulti(
+ 15208, "hatch.dynamomulti04.tier.13", "UXV 4A Dynamo Hatch", 13, 4).getStackForm(1L));
+ eM_dynamomulti16_UXV.set(new GT_MetaTileEntity_Hatch_DynamoMulti(
+ 15218, "hatch.dynamomulti16.tier.13", "UXV 16A Dynamo Hatch", 13, 16).getStackForm(1L));
+ eM_dynamomulti64_UXV.set(new GT_MetaTileEntity_Hatch_DynamoMulti(
+ 15228, "hatch.dynamomulti64.tier.13", "UXV 64A Dynamo Hatch", 13, 64).getStackForm(1L));
+
+ // ===================================================================================================
+ // MULTIBLOCKS
+ // ===================================================================================================
+
+ Machine_Multi_Transformer.set(new GT_MetaTileEntity_EM_transformer(15300, "multimachine.em.transformer", "Active Transformer").getStackForm(1L));
+
+ Machine_Multi_Switch.set(new GT_MetaTileEntity_EM_switch(15310, "multimachine.em.switch", "Network Switch With QoS").getStackForm(1L));
+ Machine_Multi_Computer.set(new GT_MetaTileEntity_EM_computer(15311, "multimachine.em.computer", "Quantum Computer").getStackForm(1L));
+ Machine_Multi_Microwave.set(new GT_MetaTileEntity_TM_microwave(15312, "multimachine.tm.microwave", "Microwave Grinder").getStackForm(1L));
+ Machine_Multi_DataBank.set(new GT_MetaTileEntity_EM_dataBank(15313, "multimachine.em.databank", "Data Bank").getStackForm(1L));
+ Machine_Multi_teslaCoil.set(new GT_MetaTileEntity_TM_teslaCoil(15314, "multimachine.tm.teslaCoil", "Tesla Coil").getStackForm(1L));
+
+ Machine_Multi_EMjunction.set(new GT_MetaTileEntity_EM_junction(15320, "multimachine.em.junction", "Matter Junction").getStackForm(1L));
+ Machine_Multi_MatterToEM.set(new GT_MetaTileEntity_EM_quantizer(15321, "multimachine.em.mattertoem", "Matter Quantizer").getStackForm(1L));
+ Machine_Multi_EMToMatter.set(new GT_MetaTileEntity_EM_dequantizer(15322, "multimachine.em.emtomatter", "Matter Dequantizer").getStackForm(1L));
+
+ // COMPAT
+ Machine_Multi_EssentiaToEM.set(new GT_MetaTileEntity_EM_essentiaQuantizer(15323, "multimachine.em.essentiatoem", "Essentia Quantizer").getStackForm(1L));
+ Machine_Multi_EMToEssentia.set(new GT_MetaTileEntity_EM_essentiaDequantizer(15324, "multimachine.em.emtoessentia", "Essentia Dequantizer").getStackForm(1L));
+
+ Machine_Multi_Scanner.set(new GT_MetaTileEntity_EM_scanner(15330, "multimachine.em.scanner", "Elemental Scanner").getStackForm(1L));
+ Machine_Multi_Research.set(new GT_MetaTileEntity_EM_research(15331, "multimachine.em.research", "Research station").getStackForm(1L));
+
+ Machine_Multi_Collider.set(new GT_MetaTileEntity_EM_collider(15340, "multimachine.em.collider", "Matter Collider").getStackForm(1L));
+
+ Machine_Multi_Infuser.set(new GT_MetaTileEntity_EM_infuser(15350, "multimachine.em.infuser", "Energy Infuser").getStackForm(1));
+
+ Machine_Multi_EMmachine.set(new GT_MetaTileEntity_EM_machine(15360, "multimachine.em.processing", "Quantum Processing Machine").getStackForm(1L));
+
+ Machine_Multi_EMCrafter.set(new GT_MetaTileEntity_EM_crafting(15370, "multimachine.em.crafter", "Matter Assembler").getStackForm(1L));
+
+ Machine_Multi_Stabilizer.set(new GT_MetaTileEntity_EM_stabilizer(15380, "multimachine.em.stabilizer", "Elemental Stabilizer").getStackForm(1L));
+
+ Machine_Multi_Wormhole.set(new GT_MetaTileEntity_EM_wormhole(15390, "multimachine.em.wormhole", "Wormhole").getStackForm(1L));
+
+ Machine_Multi_Decay.set(new GT_MetaTileEntity_EM_decay(15400, "multimachine.em.decay", "Decay Generator").getStackForm(1L));
+ Machine_Multi_Annihilation.set(new GT_MetaTileEntity_EM_annihilation(15405, "multimachine.em.annihilation", "Annihilation Generator").getStackForm(1L));
+ Machine_Multi_BHG.set(new GT_MetaTileEntity_EM_bhg(15410, "multimachine.em.blackholegenerator", "Black Hole Generator").getStackForm(1L));
+
+ // ===================================================================================================
+ // Hatches
+ // ===================================================================================================
+
+ Parametrizer_Hatch.set(new GT_MetaTileEntity_Hatch_Param(15420, "hatch.param.tier.07", "Parametrizer", 7).getStackForm(1L));
+ ParametrizerX_Hatch.set(new GT_MetaTileEntity_Hatch_Param(15421, "hatch.param.tier.10", "Parametrizer X", 10).getStackForm(1L));
+
+ Uncertainty_Hatch.set(new GT_MetaTileEntity_Hatch_Uncertainty(15430, "hatch.certain.tier.07", "Uncertainty Resolver", 7).getStackForm(1L));
+ UncertaintyX_Hatch.set(new GT_MetaTileEntity_Hatch_Uncertainty(15431, "hatch.certain.tier.10", "Uncertainty Resolver X", 10).getStackForm(1L));
+
+ dataIn_Hatch.set(new GT_MetaTileEntity_Hatch_InputData(15440, "hatch.datain.tier.07", "Optical Slave Connector", 7).getStackForm(1L));
+ dataOut_Hatch.set(new GT_MetaTileEntity_Hatch_OutputData(15441, "hatch.dataout.tier.07", "Optical Master Connector", 7).getStackForm(1L));
+ dataInAss_Hatch.set(new GT_MetaTileEntity_Hatch_InputDataItems(15442, "hatch.datainass.tier.07", "Assembly line Slave Connector", 7).getStackForm(1L));
+ dataOutAss_Hatch.set(new GT_MetaTileEntity_Hatch_OutputDataItems(15443, "hatch.dataoutass.tier.07", "Data Bank Master Connector", 7).getStackForm(1L));
+
+ rack_Hatch.set(new GT_MetaTileEntity_Hatch_Rack(15450, "hatch.rack.tier.08", "Computer Rack", 8, "4 Slot Rack").getStackForm(1L));
+ holder_Hatch.set(new GT_MetaTileEntity_Hatch_Holder(15451, "hatch.holder.tier.09", "Object Holder", 8, "For Research Station").getStackForm(1L));
+
+ capacitor_Hatch.set(new GT_MetaTileEntity_Hatch_Capacitor(15452, "hatch.capacitor.tier.05", "Capacitor Hatch", 5, "For Tesla Coil").getStackForm(1L));
+
+ // ===================================================================================================
+ // Pipes
+ // ===================================================================================================
+
+ EMpipe.set(new GT_MetaTileEntity_Pipe_EM(15460, "pipe.elementalmatter", "Quantum \"Tunnel\"").getStackForm(1L));
+
+ DATApipe.set(new GT_MetaTileEntity_Pipe_Data(15470, "pipe.datastream", "Optical Fiber Cable").getStackForm(1L));
+
+ // ===================================================================================================
+ // Single Blocks
+ // ===================================================================================================
+
+ Machine_OwnerDetector.set(new GT_MetaTileEntity_OwnerDetector(15480, "machine.tt.ownerdetector", "Owner detector", 3).getStackForm(1L));
+ Machine_DataReader.set(new GT_MetaTileEntity_DataReader(15481, "machine.tt.datareader", "Data Reader", 5).getStackForm(1L));
+
+ // ===================================================================================================
+ // Buck Converters
+ // ===================================================================================================
+
+ Machine_BuckConverter_IV.set(new GT_MetaTileEntity_BuckConverter(15485, "machine.tt.buck.05", "Insane Buck Converter", 5).getStackForm(1L));
+ Machine_BuckConverter_LuV.set(new GT_MetaTileEntity_BuckConverter(15486, "machine.tt.buck.06", "Ludicrous Buck Converter", 6).getStackForm(1L));
+ Machine_BuckConverter_ZPM.set(new GT_MetaTileEntity_BuckConverter(15487, "machine.tt.buck.07", "ZPM Voltage Buck Converter", 7).getStackForm(1L));
+ Machine_BuckConverter_UV.set(new GT_MetaTileEntity_BuckConverter(15488, "machine.tt.buck.08", "Ultimate Power Buck Converter", 8).getStackForm(1L));
+ Machine_BuckConverter_UHV.set(new GT_MetaTileEntity_BuckConverter(15489, "machine.tt.buck.09", "Highly Ultimate Buck Converter", 9).getStackForm(1L));
+ Machine_BuckConverter_UEV.set(new GT_MetaTileEntity_BuckConverter(15490, "machine.tt.buck.10", "Extremely Ultimate Buck Converter", 10).getStackForm(1L));
+ Machine_BuckConverter_UIV.set(new GT_MetaTileEntity_BuckConverter(15491, "machine.tt.buck.11", "Insanely Ultimate Buck Converter", 11).getStackForm(1L));
+ Machine_BuckConverter_UMV.set(new GT_MetaTileEntity_BuckConverter(15492, "machine.tt.buck.12", "Mega Ultimate Buck Converter", 12).getStackForm(1L));
+ Machine_BuckConverter_UXV.set(new GT_MetaTileEntity_BuckConverter(15493, "machine.tt.buck.13", "Extended Mega Ultimate Buck Converter", 13).getStackForm(1L));
+
+ // ===================================================================================================
+ // Tesla Transceiver
+ // ===================================================================================================
+
+ Machine_TeslaCoil_LV_1A.set(new GT_MetaTileEntity_TeslaCoil(16000, "machine.tt.tesla.01", "Basic Tesla Transceiver", 1,1).getStackForm(1L));
+ Machine_TeslaCoil_MV_1A.set(new GT_MetaTileEntity_TeslaCoil(16001, "machine.tt.tesla.02", "Advanced Tesla Transceiver", 2, 1).getStackForm(1L));
+ Machine_TeslaCoil_HV_1A.set(new GT_MetaTileEntity_TeslaCoil(16002, "machine.tt.tesla.03", "Epyc Tesla Transceiver", 3, 1).getStackForm(1L));
+ Machine_TeslaCoil_EV_1A.set(new GT_MetaTileEntity_TeslaCoil(16003, "machine.tt.tesla.04", "Ultimate Power Tesla Transceiver", 4, 1).getStackForm(1L));
+ Machine_TeslaCoil_IV_1A.set(new GT_MetaTileEntity_TeslaCoil(16004, "machine.tt.tesla.05", "Insane Tesla Transceiver", 5, 1).getStackForm(1L));
+
+ Machine_TeslaCoil_LV_4A.set(new GT_MetaTileEntity_TeslaCoil(16005, "machine.tt.tesla.01", "Basic Tesla Transceiver", 1,4).getStackForm(1L));
+ Machine_TeslaCoil_MV_4A.set(new GT_MetaTileEntity_TeslaCoil(16006, "machine.tt.tesla.02", "Advanced Tesla Transceiver", 2, 4).getStackForm(1L));
+ Machine_TeslaCoil_HV_4A.set(new GT_MetaTileEntity_TeslaCoil(16007, "machine.tt.tesla.03", "Epyc Tesla Transceiver", 3, 4).getStackForm(1L));
+ Machine_TeslaCoil_EV_4A.set(new GT_MetaTileEntity_TeslaCoil(16008, "machine.tt.tesla.04", "Ultimate Power Tesla Transceiver", 4, 4).getStackForm(1L));
+ Machine_TeslaCoil_IV_4A.set(new GT_MetaTileEntity_TeslaCoil(16009, "machine.tt.tesla.05", "Insane Tesla Transceiver", 5, 4).getStackForm(1L));
+
+ Machine_TeslaCoil_LV_9A.set(new GT_MetaTileEntity_TeslaCoil(16010, "machine.tt.tesla.01", "Basic Tesla Transceiver", 1,9).getStackForm(1L));
+ Machine_TeslaCoil_MV_9A.set(new GT_MetaTileEntity_TeslaCoil(16011, "machine.tt.tesla.02", "Advanced Tesla Transceiver", 2, 9).getStackForm(1L));
+ Machine_TeslaCoil_HV_9A.set(new GT_MetaTileEntity_TeslaCoil(16012, "machine.tt.tesla.03", "Epyc Tesla Transceiver", 3, 9).getStackForm(1L));
+ Machine_TeslaCoil_EV_9A.set(new GT_MetaTileEntity_TeslaCoil(16013, "machine.tt.tesla.04", "Ultimate Power Tesla Transceiver", 4, 9).getStackForm(1L));
+ Machine_TeslaCoil_IV_9A.set(new GT_MetaTileEntity_TeslaCoil(16014, "machine.tt.tesla.05", "Insane Tesla Transceiver", 5, 9).getStackForm(1L));
+
+ Machine_TeslaCoil_LV_16A.set(new GT_MetaTileEntity_TeslaCoil(16015, "machine.tt.tesla.01", "Basic Tesla Transceiver", 1,16).getStackForm(1L));
+ Machine_TeslaCoil_MV_16A.set(new GT_MetaTileEntity_TeslaCoil(16016, "machine.tt.tesla.02", "Advanced Tesla Transceiver", 2, 16).getStackForm(1L));
+ Machine_TeslaCoil_HV_16A.set(new GT_MetaTileEntity_TeslaCoil(16017, "machine.tt.tesla.03", "Epyc Tesla Transceiver", 3, 16).getStackForm(1L));
+ Machine_TeslaCoil_EV_16A.set(new GT_MetaTileEntity_TeslaCoil(16018, "machine.tt.tesla.04", "Ultimate Power Tesla Transceiver", 4, 16).getStackForm(1L));
+ Machine_TeslaCoil_IV_16A.set(new GT_MetaTileEntity_TeslaCoil(16019, "machine.tt.tesla.05", "Insane Tesla Transceiver", 5, 16).getStackForm(1L));
+
+ // ===================================================================================================
+ // Debug Stuff
+ // ===================================================================================================
+ hatch_CreativeMaitenance.set(new GT_MetaTileEntity_Hatch_CreativeMaintenance(15497, "debug.tt.maintenance", "Debug Maintenance Hatch", 15).getStackForm(1L));
+ Machine_DebugGenny.set(new GT_MetaTileEntity_DebugPowerGenerator(15498, "debug.tt.genny", "Debug Power Generator", 15).getStackForm(1L));
+ Machine_DebugWriter.set(new GT_MetaTileEntity_DebugStructureWriter(15499, "debug.tt.writer", "Debug Structure Writer", 15).getStackForm(1L));
+
+ // ===================================================================================================
+ // MetaTE init
+ // ===================================================================================================
+
+ GT_MetaTileEntity_Hatch_Rack.run();
+ GT_MetaTileEntity_TM_teslaCoil.run();
+
+ GT_MetaTileEntity_DataReader.run();
+
+ if (!Loader.isModLoaded(Reference.DREAMCRAFT)) {
+ new NoDreamCraftMachineLoader().run();
+ }
+ }
+}
diff --git a/src/main/java/com/github/technus/tectech/loader/thing/ThingsLoader.java b/src/main/java/com/github/technus/tectech/loader/thing/ThingsLoader.java index b422688a70..a0ce184c4e 100644 --- a/src/main/java/com/github/technus/tectech/loader/thing/ThingsLoader.java +++ b/src/main/java/com/github/technus/tectech/loader/thing/ThingsLoader.java @@ -53,11 +53,19 @@ public class ThingsLoader implements Runnable { ReactorSimBlock.run(); TecTech.LOGGER.info("Reactor Simulator registered"); + TeslaCoilCover.run(); + TeslaCoilCoverUltimate.run(); + TecTech.LOGGER.info("Covers Items registered"); + ConstructableTriggerItem.run(); FrontRotationTriggerItem.run(); ParametrizerMemoryCard.run(); ElementalDefinitionScanStorage_EM.run(); EuMeterGT.run(); + + + TeslaCoilCapacitor.run(); + TecTech.LOGGER.info("Useful Items registered"); ElementalDefinitionContainer_EM.run(); diff --git a/src/main/java/com/github/technus/tectech/thing/CustomItemList.java b/src/main/java/com/github/technus/tectech/thing/CustomItemList.java index a062693db4..0010378b29 100644 --- a/src/main/java/com/github/technus/tectech/thing/CustomItemList.java +++ b/src/main/java/com/github/technus/tectech/thing/CustomItemList.java @@ -1,231 +1,238 @@ -package com.github.technus.tectech.thing; - -import gregtech.api.interfaces.IItemContainer; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_OreDictUnificator; -import gregtech.api.util.GT_Utility; -import net.minecraft.block.Block; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; - -import static gregtech.api.enums.GT_Values.W; - -public enum CustomItemList implements IItemContainer { - Casing_UEV,Casing_UIV,Casing_UMV,Casing_UXV,Casing_OPV,Casing_MAXV, - Hull_UEV,Hull_UIV,Hull_UMV,Hull_UXV,Hull_OPV,Hull_MAXV, - Transformer_UEV_UHV,Transformer_UIV_UEV,Transformer_UMV_UIV, - Transformer_UXV_UMV,Transformer_OPV_UXV,Transformer_MAXV_OPV, - WetTransformer_LV_ULV,WetTransformer_MV_LV,WetTransformer_HV_MV,WetTransformer_EV_HV, - WetTransformer_IV_EV,WetTransformer_LuV_IV,WetTransformer_ZPM_LuV,WetTransformer_UV_ZPM, - WetTransformer_UHV_UV,WetTransformer_UEV_UHV,WetTransformer_UIV_UEV,WetTransformer_UMV_UIV, - WetTransformer_UXV_UMV,WetTransformer_OPV_UXV,WetTransformer_MAXV_OPV, - - Transformer_HA_UEV_UHV,Transformer_HA_UIV_UEV,Transformer_HA_UMV_UIV,Transformer_HA_UXV_UMV, - Transformer_HA_OPV_UXV,Transformer_HA_MAXV_OPV, - - hatch_CreativeMaitenance, - Machine_OwnerDetector,Machine_DataReader, - Machine_BuckConverter_IV,Machine_BuckConverter_LuV,Machine_BuckConverter_ZPM, - Machine_BuckConverter_UV,Machine_BuckConverter_UHV,Machine_BuckConverter_UEV, - Machine_BuckConverter_UIV,Machine_BuckConverter_UMV, Machine_BuckConverter_UXV, - Machine_DebugWriter,Machine_DebugGenny, - EMpipe, DATApipe, rack_Hatch, holder_Hatch, capacitor_Hatch, - - eM_dynamomulti4_IV, eM_dynamomulti16_IV, eM_dynamomulti64_IV, - eM_dynamomulti4_LuV, eM_dynamomulti16_LuV, eM_dynamomulti64_LuV, - eM_dynamomulti4_ZPM, eM_dynamomulti16_ZPM, eM_dynamomulti64_ZPM, - eM_dynamomulti4_UV, eM_dynamomulti16_UV, eM_dynamomulti64_UV, - eM_dynamomulti4_UHV, eM_dynamomulti16_UHV, eM_dynamomulti64_UHV, - eM_dynamomulti4_UEV, eM_dynamomulti16_UEV, eM_dynamomulti64_UEV, - eM_dynamomulti4_UIV, eM_dynamomulti16_UIV, eM_dynamomulti64_UIV, - eM_dynamomulti4_UMV, eM_dynamomulti16_UMV, eM_dynamomulti64_UMV, - eM_dynamomulti4_UXV, eM_dynamomulti16_UXV, eM_dynamomulti64_UXV, - - eM_energymulti4_IV, eM_energymulti16_IV, eM_energymulti64_IV, - eM_energymulti4_LuV, eM_energymulti16_LuV, eM_energymulti64_LuV, - eM_energymulti4_ZPM, eM_energymulti16_ZPM, eM_energymulti64_ZPM, - eM_energymulti4_UV, eM_energymulti16_UV, eM_energymulti64_UV, - eM_energymulti4_UHV, eM_energymulti16_UHV, eM_energymulti64_UHV, - eM_energymulti4_UEV, eM_energymulti16_UEV, eM_energymulti64_UEV, - eM_energymulti4_UIV, eM_energymulti16_UIV, eM_energymulti64_UIV, - eM_energymulti4_UMV, eM_energymulti16_UMV, eM_energymulti64_UMV, - eM_energymulti4_UXV, eM_energymulti16_UXV, eM_energymulti64_UXV, - - eM_in_UV, eM_in_UHV, eM_in_UEV, eM_in_UIV, eM_in_UMV, eM_in_UXV, - eM_out_UV, eM_out_UHV, eM_out_UEV, eM_out_UIV, eM_out_UMV, eM_out_UXV, - eM_muffler_UV, eM_muffler_UHV, eM_muffler_UEV, eM_muffler_UIV, eM_muffler_UMV, eM_muffler_UXV, - Parametrizer_Hatch, ParametrizerX_Hatch, Uncertainty_Hatch, UncertaintyX_Hatch, dataIn_Hatch, dataOut_Hatch, dataInAss_Hatch, dataOutAss_Hatch, - eM_Containment, eM_Containment_Field, eM_Containment_Advanced, eM_Coil, eM_Teleportation, eM_Dimensional, eM_Ultimate_Containment, eM_Ultimate_Containment_Advanced, eM_Ultimate_Containment_Field, eM_Spacetime, eM_Computer_Casing, eM_Computer_Bus, eM_Computer_Vent, eM_Hollow, eM_Power, - debugBlock, - Machine_Multi_Microwave, Machine_Multi_teslaCoil, - Machine_Multi_Transformer, - Machine_Multi_Computer, Machine_Multi_Switch, Machine_Multi_Research, Machine_Multi_DataBank, - Machine_Multi_MatterToEM, Machine_Multi_EMToMatter, Machine_Multi_EMjunction, Machine_Multi_Scanner, - Machine_Multi_EssentiaToEM, Machine_Multi_EMToEssentia, - Machine_Multi_Infuser, Machine_Multi_Collider, - Machine_Multi_Decay, Machine_Multi_EMmachine, - Machine_Multi_Stabilizer, Machine_Multi_EMCrafter, - Machine_Multi_Wormhole, Machine_Multi_Annihilation, - Machine_Multi_BHG, - hint_0,hint_1,hint_2,hint_3,hint_4,hint_5,hint_6,hint_7,hint_8,hint_9,hint_10,hint_11, hint_general,hint_air,hint_noAir,hint_error, - - scanContainer,parametrizerMemory; - - - private ItemStack mStack; - private boolean mHasNotBeenSet = true; - - //public static Fluid sOilExtraHeavy, sOilHeavy, sOilMedium, sOilLight, sNaturalGas; - - @Override - public IItemContainer set(Item aItem) { - mHasNotBeenSet = false; - if (aItem == null) { - return this; - } - ItemStack aStack = new ItemStack(aItem, 1, 0); - mStack = GT_Utility.copyAmount(1, aStack); - return this; - } - - @Override - public IItemContainer set(ItemStack aStack) { - mHasNotBeenSet = false; - mStack = GT_Utility.copyAmount(1, aStack); - return this; - } - - @Override - public Item getItem() { - if (mHasNotBeenSet) { - throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!"); - } - if (GT_Utility.isStackInvalid(mStack)) { - return null; - } - return mStack.getItem(); - } - - @Override - public Block getBlock() { - if (mHasNotBeenSet) { - throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!"); - } - return GT_Utility.getBlockFromStack(new ItemStack(getItem())); - } - - @Override - public final boolean hasBeenSet() { - return !mHasNotBeenSet; - } - - @Override - public boolean isStackEqual(Object aStack) { - return isStackEqual(aStack, false, false); - } - - @Override - public boolean isStackEqual(Object aStack, boolean aWildcard, boolean aIgnoreNBT) { - if (GT_Utility.isStackInvalid(aStack)) { - return false; - } - return GT_Utility.areUnificationsEqual((ItemStack) aStack, aWildcard ? getWildcard(1) : get(1), aIgnoreNBT); - } - - @Override - public ItemStack get(long aAmount, Object... aReplacements) { - if (mHasNotBeenSet) { - throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!"); - } - if (GT_Utility.isStackInvalid(mStack)) { - return GT_Utility.copyAmount(aAmount, aReplacements); - } - return GT_Utility.copyAmount(aAmount, GT_OreDictUnificator.get(mStack)); - } - - @Override - public ItemStack getWildcard(long aAmount, Object... aReplacements) { - if (mHasNotBeenSet) { - throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!"); - } - if (GT_Utility.isStackInvalid(mStack)) { - return GT_Utility.copyAmount(aAmount, aReplacements); - } - return GT_Utility.copyAmountAndMetaData(aAmount, W, GT_OreDictUnificator.get(mStack)); - } - - @Override - public ItemStack getUndamaged(long aAmount, Object... aReplacements) { - if (mHasNotBeenSet) { - throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!"); - } - if (GT_Utility.isStackInvalid(mStack)) { - return GT_Utility.copyAmount(aAmount, aReplacements); - } - return GT_Utility.copyAmountAndMetaData(aAmount, 0, GT_OreDictUnificator.get(mStack)); - } - - @Override - public ItemStack getAlmostBroken(long aAmount, Object... aReplacements) { - if (mHasNotBeenSet) { - throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!"); - } - if (GT_Utility.isStackInvalid(mStack)) { - return GT_Utility.copyAmount(aAmount, aReplacements); - } - return GT_Utility.copyAmountAndMetaData(aAmount, mStack.getMaxDamage() - 1, GT_OreDictUnificator.get(mStack)); - } - - @Override - public ItemStack getWithName(long aAmount, String aDisplayName, Object... aReplacements) { - ItemStack rStack = get(1, aReplacements); - if (GT_Utility.isStackInvalid(rStack)) { - return null; - } - rStack.setStackDisplayName(aDisplayName); - return GT_Utility.copyAmount(aAmount, rStack); - } - - @Override - public ItemStack getWithCharge(long aAmount, int aEnergy, Object... aReplacements) { - ItemStack rStack = get(1, aReplacements); - if (GT_Utility.isStackInvalid(rStack)) { - return null; - } - GT_ModHandler.chargeElectricItem(rStack, aEnergy, Integer.MAX_VALUE, true, false); - return GT_Utility.copyAmount(aAmount, rStack); - } - - @Override - public ItemStack getWithDamage(long aAmount, long aMetaValue, Object... aReplacements) { - if (mHasNotBeenSet) { - throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!"); - } - if (GT_Utility.isStackInvalid(mStack)) { - return GT_Utility.copyAmount(aAmount, aReplacements); - } - return GT_Utility.copyAmountAndMetaData(aAmount, aMetaValue, GT_OreDictUnificator.get(mStack)); - } - - @Override - public IItemContainer registerOre(Object... aOreNames) { - if (mHasNotBeenSet) { - throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!"); - } - for (Object tOreName : aOreNames) { - GT_OreDictUnificator.registerOre(tOreName, get(1)); - } - return this; - } - - @Override - public IItemContainer registerWildcardAsOre(Object... aOreNames) { - if (mHasNotBeenSet) { - throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!"); - } - for (Object tOreName : aOreNames) { - GT_OreDictUnificator.registerOre(tOreName, getWildcard(1)); - } - return this; - } -} +package com.github.technus.tectech.thing;
+
+import gregtech.api.interfaces.IItemContainer;
+import gregtech.api.util.GT_ModHandler;
+import gregtech.api.util.GT_OreDictUnificator;
+import gregtech.api.util.GT_Utility;
+import net.minecraft.block.Block;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+
+import static gregtech.api.enums.GT_Values.W;
+
+public enum CustomItemList implements IItemContainer {
+ Casing_UEV,Casing_UIV,Casing_UMV,Casing_UXV,Casing_OPV,Casing_MAXV,
+ Hull_UEV,Hull_UIV,Hull_UMV,Hull_UXV,Hull_OPV,Hull_MAXV,
+ Transformer_UEV_UHV,Transformer_UIV_UEV,Transformer_UMV_UIV,
+ Transformer_UXV_UMV,Transformer_OPV_UXV,Transformer_MAXV_OPV,
+ WetTransformer_LV_ULV,WetTransformer_MV_LV,WetTransformer_HV_MV,WetTransformer_EV_HV,
+ WetTransformer_IV_EV,WetTransformer_LuV_IV,WetTransformer_ZPM_LuV,WetTransformer_UV_ZPM,
+ WetTransformer_UHV_UV,WetTransformer_UEV_UHV,WetTransformer_UIV_UEV,WetTransformer_UMV_UIV,
+ WetTransformer_UXV_UMV,WetTransformer_OPV_UXV,WetTransformer_MAXV_OPV,
+
+ Transformer_HA_UEV_UHV,Transformer_HA_UIV_UEV,Transformer_HA_UMV_UIV,Transformer_HA_UXV_UMV,
+ Transformer_HA_OPV_UXV,Transformer_HA_MAXV_OPV,
+
+ hatch_CreativeMaitenance,
+ Machine_OwnerDetector,Machine_DataReader,
+ Machine_BuckConverter_IV,Machine_BuckConverter_LuV,Machine_BuckConverter_ZPM,
+ Machine_BuckConverter_UV,Machine_BuckConverter_UHV,Machine_BuckConverter_UEV,
+ Machine_BuckConverter_UIV,Machine_BuckConverter_UMV, Machine_BuckConverter_UXV,
+ Machine_DebugWriter,Machine_DebugGenny,
+ EMpipe, DATApipe, rack_Hatch, holder_Hatch, capacitor_Hatch,
+
+ eM_dynamomulti4_IV, eM_dynamomulti16_IV, eM_dynamomulti64_IV,
+ eM_dynamomulti4_LuV, eM_dynamomulti16_LuV, eM_dynamomulti64_LuV,
+ eM_dynamomulti4_ZPM, eM_dynamomulti16_ZPM, eM_dynamomulti64_ZPM,
+ eM_dynamomulti4_UV, eM_dynamomulti16_UV, eM_dynamomulti64_UV,
+ eM_dynamomulti4_UHV, eM_dynamomulti16_UHV, eM_dynamomulti64_UHV,
+ eM_dynamomulti4_UEV, eM_dynamomulti16_UEV, eM_dynamomulti64_UEV,
+ eM_dynamomulti4_UIV, eM_dynamomulti16_UIV, eM_dynamomulti64_UIV,
+ eM_dynamomulti4_UMV, eM_dynamomulti16_UMV, eM_dynamomulti64_UMV,
+ eM_dynamomulti4_UXV, eM_dynamomulti16_UXV, eM_dynamomulti64_UXV,
+
+ eM_energymulti4_IV, eM_energymulti16_IV, eM_energymulti64_IV,
+ eM_energymulti4_LuV, eM_energymulti16_LuV, eM_energymulti64_LuV,
+ eM_energymulti4_ZPM, eM_energymulti16_ZPM, eM_energymulti64_ZPM,
+ eM_energymulti4_UV, eM_energymulti16_UV, eM_energymulti64_UV,
+ eM_energymulti4_UHV, eM_energymulti16_UHV, eM_energymulti64_UHV,
+ eM_energymulti4_UEV, eM_energymulti16_UEV, eM_energymulti64_UEV,
+ eM_energymulti4_UIV, eM_energymulti16_UIV, eM_energymulti64_UIV,
+ eM_energymulti4_UMV, eM_energymulti16_UMV, eM_energymulti64_UMV,
+ eM_energymulti4_UXV, eM_energymulti16_UXV, eM_energymulti64_UXV,
+
+ eM_in_UV, eM_in_UHV, eM_in_UEV, eM_in_UIV, eM_in_UMV, eM_in_UXV,
+ eM_out_UV, eM_out_UHV, eM_out_UEV, eM_out_UIV, eM_out_UMV, eM_out_UXV,
+ eM_muffler_UV, eM_muffler_UHV, eM_muffler_UEV, eM_muffler_UIV, eM_muffler_UMV, eM_muffler_UXV,
+ Parametrizer_Hatch, ParametrizerX_Hatch, Uncertainty_Hatch, UncertaintyX_Hatch, dataIn_Hatch, dataOut_Hatch, dataInAss_Hatch, dataOutAss_Hatch,
+ eM_Containment, eM_Containment_Field, eM_Containment_Advanced, eM_Coil, eM_Teleportation, eM_Dimensional, eM_Ultimate_Containment, eM_Ultimate_Containment_Advanced, eM_Ultimate_Containment_Field, eM_Spacetime, eM_Computer_Casing, eM_Computer_Bus, eM_Computer_Vent, eM_Hollow, eM_Power,
+ debugBlock,
+
+ tM_TeslaBase, tM_TeslaToroid, tM_TeslaFrame, tM_TeslaPrimary_0, tM_TeslaPrimary_1, tM_TeslaPrimary_2, tM_TeslaSecondary_0, tM_TeslaSecondary_1, tM_TeslaSecondary_2,
+
+ Machine_Multi_Microwave, Machine_Multi_teslaCoil,
+ Machine_Multi_Transformer,
+ Machine_Multi_Computer, Machine_Multi_Switch, Machine_Multi_Research, Machine_Multi_DataBank,
+ Machine_Multi_MatterToEM, Machine_Multi_EMToMatter, Machine_Multi_EMjunction, Machine_Multi_Scanner,
+ Machine_Multi_EssentiaToEM, Machine_Multi_EMToEssentia,
+ Machine_Multi_Infuser, Machine_Multi_Collider,
+ Machine_Multi_Decay, Machine_Multi_EMmachine,
+ Machine_Multi_Stabilizer, Machine_Multi_EMCrafter,
+ Machine_Multi_Wormhole, Machine_Multi_Annihilation,
+ Machine_Multi_BHG,
+ hint_0,hint_1,hint_2,hint_3,hint_4,hint_5,hint_6,hint_7,hint_8,hint_9,hint_10,hint_11, hint_general,hint_air,hint_noAir,hint_error,
+
+ scanContainer,parametrizerMemory,
+
+ Machine_TeslaCoil_LV_1A, Machine_TeslaCoil_MV_1A, Machine_TeslaCoil_HV_1A, Machine_TeslaCoil_EV_1A, Machine_TeslaCoil_IV_1A,
+ Machine_TeslaCoil_LV_4A, Machine_TeslaCoil_MV_4A, Machine_TeslaCoil_HV_4A, Machine_TeslaCoil_EV_4A, Machine_TeslaCoil_IV_4A,
+ Machine_TeslaCoil_LV_9A, Machine_TeslaCoil_MV_9A, Machine_TeslaCoil_HV_9A, Machine_TeslaCoil_EV_9A, Machine_TeslaCoil_IV_9A,
+ Machine_TeslaCoil_LV_16A, Machine_TeslaCoil_MV_16A, Machine_TeslaCoil_HV_16A, Machine_TeslaCoil_EV_16A, Machine_TeslaCoil_IV_16A;
+
+ private ItemStack mStack;
+ private boolean mHasNotBeenSet = true;
+
+ //public static Fluid sOilExtraHeavy, sOilHeavy, sOilMedium, sOilLight, sNaturalGas;
+
+ @Override
+ public IItemContainer set(Item aItem) {
+ mHasNotBeenSet = false;
+ if (aItem == null) {
+ return this;
+ }
+ ItemStack aStack = new ItemStack(aItem, 1, 0);
+ mStack = GT_Utility.copyAmount(1, aStack);
+ return this;
+ }
+
+ @Override
+ public IItemContainer set(ItemStack aStack) {
+ mHasNotBeenSet = false;
+ mStack = GT_Utility.copyAmount(1, aStack);
+ return this;
+ }
+
+ @Override
+ public Item getItem() {
+ if (mHasNotBeenSet) {
+ throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!");
+ }
+ if (GT_Utility.isStackInvalid(mStack)) {
+ return null;
+ }
+ return mStack.getItem();
+ }
+
+ @Override
+ public Block getBlock() {
+ if (mHasNotBeenSet) {
+ throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!");
+ }
+ return GT_Utility.getBlockFromStack(new ItemStack(getItem()));
+ }
+
+ @Override
+ public final boolean hasBeenSet() {
+ return !mHasNotBeenSet;
+ }
+
+ @Override
+ public boolean isStackEqual(Object aStack) {
+ return isStackEqual(aStack, false, false);
+ }
+
+ @Override
+ public boolean isStackEqual(Object aStack, boolean aWildcard, boolean aIgnoreNBT) {
+ if (GT_Utility.isStackInvalid(aStack)) {
+ return false;
+ }
+ return GT_Utility.areUnificationsEqual((ItemStack) aStack, aWildcard ? getWildcard(1) : get(1), aIgnoreNBT);
+ }
+
+ @Override
+ public ItemStack get(long aAmount, Object... aReplacements) {
+ if (mHasNotBeenSet) {
+ throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!");
+ }
+ if (GT_Utility.isStackInvalid(mStack)) {
+ return GT_Utility.copyAmount(aAmount, aReplacements);
+ }
+ return GT_Utility.copyAmount(aAmount, GT_OreDictUnificator.get(mStack));
+ }
+
+ @Override
+ public ItemStack getWildcard(long aAmount, Object... aReplacements) {
+ if (mHasNotBeenSet) {
+ throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!");
+ }
+ if (GT_Utility.isStackInvalid(mStack)) {
+ return GT_Utility.copyAmount(aAmount, aReplacements);
+ }
+ return GT_Utility.copyAmountAndMetaData(aAmount, W, GT_OreDictUnificator.get(mStack));
+ }
+
+ @Override
+ public ItemStack getUndamaged(long aAmount, Object... aReplacements) {
+ if (mHasNotBeenSet) {
+ throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!");
+ }
+ if (GT_Utility.isStackInvalid(mStack)) {
+ return GT_Utility.copyAmount(aAmount, aReplacements);
+ }
+ return GT_Utility.copyAmountAndMetaData(aAmount, 0, GT_OreDictUnificator.get(mStack));
+ }
+
+ @Override
+ public ItemStack getAlmostBroken(long aAmount, Object... aReplacements) {
+ if (mHasNotBeenSet) {
+ throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!");
+ }
+ if (GT_Utility.isStackInvalid(mStack)) {
+ return GT_Utility.copyAmount(aAmount, aReplacements);
+ }
+ return GT_Utility.copyAmountAndMetaData(aAmount, mStack.getMaxDamage() - 1, GT_OreDictUnificator.get(mStack));
+ }
+
+ @Override
+ public ItemStack getWithName(long aAmount, String aDisplayName, Object... aReplacements) {
+ ItemStack rStack = get(1, aReplacements);
+ if (GT_Utility.isStackInvalid(rStack)) {
+ return null;
+ }
+ rStack.setStackDisplayName(aDisplayName);
+ return GT_Utility.copyAmount(aAmount, rStack);
+ }
+
+ @Override
+ public ItemStack getWithCharge(long aAmount, int aEnergy, Object... aReplacements) {
+ ItemStack rStack = get(1, aReplacements);
+ if (GT_Utility.isStackInvalid(rStack)) {
+ return null;
+ }
+ GT_ModHandler.chargeElectricItem(rStack, aEnergy, Integer.MAX_VALUE, true, false);
+ return GT_Utility.copyAmount(aAmount, rStack);
+ }
+
+ @Override
+ public ItemStack getWithDamage(long aAmount, long aMetaValue, Object... aReplacements) {
+ if (mHasNotBeenSet) {
+ throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!");
+ }
+ if (GT_Utility.isStackInvalid(mStack)) {
+ return GT_Utility.copyAmount(aAmount, aReplacements);
+ }
+ return GT_Utility.copyAmountAndMetaData(aAmount, aMetaValue, GT_OreDictUnificator.get(mStack));
+ }
+
+ @Override
+ public IItemContainer registerOre(Object... aOreNames) {
+ if (mHasNotBeenSet) {
+ throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!");
+ }
+ for (Object tOreName : aOreNames) {
+ GT_OreDictUnificator.registerOre(tOreName, get(1));
+ }
+ return this;
+ }
+
+ @Override
+ public IItemContainer registerWildcardAsOre(Object... aOreNames) {
+ if (mHasNotBeenSet) {
+ throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!");
+ }
+ for (Object tOreName : aOreNames) {
+ GT_OreDictUnificator.registerOre(tOreName, getWildcard(1));
+ }
+ return this;
+ }
+}
diff --git a/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_CasingsTT.java b/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_CasingsTT.java index 2ea22b625d..3f513741d2 100644 --- a/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_CasingsTT.java +++ b/src/main/java/com/github/technus/tectech/thing/casing/GT_Block_CasingsTT.java @@ -26,6 +26,7 @@ public class GT_Block_CasingsTT extends GT_Block_Casings_Abstract { public static final byte texturePage=tectechTexturePage1; public static final short textureOffset = texturePage << 7;//Start of PAGE 8 (which is the 9th page) (8*128) private static IIcon eM0, eM1, eM1s, eM2, eM2s, eM3, eM3s, eM4, eM5, eM6, eM7, eM7s, eM8, eM9, eM10, eM11, eM12, eM13, eM14; + private static IIcon tM0, tM1, tM2, tM3, tM4, tM5, tM6, tM7, tM8; private static IIcon[] debug = new IIcon[6]; public GT_Block_CasingsTT() { @@ -57,6 +58,18 @@ public class GT_Block_CasingsTT extends GT_Block_Casings_Abstract { GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".15.name", "Debug Sides");//NOT REGISTER AS TEXTURE FOR HATCHES! + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".200.name", "Tesla Base Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".201.name", "Tesla Toroid Casing"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".202.name", "Tesla Structural Frame"); + + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".203.name", "T0 Primary Tesla Windings");//TODO Decide tesla coil winding materials to rename + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".204.name", "T1 Primary Tesla Windings"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".205.name", "T2 Primary Tesla Windings"); + + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".206.name", "T3 Primary Tesla Windings"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".207.name", "T4 Primary Tesla Windings"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".208.name", "T5 Primary Tesla Windings"); + CustomItemList.eM_Power.set(new ItemStack(this, 1, 0)); @@ -80,6 +93,18 @@ public class GT_Block_CasingsTT extends GT_Block_Casings_Abstract { CustomItemList.eM_Ultimate_Containment_Field.set(new ItemStack(this, 1, 14)); CustomItemList.debugBlock.set(new ItemStack(this, 1, 15)); + + CustomItemList.tM_TeslaBase.set(new ItemStack(this, 1, 200)); + CustomItemList.tM_TeslaToroid.set(new ItemStack(this, 1, 201)); + CustomItemList.tM_TeslaFrame.set(new ItemStack(this, 1, 202)); + + CustomItemList.tM_TeslaPrimary_0.set(new ItemStack(this, 1, 203)); + CustomItemList.tM_TeslaPrimary_1.set(new ItemStack(this, 1, 204)); + CustomItemList.tM_TeslaPrimary_2.set(new ItemStack(this, 1, 205)); + + CustomItemList.tM_TeslaSecondary_0.set(new ItemStack(this, 1, 206)); + CustomItemList.tM_TeslaSecondary_1.set(new ItemStack(this, 1, 207)); + CustomItemList.tM_TeslaSecondary_2.set(new ItemStack(this, 1, 208)); } @Override @@ -116,6 +141,18 @@ public class GT_Block_CasingsTT extends GT_Block_Casings_Abstract { debug[3] = aIconRegister.registerIcon("gregtech:iconsets/DEBUG_3"); debug[4] = aIconRegister.registerIcon("gregtech:iconsets/DEBUG_4"); debug[5] = aIconRegister.registerIcon("gregtech:iconsets/DEBUG_5"); + + tM0 = aIconRegister.registerIcon("gregtech:iconsets/EM_POWER");//TODO Configure custom tesla texture sets + tM1 = aIconRegister.registerIcon("gregtech:iconsets/EM_POWER"); + tM2 = aIconRegister.registerIcon("gregtech:iconsets/EM_POWER"); + + tM3 = aIconRegister.registerIcon("gregtech:iconsets/EM_POWER"); + tM4 = aIconRegister.registerIcon("gregtech:iconsets/EM_POWER"); + tM5 = aIconRegister.registerIcon("gregtech:iconsets/EM_POWER"); + + tM6 = aIconRegister.registerIcon("gregtech:iconsets/EM_POWER"); + tM7 = aIconRegister.registerIcon("gregtech:iconsets/EM_POWER"); + tM8 = aIconRegister.registerIcon("gregtech:iconsets/EM_POWER"); } @Override @@ -165,6 +202,24 @@ public class GT_Block_CasingsTT extends GT_Block_Casings_Abstract { return eM14; case 15: return debug[aSide]; + case 200: + return tM0; + case 201: + return tM1; + case 202: + return tM2; + case 203: + return tM3; + case 204: + return tM4; + case 205: + return tM5; + case 206: + return tM6; + case 207: + return tM7; + case 208: + return tM8; default: return Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon(); } @@ -179,8 +234,13 @@ public class GT_Block_CasingsTT extends GT_Block_Casings_Abstract { @Override public void getSubBlocks(Item aItem, CreativeTabs par2CreativeTabs, List aList) { + //Add Tec's Casings for (int i = 0; i <= 15; i++) { aList.add(new ItemStack(aItem, 1, i)); } + //Add Bass' Casings + for (int i = 200; i <= 208; i++) { + aList.add(new ItemStack(aItem, 1, i)); + } } } diff --git a/src/main/java/com/github/technus/tectech/thing/casing/GT_Item_CasingsTT.java b/src/main/java/com/github/technus/tectech/thing/casing/GT_Item_CasingsTT.java index 6751e4b24b..8137a1d655 100644 --- a/src/main/java/com/github/technus/tectech/thing/casing/GT_Item_CasingsTT.java +++ b/src/main/java/com/github/technus/tectech/thing/casing/GT_Item_CasingsTT.java @@ -8,8 +8,7 @@ import net.minecraft.util.EnumChatFormatting; import java.util.List; -import static com.github.technus.tectech.CommonValues.TEC_MARK_EM; -import static com.github.technus.tectech.CommonValues.TEC_MARK_GENERAL; +import static com.github.technus.tectech.CommonValues.*; /** * Created by danie_000 on 03.10.2016. @@ -19,12 +18,16 @@ public class GT_Item_CasingsTT extends GT_Item_Casings_Abstract { super(par1); } - @Override + @Override //TODO Negotiate Casing space with Tec public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) { - if(aStack.getItemDamage()>0 && aStack.getItemDamage()<15) { + if(aStack.getItemDamage() < 15) { aList.add(TEC_MARK_EM); - } else { + } else if ((aStack.getItemDamage() < 200)) { aList.add(TEC_MARK_GENERAL); + } else if (aStack.getItemDamage() < 300){ + aList.add(BASS_MARK); + } else { + aList.add(COSMIC_MARK); } switch (aStack.getItemDamage()) { case 0://"High Power Casing" @@ -91,6 +94,42 @@ public class GT_Item_CasingsTT extends GT_Item_Casings_Abstract { aList.add("Lazy man way of determining sides."); aList.add(EnumChatFormatting.BLUE.toString() + "0, 1, 2, 3, 4, 5, 6?!"); break; + case 200://"Tesla Base Casing" + aList.add("Lazy man way of determining sides."); + aList.add(EnumChatFormatting.BLUE.toString() + "0, 1, 2, 3, 4, 5, 6?!"); + break; + case 201://"Tesla Toroid Casing" + aList.add("Lazy man way of determining sides."); + aList.add(EnumChatFormatting.BLUE.toString() + "0, 1, 2, 3, 4, 5, 6?!"); + break; + case 202://"Tesla Structural Frame" + aList.add("Lazy man way of determining sides."); + aList.add(EnumChatFormatting.BLUE.toString() + "0, 1, 2, 3, 4, 5, 6?!"); + break; + case 203://"T0 Primary Tesla Windings" + aList.add("Lazy man way of determining sides."); + aList.add(EnumChatFormatting.BLUE.toString() + "0, 1, 2, 3, 4, 5, 6?!"); + break; + case 204://"T1 Primary Tesla Windings" + aList.add("Lazy man way of determining sides."); + aList.add(EnumChatFormatting.BLUE.toString() + "0, 1, 2, 3, 4, 5, 6?!"); + break; + case 205://"T2 Primary Tesla Windings" + aList.add("Lazy man way of determining sides."); + aList.add(EnumChatFormatting.BLUE.toString() + "0, 1, 2, 3, 4, 5, 6?!"); + break; + case 206://"T0 Secondary Tesla Windings" + aList.add("Lazy man way of determining sides."); + aList.add(EnumChatFormatting.BLUE.toString() + "0, 1, 2, 3, 4, 5, 6?!"); + break; + case 207://"T1 Secondary Tesla Windings" + aList.add("Lazy man way of determining sides."); + aList.add(EnumChatFormatting.BLUE.toString() + "0, 1, 2, 3, 4, 5, 6?!"); + break; + case 208://"T2 Secondary Tesla Windings" + aList.add("Lazy man way of determining sides."); + aList.add(EnumChatFormatting.BLUE.toString() + "0, 1, 2, 3, 4, 5, 6?!"); + break; default://WTF? aList.add("Damn son where did you get that!?"); aList.add(EnumChatFormatting.BLUE.toString() + "From outer space... I guess..."); diff --git a/src/main/java/com/github/technus/tectech/thing/cover/GT_Cover_TM_TeslaCoil.java b/src/main/java/com/github/technus/tectech/thing/cover/GT_Cover_TM_TeslaCoil.java new file mode 100644 index 0000000000..721f730960 --- /dev/null +++ b/src/main/java/com/github/technus/tectech/thing/cover/GT_Cover_TM_TeslaCoil.java @@ -0,0 +1,28 @@ +package com.github.technus.tectech.thing.cover; + +import gregtech.api.interfaces.tileentity.ICoverable; +import gregtech.api.util.GT_CoverBehavior; +import gregtech.api.util.GT_Utility; +import net.minecraft.entity.player.EntityPlayer; + +import static ic2.api.info.Info.DMG_ELECTRIC; + +public class GT_Cover_TM_TeslaCoil extends GT_CoverBehavior { + public GT_Cover_TM_TeslaCoil() { + } + + public String getDescription(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return "Do not attempt to use screwdriver!"; + } + + public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } + + public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { + if(aTileEntity.getStoredEU() > 0 && !GT_Utility.isWearingFullElectroHazmat(aPlayer)){ + aPlayer.attackEntityFrom(DMG_ELECTRIC, 20); + } + return aCoverVariable; + } +}
\ No newline at end of file diff --git a/src/main/java/com/github/technus/tectech/thing/cover/GT_Cover_TM_TeslaCoil_Ultimate.java b/src/main/java/com/github/technus/tectech/thing/cover/GT_Cover_TM_TeslaCoil_Ultimate.java new file mode 100644 index 0000000000..db7c751fc6 --- /dev/null +++ b/src/main/java/com/github/technus/tectech/thing/cover/GT_Cover_TM_TeslaCoil_Ultimate.java @@ -0,0 +1,29 @@ +package com.github.technus.tectech.thing.cover; + +import gregtech.api.interfaces.tileentity.ICoverable; +import net.minecraftforge.fluids.Fluid; + +public class GT_Cover_TM_TeslaCoil_Ultimate extends GT_Cover_TM_TeslaCoil { + public GT_Cover_TM_TeslaCoil_Ultimate() { + } + + public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return true; + } + + public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { + return true; + } + + public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { + return true; + } + + public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { + return true; + } + + public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { + return true; + } +}
\ No newline at end of file diff --git a/src/main/java/com/github/technus/tectech/thing/item/TeslaCoilCapacitor.java b/src/main/java/com/github/technus/tectech/thing/item/TeslaCoilCapacitor.java new file mode 100644 index 0000000000..1755ad05fb --- /dev/null +++ b/src/main/java/com/github/technus/tectech/thing/item/TeslaCoilCapacitor.java @@ -0,0 +1,123 @@ +package com.github.technus.tectech.thing.item; + +import com.github.technus.tectech.CommonValues; +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.util.GT_LanguageManager; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IIcon; + +import java.util.List; + +import static com.github.technus.tectech.CommonValues.VN; +import static com.github.technus.tectech.Reference.MODID; + + +public final class TeslaCoilCapacitor extends Item { + public static TeslaCoilCapacitor INSTANCE; + public static IIcon LVicon, MVicon, HVicon, EVicon, IVicon, LuVicon, ZPMicon, UVicon; + + public TeslaCoilCapacitor() { + setUnlocalizedName("tm.teslaCoilCapacitor"); + setTextureName(MODID + ":itemParametrizerMemoryCardUnlocked"); + + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "LV Tesla Capacitor"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "MV Tesla Capacitor"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".2.name", "HV Tesla Capacitor"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".3.name", "EV Tesla Capacitor"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".4.name", "IV Tesla Capacitor"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".5.name", "LuV Tesla Capacitor"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".6.name", "ZPM Tesla Capacitor"); + GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".7.name", "UV Tesla Capacitor"); + } + + @Override + public void addInformation(ItemStack aStack, EntityPlayer ep, List aList, boolean boo) { + aList.add(CommonValues.BASS_MARK); + switch (aStack.getItemDamage()) { + case 1://"MV" + aList.add("Stores energy for tesla towers! (MV)"); + break; + case 2://"HV" + aList.add("Stores energy for tesla towers! (HV)"); + break; + case 3://"EV" + aList.add("Stores energy for tesla towers! (EV)"); + break; + case 4://"IV" + aList.add("Stores energy for tesla towers! (IV)"); + break; + case 5://"LuV" + aList.add("Stores energy for tesla towers! (LuV)"); + break; + case 6://"ZPM" + aList.add("Stores energy for tesla towers! (ZPM)"); + break; + case 7://"UV" + aList.add("Stores energy for tesla towers! (UV)"); + break; + default://"LV" + aList.add("Stores energy for tesla towers! (LV)"); + break; + } + aList.add(EnumChatFormatting.BLUE + "Insert into a Capacitor hatch of a Tesla Tower"); + aList.add(EnumChatFormatting.BLUE + "Capacitors are the same thing as batteries, right?"); + } + + @Override + public String getUnlocalizedName(ItemStack aStack) { + return getUnlocalizedName() + "." + getDamage(aStack); + } + + public static void run() { + INSTANCE = new TeslaCoilCapacitor(); + GameRegistry.registerItem(INSTANCE, INSTANCE.getUnlocalizedName()); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconRegister) { + LVicon = itemIcon = iconRegister.registerIcon(getIconString()); + MVicon = iconRegister.registerIcon(MODID + ":itemParametrizerMemoryCardLocked"); + HVicon = iconRegister.registerIcon(MODID + ":itemParametrizerMemoryCardLocked"); + EVicon = iconRegister.registerIcon(MODID + ":itemParametrizerMemoryCardLocked"); + IVicon = iconRegister.registerIcon(MODID + ":itemParametrizerMemoryCardLocked"); + LuVicon = iconRegister.registerIcon(MODID + ":itemParametrizerMemoryCardLocked"); + ZPMicon = iconRegister.registerIcon(MODID + ":itemParametrizerMemoryCardLocked"); + UVicon = iconRegister.registerIcon(MODID + ":itemParametrizerMemoryCardLocked"); + } + + @Override + public IIcon getIconFromDamage(int damage) { + switch (damage) { + case 1: + return MVicon; + case 2: + return HVicon; + case 3: + return EVicon; + case 4: + return IVicon; + case 5: + return LuVicon; + case 6: + return ZPMicon; + case 7: + return UVicon; + default: + return LVicon; + } + } + + public void getSubItems(Item aItem, CreativeTabs par2CreativeTabs, List aList) { + for (int i = 0; i <= 7; i++) { + aList.add(new ItemStack(aItem, 1, i)); + } + } +} diff --git a/src/main/java/com/github/technus/tectech/thing/item/TeslaCoilCover.java b/src/main/java/com/github/technus/tectech/thing/item/TeslaCoilCover.java new file mode 100644 index 0000000000..8f2dfc0951 --- /dev/null +++ b/src/main/java/com/github/technus/tectech/thing/item/TeslaCoilCover.java @@ -0,0 +1,35 @@ +package com.github.technus.tectech.thing.item; + +import com.github.technus.tectech.CommonValues; +import cpw.mods.fml.common.registry.GameRegistry; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; + +import java.util.List; + +import static com.github.technus.tectech.Reference.MODID; + + +public final class TeslaCoilCover extends Item { + public static TeslaCoilCover INSTANCE; + + public TeslaCoilCover() { + setUnlocalizedName("tm.teslaCoilCover"); + setTextureName(MODID + ":itemParametrizerMemoryCardUnlocked"); + } + + @Override + public void addInformation(ItemStack aStack, EntityPlayer ep, List aList, boolean boo) { + aList.add(CommonValues.BASS_MARK); + aList.add("Tesla-Enables Machines!"); + aList.add(EnumChatFormatting.BLUE + "Use on a machine to apply Tesla capabilities"); + aList.add(EnumChatFormatting.BLUE + "Who the hell need cables anyway?"); + } + + public static void run() { + INSTANCE = new TeslaCoilCover(); + GameRegistry.registerItem(INSTANCE, INSTANCE.getUnlocalizedName()); + } +} diff --git a/src/main/java/com/github/technus/tectech/thing/item/TeslaCoilCoverUltimate.java b/src/main/java/com/github/technus/tectech/thing/item/TeslaCoilCoverUltimate.java new file mode 100644 index 0000000000..ca6734f8d6 --- /dev/null +++ b/src/main/java/com/github/technus/tectech/thing/item/TeslaCoilCoverUltimate.java @@ -0,0 +1,35 @@ +package com.github.technus.tectech.thing.item; + +import com.github.technus.tectech.CommonValues; +import cpw.mods.fml.common.registry.GameRegistry; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; + +import java.util.List; + +import static com.github.technus.tectech.Reference.MODID; + + +public final class TeslaCoilCoverUltimate extends Item { + public static TeslaCoilCoverUltimate INSTANCE; + + public TeslaCoilCoverUltimate() { + setUnlocalizedName("tm.teslaCoilCoverUltimate"); + setTextureName(MODID + ":itemParametrizerMemoryCardUnlocked"); + } + + @Override + public void addInformation(ItemStack aStack, EntityPlayer ep, List aList, boolean boo) { + aList.add(CommonValues.BASS_MARK); + aList.add("Tesla-Enables Machines! (BUT LOUDER!!)"); + aList.add(EnumChatFormatting.BLUE + "Use on a machine to apply Tesla capabilities"); + aList.add(EnumChatFormatting.BLUE + "Who the hell need cables anyway?"); + } + + public static void run() { + INSTANCE = new TeslaCoilCoverUltimate(); + GameRegistry.registerItem(INSTANCE, INSTANCE.getUnlocalizedName()); + } +} diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Capacitor.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Capacitor.java index 2aae2b8c2b..b27efb59e2 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Capacitor.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/GT_MetaTileEntity_Hatch_Capacitor.java @@ -1,11 +1,15 @@ package com.github.technus.tectech.thing.metaTileEntity.hatch; import com.github.technus.tectech.CommonValues; +import com.github.technus.tectech.Reference; +import com.github.technus.tectech.TecTech; import com.github.technus.tectech.Util; import com.github.technus.tectech.thing.metaTileEntity.hatch.gui.GT_Container_Capacitor; import com.github.technus.tectech.thing.metaTileEntity.hatch.gui.GT_GUIContainer_Capacitor; +import cpw.mods.fml.common.Loader; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.enums.ItemList; import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; @@ -16,22 +20,49 @@ import net.minecraft.client.renderer.texture.IIconRegister; 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.util.EnumChatFormatting; +import java.util.HashMap; +import java.util.Map; + +import static com.github.technus.tectech.CommonValues.V; +import static com.github.technus.tectech.Util.getUniqueIdentifier; +import static com.github.technus.tectech.loader.TecTechConfig.DEBUG_MODE; + /** * Created by Tec on 03.04.2017. */ public class GT_MetaTileEntity_Hatch_Capacitor extends GT_MetaTileEntity_Hatch { private static Textures.BlockIcons.CustomIcon EM_H; private static Textures.BlockIcons.CustomIcon EM_H_ACTIVE; + private static Map<String, GT_MetaTileEntity_Hatch_Capacitor.CapacitorComponent> componentBinds = new HashMap<>(); + public float energyStoredFrac = 0; public GT_MetaTileEntity_Hatch_Capacitor(int aID, String aName, String aNameRegional, int aTier, String descr) { - super(aID, aName, aNameRegional, aTier, 1, descr); + super(aID, aName, aNameRegional, aTier, 16, descr); Util.setTier(aTier,this); } public GT_MetaTileEntity_Hatch_Capacitor(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { - super(aName, aTier, 1, aDescription, aTextures); + super(aName, aTier, 16, aDescription, aTextures); + } + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + super.saveNBTData(aNBT); + aNBT.setFloat("energyStoredFrac", energyStoredFrac); + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + super.loadNBTData(aNBT); + energyStoredFrac = aNBT.getFloat("energyStoredFrac"); + } + + @Override + public int getInventoryStackLimit() { + return 1; } @Override @@ -102,18 +133,13 @@ public class GT_MetaTileEntity_Hatch_Capacitor extends GT_MetaTileEntity_Hatch { if (aBaseMetaTileEntity.isClientSide()) { return true; } - //if(aBaseMetaTileEntity.isActive()) - // aPlayer.addChatComponentMessage(new ChatComponentText("It is still active...")); - //else if(heat>0) - // aPlayer.addChatComponentMessage(new ChatComponentText("It is still warm...")); - //else aBaseMetaTileEntity.openGUI(aPlayer); return true; } @Override - public int getInventoryStackLimit() { - return 1; + public int getSizeInventory() { + return energyStoredFrac > 0.2 || getBaseMetaTileEntity().isActive() ? 0 : mInventory.length; } @Override @@ -124,6 +150,86 @@ public class GT_MetaTileEntity_Hatch_Capacitor extends GT_MetaTileEntity_Hatch { EnumChatFormatting.AQUA + "Stores 'nergy! (for a while)" }; } + + public long[] getCapacitors() { + long tier = -1; + long tCurrent = 0; + long tEnergyMax = 0; + for (int i = 0; i < mInventory.length; i++) { + if (mInventory[i] == null || mInventory[i].stackSize != 1) { + continue; + } + CapacitorComponent cap = componentBinds.get(getUniqueIdentifier(mInventory[i])); + if (cap != null && cap.tier > tier) { + tier = cap.tier; + } + } + if (tier >= 0) { + for (int i = 0; i < mInventory.length; i++) { + if (mInventory[i] == null || mInventory[i].stackSize != 1) { + continue; + } + CapacitorComponent cap = componentBinds.get(getUniqueIdentifier(mInventory[i])); + if (cap == null) { + continue; + } + if (cap.tier < tier) { + if (getBaseMetaTileEntity().isActive()) { + mInventory[i] = null; + getBaseMetaTileEntity().setOnFire(); + } + } else { + tCurrent += cap.current; + tEnergyMax += cap.energyMax; + } + } + } + return new long[]{tier, tCurrent, tEnergyMax}; + } + + public static void run() { + new GT_MetaTileEntity_Hatch_Capacitor.CapacitorComponent(Reference.MODID+":item.tm.teslaCoilCapacitor.0", 0, 1, V[0]*512);//LV Capacitor + new GT_MetaTileEntity_Hatch_Capacitor.CapacitorComponent(Reference.MODID+":item.tm.teslaCoilCapacitor.1", 1, 1, V[1]*512);//MV Capacitor + new GT_MetaTileEntity_Hatch_Capacitor.CapacitorComponent(Reference.MODID+":item.tm.teslaCoilCapacitor.2", 2, 1, V[2]*512);//HV Capacitor + new GT_MetaTileEntity_Hatch_Capacitor.CapacitorComponent(Reference.MODID+":item.tm.teslaCoilCapacitor.3", 3, 1, V[3]*512);//EV Capacitor + new GT_MetaTileEntity_Hatch_Capacitor.CapacitorComponent(Reference.MODID+":item.tm.teslaCoilCapacitor.4", 4, 1, V[4]*512);//IV Capacitor + new GT_MetaTileEntity_Hatch_Capacitor.CapacitorComponent(Reference.MODID+":item.tm.teslaCoilCapacitor.5", 5, 1, V[5]*512);//LuV Capacitor + new GT_MetaTileEntity_Hatch_Capacitor.CapacitorComponent(Reference.MODID+":item.tm.teslaCoilCapacitor.6", 6, 1, V[6]*512);//ZPM Capacitor + new GT_MetaTileEntity_Hatch_Capacitor.CapacitorComponent(Reference.MODID+":item.tm.teslaCoilCapacitor.7", 7, 1, V[7]*512);//UV Capacitor + } + + public static class CapacitorComponent implements Comparable<GT_MetaTileEntity_Hatch_Capacitor.CapacitorComponent> { + private final String unlocalizedName; + private final long tier, current, energyMax; + + CapacitorComponent(ItemStack is, long tier, long current, long energyMax) { + this(getUniqueIdentifier(is), tier, current, energyMax); + } + + CapacitorComponent(String is, long tier, long current, long energyMax) { + unlocalizedName = is; + this.tier = tier; + this.current = current; + this.energyMax = energyMax; + componentBinds.put(unlocalizedName, this); + if (DEBUG_MODE) { + TecTech.LOGGER.info("Tesla Capacitor registered: " + unlocalizedName); + } + } + + @Override + public int compareTo(CapacitorComponent o) { + return unlocalizedName.compareTo(o.unlocalizedName); + } + + @Override + public boolean equals(Object obj) { + if(obj instanceof CapacitorComponent) { + return compareTo((CapacitorComponent) obj) == 0; + } + return false; + } + } } diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_Container_Capacitor.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_Container_Capacitor.java index f368867736..0b27dc4f04 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_Container_Capacitor.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_Container_Capacitor.java @@ -1,38 +1,61 @@ package com.github.technus.tectech.thing.metaTileEntity.hatch.gui; +import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_Capacitor; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.gui.GT_ContainerMetaTile_Machine; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.ICrafting; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; -/** - * Created by Tec on 09.04.2017. - */ public class GT_Container_Capacitor extends GT_ContainerMetaTile_Machine { + public boolean charged = false; + public GT_Container_Capacitor(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { super(aInventoryPlayer, aTileEntity); } @Override public void addSlots(InventoryPlayer aInventoryPlayer) { - addSlotToContainer(new Slot(mTileEntity, 0, 80, 39)); + this.addSlotToContainer(new Slot(this.mTileEntity, 0, 53, 8)); + this.addSlotToContainer(new Slot(this.mTileEntity, 1, 71, 8)); + this.addSlotToContainer(new Slot(this.mTileEntity, 2, 89, 8)); + this.addSlotToContainer(new Slot(this.mTileEntity, 3, 107, 8)); + this.addSlotToContainer(new Slot(this.mTileEntity, 4, 53, 26)); + this.addSlotToContainer(new Slot(this.mTileEntity, 5, 71, 26)); + this.addSlotToContainer(new Slot(this.mTileEntity, 6, 89, 26)); + this.addSlotToContainer(new Slot(this.mTileEntity, 7, 107, 26)); + this.addSlotToContainer(new Slot(this.mTileEntity, 8, 53, 44)); + this.addSlotToContainer(new Slot(this.mTileEntity, 9, 71, 44)); + this.addSlotToContainer(new Slot(this.mTileEntity, 10, 89, 44)); + this.addSlotToContainer(new Slot(this.mTileEntity, 11, 107, 44)); + this.addSlotToContainer(new Slot(this.mTileEntity, 12, 53, 62)); + this.addSlotToContainer(new Slot(this.mTileEntity, 13, 71, 62)); + this.addSlotToContainer(new Slot(this.mTileEntity, 14, 89, 62)); + this.addSlotToContainer(new Slot(this.mTileEntity, 15, 107, 62)); } @Override - public int getSlotCount() { - return 1; - } + public int getSlotCount() { return 16; } + + @Override + public int getShiftClickSlotCount() { return getSlotCount(); } @Override - public int getShiftClickSlotCount() { - return 1; + public void detectAndSendChanges() { + super.detectAndSendChanges(); + if (mTileEntity.isClientSide() || mTileEntity.getMetaTileEntity() == null) { + return; + } + charged = ((GT_MetaTileEntity_Hatch_Capacitor) mTileEntity.getMetaTileEntity()).energyStoredFrac > 0; } @Override public ItemStack slotClick(int aSlotIndex, int aMouseclick, int aShifthold, EntityPlayer aPlayer) { - if (mActive != 0) { + if (charged || mActive != 0) { return null; } return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); @@ -40,7 +63,7 @@ public class GT_Container_Capacitor extends GT_ContainerMetaTile_Machine { @Override public ItemStack transferStackInSlot(EntityPlayer aPlayer, int aSlotIndex) { - if (mActive != 0) { + if (charged || mActive != 0) { return null; } return super.transferStackInSlot(aPlayer, aSlotIndex); @@ -48,7 +71,7 @@ public class GT_Container_Capacitor extends GT_ContainerMetaTile_Machine { @Override public boolean canDragIntoSlot(Slot par1Slot) { - if (mActive != 0) { + if (charged || mActive != 0) { return false; } return super.canDragIntoSlot(par1Slot); @@ -56,7 +79,7 @@ public class GT_Container_Capacitor extends GT_ContainerMetaTile_Machine { @Override public void putStacksInSlots(ItemStack[] par1ArrayOfItemStack) { - if (mActive != 0) { + if (charged || mActive != 0) { return; } super.putStacksInSlots(par1ArrayOfItemStack); @@ -64,7 +87,7 @@ public class GT_Container_Capacitor extends GT_ContainerMetaTile_Machine { @Override protected boolean mergeItemStack(ItemStack aStack, int aStartIndex, int aSlotCount, boolean par4) { - if (mActive != 0) { + if (charged || mActive != 0) { return false; } return super.mergeItemStack(aStack, aStartIndex, aSlotCount, par4); @@ -72,7 +95,7 @@ public class GT_Container_Capacitor extends GT_ContainerMetaTile_Machine { @Override public void putStackInSlot(int par1, ItemStack par2ItemStack) { - if (mActive != 0) { + if (charged || mActive != 0) { return; } super.putStackInSlot(par1, par2ItemStack); diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_GUIContainer_Capacitor.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_GUIContainer_Capacitor.java index fbc34f1e29..3850e7dc30 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_GUIContainer_Capacitor.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/hatch/gui/GT_GUIContainer_Capacitor.java @@ -4,17 +4,19 @@ import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import net.minecraft.entity.player.InventoryPlayer; -/** - * Created by Tec on 09.04.2017. - */ public class GT_GUIContainer_Capacitor extends GT_GUIContainerMetaTile_Machine { private final String mName; public GT_GUIContainer_Capacitor(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName) { - super(new GT_Container_Capacitor(aInventoryPlayer, aTileEntity), "gregtech:textures/gui/holder.png"); + super(new GT_Container_Capacitor(aInventoryPlayer, aTileEntity), "gregtech:textures/gui/4by4.png"); mName = aName; } + public GT_GUIContainer_Capacitor(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, String aBackground) { + super(new GT_Container_Capacitor(aInventoryPlayer, aTileEntity), "gregtech:textures/gui/" + aBackground + "4by4.png"); + this.mName = aName; + } + @Override protected void drawGuiContainerForegroundLayer(int par1, int par2) { fontRendererObj.drawString(mName, 8, 4, 4210752); @@ -23,13 +25,8 @@ public class GT_GUIContainer_Capacitor extends GT_GUIContainerMetaTile_Machine { @Override protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) { super.drawGuiContainerBackgroundLayer(par1, par2, par3); - int x = (width - xSize) / 2; - int y = (height - ySize) / 2; - drawTexturedModalRect(x, y, 0, 0, xSize, ySize); - if (mContainer != null) { - if (((GT_Container_Capacitor) mContainer).mActive == 1) { - drawTexturedModalRect(x + 151, y + 23, 183, 23, 18, 18); - } - } + int x = (this.width - this.xSize) / 2; + int y = (this.height - this.ySize) / 2; + this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); } } 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 c2b6589901..66b67236de 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 @@ -241,11 +241,13 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB } } - @Override + @Override//Had a crash bug with breaking a rack and then the multi public void onRemoval() { super.onRemoval(); - for (GT_MetaTileEntity_Hatch_Rack r : eRacks) { - r.getBaseMetaTileEntity().setActive(false); + for (GT_MetaTileEntity_Hatch_Rack rack : eRacks) { + if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(rack)) { + rack.getBaseMetaTileEntity().setActive(false); + } } } @@ -253,8 +255,10 @@ public class GT_MetaTileEntity_EM_computer extends GT_MetaTileEntity_MultiblockB public void stopMachine() { super.stopMachine(); eAvailableData=0; - for (GT_MetaTileEntity_Hatch_Rack r : eRacks) { - r.getBaseMetaTileEntity().setActive(false); + for (GT_MetaTileEntity_Hatch_Rack rack : eRacks) { + if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(rack)) { + rack.getBaseMetaTileEntity().setActive(false); + } } } 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 2c58006360..db3e2e8065 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java @@ -1,12 +1,11 @@ package com.github.technus.tectech.thing.metaTileEntity.multi; import com.github.technus.tectech.CommonValues; +import com.github.technus.tectech.thing.cover.GT_Cover_TM_TeslaCoil_Ultimate; import com.github.technus.tectech.thing.metaTileEntity.IConstructable; -import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_Capacitor; -import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_DynamoMulti; -import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_EnergyMulti; +import com.github.technus.tectech.thing.metaTileEntity.hatch.*; import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; -import com.github.technus.tectech.thing.metaTileEntity.multi.base.HatchAdder; +import com.github.technus.tectech.thing.metaTileEntity.single.GT_MetaTileEntity_TeslaCoil; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.Textures; @@ -20,29 +19,63 @@ import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; -import java.util.ArrayList; +import java.util.*; import static com.github.technus.tectech.CommonValues.V; import static com.github.technus.tectech.Util.StructureBuilder; +import static com.github.technus.tectech.Util.entriesSortedByValues; +import static com.github.technus.tectech.loader.TecTechConfig.DEBUG_MODE; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage; import static gregtech.api.GregTech_API.*; import static gregtech.api.enums.GT_Values.E; -/** - * Created by danie_000 on 17.12.2016. - * edited by Bass on like 2018-02-05 - */ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable {//TODO Add capacitors private static Textures.BlockIcons.CustomIcon ScreenOFF; private static Textures.BlockIcons.CustomIcon ScreenON; - private final ArrayList<GT_MetaTileEntity_Hatch_Capacitor> eCaps = new ArrayList<>(); private int tier = 0; private int orientation = 0; - private int scanTime = 0; - private int scanRadius = 64;//TODO Generate depending on power stored - private long euTOutMax = V[9] / 8;//TODO Generate depending on count and kind of capacitors - private ArrayList<GT_MetaTileEntity_TM_teslaCoil> eTeslaList = new ArrayList<>(); + + private int scanTime = 0; //Sets scan time to Z E R O :epic: + private int scanTimeMin = 100; //Min scan time in ticks + private int scanTimeTill = scanTimeMin; //Set default scan time + + private Map<IGregTechTileEntity, Integer> eTeslaMap = new HashMap<IGregTechTileEntity, Integer>(); //Tesla Map to map them tesla bois! + private final ArrayList<GT_MetaTileEntity_Hatch_Capacitor> eCaps = new ArrayList<>(); //Capacitor List + + private float histLow = 0.25F; //Power pass is disabled if power is under this fraction + private float histHigh = 0.75F; //Power pass is enabled if power is over this fraction + + private float histLowLimit = 0.05F; //How low can you configure it? + private float histHighLimit = 0.95F; //How high can you configure it? + + private int scanRadius = 32; //Tesla scan radius + + private int transferRadiusTower = 32; //Radius for tower to tower transfers + private int transferRadiusTransceiver = 16; //Radius for tower to transceiver transfers + private int transferRadiusCoverUltimate = 16; //Radius for tower to ultimate cover transfers + + private long outputVoltage = 0; //Tesla Voltage Output + private long outputCurrent = 0; //Tesla Current Output + private long energyCapacity = 0; //Total energy the tower can store + + public boolean powerPassToggle = false; //Power Pass for public viewing + + private boolean parametrized = false; //Assumes no parametrizer on initialisation + //Default parametrized variables + private long histLowParam = 0; + private long histHighParam = 0; + private long histScaleParam = 0; + private int transferRadiusTowerParam = 0; + private int transferRadiusTransceiverParam = 0; + private int transferRadiusCoverUltimateParam = 0; + private long outputVoltageParam = 0; + private long outputCurrentParam = 0; + private int scanTimeMinParam = 0; + + public int vTier = -1; + public int pTier = 0; + public int sTier = 0; //region structure private static final String[][] shape0 = new String[][]{//3 16 0 @@ -88,7 +121,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock private static final byte[] blockMetaT1 = new byte[]{15, 1, 13, 0}; private static final byte[] blockMetaT2 = new byte[]{15, 2, 13, 0}; private static final byte[][] blockMetas = new byte[][]{blockMetaT0,blockMetaT1,blockMetaT2}; - private final HatchAdder[] addingMethods = new HatchAdder[]{this::addCapacitorToMachineList, this::addFrameToMachineList}; + private static final String[] addingMethods = new String[]{"addCapacitorToMachineList", "addFrameToMachineList"}; private static final short[] casingTextures = new short[]{29, 0}; private static final Block[] blockTypeFallback = new Block[]{sBlockCasings2, null}; private static final byte[] blockMetaFallback = new byte[]{13, 0}; @@ -122,7 +155,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock @Override public long maxEUStore() { - return V[9] * 2; + return energyCapacity * 2; } @Override @@ -134,8 +167,30 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock } @Override + public void onRemoval() { + super.onRemoval(); + for (GT_MetaTileEntity_Hatch_Capacitor cap : eCaps) { + cap.getBaseMetaTileEntity().setActive(false); + } + } + + @Override + public void stopMachine() { + super.stopMachine(); + for (GT_MetaTileEntity_Hatch_Capacitor cap : eCaps) { + cap.getBaseMetaTileEntity().setActive(false); + } + } + + @Override public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { + for (GT_MetaTileEntity_Hatch_Capacitor cap : eCaps) { + if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(cap)) { + cap.getBaseMetaTileEntity().setActive(false); + } + } eCaps.clear(); + int coilX0 = 0; int coilX1 = 0; int coilX2 = 0; @@ -218,7 +273,15 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock return false; } - return structureCheck_EM(shapes[orientation], blockType, blockMetas[tier], addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, xOffset, yOffset, zOffset); + if (structureCheck_EM(shapes[orientation], blockType, blockMetas[tier], addingMethods, casingTextures, blockTypeFallback, blockMetaFallback, xOffset, yOffset, zOffset) && eCaps.size() > 0) { + for (GT_MetaTileEntity_Hatch_Capacitor cap : eCaps) { + if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(cap)) { + cap.getBaseMetaTileEntity().setActive(iGregTechTileEntity.isActive()); + } + } + return true; + } + return false; } @Override @@ -245,67 +308,238 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock public boolean checkRecipe_EM(ItemStack itemStack) { mEfficiencyIncrease = 10000; mMaxProgresstime = 20; + vTier = -1; + energyCapacity = 0; + outputCurrent = 0; + long[] capacitorData; + for (GT_MetaTileEntity_Hatch_Capacitor cap : eCaps) { + if (!GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(cap)) { + continue; + } + if (cap.getCapacitors()[0] > vTier) { + vTier = (int) cap.getCapacitors()[0]; + } + } + if(vTier < 0){ return false; } + outputVoltage = V[vTier]; + for (GT_MetaTileEntity_Hatch_Capacitor cap : eCaps) { + if (!GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(cap)) { + continue; + } + cap.getBaseMetaTileEntity().setActive(true); + capacitorData = cap.getCapacitors(); + if (capacitorData[0] < vTier) { + if(getEUVar() > 0 && capacitorData[0] != 0){ + cap.getBaseMetaTileEntity().setToFire(); + System.out.println("Oman oman a hatch burst into flame!"); + } + eCaps.remove(cap); + } else { + outputCurrent += capacitorData[1]; + energyCapacity += capacitorData[2]; + } + } return true; } @Override public boolean onRunningTick(ItemStack aStack) { - IGregTechTileEntity mte = getBaseMetaTileEntity(); - - if (mte.isClientSide()) { + if (getBaseMetaTileEntity().isClientSide()) { return true; } + //Parametrizer hatch loader TODO Add parametrizer detection + if (false) { + parametrized = true; + histLowParam = 0; + histHighParam = 0; + histScaleParam = 0; + transferRadiusTowerParam = 0; + transferRadiusTransceiverParam = 0; + transferRadiusCoverUltimateParam = 0; + outputVoltageParam = 0; + outputCurrentParam = 0; + scanTimeMin = 0; + } else { + parametrized = false; + } + + ////Hysteresis based ePowerPass Config + long energyMax = maxEUStore() / 2; + long energyStored = getEUVar(); + + float energyFrac = (float)energyStored/energyMax; + + for (GT_MetaTileEntity_Hatch_Capacitor cap : eCaps) { + if (!GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(cap)) { + continue; + } + cap.energyStoredFrac = energyFrac; + } + + //Hysteresis Parameters sanity check + if (parametrized && histScaleParam > 0 && histLowParam > 0 && histScaleParam <= histHighParam && histLowParam < histHighParam) { + float histLowt = (float)histLowParam/histScaleParam; + if (histLowt >= histLowLimit){ + histLow = histLowt; + } else { + histLow = histLowLimit; + } - if (!ePowerPass && getEUVar() > maxEUStore() / 2 * 0.8) { + float histHight = (float)histHighParam/histScaleParam; + if (histHight <= histHighLimit){ + histHigh = histHight; + } else { + histHigh = histHighLimit; + } + } + + //TODO Fix this because something broke it :L + //ePowerPass hist toggle + if (!ePowerPass && energyFrac > histHigh) { ePowerPass = true; - } else if (ePowerPass && getEUVar() < maxEUStore() / 2 * 0.2) { + } else if (ePowerPass && energyFrac < histLow) { ePowerPass = false; } + powerPassToggle = ePowerPass; - if (ePowerPass) { - scanTime++; - if (scanTime == 100) { - scanTime = 0; - eTeslaList.clear(); - - for (int xPosOffset = -scanRadius; xPosOffset <= scanRadius; xPosOffset++) { - for (int yPosOffset = -scanRadius; yPosOffset <= scanRadius; yPosOffset++) { - for (int zPosOffset = -scanRadius; zPosOffset <= scanRadius; zPosOffset++) { - IGregTechTileEntity node = mte.getIGregTechTileEntityOffset(xPosOffset, yPosOffset, zPosOffset); - if (node == null) { - continue; - } - IMetaTileEntity nodeInside = node.getMetaTileEntity(); - if (nodeInside instanceof GT_MetaTileEntity_TM_teslaCoil && node.isActive()) { - eTeslaList.add((GT_MetaTileEntity_TM_teslaCoil) nodeInside); - } + ////Scanning for active teslas + + if (parametrized && scanTimeMinParam > scanTimeMin) { + scanTimeTill = scanTimeMinParam; + } + + scanTime++; + if (scanTime >= scanTimeTill) { + scanTime = 0; + eTeslaMap.clear(); + + for (int xPosOffset = -scanRadius; xPosOffset <= scanRadius; xPosOffset++) { + for (int yPosOffset = -scanRadius; yPosOffset <= scanRadius; yPosOffset++) { + for (int zPosOffset = -scanRadius; zPosOffset <= scanRadius; zPosOffset++) { + if (xPosOffset == 0 && yPosOffset == 0 && zPosOffset == 0) { + continue; + } + IGregTechTileEntity node = getBaseMetaTileEntity().getIGregTechTileEntityOffset(xPosOffset, yPosOffset, zPosOffset); + if (node == null) { + continue; + } + IMetaTileEntity nodeInside = node.getMetaTileEntity(); + if (nodeInside instanceof GT_MetaTileEntity_TeslaCoil || nodeInside instanceof GT_MetaTileEntity_TM_teslaCoil && node.isActive() || (node.getCoverBehaviorAtSide((byte) 1) instanceof GT_Cover_TM_TeslaCoil_Ultimate)) { + eTeslaMap.put(node, (int) Math.ceil(Math.sqrt(xPosOffset * xPosOffset + yPosOffset * yPosOffset + zPosOffset * zPosOffset))); } } } } + } + + //Stuff to do if ePowerPass + if (powerPassToggle) { + if (parametrized && outputVoltageParam > 0 && outputVoltage > outputVoltageParam) { + outputVoltage = outputVoltageParam; + } + + if (parametrized && outputCurrentParam > 0 && outputCurrent > outputCurrentParam) { + outputCurrent = outputCurrentParam; + } + + transferRadiusTower = 32; //TODO generate based on power stored + transferRadiusTransceiver = 16; //TODO generate based on power stored + transferRadiusCoverUltimate = 16; //TODO generate based on power stored + + if (parametrized && transferRadiusTowerParam > 0 && transferRadiusTowerParam < transferRadiusTower) { + transferRadiusTower = transferRadiusTowerParam; + } + + if (parametrized && transferRadiusTransceiverParam > 0 && transferRadiusTransceiverParam < transferRadiusTransceiver) { + transferRadiusTransceiver = transferRadiusTransceiverParam; + } + + if (parametrized && transferRadiusCoverUltimateParam > 0 && transferRadiusCoverUltimateParam < transferRadiusCoverUltimate) { + transferRadiusCoverUltimate = transferRadiusCoverUltimateParam; + } - float xPos = mte.getXCoord() + 0.5f; - float yPos = mte.getYCoord() + 0.5f; - float zPos = mte.getZCoord() + 0.5f; - long reqSum = 0; - for (GT_MetaTileEntity_TM_teslaCoil Rx : eTeslaList.toArray(new GT_MetaTileEntity_TM_teslaCoil[eTeslaList.size()])) { - try { - reqSum += Rx.maxEUStore() - Rx.getEUVar(); - } catch (Exception e) { - eTeslaList.remove(Rx); + //Clean the eTeslaMap + for (Map.Entry<IGregTechTileEntity, Integer> Rx : eTeslaMap.entrySet()) { + IGregTechTileEntity node = Rx.getKey(); + if (node != null) { + IMetaTileEntity nodeInside = node.getMetaTileEntity(); + try { + if (nodeInside instanceof GT_MetaTileEntity_TM_teslaCoil && node.isActive()) { + GT_MetaTileEntity_TM_teslaCoil teslaTower = (GT_MetaTileEntity_TM_teslaCoil) nodeInside; + if (teslaTower.maxEUStore() > 0) { + continue; + } + } else if (nodeInside instanceof GT_MetaTileEntity_TeslaCoil) { + GT_MetaTileEntity_TeslaCoil teslaCoil = (GT_MetaTileEntity_TeslaCoil) nodeInside; + if (teslaCoil.getStoredEnergy()[1] > 0) { + continue; + } + } else if ((node.getCoverBehaviorAtSide((byte) 1) instanceof GT_Cover_TM_TeslaCoil_Ultimate) && node.getEUCapacity() > 0) { + continue; + } + } catch (Exception e) { + } } + eTeslaMap.remove(Rx.getKey()); } - for (GT_MetaTileEntity_TM_teslaCoil Rx : eTeslaList) { - if (!Rx.ePowerPass) { - long euTran = (euTOutMax * (Rx.maxEUStore() - Rx.getEUVar())) / reqSum; - if (Rx.getEUVar() + euTran <= Rx.maxEUStore() && getEUVar() - euTran >= 0) { - setEUVar(getEUVar() - euTran); - Rx.getBaseMetaTileEntity().increaseStoredEnergyUnits(euTran, true);//might work QUESTION POINT; - //mte.getWorld().playSoundEffect(xPos, yPos, zPos, Reference.MODID + ":microwave_ding", 1, 1); + //Power transfer + long sparks = outputCurrent; + System.out.println("Output Current at: " + outputCurrent + "A" ); + long sparkz = 0; + while (sparks > 0) { + boolean idle = true; + for (Map.Entry<IGregTechTileEntity, Integer> Rx : entriesSortedByValues(eTeslaMap)) { + if(energyStored > outputVoltage) { + IGregTechTileEntity node = Rx.getKey(); + IMetaTileEntity nodeInside = node.getMetaTileEntity(); + long euTran = outputVoltage;//TODO Efficency? + + if (nodeInside instanceof GT_MetaTileEntity_TM_teslaCoil && Rx.getValue() <= transferRadiusTower) { + GT_MetaTileEntity_TM_teslaCoil nodeTesla = (GT_MetaTileEntity_TM_teslaCoil) nodeInside; + if (!nodeTesla.powerPassToggle) { + if (nodeTesla.getEUVar() + euTran <= (nodeTesla.maxEUStore() / 2)) { + setEUVar(getEUVar() - euTran); + node.increaseStoredEnergyUnits(euTran, true); + sparks--; + sparkz++; + idle = false; + } + } + } else if (nodeInside instanceof GT_MetaTileEntity_TeslaCoil && Rx.getValue() <= transferRadiusTransceiver) { + GT_MetaTileEntity_TeslaCoil nodeTesla = (GT_MetaTileEntity_TeslaCoil) nodeInside; + if (!nodeTesla.powerPassToggle) { + if (node.injectEnergyUnits((byte) 6, euTran, 1L) > 0L) { + setEUVar(getEUVar() - euTran); + sparks--; + sparkz++; + idle = false; + } + } + } else if ((node.getCoverBehaviorAtSide((byte) 1) instanceof GT_Cover_TM_TeslaCoil_Ultimate) && Rx.getValue() <= transferRadiusCoverUltimate) { + if (node.injectEnergyUnits((byte) 1, euTran, 1L) > 0L) { + setEUVar(getEUVar() - euTran); + sparks--; + sparkz++; + idle = false; + } + } + if (sparks == 0) { + System.out.println("Fresh out of sparks!"); + break; + } + } else { + idle = true; + System.out.println("ENERGY LOW!"); + break; } } + if (idle) { + System.out.println("IDLE DROP!"); + break; + } } + System.out.println("I sent a total of :" + sparkz + " This tick!"); } return true; } @@ -346,6 +580,21 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex); return eDynamoMulti.add((GT_MetaTileEntity_Hatch_DynamoMulti) aMetaTileEntity); } + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Param) { + ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex); + return eParamHatches.add((GT_MetaTileEntity_Hatch_Param) aMetaTileEntity); + } return false; } + + public static void run() { + try { + adderMethodMap.put("addFrameToMachineList", GT_MetaTileEntity_TM_teslaCoil.class.getMethod("addFrameToMachineList", IGregTechTileEntity.class, int.class)); + adderMethodMap.put("addCapacitorToMachineList", GT_MetaTileEntity_TM_teslaCoil.class.getMethod("addCapacitorToMachineList", IGregTechTileEntity.class, int.class)); + } catch (NoSuchMethodException e) { + if (DEBUG_MODE) { + e.printStackTrace(); + } + } + } } 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 new file mode 100644 index 0000000000..c1a66eb83b --- /dev/null +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/single/GT_MetaTileEntity_TeslaCoil.java @@ -0,0 +1,269 @@ +package com.github.technus.tectech.thing.metaTileEntity.single;
+
+import com.github.technus.tectech.Util;
+import com.github.technus.tectech.thing.cover.GT_Cover_TM_TeslaCoil;
+import com.github.technus.tectech.thing.cover.GT_Cover_TM_TeslaCoil_Ultimate;
+import com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_TM_teslaCoil;
+import eu.usrv.yamcore.auxiliary.PlayerChatHelper;
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.metatileentity.MetaTileEntity;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicBatteryBuffer;
+import net.minecraft.entity.player.EntityPlayer;
+
+
+import java.util.*;
+
+import static com.github.technus.tectech.CommonValues.V;
+import static com.github.technus.tectech.Util.entriesSortedByValues;
+import static java.lang.Math.round;
+
+
+public class GT_MetaTileEntity_TeslaCoil extends GT_MetaTileEntity_BasicBatteryBuffer {
+ private int maxTier = 4; //Max tier of transceiver
+ private int minTier = 1; //Min tier of transceiver
+
+ private Map<IGregTechTileEntity, Integer> eTeslaMap = new HashMap<IGregTechTileEntity, Integer>();//Tesla Map to map them tesla bois!
+ private int scanTime = 0; //Sets scan time to Z E R O :epic:
+ private int scanTimeMin = 100; //Min scan time in ticks
+ private int scanTimeTill = scanTimeMin; //Set default scan time
+ private int scanRadiusMax = 20; //Tesla scan radius
+ private int scanRadiusMin = 4; //Tesla scan radius
+ private int scanRadiusLimitTop = scanRadiusMin + (scanRadiusMax - scanRadiusMin) / (maxTier - minTier + 1) * (mTier - 1); //Tesla scan radius Formula
+ private int scanRadiusLimitBottom = 1; //Minimum user configurable scanRadius
+ private int scanRadius = scanRadiusLimitTop; //Default scanRadius setting
+ private int transferRadiusTower = 0; //Radius for transceiver to tower transfers
+ private int transferRadiusCover = 0; //Radius for transceiver to cover transfers
+
+ public boolean powerPassToggle = false; //Power Pass for public viewing
+ private int histSteps = 20; //Hysteresis Resolution
+ private int histSettingLow = 3; //Hysteresis Low Limit
+ private int histSettingHigh = 15; //Hysteresis High Limit
+ private int histLowLimit = 1; //How low can you configure it?
+ private int histHighLimit = histSteps - 1; //How high can you configure it?
+ private float histLow = (float) histSettingLow / histSteps; //Power pass is disabled if power is under this fraction
+ private float histHigh = (float) histSettingHigh / histSteps; //Power pass is enabled if power is over this fraction
+
+ private long lossPerBlock = 2; //EU lost per block traveled
+ private float energyEfficiencyMax = 0.95F; //Max efficiency
+ private float energyEfficiencyMin = 0.75F; //Min efficiency
+ private float overdriveEfficiency = 0.95F; //Overdrive efficiency
+ private float energyEfficiency = energyEfficiencyMin + (energyEfficiencyMax - energyEfficiencyMin) / (maxTier - minTier + 1) * (mTier - 1); //Efficiency Formula
+ private float sumOverdriveEfficiency = (2-energyEfficiency)*(2- overdriveEfficiency); //Sum overdrive efficiency formula
+
+ public boolean overDriveToggle = false; //Overdrive toggle
+ private long outputVoltage = V[mTier]; //Tesla Voltage Output
+ private long outputVoltagePostEfficiency = (long) (outputVoltage * energyEfficiency); //Max power a machine can actually receive
+ private long outputVoltagePostOverdrive = (long) (outputVoltage * sumOverdriveEfficiency); //Max power the sender can consume
+ private long outputVoltageInjectable = 0; //How much EU will be received post distance losses
+ private long outputVoltageConsumption = 0; //How much EU will be drained
+ private long outputCurrent = 0; //Tesla Current Output
+
+ public GT_MetaTileEntity_TeslaCoil(int aID, String aName, String aNameRegional, int aTier, int aSlotCount) {
+ super(aID, aName, aNameRegional, aTier, "Tesla Coil Transceiver", aSlotCount);
+ Util.setTier(aTier, this);
+ }
+
+ public GT_MetaTileEntity_TeslaCoil(String aName, int aTier, String aDescription, ITexture[][][] aTextures, int aSlotCount) {
+ super(aName, aTier, aDescription, aTextures, aSlotCount);
+ }
+
+ @Override
+ public boolean onSolderingToolRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) {
+ if (overDriveToggle) {
+ overDriveToggle = false;
+ PlayerChatHelper.SendInfo(aPlayer, "Overdrive Disengaged");
+ } else {
+ overDriveToggle = true;
+ PlayerChatHelper.SendInfo(aPlayer, "Overdrive Engaged");
+ }
+ return true;
+ }
+
+ @Override
+ public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) {
+ if (aPlayer.isSneaking()) {
+ if (histSettingHigh < histHighLimit) {
+ histSettingHigh++;
+ } else {
+ histSettingHigh = histSettingLow + 1;
+ }
+ histHigh = (float) histSettingHigh / histSteps;
+ PlayerChatHelper.SendInfo(aPlayer, "Hysteresis High Changed to " + round(histHigh * 100F) + "%");
+ } else {
+ if (histSettingLow > histLowLimit) {
+ histSettingLow--;
+ } else {
+ histSettingLow = histSettingHigh - 1;
+ }
+ histLow = (float) histSettingLow / histSteps;
+ PlayerChatHelper.SendInfo(aPlayer, "Hysteresis Low Changed to " + round(histLow * 100F) + "%");
+ }
+ }
+
+ @Override
+ public boolean onWireCutterRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) {
+ if (aPlayer.isSneaking()) {
+ if (scanRadius > scanRadiusLimitBottom) {
+ scanRadius--;
+ } else {
+ scanRadius = scanRadiusLimitTop;
+ }
+ } else {
+ if (scanRadius < scanRadiusLimitTop) {
+ scanRadius++;
+ } else {
+ scanRadius = scanRadiusLimitBottom;
+ }
+ }
+ PlayerChatHelper.SendInfo(aPlayer, "Tesla Radius Changed to " + scanRadius + " Blocks");
+ return false;
+ }
+
+ // Cheeky skrub stuff to get machine to switch powerPass on soft mallet
+ @Override
+ public boolean hasAlternativeModeText() {
+ return true;
+ }
+
+ @Override
+ public String getAlternativeModeText() {
+ ////Hysteresis based ePowerPass Config
+ long energyMax = getStoredEnergy()[1];
+ long energyStored = getStoredEnergy()[0];
+ float energyFrac = (float) energyStored / energyMax;
+
+ //ePowerPass hist toggle
+ if (energyFrac > histHigh) {
+ powerPassToggle = true;
+ } else if (energyFrac < histLow) {
+ powerPassToggle = false;
+ } else {
+ powerPassToggle = !powerPassToggle;
+ }
+
+ //And after this cheeky-ness, toss the string XD
+ return powerPassToggle ? "Sending Power!" : "Receiving Power!";
+ }
+
+ @Override
+ public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
+ return new GT_MetaTileEntity_TeslaCoil(mName, mTier, mDescription, mTextures, mInventory.length);
+ }
+
+ @Override
+ public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
+ super.onPostTick(aBaseMetaTileEntity, aTick);
+ if (aBaseMetaTileEntity.isServerSide()) {
+
+ ////Hysteresis based ePowerPass Config
+ long energyMax = getStoredEnergy()[1];
+ long energyStored = getStoredEnergy()[0];
+ float energyFraction = (float) energyStored / energyMax;
+
+ //ePowerPass hist toggle
+ if (!powerPassToggle && energyFraction > histHigh) {
+ powerPassToggle = true;
+ } else if (powerPassToggle && energyFraction < histLow) {
+ powerPassToggle = false;
+ }
+
+ ////Scanning for active teslas
+ scanTime++;
+ if (scanTime >= scanTimeTill) {
+ scanTime = 0;
+ eTeslaMap.clear();
+
+ for (int xPosOffset = -scanRadius; xPosOffset <= scanRadius; xPosOffset++) {
+ for (int yPosOffset = -scanRadius; yPosOffset <= scanRadius; yPosOffset++) {
+ for (int zPosOffset = -scanRadius; zPosOffset <= scanRadius; zPosOffset++) {
+ if (xPosOffset == 0 && yPosOffset == 0 && zPosOffset == 0) {
+ continue;
+ }
+ IGregTechTileEntity node = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xPosOffset, yPosOffset, zPosOffset);
+ if (node == null) {
+ continue;
+ }
+ IMetaTileEntity nodeInside = node.getMetaTileEntity();
+ if (nodeInside instanceof GT_MetaTileEntity_TM_teslaCoil && node.isActive() || (node.getCoverBehaviorAtSide((byte) 1) instanceof GT_Cover_TM_TeslaCoil)) {
+ eTeslaMap.put(node, (int) Math.ceil(Math.sqrt(xPosOffset * xPosOffset + yPosOffset * yPosOffset + zPosOffset * zPosOffset)));
+ }
+ }
+ }
+ }
+ }
+
+ //Stuff to do if ePowerPass
+ if (powerPassToggle) {
+ outputCurrent = mBatteryCount;
+ transferRadiusTower = (int) (scanRadius * energyFraction);
+ transferRadiusCover = (int) (transferRadiusTower / 1.5);
+
+ //Clean the eTeslaMap
+ for (Map.Entry<IGregTechTileEntity, Integer> Rx : eTeslaMap.entrySet()) {
+ IGregTechTileEntity node = Rx.getKey();
+ if (node != null) {
+ IMetaTileEntity nodeInside = node.getMetaTileEntity();
+ try {
+ if (nodeInside instanceof GT_MetaTileEntity_TM_teslaCoil && node.isActive()) {
+ GT_MetaTileEntity_TM_teslaCoil teslaTower = (GT_MetaTileEntity_TM_teslaCoil) nodeInside;
+ if (teslaTower.maxEUStore() > 0) {
+ continue;
+ }
+ } else if ((node.getCoverBehaviorAtSide((byte) 1) instanceof GT_Cover_TM_TeslaCoil) && node.getEUCapacity() > 0) {
+ continue;
+ }
+ } catch (Exception e) {
+ }
+ }
+ eTeslaMap.remove(Rx.getKey());
+ }
+
+ //Power transfer
+ while (outputCurrent > 0) {
+ boolean idle = true;
+ for (Map.Entry<IGregTechTileEntity, Integer> Rx : entriesSortedByValues(eTeslaMap)) {
+ if (getEUVar() >= (overDriveToggle ? outputVoltage*2 : outputVoltage)) {
+ IGregTechTileEntity node = Rx.getKey();
+ IMetaTileEntity nodeInside = node.getMetaTileEntity();
+ if (overDriveToggle){
+ outputVoltageInjectable = outputVoltage;
+ outputVoltageConsumption = outputVoltagePostOverdrive + (lossPerBlock * Rx.getValue());
+ } else {
+ outputVoltageInjectable = outputVoltagePostEfficiency - (lossPerBlock * Rx.getValue());
+ outputVoltageConsumption = outputVoltage;
+ }
+ if (nodeInside instanceof GT_MetaTileEntity_TM_teslaCoil && Rx.getValue() <= transferRadiusTower) {
+ GT_MetaTileEntity_TM_teslaCoil nodeTesla = (GT_MetaTileEntity_TM_teslaCoil) nodeInside;
+ if (!nodeTesla.powerPassToggle) {
+ if (nodeTesla.getEUVar() + outputVoltageInjectable <= (nodeTesla.maxEUStore() / 2)) {
+ setEUVar(getEUVar() - outputVoltageConsumption);
+ node.increaseStoredEnergyUnits(outputVoltageInjectable, true);
+ outputCurrent--;
+ idle = false;
+ }
+ }
+ } else if ((node.getCoverBehaviorAtSide((byte) 1) instanceof GT_Cover_TM_TeslaCoil) && !(node.getCoverBehaviorAtSide((byte) 1) instanceof GT_Cover_TM_TeslaCoil_Ultimate) && Rx.getValue() <= transferRadiusCover) {
+ if (node.injectEnergyUnits((byte) 1, outputVoltageInjectable, 1L) > 0L) {
+ setEUVar(getEUVar() - outputVoltageConsumption);
+ outputCurrent--;
+ idle = false;
+ }
+ }
+ if (outputCurrent == 0) {
+ break;
+ }
+ } else {
+ idle = true;
+ break;
+ }
+ }
+ if (idle) {
+ break;
+ }
+ }
+ }
+ }
+ }
+}
\ No newline at end of file diff --git a/src/main/resources/assets/tectech/lang/en_US.lang b/src/main/resources/assets/tectech/lang/en_US.lang index ccb17a8a0c..ac36e32772 100644 --- a/src/main/resources/assets/tectech/lang/en_US.lang +++ b/src/main/resources/assets/tectech/lang/en_US.lang @@ -9,6 +9,9 @@ item.em.frontRotate.name=Front Rotation Scrench item.em.parametrizerMemoryCard.name=Parametrizer Memory Card item.em.EuMeterGT.name=GT EU meter +item.tm.teslaCoilCover.name=Tesla Coil Cover +item.tm.teslaCoilCoverUltimate.name=Tesla Coil Cover Rich Edition + death.attack.microwaving=%1$s was dehydrated by radiation. death.attack.microwaving.player=%1$s was dehydrated by radiation while fighting %2$s. |