aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/tectech/loader
diff options
context:
space:
mode:
authorNotAPenguin <michiel.vandeginste@gmail.com>2024-09-02 23:17:17 +0200
committerGitHub <noreply@github.com>2024-09-02 23:17:17 +0200
commit1b820de08a05070909a267e17f033fcf58ac8710 (patch)
tree02831a025986a06b20f87e5bcc69d1e0c639a342 /src/main/java/tectech/loader
parentafd3fd92b6a6ab9ab0d0dc3214e6bc8ff7a86c9b (diff)
downloadGT5-Unofficial-1b820de08a05070909a267e17f033fcf58ac8710.tar.gz
GT5-Unofficial-1b820de08a05070909a267e17f033fcf58ac8710.tar.bz2
GT5-Unofficial-1b820de08a05070909a267e17f033fcf58ac8710.zip
The Great Renaming (#3014)
* move kekztech to a single root dir * move detrav to a single root dir * move gtnh-lanthanides to a single root dir * move tectech and delete some gross reflection in gt++ * remove more reflection inside gt5u * delete more reflection in gt++ * fix imports * move bartworks and bwcrossmod * fix proxies * move galactigreg and ggfab * move gtneioreplugin * try to fix gt++ bee loader * apply the rename rules to BW * apply rename rules to bwcrossmod * apply rename rules to detrav scanner mod * apply rename rules to galacticgreg * apply rename rules to ggfab * apply rename rules to goodgenerator * apply rename rules to gtnh-lanthanides * apply rename rules to gt++ * apply rename rules to kekztech * apply rename rules to kubatech * apply rename rules to tectech * apply rename rules to gt apply the rename rules to gt * fix tt import * fix mui hopefully * fix coremod except intergalactic * rename assline recipe class * fix a class name i stumbled on * rename StructureUtility to GTStructureUtility to prevent conflict with structurelib * temporary rename of GTTooltipDataCache to old name * fix gt client/server proxy names
Diffstat (limited to 'src/main/java/tectech/loader')
-rw-r--r--src/main/java/tectech/loader/MainLoader.java206
-rw-r--r--src/main/java/tectech/loader/NetworkDispatcher.java25
-rw-r--r--src/main/java/tectech/loader/TecTechConfig.java271
-rw-r--r--src/main/java/tectech/loader/gui/CreativeTabTecTech.java36
-rw-r--r--src/main/java/tectech/loader/recipe/Assembler.java3091
-rw-r--r--src/main/java/tectech/loader/recipe/AssemblyLine.java169
-rw-r--r--src/main/java/tectech/loader/recipe/BaseRecipeLoader.java49
-rw-r--r--src/main/java/tectech/loader/recipe/CircuitAssembler.java54
-rw-r--r--src/main/java/tectech/loader/recipe/Crafting.java57
-rw-r--r--src/main/java/tectech/loader/recipe/Extractor.java67
-rw-r--r--src/main/java/tectech/loader/recipe/Godforge.java675
-rw-r--r--src/main/java/tectech/loader/recipe/ResearchStationAssemblyLine.java3709
-rw-r--r--src/main/java/tectech/loader/thing/CoverLoader.java47
-rw-r--r--src/main/java/tectech/loader/thing/MachineLoader.java2532
-rw-r--r--src/main/java/tectech/loader/thing/MuTeLoader.java21
-rw-r--r--src/main/java/tectech/loader/thing/ThingsLoader.java93
16 files changed, 11102 insertions, 0 deletions
diff --git a/src/main/java/tectech/loader/MainLoader.java b/src/main/java/tectech/loader/MainLoader.java
new file mode 100644
index 0000000000..801653ca4b
--- /dev/null
+++ b/src/main/java/tectech/loader/MainLoader.java
@@ -0,0 +1,206 @@
+package tectech.loader;
+
+import static gregtech.api.enums.Mods.NewHorizonsCoreMod;
+import static gregtech.api.enums.Mods.TwilightForest;
+import static tectech.TecTech.LOGGER;
+import static tectech.TecTech.configTecTech;
+import static tectech.TecTech.creativeTabTecTech;
+import static tectech.TecTech.proxy;
+import static tectech.loader.TecTechConfig.DEBUG_MODE;
+
+import java.util.HashMap;
+
+import net.minecraft.block.Block;
+import net.minecraft.util.DamageSource;
+import net.minecraftforge.fluids.Fluid;
+import net.minecraftforge.fluids.FluidStack;
+
+import cpw.mods.fml.common.ProgressManager;
+import cpw.mods.fml.common.registry.GameRegistry;
+import gregtech.api.GregTechAPI;
+import gregtech.api.enums.Materials;
+import gregtech.api.recipe.RecipeMaps;
+import gregtech.api.util.GTRecipe;
+import tectech.TecTech;
+import tectech.loader.gui.CreativeTabTecTech;
+import tectech.loader.recipe.BaseRecipeLoader;
+import tectech.loader.recipe.ResearchStationAssemblyLine;
+import tectech.loader.thing.CoverLoader;
+import tectech.loader.thing.MachineLoader;
+import tectech.loader.thing.ThingsLoader;
+import tectech.thing.casing.TTCasingsContainer;
+import tectech.thing.metaTileEntity.Textures;
+
+@SuppressWarnings("deprecation")
+public final class MainLoader {
+
+ public static DamageSource microwaving;
+
+ private MainLoader() {}
+
+ public static void preLoad() {
+ creativeTabTecTech = new CreativeTabTecTech("TecTech");
+
+ // set expanded texture arrays for tiers
+ try {
+ Textures.run();
+ } catch (Throwable t) {
+ LOGGER.error("Loading textures...", t);
+ }
+ }
+
+ public static void load() {
+ ProgressManager.ProgressBar progressBarLoad = ProgressManager.push("TecTech Loader", 6);
+
+ progressBarLoad.step("Regular Things");
+ new ThingsLoader().run();
+ LOGGER.info("Block/Item Init Done");
+
+ progressBarLoad.step("Machine Things");
+ new MachineLoader().run();
+ LOGGER.info("Machine Init Done");
+
+ progressBarLoad.step("Cover Things");
+ new CoverLoader().run();
+ LOGGER.info("Cover Init Done");
+
+ progressBarLoad.step("Add damage types");
+ microwaving = new DamageSource("microwaving").setDamageBypassesArmor();
+ LOGGER.info("Damage types addition Done");
+
+ progressBarLoad.step("Register Packet Dispatcher");
+ new NetworkDispatcher();
+ LOGGER.info("Packet Dispatcher registered");
+
+ progressBarLoad.step("Register GUI Handler");
+ proxy.registerRenderInfo();
+ LOGGER.info("GUI Handler registered");
+
+ ProgressManager.pop(progressBarLoad);
+ }
+
+ public static void postLoad() {
+ ProgressManager.ProgressBar progressBarPostLoad = ProgressManager.push("TecTech Post Loader", 4);
+
+ progressBarPostLoad.step("Dreamcraft Compatibility");
+ if (NewHorizonsCoreMod.isModLoaded()) {
+ try {
+ Class<?> clazz = Class.forName("com.dreammaster.gthandler.casings.GT_Container_CasingsNH");
+ TTCasingsContainer.sBlockCasingsNH = (Block) clazz.getField("sBlockCasingsNH")
+ .get(null);
+
+ if (TTCasingsContainer.sBlockCasingsNH == null) {
+ throw new NullPointerException("sBlockCasingsNH Is not set at this time");
+ }
+ } catch (Exception e) {
+ throw new Error("Unable to get NH casings", e);
+ }
+ }
+
+ progressBarPostLoad.step("Recipes");
+ new BaseRecipeLoader().run();
+ TecTech.LOGGER.info("Recipe Init Done");
+
+ if (!configTecTech.DISABLE_BLOCK_HARDNESS_NERF) {
+ progressBarPostLoad.step("Nerf blocks blast resistance");
+ adjustTwilightBlockResistance();
+ TecTech.LOGGER.info("Blocks nerf done");
+ } else {
+ progressBarPostLoad.step("Do not nerf blocks blast resistance");
+ TecTech.LOGGER.info("Blocks were not nerfed");
+ }
+
+ // ProgressManager.pop(progressBarPostLoad);
+ }
+
+ public static void addAfterGregTechPostLoadRunner() {
+ GregTechAPI.sAfterGTPostload.add(() -> {
+ if (TecTech.configTecTech.NERF_FUSION) {
+ FixBrokenFusionRecipes();
+ }
+ });
+ }
+
+ private static void FixBrokenFusionRecipes() {
+ HashMap<Fluid, Fluid> binds = new HashMap<>();
+ for (Materials material : Materials.values()) {
+ FluidStack p = material.getPlasma(1);
+ if (p != null) {
+ if (DEBUG_MODE) {
+ LOGGER.info("Found Plasma of " + material.mName);
+ }
+ if (material.mElement != null && (material.mElement.mProtons >= Materials.Iron.mElement.mProtons
+ || -material.mElement.mProtons >= Materials.Iron.mElement.mProtons
+ || material.mElement.mNeutrons >= Materials.Iron.mElement.mNeutrons
+ || -material.mElement.mNeutrons >= Materials.Iron.mElement.mNeutrons)) {
+ if (DEBUG_MODE) {
+ LOGGER.info("Attempting to bind " + material.mName);
+ }
+ if (material.getMolten(1) != null) {
+ binds.put(
+ p.getFluid(),
+ material.getMolten(1)
+ .getFluid());
+ } else if (material.getGas(1) != null) {
+ binds.put(
+ p.getFluid(),
+ material.getGas(1)
+ .getFluid());
+ } else if (material.getFluid(1) != null) {
+ binds.put(
+ p.getFluid(),
+ material.getFluid(1)
+ .getFluid());
+ } else {
+ binds.put(
+ p.getFluid(),
+ Materials.Iron.getMolten(1)
+ .getFluid());
+ }
+ }
+ }
+ }
+ for (GTRecipe r : RecipeMaps.fusionRecipes.getAllRecipes()) {
+ Fluid fluid = binds.get(r.mFluidOutputs[0].getFluid());
+ if (fluid != null) {
+ if (DEBUG_MODE) {
+ LOGGER.info("Nerfing Recipe " + r.mFluidOutputs[0].getUnlocalizedName());
+ }
+ r.mFluidOutputs[0] = new FluidStack(fluid, r.mFluidOutputs[0].amount);
+ }
+ fluid = binds.get(r.mFluidInputs[0].getFluid());
+ if (fluid != null) {
+ if (DEBUG_MODE) {
+ LOGGER.info("Fixing plasma use in Recipe " + r.mFluidInputs[0].getUnlocalizedName());
+ }
+ r.mFluidInputs[0] = new FluidStack(fluid, r.mFluidInputs[0].amount);
+ }
+ fluid = binds.get(r.mFluidInputs[1].getFluid());
+ if (fluid != null) {
+ if (DEBUG_MODE) {
+ LOGGER.info("Fixing plasma use in Recipe " + r.mFluidInputs[1].getUnlocalizedName());
+ }
+ r.mFluidInputs[1] = new FluidStack(fluid, r.mFluidInputs[1].amount);
+ }
+ }
+ }
+
+ private static void safeSetResistance(Block block, float resistance) {
+ if (block != null) {
+ block.setResistance(resistance);
+ }
+ }
+
+ private static void adjustTwilightBlockResistance() {
+ if (TwilightForest.isModLoaded()) {
+ safeSetResistance(GameRegistry.findBlock("TwilightForest", "tile.TFShield"), 30);
+ safeSetResistance(GameRegistry.findBlock("TwilightForest", "tile.TFThorns"), 10);
+ safeSetResistance(GameRegistry.findBlock("TwilightForest", "tile.TFTowerTranslucent"), 30);
+ safeSetResistance(GameRegistry.findBlock("TwilightForest", "tile.TFDeadrock"), 5);
+ }
+ }
+
+ public static void onLoadCompleted() {
+ new ResearchStationAssemblyLine().runLateRecipes();
+ }
+}
diff --git a/src/main/java/tectech/loader/NetworkDispatcher.java b/src/main/java/tectech/loader/NetworkDispatcher.java
new file mode 100644
index 0000000000..dd46715450
--- /dev/null
+++ b/src/main/java/tectech/loader/NetworkDispatcher.java
@@ -0,0 +1,25 @@
+package tectech.loader;
+
+import static tectech.Reference.MODID;
+
+import tectech.mechanics.pipe.PipeActivityMessage;
+import tectech.mechanics.spark.RendererMessage;
+
+public class NetworkDispatcher extends eu.usrv.yamcore.network.PacketDispatcher {
+
+ public static NetworkDispatcher INSTANCE;
+
+ public NetworkDispatcher() {
+ super(MODID);
+ INSTANCE = this;
+ registerPackets();
+ }
+
+ @Override
+ public void registerPackets() {
+ registerMessage(PipeActivityMessage.ServerHandler.class, PipeActivityMessage.PipeActivityQuery.class);
+ registerMessage(PipeActivityMessage.ClientHandler.class, PipeActivityMessage.PipeActivityData.class);
+
+ registerMessage(RendererMessage.ClientHandler.class, RendererMessage.RendererData.class);
+ }
+}
diff --git a/src/main/java/tectech/loader/TecTechConfig.java b/src/main/java/tectech/loader/TecTechConfig.java
new file mode 100644
index 0000000000..06ded34e01
--- /dev/null
+++ b/src/main/java/tectech/loader/TecTechConfig.java
@@ -0,0 +1,271 @@
+package tectech.loader;
+
+import java.io.File;
+
+import net.minecraft.launchwrapper.Launch;
+
+import eu.usrv.yamcore.config.ConfigManager;
+
+public class TecTechConfig extends ConfigManager {
+
+ public TecTechConfig(File pConfigBaseDirectory, String pModCollectionDirectory, String pModID) {
+ super(pConfigBaseDirectory, pModCollectionDirectory, pModID);
+ }
+
+ // final static to allow compiler to remove the debug code when this is false
+ public static boolean DEBUG_MODE = false;
+ public static boolean POWERLESS_MODE = false;
+ /**
+ * Not complete; enabled by default only in dev env
+ */
+ public boolean ENABLE_GOD_FORGE;
+
+ public boolean BOOM_ENABLE;
+ public boolean DISABLE_BLOCK_HARDNESS_NERF;
+ public boolean EASY_SCAN;
+ public boolean NERF_FUSION;
+ public boolean ENABLE_TURRET_EXPLOSIONS;
+ public float TURRET_DAMAGE_FACTOR;
+ public float TURRET_EXPLOSION_FACTOR;
+
+ public boolean MOD_ADMIN_ERROR_LOGS;
+
+ public boolean TESLA_MULTI_GAS_OUTPUT;
+ public float TESLA_MULTI_LOSS_FACTOR_OVERDRIVE;
+ public int TESLA_MULTI_LOSS_PER_BLOCK_T0;
+ public int TESLA_MULTI_LOSS_PER_BLOCK_T1;
+ public int TESLA_MULTI_LOSS_PER_BLOCK_T2;
+ public int TESLA_MULTI_PLASMA_PER_SECOND_T1_HELIUM;
+ public int TESLA_MULTI_PLASMA_PER_SECOND_T1_NITROGEN;
+ public int TESLA_MULTI_PLASMA_PER_SECOND_T2_RADON;
+ public int TESLA_MULTI_RANGE_COEFFICIENT_PLASMA_T1;
+ public int TESLA_MULTI_RANGE_COEFFICIENT_PLASMA_T2;
+ public int TESLA_MULTI_RANGE_COVER;
+ public int TESLA_MULTI_RANGE_TOWER;
+ public int TESLA_MULTI_RANGE_TRANSCEIVER;
+ public float TESLA_SINGLE_LOSS_FACTOR_OVERDRIVE;
+ public int TESLA_SINGLE_LOSS_PER_BLOCK;
+ public int TESLA_SINGLE_RANGE;
+ public boolean TESLA_VISUAL_EFFECT;
+
+ /**
+ * This loading phases do not correspond to mod loading phases!
+ */
+ @Override
+ protected void PreInit() {
+
+ BOOM_ENABLE = true;
+ DISABLE_BLOCK_HARDNESS_NERF = false;
+ EASY_SCAN = false;
+ NERF_FUSION = false;
+ ENABLE_TURRET_EXPLOSIONS = true;
+ TURRET_DAMAGE_FACTOR = 10;
+ TURRET_EXPLOSION_FACTOR = 1;
+
+ MOD_ADMIN_ERROR_LOGS = false;
+
+ TESLA_MULTI_GAS_OUTPUT = false;
+ TESLA_MULTI_LOSS_FACTOR_OVERDRIVE = 0.25F;
+ TESLA_MULTI_LOSS_PER_BLOCK_T0 = 1;
+ TESLA_MULTI_LOSS_PER_BLOCK_T1 = 1;
+ TESLA_MULTI_LOSS_PER_BLOCK_T2 = 1;
+ TESLA_MULTI_PLASMA_PER_SECOND_T1_HELIUM = 100;
+ TESLA_MULTI_PLASMA_PER_SECOND_T1_NITROGEN = 50;
+ TESLA_MULTI_PLASMA_PER_SECOND_T2_RADON = 50;
+ TESLA_MULTI_RANGE_COEFFICIENT_PLASMA_T1 = 2;
+ TESLA_MULTI_RANGE_COEFFICIENT_PLASMA_T2 = 4;
+ TESLA_MULTI_RANGE_COVER = 16;
+ TESLA_MULTI_RANGE_TOWER = 32;
+ TESLA_MULTI_RANGE_TRANSCEIVER = 16;
+ TESLA_SINGLE_LOSS_FACTOR_OVERDRIVE = 0.25F;
+ TESLA_SINGLE_LOSS_PER_BLOCK = 1;
+ TESLA_SINGLE_RANGE = 20;
+ TESLA_VISUAL_EFFECT = true;
+
+ ENABLE_GOD_FORGE = (boolean) Launch.blackboard.get("fml.deobfuscatedEnvironment");
+ }
+
+ /**
+ * This loading phases do not correspond to mod loading phases!
+ */
+ @Override
+ protected void Init() {
+ DEBUG_MODE = _mainConfig
+ .getBoolean("DebugMode", "debug", DEBUG_MODE, "Enables logging and other purely debug features");
+ POWERLESS_MODE = _mainConfig
+ .getBoolean("PowerlessMode", "debug", POWERLESS_MODE, "Enables 0EU/t multi block machinery");
+ ENABLE_GOD_FORGE = _mainConfig.getBoolean(
+ "EnableGodForge",
+ "debug",
+ ENABLE_GOD_FORGE,
+ "Enables the in progress God Forge; enabled automatically in dev env");
+
+ BOOM_ENABLE = _mainConfig.getBoolean(
+ "BoomEnable",
+ "features",
+ BOOM_ENABLE,
+ "Set to false to disable explosions on everything bad that you can do");
+ DISABLE_BLOCK_HARDNESS_NERF = _mainConfig.getBoolean(
+ "DisableBlockHardnessNerf",
+ "features",
+ DISABLE_BLOCK_HARDNESS_NERF,
+ "Set to true to disable the block hardness nerf");
+ EASY_SCAN = _mainConfig.getBoolean(
+ "EasyScan",
+ "features",
+ EASY_SCAN,
+ "Enables tricorder to scan EM i/o hatches directly, too CHEEKY");
+ NERF_FUSION = _mainConfig.getBoolean(
+ "NerfFusion",
+ "features",
+ NERF_FUSION,
+ "Set to true to enable removal of plasmas heavier than Fe and other weird ones");
+ ENABLE_TURRET_EXPLOSIONS = _mainConfig.getBoolean(
+ "TurretBoomEnable",
+ "features",
+ ENABLE_TURRET_EXPLOSIONS,
+ "Set to false to disable explosions caused by EM turrets");
+ TURRET_DAMAGE_FACTOR = _mainConfig.getFloat(
+ "TurretDamageFactor",
+ "features",
+ TURRET_DAMAGE_FACTOR,
+ 0,
+ Short.MAX_VALUE,
+ "Damage is multiplied by this number");
+ TURRET_EXPLOSION_FACTOR = _mainConfig.getFloat(
+ "TurretExplosionFactor",
+ "features",
+ TURRET_EXPLOSION_FACTOR,
+ 0,
+ Short.MAX_VALUE,
+ "Explosion strength is multiplied by this number");
+
+ MOD_ADMIN_ERROR_LOGS = _mainConfig.getBoolean(
+ "AdminErrorLog",
+ "modules",
+ MOD_ADMIN_ERROR_LOGS,
+ "If set to true, every op/admin will receive all errors occurred during the startup phase as in game message on join");
+
+ TESLA_MULTI_GAS_OUTPUT = _mainConfig.getBoolean(
+ "TeslaMultiGasOutput",
+ "tesla_tweaks",
+ TESLA_MULTI_GAS_OUTPUT,
+ "Set to true to enable outputting plasmas as gasses from the tesla tower with a 1:1 ratio");
+ TESLA_MULTI_LOSS_FACTOR_OVERDRIVE = _mainConfig.getFloat(
+ "TeslaMultiLossFactorOverdrive",
+ "tesla_tweaks",
+ TESLA_MULTI_LOSS_FACTOR_OVERDRIVE,
+ 0,
+ 1,
+ "Additional Tesla Tower power loss per amp as a factor of the tier voltage");
+ TESLA_MULTI_LOSS_PER_BLOCK_T0 = _mainConfig.getInt(
+ "TeslaMultiLossPerBlockT0",
+ "tesla_tweaks",
+ TESLA_MULTI_LOSS_PER_BLOCK_T0,
+ 0,
+ Integer.MAX_VALUE,
+ "Tesla Tower power transmission loss per block per amp using no plasmas");
+ TESLA_MULTI_LOSS_PER_BLOCK_T1 = _mainConfig.getInt(
+ "TeslaMultiLossPerBlockT1",
+ "tesla_tweaks",
+ TESLA_MULTI_LOSS_PER_BLOCK_T1,
+ 0,
+ Integer.MAX_VALUE,
+ "Tesla Tower power transmission loss per block per amp using helium or nitrogen plasma");
+ TESLA_MULTI_LOSS_PER_BLOCK_T2 = _mainConfig.getInt(
+ "TeslaMultiLossPerBlockT2",
+ "tesla_tweaks",
+ TESLA_MULTI_LOSS_PER_BLOCK_T2,
+ 0,
+ Integer.MAX_VALUE,
+ "Tesla Tower power transmission loss per block per amp using radon plasma");
+ TESLA_MULTI_PLASMA_PER_SECOND_T1_HELIUM = _mainConfig.getInt(
+ "TeslaMultiPlasmaPerSecondT1Helium",
+ "tesla_tweaks",
+ TESLA_MULTI_PLASMA_PER_SECOND_T1_HELIUM,
+ 0,
+ Integer.MAX_VALUE,
+ "Tesla Tower helium plasma consumed each second the tesla tower is active");
+ TESLA_MULTI_PLASMA_PER_SECOND_T1_NITROGEN = _mainConfig.getInt(
+ "TeslaMultiPlasmaPerSecondT1Nitrogen",
+ "tesla_tweaks",
+ TESLA_MULTI_PLASMA_PER_SECOND_T1_NITROGEN,
+ 0,
+ Integer.MAX_VALUE,
+ "Tesla Tower nitrogen plasma consumed each second the tesla tower is active");
+ TESLA_MULTI_PLASMA_PER_SECOND_T2_RADON = _mainConfig.getInt(
+ "TeslaMultiPlasmaPerSecondT2Radon",
+ "tesla_tweaks",
+ TESLA_MULTI_PLASMA_PER_SECOND_T2_RADON,
+ 0,
+ Integer.MAX_VALUE,
+ "Tesla Tower radon plasma consumed each second the tesla tower is active");
+ TESLA_MULTI_RANGE_COEFFICIENT_PLASMA_T1 = _mainConfig.getInt(
+ "TeslaMultiRangeCoefficientPlasmaT1",
+ "tesla_tweaks",
+ TESLA_MULTI_RANGE_COEFFICIENT_PLASMA_T1,
+ 0,
+ Integer.MAX_VALUE,
+ "Tesla Tower T1 Plasmas Range Multiplier");
+ TESLA_MULTI_RANGE_COEFFICIENT_PLASMA_T2 = _mainConfig.getInt(
+ "TeslaMultiRangeCoefficientPlasmaT2",
+ "tesla_tweaks",
+ TESLA_MULTI_RANGE_COEFFICIENT_PLASMA_T2,
+ 0,
+ Integer.MAX_VALUE,
+ "Tesla Tower T2 Plasmas Range Multiplier");
+ TESLA_MULTI_RANGE_COVER = _mainConfig.getInt(
+ "TeslaMultiRangeCover",
+ "tesla_tweaks",
+ TESLA_MULTI_RANGE_COVER,
+ 0,
+ Integer.MAX_VALUE,
+ "Tesla Tower to Tesla Coil Rich Edition Cover max range");
+ TESLA_MULTI_RANGE_TOWER = _mainConfig.getInt(
+ "TeslaMultiRangeTower",
+ "tesla_tweaks",
+ TESLA_MULTI_RANGE_TOWER,
+ 0,
+ Integer.MAX_VALUE,
+ "Tesla Tower to Tower max range");
+ TESLA_MULTI_RANGE_TRANSCEIVER = _mainConfig.getInt(
+ "TeslaMultiRangeTransceiver",
+ "tesla_tweaks",
+ TESLA_MULTI_RANGE_TRANSCEIVER,
+ 0,
+ Integer.MAX_VALUE,
+ "Tesla Tower to Transceiver max range");
+ TESLA_SINGLE_LOSS_FACTOR_OVERDRIVE = _mainConfig.getFloat(
+ "TeslaSingleLossFactorOverdrive",
+ "tesla_tweaks",
+ TESLA_SINGLE_LOSS_FACTOR_OVERDRIVE,
+ 0,
+ 1,
+ "Additional Tesla Transceiver power loss per amp as a factor of the tier voltage");
+ TESLA_SINGLE_LOSS_PER_BLOCK = _mainConfig.getInt(
+ "TeslaSingleLossPerBlock",
+ "tesla_tweaks",
+ TESLA_SINGLE_LOSS_PER_BLOCK,
+ 0,
+ Integer.MAX_VALUE,
+ "Tesla Transceiver power transmission loss per block per amp");
+ TESLA_SINGLE_RANGE = _mainConfig.getInt(
+ "TeslaSingleRange",
+ "tesla_tweaks",
+ TESLA_SINGLE_RANGE,
+ 0,
+ Integer.MAX_VALUE,
+ "Tesla Transceiver to max range");
+ TESLA_VISUAL_EFFECT = _mainConfig.getBoolean(
+ "EnableTeslaVisualEffect",
+ "tesla_tweaks",
+ TESLA_VISUAL_EFFECT,
+ "Set true to enable the cool visual effect when tesla tower running.");
+ }
+
+ /**
+ * This loading phases do not correspond to mod loading phases!
+ */
+ @Override
+ protected void PostInit() {}
+}
diff --git a/src/main/java/tectech/loader/gui/CreativeTabTecTech.java b/src/main/java/tectech/loader/gui/CreativeTabTecTech.java
new file mode 100644
index 0000000000..d098d375c4
--- /dev/null
+++ b/src/main/java/tectech/loader/gui/CreativeTabTecTech.java
@@ -0,0 +1,36 @@
+package tectech.loader.gui;
+
+import java.util.List;
+
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import gregtech.api.GregTechAPI;
+import tectech.thing.CustomItemList;
+import tectech.thing.casing.TTCasingsContainer;
+
+public class CreativeTabTecTech extends CreativeTabs {
+
+ public CreativeTabTecTech(String name) {
+ super(name);
+ }
+
+ @SideOnly(Side.CLIENT)
+ @Override
+ public Item getTabIconItem() {
+ return Item.getItemFromBlock(TTCasingsContainer.sBlockCasingsTT); // High power casing
+ }
+
+ @Override
+ public void displayAllReleventItems(List<ItemStack> stuffToShow) {
+ for (CustomItemList item : CustomItemList.values()) {
+ if (item.hasBeenSet() && item.getBlock() == GregTechAPI.sBlockMachines) {
+ stuffToShow.add(item.get(1));
+ }
+ }
+ super.displayAllReleventItems(stuffToShow);
+ }
+}
diff --git a/src/main/java/tectech/loader/recipe/Assembler.java b/src/main/java/tectech/loader/recipe/Assembler.java
new file mode 100644
index 0000000000..eee8182184
--- /dev/null
+++ b/src/main/java/tectech/loader/recipe/Assembler.java
@@ -0,0 +1,3091 @@
+package tectech.loader.recipe;
+
+import static bartworks.common.loaders.ItemRegistry.bw_realglas;
+import static gregtech.api.recipe.RecipeMaps.assemblerRecipes;
+import static gregtech.api.util.GTRecipeBuilder.MINUTES;
+import static gregtech.api.util.GTRecipeBuilder.SECONDS;
+import static gregtech.api.util.GTRecipeBuilder.TICKS;
+
+import net.minecraft.init.Blocks;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.fluids.FluidRegistry;
+import net.minecraftforge.fluids.FluidStack;
+
+import com.gtnewhorizon.structurelib.StructureLibAPI;
+
+import gregtech.api.enums.GTValues;
+import gregtech.api.enums.ItemList;
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.MaterialsUEVplus;
+import gregtech.api.enums.OrePrefixes;
+import gregtech.api.enums.TierEU;
+import gregtech.api.util.GTModHandler;
+import gregtech.api.util.GTOreDictUnificator;
+import gregtech.api.util.GTUtility;
+import tectech.thing.CustomItemList;
+import tectech.thing.block.BlockQuantumGlass;
+
+public class Assembler implements Runnable {
+
+ @Override
+ public void run() {
+
+ cleanroomRecipes();
+
+ for (int i = 0; i <= 15; i++) {
+ GTValues.RA.stdBuilder()
+ .itemInputs(
+ GTUtility.getIntegratedCircuit(i + 1),
+ GTOreDictUnificator.get(OrePrefixes.dust, Materials.Cobalt, 1))
+ .itemOutputs(new ItemStack(StructureLibAPI.getBlockHint(), 1, i))
+ .fluidInputs(Materials.Aluminium.getMolten(864))
+ .duration(1 * SECONDS + 12 * TICKS)
+ .eut(TierEU.RECIPE_MV)
+ .addTo(assemblerRecipes);
+ }
+
+ // Quantum Glass
+ GTValues.RA.stdBuilder()
+ .itemInputs(CustomItemList.eM_Containment.get(1), GTModHandler.getIC2Item("reinforcedGlass", 1L))
+ .itemOutputs(new ItemStack(BlockQuantumGlass.INSTANCE, 1))
+ .fluidInputs(
+ BaseRecipeLoader.getOrDefault("Trinium", Materials.Osmium)
+ .getMolten(576))
+ .duration(10 * SECONDS)
+ .eut(TierEU.RECIPE_UV)
+ .addTo(assemblerRecipes);
+
+ // recipe for assline data hatches
+ GTValues.RA.stdBuilder()
+ .itemInputs(ItemList.Hatch_DataAccess_EV.get(1), CustomItemList.dataIn_Hatch.get(1))
+ .itemOutputs(CustomItemList.dataInAss_Hatch.get(1))
+ .duration(1 * MINUTES + 42 * SECONDS + 8 * TICKS)
+ .eut(12000)
+ .addTo(assemblerRecipes);
+ GTValues.RA.stdBuilder()
+ .itemInputs(ItemList.Hatch_DataAccess_EV.get(1), CustomItemList.dataOut_Hatch.get(1))
+ .itemOutputs(CustomItemList.dataOutAss_Hatch.get(1))
+ .duration(1 * MINUTES + 42 * SECONDS + 8 * TICKS)
+ .eut(12000)
+ .addTo(assemblerRecipes);
+
+ // High Power Casing
+ GTValues.RA.stdBuilder()
+ .itemInputs(
+ GTOreDictUnificator.get(OrePrefixes.frameGt, Materials.Iridium, 1),
+ GTOreDictUnificator.get(OrePrefixes.plateDouble, Materials.Iridium, 6),
+ GTOreDictUnificator.get(OrePrefixes.circuit, Materials.LuV, 1),
+ GTOreDictUnificator.get(OrePrefixes.wireFine, Materials.Cobalt, 16),
+ GTOreDictUnificator.get(OrePrefixes.wireFine, Materials.Copper, 16),
+ GTOreDictUnificator.get(OrePrefixes.wireGt02, Materials.NiobiumTitanium, 2))
+ .itemOutputs(CustomItemList.eM_Power.get(1))
+ .fluidInputs(Materials.TungstenSteel.getMolten(576))
+ .duration(5 * SECONDS)
+ .eut(TierEU.RECIPE_LuV)
+ .addTo(assemblerRecipes);
+ // Computer Casing
+ GTValues.RA.stdBuilder()
+ .itemInputs(
+ CustomItemList.eM_Power.get(1),
+ GTOreDictUnificator.get(OrePrefixes.plate, Materials.StainlessSteel, 8),
+ GTOreDictUnificator.get(OrePrefixes.circuit, Materials.ZPM, 1),
+ GTOreDictUnificator.get(OrePrefixes.wireGt02, Materials.NiobiumTitanium, 2))
+ .itemOutputs(CustomItemList.eM_Computer_Casing.get(1))
+ .fluidInputs(Materials.Aluminium.getMolten(1296))
+ .duration(10 * SECONDS)
+ .eut(TierEU.RECIPE_ZPM)
+ .addTo(assemblerRecipes);
+ // Computer Vent Casing
+ GTValues.RA.stdBuilder()
+ .itemInputs(
+ GTOreDictUnificator.get(OrePrefixes.frameGt, Materials.StainlessSteel, 1),
+ ItemList.Electric_Motor_IV.get(2),
+ GTOreDictUnificator.get(OrePrefixes.rotor, Materials.StainlessSteel, 2),
+ GTOreDictUnificator.get(OrePrefixes.pipeTiny, Materials.StainlessSteel, 16),
+ GTOreDictUnificator.get(OrePrefixes.plate, Materials.Copper, 16),
+ GTOreDictUnificator.get(
+ OrePrefixes.wireGt01,
+ BaseRecipeLoader.getOrDefault("SuperconductorIV", Materials.SuperconductorUHV),
+ 1))
+ .itemOutputs(CustomItemList.eM_Computer_Vent.get(1))
+ .fluidInputs(Materials.SolderingAlloy.getMolten(1296))
+ .duration(5 * SECONDS)
+ .eut(TierEU.RECIPE_EV)
+ .addTo(assemblerRecipes);
+ // Molecular Casing
+ GTValues.RA.stdBuilder()
+ .itemInputs(
+ CustomItemList.eM_Power.get(1),
+ GTOreDictUnificator.get(OrePrefixes.plateDense, Materials.Osmiridium, 6),
+ GTOreDictUnificator
+ .get(OrePrefixes.foil, BaseRecipeLoader.getOrDefault("Trinium", Materials.Osmium), 12),
+ GTOreDictUnificator.get(OrePrefixes.screw, Materials.TungstenSteel, 24),
+ GTOreDictUnificator.get(OrePrefixes.ring, Materials.TungstenSteel, 24),
+ ItemList.Field_Generator_IV.get(1))
+ .itemOutputs(CustomItemList.eM_Containment.get(1))
+ .fluidInputs(Materials.Osmium.getMolten(1296))
+ .duration(40 * SECONDS)
+ .eut(TierEU.RECIPE_UV)
+ .addTo(assemblerRecipes);
+ // Tesla Base
+ GTValues.RA.stdBuilder()
+ .itemInputs(
+ GTOreDictUnificator.get(OrePrefixes.plate, Materials.NickelZincFerrite, 6),
+ GTOreDictUnificator.get(OrePrefixes.frameGt, Materials.NickelZincFerrite, 1))
+ .itemOutputs(CustomItemList.tM_TeslaBase.get(1))
+ .duration(2 * SECONDS + 10 * TICKS)
+ .eut(16)
+ .addTo(assemblerRecipes);
+ // Tesla Toroid
+ GTValues.RA.stdBuilder()
+ .itemInputs(
+ GTOreDictUnificator.get(OrePrefixes.foil, Materials.Aluminium, 6),
+ GTOreDictUnificator.get(OrePrefixes.frameGt, Materials.Aluminium, 1))
+ .itemOutputs(CustomItemList.tM_TeslaToroid.get(1))
+ .duration(2 * SECONDS + 10 * TICKS)
+ .eut(16)
+ .addTo(assemblerRecipes);
+ // Tesla Secondary Windings
+ GTValues.RA.stdBuilder()
+ .itemInputs(
+ CustomItemList.teslaComponent.getWithDamage(8, 0),
+ BaseRecipeLoader.getItemContainer("MicaInsulatorFoil")
+ .get(12))
+ .itemOutputs(CustomItemList.tM_TeslaSecondary.get(1))
+ .fluidInputs(Materials.Silver.getMolten(144))
+ .duration(10 * SECONDS)
+ .eut(TierEU.RECIPE_MV)
+ .addTo(assemblerRecipes);
+ // Tesla Primary Coils T0
+ GTValues.RA.stdBuilder()
+ .itemInputs(
+ GTOreDictUnificator.get(OrePrefixes.wireGt02, Materials.RedstoneAlloy, 8),
+ BaseRecipeLoader.getItemContainer("MicaInsulatorFoil")
+ .get(8))
+ .itemOutputs(CustomItemList.tM_TeslaPrimary_0.get(1))
+ .fluidInputs(Materials.RedAlloy.getMolten(144))
+ .duration(10 * SECONDS)
+ .eut(TierEU.RECIPE_LV)
+ .addTo(assemblerRecipes);
+ // Tesla Primary Coils T1
+ GTValues.RA.stdBuilder()
+ .itemInputs(
+ GTOreDictUnificator.get(OrePrefixes.wireGt02, Materials.SuperconductorMV, 8),
+ BaseRecipeLoader.getItemContainer("MicaInsulatorFoil")
+ .get(12))
+ .itemOutputs(CustomItemList.tM_TeslaPrimary_1.get(1))
+ .fluidInputs(Materials.Magnesium.getMolten(144))
+ .duration(10 * SECONDS)
+ .eut(TierEU.RECIPE_MV)
+ .addTo(assemblerRecipes);
+ // Tesla Primary Coils T2
+ GTValues.RA.stdBuilder()
+ .itemInputs(
+ GTOreDictUnificator.get(OrePrefixes.wireGt02, Materials.SuperconductorHV, 8),
+ BaseRecipeLoader.getItemContainer("MicaInsulatorFoil")
+ .get(16))
+ .itemOutputs(CustomItemList.tM_TeslaPrimary_2.get(1))
+ .fluidInputs(Materials.Barium.getMolten(144))
+ .duration(10 * SECONDS)
+ .eut(TierEU.RECIPE_HV)
+ .addTo(assemblerRecipes);
+ // Tesla Primary Coils T3
+ GTValues.RA.stdBuilder()
+ .itemInputs(
+ GTOreDictUnificator.get(OrePrefixes.wireGt02, Materials.SuperconductorEV, 8),
+ BaseRecipeLoader.getItemContainer("MicaInsulatorFoil")
+ .get(20))
+ .itemOutputs(CustomItemList.tM_TeslaPrimary_3.get(1))
+ .fluidInputs(Materials.Platinum.getMolten(144))
+ .duration(10 * SECONDS)
+ .eut(TierEU.RECIPE_EV)
+ .addTo(assemblerRecipes);