From b03e63865a93ff13800da93cfa425989222b554f Mon Sep 17 00:00:00 2001 From: GDCloud <93287602+GDCloudstrike@users.noreply.github.com> Date: Tue, 12 Mar 2024 00:19:29 +0100 Subject: Forge of the Gods (#225) * Initial commit * Graviton Modulation Casings * It forms * testing cursed things, will rework soon * test better recipe check * get rid of cursed stuff * fix OC * parameter shenanigans * fuel input hatch * redo fuel drain * fluid output * add blocks * run on preload * dependency bump * preliminary structure works * fix some misc things * New class * Fix build issue * 1 hatch * Cleaning up code with seperate class for structure string * start on modules * Spotless + Smelting Module Class + BaseModule Changes * Remove useless import * ... * protected * trying module things * add checkRecipe, remove some redundant stuff * Initial commit * Graviton Modulation Casings * It forms * testing cursed things, will rework soon * test better recipe check * get rid of cursed stuff * fix OC * parameter shenanigans * fuel input hatch * redo fuel drain * fluid output * add blocks * run on preload * preliminary structure works * fix some misc things * New class * 1 hatch * start on modules * Fix build issue * Cleaning up code with seperate class for structure string * Spotless + Smelting Module Class + BaseModule Changes * Remove useless import * protected * trying module things * add checkRecipe, remove some redundant stuff * ... * New Classes + Modules * Recipe Maps * fix deps * recipe map fixes * make modules connect * spotless * remove recipe functionality + misc cleanup * parallel parameter * remove unneeded check * fix item to fluid conversion + remove parameter * outputs appear now * remove parallel param * improve scanner info * parameter adjustment + add onRemoval * parameter followup * plasma module (almost) fully works * attempt at fixing param * Fixes & stuff * Recommendation fixes * tooltip upgrade * Spotless for clean * plasma recipe map * recipe adder * first recipes * use new recipe map * Recipe map change stuff * recipe map fixes * some quick fixes * Spotless * fix null checks * batch size * add input separation * add batch mode parameter and functionality * spotless * first recipe addition loops * start on ui (add button) * spotless * add rendering block * render tile * more rendering * summon render block * spotless again * greyscale * lighter * why is rendering a pain * fix merge conflicts * is this the conflict? * spotless * merge conflict again :pensib: * start on upgrade gui * more upgrade gui things * saving * resolve merge conflicts & crashes * redo added blocks + add new ones + some tooltip stuff * more tooltip stuff * one more casing * forgot this * redo module processing logic * migrate to wirelessNetworkManager * quark gluon -> exotic * forgot achievements * adjust plasma module recipemap to prepare for upgrades * migrate to nice mui gui * some more plasma recipemap changes * eve more plasma recipemap changes, yay * everyone loves plasma recipemap changes * they never end, do they * exotic module recipes (wip) * exotic module recipe processing (mostly works) * prevent duplicate materials * make input sizes random * fix gt++ material conversions * nbt data things * start on magmatter mode + misc stuff * more magmatter work * no need for putIfAbsent + added awdr and runite * load recipemap from nbt * getFluidsStored -> inputFluids * add upgrades and make them scrollable * assign window colors to upgrades * green background * green background * redo upgrade IDs and add boolean array for storing whether they are active * implement system to restrict the order which upgrades can be bought in * add split functionality * switch to constants * reset button tooltip + change texture of upgrade if active * some cleanup + new fuel config * button BGs, altered power switch + localisation * fuel config window + save everything to nbt + random stuff * new helper class + fuel calculations * heat calculations + some molten module logic adjustments * more calculations, fuel hatch removal, transfer values to modules, internal fuel battery * use values in module processing * switch to UUID * switch to numericWidget * fix speedbonus being infinite sometimes * move method over to godforgeMath + very minor exotic module changes * remove this so it actually loads * new texture * switch to processInitialSettings * remove wireless energy things * add furnace mode * mode localisation * remove author tag * scala bad (switch away from scala arrays) * nuke all star imports (& godforge recipemap) * minor wording changes * add mod checks * mod check * revert star textures * return widget * dont return object types * forgot I even enabled debug, whoops * remove unnecessary GL11 calls --------- Co-authored-by: TheEpicGamer274 <102255081+TheEpicGamer274@users.noreply.github.com> Co-authored-by: GTNH-Colen <54497873+GTNH-Colen@users.noreply.github.com> Co-authored-by: BlueWeabo <76872108+BlueWeabo@users.noreply.github.com> --- .../java/com/github/technus/tectech/TecTech.java | 2 + .../tectech/loader/recipe/BaseRecipeLoader.java | 3 +- .../technus/tectech/loader/recipe/Godforge.java | 428 +++ .../tectech/loader/thing/MachineLoader.java | 25 + .../technus/tectech/loader/thing/MuTeLoader.java | 21 + .../technus/tectech/loader/thing/ThingsLoader.java | 10 + .../github/technus/tectech/proxy/ClientProxy.java | 11 + .../tectech/recipe/GodforgeExoticFrontend.java | 51 + .../tectech/recipe/GodforgePlasmaFrontend.java | 64 + .../technus/tectech/recipe/TT_recipeAdder.java | 87 + .../technus/tectech/recipe/TecTechRecipeMaps.java | 9 + .../technus/tectech/thing/CustomItemList.java | 16 + .../tectech/thing/block/ForgeOfGodsBlock.java | 70 + .../tectech/thing/block/GodforgeGlassBlock.java | 107 + .../tectech/thing/block/GodforgeGlassItem.java | 30 + .../tectech/thing/block/GodforgeGlassRender.java | 116 + .../tectech/thing/block/RenderForgeOfGods.java | 125 + .../tectech/thing/block/TileForgeOfGods.java | 77 + .../thing/casing/GT_Item_Casings_Godforge.java | 119 + .../tectech/thing/casing/GodforgeCasings.java | 125 + .../tectech/thing/casing/TT_Container_Casings.java | 4 + .../tectech/thing/gui/TecTechUITextures.java | 14 + .../tectech/thing/item/RenderForgeOfGodsItem.java | 88 + .../multi/ForgeofGodsStructureString.java | 2933 ++++++++++++++++++++ .../multi/GT_MetaTileEntity_EM_ForgeOfGods.java | 1178 ++++++++ .../GT_MetaTileEntity_EM_BaseModule.java | 252 ++ .../GT_MetaTileEntity_EM_ExoticModule.java | 498 ++++ .../GT_MetaTileEntity_EM_MoltenModule.java | 229 ++ .../GT_MetaTileEntity_EM_PlasmaModule.java | 217 ++ .../GT_MetaTileEntity_EM_SmeltingModule.java | 243 ++ .../tectech/thing/multiTileEntity/GodForge.java | 0 .../github/technus/tectech/util/CommonValues.java | 1 + .../github/technus/tectech/util/GodforgeMath.java | 145 + .../textures/blocks/iconsets/GODFORGE_ENERGY.png | Bin 0 -> 604 bytes .../textures/blocks/iconsets/GODFORGE_INNER.png | Bin 0 -> 441 bytes .../textures/blocks/iconsets/GODFORGE_SUPPORT.png | Bin 0 -> 522 bytes .../textures/blocks/iconsets/GODFORGE_TRIM.png | Bin 0 -> 334 bytes .../textures/blocks/iconsets/GRAVITON_CASING_0.png | Bin 0 -> 4836 bytes .../blocks/iconsets/GRAVITON_CASING_0.png.mcmeta | 5 + .../textures/blocks/iconsets/GRAVITON_CASING_1.png | Bin 0 -> 3752 bytes .../blocks/iconsets/GRAVITON_CASING_1.png.mcmeta | 5 + .../textures/blocks/iconsets/GRAVITON_CASING_2.png | Bin 0 -> 3586 bytes .../blocks/iconsets/GRAVITON_CASING_2.png.mcmeta | 5 + .../blocks/iconsets/GRAVITON_TOP_BOTTOM.png | Bin 0 -> 472 bytes src/main/resources/assets/tectech/lang/en_US.lang | 138 + ...blockSpatiallyTranscendentGravitationalLens.png | Bin 0 -> 349 bytes .../tectech/textures/gui/background/blue_glow.png | Bin 0 -> 5301 bytes .../tectech/textures/gui/background/green_glow.png | Bin 0 -> 3975 bytes .../textures/gui/background/orange_glow.png | Bin 0 -> 5653 bytes .../textures/gui/background/purple_glow.png | Bin 0 -> 9762 bytes .../tectech/textures/gui/background/star.png | Bin 0 -> 119474 bytes .../tectech/textures/gui/button/celestial.png | Bin 0 -> 1943 bytes .../textures/gui/overlay_button/arrow_blue_up.png | Bin 0 -> 806 bytes .../tectech/textures/gui/picture/connector.png | Bin 0 -> 163 bytes .../textures/gui/picture/connector_empty.png | Bin 0 -> 158 bytes .../textures/gui/picture/connector_switch.png | Bin 0 -> 189 bytes .../textures/gui/picture/green_selector.png | Bin 0 -> 152 bytes 57 files changed, 7449 insertions(+), 2 deletions(-) create mode 100644 src/main/java/com/github/technus/tectech/loader/recipe/Godforge.java create mode 100644 src/main/java/com/github/technus/tectech/loader/thing/MuTeLoader.java create mode 100644 src/main/java/com/github/technus/tectech/recipe/GodforgeExoticFrontend.java create mode 100644 src/main/java/com/github/technus/tectech/recipe/GodforgePlasmaFrontend.java create mode 100644 src/main/java/com/github/technus/tectech/thing/block/ForgeOfGodsBlock.java create mode 100644 src/main/java/com/github/technus/tectech/thing/block/GodforgeGlassBlock.java create mode 100644 src/main/java/com/github/technus/tectech/thing/block/GodforgeGlassItem.java create mode 100644 src/main/java/com/github/technus/tectech/thing/block/GodforgeGlassRender.java create mode 100644 src/main/java/com/github/technus/tectech/thing/block/RenderForgeOfGods.java create mode 100644 src/main/java/com/github/technus/tectech/thing/block/TileForgeOfGods.java create mode 100644 src/main/java/com/github/technus/tectech/thing/casing/GT_Item_Casings_Godforge.java create mode 100644 src/main/java/com/github/technus/tectech/thing/casing/GodforgeCasings.java create mode 100644 src/main/java/com/github/technus/tectech/thing/item/RenderForgeOfGodsItem.java create mode 100644 src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/ForgeofGodsStructureString.java create mode 100644 src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_ForgeOfGods.java create mode 100644 src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/godforge_modules/GT_MetaTileEntity_EM_BaseModule.java create mode 100644 src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/godforge_modules/GT_MetaTileEntity_EM_ExoticModule.java create mode 100644 src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/godforge_modules/GT_MetaTileEntity_EM_MoltenModule.java create mode 100644 src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/godforge_modules/GT_MetaTileEntity_EM_PlasmaModule.java create mode 100644 src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/godforge_modules/GT_MetaTileEntity_EM_SmeltingModule.java create mode 100644 src/main/java/com/github/technus/tectech/thing/multiTileEntity/GodForge.java create mode 100644 src/main/java/com/github/technus/tectech/util/GodforgeMath.java create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/GODFORGE_ENERGY.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/GODFORGE_INNER.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/GODFORGE_SUPPORT.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/GODFORGE_TRIM.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/GRAVITON_CASING_0.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/GRAVITON_CASING_0.png.mcmeta create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/GRAVITON_CASING_1.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/GRAVITON_CASING_1.png.mcmeta create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/GRAVITON_CASING_2.png create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/GRAVITON_CASING_2.png.mcmeta create mode 100644 src/main/resources/assets/gregtech/textures/blocks/iconsets/GRAVITON_TOP_BOTTOM.png create mode 100644 src/main/resources/assets/tectech/textures/blocks/blockSpatiallyTranscendentGravitationalLens.png create mode 100644 src/main/resources/assets/tectech/textures/gui/background/blue_glow.png create mode 100644 src/main/resources/assets/tectech/textures/gui/background/green_glow.png create mode 100644 src/main/resources/assets/tectech/textures/gui/background/orange_glow.png create mode 100644 src/main/resources/assets/tectech/textures/gui/background/purple_glow.png create mode 100644 src/main/resources/assets/tectech/textures/gui/background/star.png create mode 100644 src/main/resources/assets/tectech/textures/gui/button/celestial.png create mode 100644 src/main/resources/assets/tectech/textures/gui/overlay_button/arrow_blue_up.png create mode 100644 src/main/resources/assets/tectech/textures/gui/picture/connector.png create mode 100644 src/main/resources/assets/tectech/textures/gui/picture/connector_empty.png create mode 100644 src/main/resources/assets/tectech/textures/gui/picture/connector_switch.png create mode 100644 src/main/resources/assets/tectech/textures/gui/picture/green_selector.png (limited to 'src') diff --git a/src/main/java/com/github/technus/tectech/TecTech.java b/src/main/java/com/github/technus/tectech/TecTech.java index 0845e02736..ea5a23558d 100644 --- a/src/main/java/com/github/technus/tectech/TecTech.java +++ b/src/main/java/com/github/technus/tectech/TecTech.java @@ -8,6 +8,7 @@ import net.minecraftforge.common.MinecraftForge; import com.github.technus.tectech.loader.MainLoader; import com.github.technus.tectech.loader.TecTechConfig; import com.github.technus.tectech.loader.gui.CreativeTabTecTech; +import com.github.technus.tectech.loader.thing.MuTeLoader; import com.github.technus.tectech.mechanics.enderStorage.EnderWorldSavedData; import com.github.technus.tectech.proxy.CommonProxy; import com.github.technus.tectech.recipe.EyeOfHarmonyRecipeStorage; @@ -87,6 +88,7 @@ public class TecTech { TecTechRecipeMaps.init(); MainLoader.preLoad(); + new MuTeLoader().run(); } @Mod.EventHandler diff --git a/src/main/java/com/github/technus/tectech/loader/recipe/BaseRecipeLoader.java b/src/main/java/com/github/technus/tectech/loader/recipe/BaseRecipeLoader.java index d50f7d4102..e9df999e87 100644 --- a/src/main/java/com/github/technus/tectech/loader/recipe/BaseRecipeLoader.java +++ b/src/main/java/com/github/technus/tectech/loader/recipe/BaseRecipeLoader.java @@ -34,7 +34,7 @@ public class BaseRecipeLoader { } public void run() { - + new Godforge().run(); // todo: Move those recipes in NHCore if (NewHorizonsCoreMod.isModLoaded()) { new Assembler().run(); @@ -44,6 +44,5 @@ public class BaseRecipeLoader { new Extractor().run(); new ResearchStationAssemblyLine().run(); } - } } diff --git a/src/main/java/com/github/technus/tectech/loader/recipe/Godforge.java b/src/main/java/com/github/technus/tectech/loader/recipe/Godforge.java new file mode 100644 index 0000000000..ca5f719aa8 --- /dev/null +++ b/src/main/java/com/github/technus/tectech/loader/recipe/Godforge.java @@ -0,0 +1,428 @@ +package com.github.technus.tectech.loader.recipe; + +import static gregtech.api.enums.Mods.GTPlusPlus; +import static gregtech.api.util.GT_RecipeBuilder.SECONDS; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; + +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; + +import com.github.technus.tectech.recipe.TT_recipeAdder; + +import gregtech.api.enums.Materials; +import gregtech.api.enums.TierEU; +import gtPlusPlus.core.material.ELEMENT; + +public class Godforge implements Runnable { + + public static final ArrayList plasmaGTMaterialList = new ArrayList<>(); + public static final ArrayList plasmaGTWeightList = new ArrayList<>(); + public static final HashMap exoticModulePlasmaItemMap = new HashMap<>(); + public static final HashMap exoticModulePlasmaFluidMap = new HashMap<>(); + public static final HashMap exoticModuleMagmatterItemMap = new HashMap<>(); + public static final HashMap exoticModuleMagmatterFluidMap = new HashMap<>(); + + @Override + public void run() { + + if (GTPlusPlus.isModLoaded()) { + // Solid to plasma recipes + { + // Fusion tier 1-3 + { + // Single step + ItemStack[] solids_t0_1step = { Materials.Aluminium.getDust(1), Materials.Iron.getDust(1) }; + FluidStack[] solid_plasmas_t0_1step = { Materials.Aluminium.getPlasma(144), + Materials.Iron.getPlasma(144) }; + + for (int i = 0; i < solids_t0_1step.length; i++) { + TT_recipeAdder.addFOGPlasmaRecipe( + new ItemStack[] { solids_t0_1step[i] }, + new FluidStack[] { solid_plasmas_t0_1step[i] }, + 1 * SECONDS, + (int) TierEU.RECIPE_MAX, + false, + 0); + } + + // Multi-step + ItemStack[] solids_t0_xstep = { Materials.Force.getDust(1), Materials.Bismuth.getDust(1), + ELEMENT.STANDALONE.ADVANCED_NITINOL.getDust(1) }; + FluidStack[] solid_plasmas_t0_xstep = { new FluidStack(ELEMENT.STANDALONE.FORCE.getPlasma(), 144), + Materials.Bismuth.getPlasma(144), + new FluidStack(ELEMENT.STANDALONE.ADVANCED_NITINOL.getPlasma(), 144) }; + + for (int i = 0; i < solids_t0_xstep.length; i++) { + TT_recipeAdder.addFOGPlasmaRecipe( + new ItemStack[] { solids_t0_xstep[i] }, + new FluidStack[] { solid_plasmas_t0_xstep[i] }, + 1 * SECONDS, + (int) TierEU.RECIPE_MAX, + true, + 0); + } + } + // Fusion tier 4-5 + { + // Single step + ItemStack[] solids_t1_1step = { Materials.Lead.getDust(1) }; + FluidStack[] solid_plasmas_t1_1step = { Materials.Lead.getPlasma(144) }; + + for (int i = 0; i < solids_t1_1step.length; i++) { + TT_recipeAdder.addFOGPlasmaRecipe( + new ItemStack[] { solids_t1_1step[i] }, + new FluidStack[] { solid_plasmas_t1_1step[i] }, + 1 * SECONDS, + (int) TierEU.RECIPE_MAX, + false, + 1); + } + + // Multi-step + ItemStack[] solids_t1_xstep = { ELEMENT.getInstance().NEPTUNIUM.getDust(1), + ELEMENT.getInstance().FERMIUM.getDust(1) }; + FluidStack[] solid_plasmas_t1_xstep = { + new FluidStack(ELEMENT.getInstance().NEPTUNIUM.getPlasma(), 144), + new FluidStack(ELEMENT.getInstance().FERMIUM.getPlasma(), 144) }; + + for (int i = 0; i < solids_t1_xstep.length; i++) { + TT_recipeAdder.addFOGPlasmaRecipe( + new ItemStack[] { solids_t1_xstep[i] }, + new FluidStack[] { solid_plasmas_t1_xstep[i] }, + 1 * SECONDS, + (int) TierEU.RECIPE_MAX, + true, + 1); + } + } + // Exotic Plasmas + { + // Single step + ItemStack[] solids_t2_1step = { ELEMENT.STANDALONE.RHUGNOR.getDust(1) }; + FluidStack[] solid_plasmas_t2_1step = { + new FluidStack(ELEMENT.STANDALONE.RHUGNOR.getPlasma(), 144) }; + + for (int i = 0; i < solids_t2_1step.length; i++) { + TT_recipeAdder.addFOGPlasmaRecipe( + new ItemStack[] { solids_t2_1step[i] }, + new FluidStack[] { solid_plasmas_t2_1step[i] }, + 1 * SECONDS, + (int) TierEU.RECIPE_MAX, + false, + 2); + } + + // Multi-step + ItemStack[] solids_t2_xstep = { ELEMENT.STANDALONE.HYPOGEN.getDust(1), + Materials.Tritanium.getDust(1) }; + FluidStack[] solid_plasmas_t2_xstep = { new FluidStack(ELEMENT.STANDALONE.HYPOGEN.getPlasma(), 144), + Materials.Tritanium.getPlasma(144) }; + + for (int i = 0; i < solids_t2_xstep.length; i++) { + TT_recipeAdder.addFOGPlasmaRecipe( + new ItemStack[] { solids_t2_xstep[i] }, + new FluidStack[] { solid_plasmas_t2_xstep[i] }, + 1 * SECONDS, + (int) TierEU.RECIPE_MAX, + true, + 2); + } + + } + + } + + // Fluid to plasma recipes + { + // Fusion tier 1-3 + { + // Single step + FluidStack[] fluids_t0_1step = { Materials.Helium.getGas(1000) }; + FluidStack[] fluid_plasmas_t0_1step = { Materials.Helium.getPlasma(1000) }; + + for (int i = 0; i < fluids_t0_1step.length; i++) { + TT_recipeAdder.addFOGPlasmaRecipe( + new FluidStack[] { fluids_t0_1step[i] }, + new FluidStack[] { fluid_plasmas_t0_1step[i] }, + 1 * SECONDS, + (int) TierEU.RECIPE_MAX, + false, + 0); + } + + // Multi-step + FluidStack[] fluids_t0_xstep = { ELEMENT.getInstance().NEON.getFluidStack(1000) }; + FluidStack[] fluid_plasmas_t0_xstep = { + new FluidStack(ELEMENT.getInstance().NEON.getPlasma(), 1000) }; + + for (int i = 0; i < fluids_t0_xstep.length; i++) { + TT_recipeAdder.addFOGPlasmaRecipe( + new FluidStack[] { fluids_t0_xstep[i] }, + new FluidStack[] { fluid_plasmas_t0_xstep[i] }, + 1 * SECONDS, + (int) TierEU.RECIPE_MAX, + true, + 0); + } + } + // Fusion tier 4-5 + { + // Single step + // None yet + + // Multi-step + // None yet + } + // Exotic + { + // None yet + } + } + + // Exotic module fake recipes + { + TT_recipeAdder.addFOGExoticFakeRecipe( + new Object[] { Materials.Iron.getDust(1), Materials.Bismuth.getDust(1), + Materials.Tritanium.getDust(1) }, + new Object[] { Materials.Helium.getGas(1000), ELEMENT.getInstance().NEON.getFluidStack(1000), + ELEMENT.getInstance().XENON.getFluidStack(1000) }, + new FluidStack[] { Materials.Titanium.getMolten(1000) }, + 10 * SECONDS, + (int) TierEU.RECIPE_MAX, + 1); + } + } + + // Exotic module plasma material maps + // GT materials + plasmaGTMaterialList.addAll( + Arrays.asList( + Materials.Aluminium, + Materials.Americium, + Materials.Antimony, + Materials.Ardite, + Materials.Argon, + Materials.Arsenic, + Materials.Barium, + Materials.Beryllium, + Materials.Bismuth, + Materials.Boron, + Materials.Caesium, + Materials.Calcium, + Materials.Cadmium, + Materials.Carbon, + Materials.Cerium, + Materials.Chlorine, + Materials.Chrome, + Materials.Cobalt, + Materials.Copper, + Materials.Desh, + Materials.Deuterium, + Materials.Dysprosium, + Materials.Erbium, + Materials.Europium, + Materials.Fluorine, + Materials.Gadolinium, + Materials.Gallium, + Materials.Gold, + Materials.Helium, + Materials.Holmium, + Materials.Hydrogen, + Materials.Indium, + Materials.Iridium, + Materials.Iron, + Materials.Lanthanum, + Materials.Lead, + Materials.Lithium, + Materials.Lutetium, + Materials.Magnesium, + Materials.Manganese, + Materials.MeteoricIron, + Materials.Molybdenum, + Materials.Naquadah, + Materials.Neodymium, + Materials.Nickel, + Materials.Niobium, + Materials.Nitrogen, + Materials.Oriharukon, + Materials.Osmium, + Materials.Oxygen, + Materials.Palladium, + Materials.Phosphorus, + Materials.Platinum, + Materials.Plutonium, + Materials.Plutonium241, + Materials.Potassium, + Materials.Praseodymium, + Materials.Promethium, + Materials.Radon, + Materials.Rubidium, + Materials.Samarium, + Materials.Silicon, + Materials.Silver, + Materials.Sodium, + Materials.Strontium, + Materials.Sulfur, + Materials.Tantalum, + Materials.Tellurium, + Materials.Terbium, + Materials.Thorium, + Materials.Thulium, + Materials.Tin, + Materials.Titanium, + Materials.Tritium, + Materials.Tungsten, + Materials.Uranium235, + Materials.Uranium, + Materials.Vanadium, + Materials.Ytterbium, + Materials.Yttrium, + Materials.Zinc, + Materials.Flerovium)); + + plasmaGTWeightList.addAll( + Arrays.asList( + 6000 /* Aluminium */, + 10000 /* Americium */, + 6000 /* Antimony */, + 6000 /* Ardite */, + 6000 /* Argon */, + 6000 /* Arsenic */, + 6000 /* Barium */, + 6000 /* Beryllium */, + 8000 /* Bismuth */, + 8000 /* Boron */, + 6000 /* Caesium */, + 10000 /* Calcium */, + 6000 /* Cadmium */, + 6000 /* Carbon */, + 6000 /* Cerium */, + 6000 /* Chlorine */, + 6000 /* Chrome */, + 6000 /* Cobalt */, + 6000 /* Copper */, + 6000 /* Desh */, + 6000 /* Deuterium */, + 2000 /* Dysprosium */, + 2000 /* Erbium */, + 6000 /* Europium */, + 6000 /* Fluorine */, + 2000 /* Gadolinium */, + 6000 /* Gallium */, + 6000 /* Gold */, + 10000 /* Helium */, + 6000 /* Holmium */, + 10000 /* Hydrogen */, + 6000 /* Indium */, + 6000 /* Iridium */, + 10000 /* Iron */, + 6000 /* Lanthanum */, + 500 /* Lead */, + 6000 /* Lithium */, + 6000 /* Lutetium */, + 6000 /* Magnesium */, + 6000 /* Manganese */, + 6000 /* Meteoric Iron */, + 6000 /* Molybdenum */, + 6000 /* Naquadah */, + 6000 /* Neodymium */, + 10000 /* Nickel */, + 10000 /* Niobium */, + 10000 /* Nitrogen */, + 6000 /* Oriharukon */, + 6000 /* Osmium */, + 8000 /* Oxygen */, + 6000 /* Palladium */, + 6000 /* Phosphorus */, + 6000 /* Platinum */, + 6000 /* Plutonium 239 */, + 500 /* Plutonium 241 */, + 6000 /* Potassium */, + 6000 /* Praseodymium */, + 2000 /* Promethium */, + 10000 /* Radon */, + 2000 /* Rubidium */, + 6000 /* Samarium */, + 6000 /* Raw Silicon */, + 10000 /* Silver */, + 6000 /* Sodium */, + 2000 /* Strontium */, + 10000 /* Sulfur */, + 6000 /* Tantalum */, + 2000 /* Tellurium */, + 1000 /* Terbium */, + 500 /* Thorium */, + 6000 /* Thulium */, + 10000 /* Tin */, + 10000 /* Titanium */, + 6000 /* Tritium */, + 6000 /* Tungsten */, + 6000 /* Uranium 235 */, + 6000 /* Uranium 238 */, + 6000 /* Vanadium */, + 2000 /* Ytterbium */, + 6000 /* Yttrium */, + 6000 /* Zinc */, + 1000 /* Flerovium */ )); + + // GT++ materials + if (GTPlusPlus.isModLoaded()) { + exoticModulePlasmaItemMap.put(ELEMENT.getInstance().ZIRCONIUM.getTinyDust(1), 6000); + exoticModulePlasmaItemMap.put(ELEMENT.getInstance().THORIUM232.getTinyDust(1), 6000); + exoticModulePlasmaItemMap.put(ELEMENT.getInstance().GERMANIUM.getTinyDust(1), 2000); + exoticModulePlasmaItemMap.put(ELEMENT.getInstance().THALLIUM.getTinyDust(1), 2000); + exoticModulePlasmaItemMap.put(ELEMENT.getInstance().RUTHENIUM.getTinyDust(1), 6000); + exoticModulePlasmaItemMap.put(ELEMENT.getInstance().RHENIUM.getTinyDust(1), 2000); + exoticModulePlasmaItemMap.put(ELEMENT.getInstance().RHODIUM.getTinyDust(1), 6000); + exoticModulePlasmaItemMap.put(ELEMENT.getInstance().IODINE.getTinyDust(1), 6000); + exoticModulePlasmaItemMap.put(ELEMENT.STANDALONE.ASTRAL_TITANIUM.getTinyDust(1), 8000); + exoticModulePlasmaItemMap.put(ELEMENT.STANDALONE.ADVANCED_NITINOL.getTinyDust(1), 8000); + exoticModulePlasmaItemMap.put(ELEMENT.STANDALONE.FORCE.getTinyDust(1), 8000); + exoticModulePlasmaItemMap.put(ELEMENT.getInstance().HAFNIUM.getTinyDust(1), 6000); + exoticModulePlasmaItemMap.put(ELEMENT.getInstance().CALIFORNIUM.getTinyDust(1), 1000); + exoticModulePlasmaItemMap.put(ELEMENT.STANDALONE.RUNITE.getTinyDust(1), 8000); + + exoticModulePlasmaFluidMap.put(new FluidStack(ELEMENT.getInstance().XENON.getFluid(), 1), 8000); + exoticModulePlasmaFluidMap.put(new FluidStack(ELEMENT.getInstance().KRYPTON.getFluid(), 1), 8000); + exoticModulePlasmaFluidMap.put(new FluidStack(ELEMENT.getInstance().NEON.getFluid(), 1), 8000); + // These are here because they cant be solidified + exoticModulePlasmaFluidMap.put(new FluidStack(ELEMENT.getInstance().CURIUM.getFluid(), 1), 10000); + exoticModulePlasmaFluidMap.put(new FluidStack(ELEMENT.getInstance().NEPTUNIUM.getFluid(), 1), 800); + exoticModulePlasmaFluidMap.put(new FluidStack(ELEMENT.getInstance().FERMIUM.getFluid(), 1), 800); + } + // Mercury is weird, it has neither dust nor gas, so it needs to be added separately + exoticModulePlasmaFluidMap.put(Materials.Mercury.getFluid(1), 6000); + + // Loop for adding all GT plasma materials + for (int i = 0; i < plasmaGTMaterialList.size(); i++) { + if (plasmaGTMaterialList.get(i).getDustTiny(1) != null) { + exoticModulePlasmaItemMap.put(plasmaGTMaterialList.get(i).getDustTiny(1), plasmaGTWeightList.get(i)); + } else { + exoticModulePlasmaFluidMap.put(plasmaGTMaterialList.get(i).getGas(1), plasmaGTWeightList.get(i)); + } + } + + // Magmatter maps + exoticModuleMagmatterItemMap.putAll(exoticModulePlasmaItemMap); + exoticModuleMagmatterFluidMap.putAll(exoticModulePlasmaFluidMap); + + // GT materials + exoticModuleMagmatterItemMap.put(Materials.CosmicNeutronium.getDustTiny(1), 100000); + exoticModuleMagmatterItemMap.put(Materials.Draconium.getDustTiny(1), 100000); + exoticModuleMagmatterItemMap.put(Materials.DraconiumAwakened.getDustTiny(1), 100000); + exoticModuleMagmatterItemMap.put(Materials.Ichorium.getDustTiny(1), 100000); + exoticModuleMagmatterItemMap.put(Materials.Neutronium.getDustTiny(1), 100000); + + // GT++ materials + if (GTPlusPlus.isModLoaded()) { + exoticModuleMagmatterItemMap.put(ELEMENT.STANDALONE.CELESTIAL_TUNGSTEN.getTinyDust(1), 100000); + exoticModuleMagmatterFluidMap.put(ELEMENT.STANDALONE.HYPOGEN.getFluidStack(1), 100000); + exoticModuleMagmatterFluidMap.put(ELEMENT.STANDALONE.RHUGNOR.getFluidStack(1), 100000); + exoticModuleMagmatterFluidMap.put(ELEMENT.STANDALONE.CHRONOMATIC_GLASS.getFluidStack(1), 100000); + exoticModuleMagmatterFluidMap.put(ELEMENT.STANDALONE.DRAGON_METAL.getFluidStack(1), 100000); + } + } +} 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 953306e9a4..564c596086 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 @@ -19,9 +19,14 @@ import static com.github.technus.tectech.thing.CustomItemList.Machine_DebugWrite import static com.github.technus.tectech.thing.CustomItemList.Machine_Multi_Computer; import static com.github.technus.tectech.thing.CustomItemList.Machine_Multi_DataBank; import static com.github.technus.tectech.thing.CustomItemList.Machine_Multi_EyeOfHarmony; +import static com.github.technus.tectech.thing.CustomItemList.Machine_Multi_ForgeOfGods; import static com.github.technus.tectech.thing.CustomItemList.Machine_Multi_Infuser; import static com.github.technus.tectech.thing.CustomItemList.Machine_Multi_Microwave; +import static com.github.technus.tectech.thing.CustomItemList.Machine_Multi_MoltenModule; +import static com.github.technus.tectech.thing.CustomItemList.Machine_Multi_PlasmaModule; +import static com.github.technus.tectech.thing.CustomItemList.Machine_Multi_QuarkGluonPlasmaModule; import static com.github.technus.tectech.thing.CustomItemList.Machine_Multi_Research; +import static com.github.technus.tectech.thing.CustomItemList.Machine_Multi_SmeltingModule; import static com.github.technus.tectech.thing.CustomItemList.Machine_Multi_Switch; import static com.github.technus.tectech.thing.CustomItemList.Machine_Multi_TeslaCoil; import static com.github.technus.tectech.thing.CustomItemList.Machine_Multi_Transformer; @@ -314,6 +319,7 @@ import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_H import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_Uncertainty; import com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_WirelessMulti; import com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_EM_EyeOfHarmony; +import com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_EM_ForgeOfGods; import com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_EM_computer; import com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_EM_dataBank; import com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_EM_infuser; @@ -322,6 +328,10 @@ import com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_E import com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_EM_transformer; import com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_TM_microwave; import com.github.technus.tectech.thing.metaTileEntity.multi.GT_MetaTileEntity_TM_teslaCoil; +import com.github.technus.tectech.thing.metaTileEntity.multi.godforge_modules.GT_MetaTileEntity_EM_ExoticModule; +import com.github.technus.tectech.thing.metaTileEntity.multi.godforge_modules.GT_MetaTileEntity_EM_MoltenModule; +import com.github.technus.tectech.thing.metaTileEntity.multi.godforge_modules.GT_MetaTileEntity_EM_PlasmaModule; +import com.github.technus.tectech.thing.metaTileEntity.multi.godforge_modules.GT_MetaTileEntity_EM_SmeltingModule; import com.github.technus.tectech.thing.metaTileEntity.pipe.GT_MetaTileEntity_PipeBlock_Data; import com.github.technus.tectech.thing.metaTileEntity.pipe.GT_MetaTileEntity_PipeBlock_Energy; import com.github.technus.tectech.thing.metaTileEntity.pipe.GT_MetaTileEntity_Pipe_Data; @@ -2025,6 +2035,21 @@ public class MachineLoader implements Runnable { Machine_Multi_EyeOfHarmony.set( new GT_MetaTileEntity_EM_EyeOfHarmony(15410, "multimachine.em.eye_of_harmony", "Eye of Harmony") .getStackForm(1L)); + Machine_Multi_ForgeOfGods.set( + new GT_MetaTileEntity_EM_ForgeOfGods(15411, "multimachine.em.forge_of_gods", "Forge of the Gods") + .getStackForm(1L)); + Machine_Multi_SmeltingModule.set( + new GT_MetaTileEntity_EM_SmeltingModule(15412, "multimachine.em.smelting_module", "Smelting Module") + .getStackForm(1L)); + Machine_Multi_MoltenModule.set( + new GT_MetaTileEntity_EM_MoltenModule(15413, "multimachine.em.molten_module", "Molten Module") + .getStackForm(1L)); + Machine_Multi_PlasmaModule.set( + new GT_MetaTileEntity_EM_PlasmaModule(15414, "multimachine.em.plasma_module", "Plasma Module") + .getStackForm(1L)); + Machine_Multi_QuarkGluonPlasmaModule.set( + new GT_MetaTileEntity_EM_ExoticModule(15415, "multimachine.em.exotic_module", "Exotic Matter Module") + .getStackForm(1L)); // =================================================================================================== // Hatches diff --git a/src/main/java/com/github/technus/tectech/loader/thing/MuTeLoader.java b/src/main/java/com/github/technus/tectech/loader/thing/MuTeLoader.java new file mode 100644 index 0000000000..15ab723e42 --- /dev/null +++ b/src/main/java/com/github/technus/tectech/loader/thing/MuTeLoader.java @@ -0,0 +1,21 @@ +package com.github.technus.tectech.loader.thing; + +import com.github.technus.tectech.TecTech; + +public class MuTeLoader implements Runnable { + + @Override + public void run() { + TecTech.LOGGER.info("TecTech: Registering MultiTileEntities"); + registerMachines(); + registerCasings(); + } + + private static void registerMachines() { + + } + + private static void registerCasings() { + + } +} 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 af383a18e8..eaec6574e1 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 @@ -4,11 +4,14 @@ import static com.github.technus.tectech.Reference.MODID; import static com.github.technus.tectech.TecTech.tectechTexturePage1; import com.github.technus.tectech.TecTech; +import com.github.technus.tectech.thing.block.GodforgeGlassBlock; import com.github.technus.tectech.thing.block.QuantumGlassBlock; import com.github.technus.tectech.thing.block.ReactorSimBlock; import com.github.technus.tectech.thing.block.TileEyeOfHarmony; +import com.github.technus.tectech.thing.block.TileForgeOfGods; import com.github.technus.tectech.thing.casing.GT_Block_CasingsBA0; import com.github.technus.tectech.thing.casing.GT_Block_CasingsTT; +import com.github.technus.tectech.thing.casing.GodforgeCasings; import com.github.technus.tectech.thing.casing.SpacetimeCompressionFieldCasing; import com.github.technus.tectech.thing.casing.StabilisationFieldCasing; import com.github.technus.tectech.thing.casing.TT_Container_Casings; @@ -36,6 +39,7 @@ public class ThingsLoader implements Runnable { public void run() { GameRegistry.registerTileEntity(TileEyeOfHarmony.class, MODID + ":EyeOfHarmonyRenderBlock"); + GameRegistry.registerTileEntity(TileForgeOfGods.class, MODID + ":ForgeOfGodsRenderBlock"); if (Textures.BlockIcons.casingTexturePages[tectechTexturePage1] == null) { Textures.BlockIcons.casingTexturePages[tectechTexturePage1] = new ITexture[128]; @@ -60,6 +64,12 @@ public class ThingsLoader implements Runnable { TT_Container_Casings.StabilisationFieldGenerators = new StabilisationFieldCasing(); + TT_Container_Casings.GodforgeCasings = new GodforgeCasings(); + TecTech.LOGGER.info("Godforge blocks registered."); + + GodforgeGlassBlock.run(); + TecTech.LOGGER.info("Godforge Glass registered"); + QuantumGlassBlock.run(); TecTech.LOGGER.info("Quantum Glass registered"); diff --git a/src/main/java/com/github/technus/tectech/proxy/ClientProxy.java b/src/main/java/com/github/technus/tectech/proxy/ClientProxy.java index 68b3fb7a0f..e1ba2959f7 100644 --- a/src/main/java/com/github/technus/tectech/proxy/ClientProxy.java +++ b/src/main/java/com/github/technus/tectech/proxy/ClientProxy.java @@ -2,6 +2,7 @@ package com.github.technus.tectech.proxy; import static com.github.technus.tectech.TecTech.RANDOM; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.eyeOfHarmonyRenderBlock; +import static com.github.technus.tectech.thing.casing.TT_Container_Casings.forgeOfGodsRenderBlock; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiNewChat; @@ -17,9 +18,14 @@ import net.minecraftforge.common.util.ForgeDirection; import com.github.technus.tectech.Reference; import com.github.technus.tectech.rendering.EOH.EOH_ItemRenderer; import com.github.technus.tectech.rendering.EOH.EOH_TESR; +import com.github.technus.tectech.thing.block.GodforgeGlassBlock; +import com.github.technus.tectech.thing.block.GodforgeGlassRender; import com.github.technus.tectech.thing.block.QuantumGlassBlock; import com.github.technus.tectech.thing.block.QuantumGlassRender; +import com.github.technus.tectech.thing.block.RenderForgeOfGods; import com.github.technus.tectech.thing.block.TileEyeOfHarmony; +import com.github.technus.tectech.thing.block.TileForgeOfGods; +import com.github.technus.tectech.thing.item.RenderForgeOfGodsItem; import com.gtnewhorizon.structurelib.entity.fx.WeightlessParticleFX; import cpw.mods.fml.client.FMLClientHandler; @@ -33,11 +39,16 @@ public class ClientProxy extends CommonProxy { public void registerRenderInfo() { QuantumGlassBlock.renderID = RenderingRegistry.getNextAvailableRenderId(); RenderingRegistry.registerBlockHandler(QuantumGlassBlock.renderID, new QuantumGlassRender()); + GodforgeGlassBlock.renderID = RenderingRegistry.getNextAvailableRenderId(); + RenderingRegistry.registerBlockHandler(GodforgeGlassBlock.renderID, new GodforgeGlassRender()); MinecraftForgeClient .registerItemRenderer(Item.getItemFromBlock(eyeOfHarmonyRenderBlock), new EOH_ItemRenderer()); + MinecraftForgeClient + .registerItemRenderer(Item.getItemFromBlock(forgeOfGodsRenderBlock), new RenderForgeOfGodsItem()); ClientRegistry.bindTileEntitySpecialRenderer(TileEyeOfHarmony.class, new EOH_TESR()); + ClientRegistry.bindTileEntitySpecialRenderer(TileForgeOfGods.class, new RenderForgeOfGods()); } @Override diff --git a/src/main/java/com/github/technus/tectech/recipe/GodforgeExoticFrontend.java b/src/main/java/com/github/technus/tectech/recipe/GodforgeExoticFrontend.java new file mode 100644 index 0000000000..1f19fc00c4 --- /dev/null +++ b/src/main/java/com/github/technus/tectech/recipe/GodforgeExoticFrontend.java @@ -0,0 +1,51 @@ +package com.github.technus.tectech.recipe; + +import static gregtech.api.util.GT_Utility.trans; + +import java.util.Collections; +import java.util.List; + +import javax.annotation.ParametersAreNonnullByDefault; + +import com.gtnewhorizons.modularui.api.math.Pos2d; + +import gregtech.api.recipe.BasicUIPropertiesBuilder; +import gregtech.api.recipe.NEIRecipePropertiesBuilder; +import gregtech.api.recipe.RecipeMapFrontend; +import gregtech.api.util.GT_Utility; +import gregtech.api.util.MethodsReturnNonnullByDefault; +import gregtech.nei.RecipeDisplayInfo; + +@ParametersAreNonnullByDefault +@MethodsReturnNonnullByDefault +public class GodforgeExoticFrontend extends RecipeMapFrontend { + + public GodforgeExoticFrontend(BasicUIPropertiesBuilder uiPropertiesBuilder, + NEIRecipePropertiesBuilder neiPropertiesBuilder) { + super(uiPropertiesBuilder, neiPropertiesBuilder); + } + + @Override + public List getItemInputPositions(int itemInputCount) { + return Collections.singletonList(new Pos2d(52, 33)); + } + + @Override + public List getItemOutputPositions(int itemOutputCount) { + return Collections.singletonList(new Pos2d(106, 33)); + } + + @Override + protected void drawEnergyInfo(RecipeDisplayInfo recipeInfo) { + long eut = recipeInfo.recipe.mEUt; + long duration = recipeInfo.recipe.mDuration; + recipeInfo.drawText(trans("152", "Total: ") + GT_Utility.formatNumbers(eut * duration) + " EU"); + recipeInfo.drawText(trans("153", "Usage: ") + GT_Utility.formatNumbers(eut) + " EU/t"); + recipeInfo.drawText(trans("158", "Time: ") + GT_Utility.formatNumbers(duration / 20) + " secs"); + + } + + @Override + protected void drawDurationInfo(RecipeDisplayInfo recipeInfo) {} + +} diff --git a/src/main/java/com/github/technus/tectech/recipe/GodforgePlasmaFrontend.java b/src/main/java/com/github/technus/tectech/recipe/GodforgePlasmaFrontend.java new file mode 100644 index 0000000000..bf8fcc5e8a --- /dev/null +++ b/src/main/java/com/github/technus/tectech/recipe/GodforgePlasmaFrontend.java @@ -0,0 +1,64 @@ +package com.github.technus.tectech.recipe; + +import static gregtech.api.util.GT_Utility.trans; +import static net.minecraft.util.StatCollector.translateToLocal; + +import java.util.Collections; +import java.util.List; + +import javax.annotation.ParametersAreNonnullByDefault; + +import com.gtnewhorizons.modularui.api.math.Pos2d; + +import gregtech.api.recipe.BasicUIPropertiesBuilder; +import gregtech.api.recipe.NEIRecipePropertiesBuilder; +import gregtech.api.recipe.RecipeMapFrontend; +import gregtech.api.util.GT_Utility; +import gregtech.api.util.MethodsReturnNonnullByDefault; +import gregtech.nei.RecipeDisplayInfo; + +@ParametersAreNonnullByDefault +@MethodsReturnNonnullByDefault +public class GodforgePlasmaFrontend extends RecipeMapFrontend { + + public GodforgePlasmaFrontend(BasicUIPropertiesBuilder uiPropertiesBuilder, + NEIRecipePropertiesBuilder neiPropertiesBuilder) { + super(uiPropertiesBuilder, neiPropertiesBuilder); + } + + @Override + public List getItemInputPositions(int itemInputCount) { + return Collections.singletonList(new Pos2d(52, 33)); + } + + @Override + public List getItemOutputPositions(int itemOutputCount) { + return Collections.singletonList(new Pos2d(106, 33)); + } + + @Override + protected void drawEnergyInfo(RecipeDisplayInfo recipeInfo) { + long eut = recipeInfo.recipe.mEUt; + long duration = recipeInfo.recipe.mDuration; + String multistep = "No"; + if (recipeInfo.recipe.mSpecialItems.toString().equals("true")) { + multistep = "Yes"; + } + String requiredUpgrade = switch (recipeInfo.recipe.mSpecialValue) { + case 1 -> "T4-T5"; + case 2 -> "Exotic"; + default -> "T1-T3"; + }; + + recipeInfo.drawText(trans("152", "Total: ") + GT_Utility.formatNumbers(eut * duration) + " EU"); + recipeInfo.drawText(trans("153", "Usage: ") + GT_Utility.formatNumbers(eut) + " EU/t"); + recipeInfo.drawText(trans("158", "Time: ") + GT_Utility.formatNumbers(duration / 20) + " secs"); + recipeInfo.drawText(translateToLocal("gt.blockmachines.multimachine.FOG.plasmamultistep") + ": " + multistep); + recipeInfo.drawText( + translateToLocal("gt.blockmachines.multimachine.FOG.plasmarecipetier") + ": " + requiredUpgrade); + } + + @Override + protected void drawDurationInfo(RecipeDisplayInfo recipeInfo) {} + +} diff --git a/src/main/java/com/github/technus/tectech/recipe/TT_recipeAdder.java b/src/main/java/com/github/technus/tectech/recipe/TT_recipeAdder.java index 366ee0ebb0..a12a645799 100644 --- a/src/main/java/com/github/technus/tectech/recipe/TT_recipeAdder.java +++ b/src/main/java/com/github/technus/tectech/recipe/TT_recipeAdder.java @@ -227,4 +227,91 @@ public class TT_recipeAdder extends GT_RecipeAdder { return true; } + public static boolean addFOGPlasmaRecipe(ItemStack[] itemInputs, FluidStack[] fluidOutputs, int machineDuration, + int machineEUt, boolean multiStep, int recipeTier) { + if (itemInputs == null) { + itemInputs = nullItem; + } + + TecTechRecipeMaps.godforgePlasmaRecipes.addRecipe( + false, + itemInputs, + null, + multiStep, + null, + fluidOutputs, + machineDuration, + machineEUt, + recipeTier); + return true; + } + + public static boolean addFOGPlasmaRecipe(FluidStack[] fluidInputs, FluidStack[] fluidOutputs, int machineDuration, + int machineEUt, boolean multiStep, int recipeTier) { + + if (fluidInputs == null) { + fluidInputs = nullFluid; + } + + TecTechRecipeMaps.godforgePlasmaRecipes.addRecipe( + false, + null, + null, + multiStep, + fluidInputs, + fluidOutputs, + machineDuration, + machineEUt, + recipeTier); + return true; + } + + public static boolean addFOGExoticFakeRecipe(Object[] itemInputs, Object[] fluidInputs, FluidStack[] fluidOutputs, + int machineDuration, int machineEUt, int recipeTier) { + + if (itemInputs == null) { + itemInputs = nullItem; + } + + if (fluidInputs == null) { + fluidInputs = nullFluid; + } + + ItemStack[] inputItems = new ItemStack[itemInputs.length]; + ItemStack[][] itemAlts = new ItemStack[itemInputs.length][]; + for (int i = 0; i < itemInputs.length; i++) { + Object obj = itemInputs[i]; + if (obj instanceof ItemStack) { + inputItems[i] = (ItemStack) obj; + itemAlts[i] = null; + } else if (obj instanceof ItemStack[]stacks) { + if (stacks.length > 0) { + inputItems[i] = stacks[0]; + itemAlts[i] = Arrays.copyOf(stacks, stacks.length); + } + } + } + + FluidStack[] inputFluids = new FluidStack[fluidInputs.length]; + for (int i = 0; i < fluidInputs.length; i++) { + Object obj = fluidInputs[i]; + if (obj instanceof FluidStack[]stacks) { + inputFluids[i] = stacks[0]; + } + } + + TecTechRecipeMaps.godforgeExoticMatterRecipes.addFakeRecipe( + false, + inputItems, + null, + null, + inputFluids, + fluidOutputs, + machineDuration, + machineEUt, + recipeTier, + itemAlts, + false); + return true; + } } diff --git a/src/main/java/com/github/technus/tectech/recipe/TecTechRecipeMaps.java b/src/main/java/com/github/technus/tectech/recipe/TecTechRecipeMaps.java index da60084e3e..a115f0cc9f 100644 --- a/src/main/java/com/github/technus/tectech/recipe/TecTechRecipeMaps.java +++ b/src/main/java/com/github/technus/tectech/recipe/TecTechRecipeMaps.java @@ -46,4 +46,13 @@ public class TecTechRecipeMaps { .logo(TecTechUITextures.PICTURE_TECTECH_LOGO).logoSize(18, 18).logoPos(151, 63) .neiTransferRect(81, 33, 25, 18).neiTransferRect(124, 33, 18, 29).frontend(ResearchStationFrontend::new) .neiHandlerInfo(builder -> builder.setDisplayStack(CustomItemList.Machine_Multi_Research.get(1))).build(); + + public static final RecipeMap godforgePlasmaRecipes = RecipeMapBuilder.of("gt.recipe.fog_plasma") + .maxIO(1, 1, 1, 1).progressBar(TecTechUITextures.OVERLAY_BUTTON_ARROW_BLUE_UP, ProgressBar.Direction.RIGHT) + .progressBarPos(86, 44).neiTransferRect(86, 44, 20, 20).frontend(GodforgePlasmaFrontend::new).build(); + public static final RecipeMap godforgeExoticMatterRecipes = RecipeMapBuilder + .of("gt.recipe.fog_exotic").maxIO(1, 1, 1, 1) + .progressBar(TecTechUITextures.OVERLAY_BUTTON_ARROW_BLUE_UP, ProgressBar.Direction.RIGHT) + .progressBarPos(86, 44).neiTransferRect(86, 44, 20, 20).frontend(GodforgeExoticFrontend::new).build(); + } 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 6195942221..a45e342050 100644 --- a/src/main/java/com/github/technus/tectech/thing/CustomItemList.java +++ b/src/main/java/com/github/technus/tectech/thing/CustomItemList.java @@ -353,6 +353,12 @@ public enum CustomItemList implements IItemContainer { Machine_Multi_Decay, Machine_Multi_Annihilation, Machine_Multi_EyeOfHarmony, + Machine_Multi_ForgeOfGods, + Machine_Multi_SmeltingModule, + Machine_Multi_MoltenModule, + Machine_Multi_PlasmaModule, + Machine_Multi_QuarkGluonPlasmaModule, + hint_0, hint_1, hint_2, @@ -432,6 +438,16 @@ public enum CustomItemList implements IItemContainer { StabilisationFieldGeneratorTier7, StabilisationFieldGeneratorTier8, + Godforge_Gravitational_Lens, + Godforge_Singularity_Shielding_Casing, + Godforge_Guidance_Casing, + Godforge_Boundless_Structure_Casing, + Godforge_Magnetic_Confinement_Casing, + Godforge_Stellar_Energy_Siphon_Casing, + Godforge_GravitonFlowModulatorTier1, + Godforge_GravitonFlowModulatorTier2, + Godforge_GravitonFlowModulatorTier3, + astralArrayFabricator; private ItemStack mStack; diff --git a/src/main/java/com/github/technus/tectech/thing/block/ForgeOfGodsBlock.java b/src/main/java/com/github/technus/tectech/thing/block/ForgeOfGodsBlock.java new file mode 100644 index 0000000000..02be399bb0 --- /dev/null +++ b/src/main/java/com/github/technus/tectech/thing/block/ForgeOfGodsBlock.java @@ -0,0 +1,70 @@ +package com.github.technus.tectech.thing.block; + +import java.util.ArrayList; + +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; + +import com.github.technus.tectech.TecTech; + +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class ForgeOfGodsBlock extends Block { + + public ForgeOfGodsBlock() { + super(Material.iron); + this.setResistance(20f); + this.setHardness(-1.0f); + this.setCreativeTab(TecTech.creativeTabTecTech); + this.setBlockName("Forge of the Gods Renderer"); + this.setLightLevel(100.0f); + registerOther(this); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister iconRegister) { + blockIcon = iconRegister.registerIcon("gregtech:iconsets/TRANSPARENT"); + } + + @Override + public boolean isOpaqueCube() { + return false; + } + + @Override + public boolean canRenderInPass(int a) { + return true; + } + + @Override + public boolean renderAsNormalBlock() { + return false; + } + + @Override + public boolean hasTileEntity(int metadata) { + return true; + } + + @Override + public TileEntity createTileEntity(World world, int metadata) { + return new TileForgeOfGods(); + } + + public static void registerOther(Block block) { + GameRegistry.registerBlock(block, "ForgeOfGodsRenderBlock"); + } + + @Override + public ArrayList getDrops(World world, int x, int y, int z, int meta, int fortune) { + return new ArrayList<>(); + } + +} diff --git a/src/main/java/com/github/technus/tectech/thing/block/GodforgeGlassBlock.java b/src/main/java/com/github/technus/tectech/thing/block/GodforgeGlassBlock.java new file mode 100644 index 0000000000..67c77f5ac4 --- /dev/null +++ b/src/main/java/com/github/technus/tectech/thing/block/GodforgeGlassBlock.java @@ -0,0 +1,107 @@ +package com.github.technus.tectech.thing.block; + +import static com.github.technus.tectech.Reference.MODID; +import static com.github.technus.tectech.TecTech.creativeTabTecTech; + +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; + +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import eu.usrv.yamcore.blocks.BlockBase; +import gregtech.api.GregTech_API; + +public class GodforgeGlassBlock extends BlockBase { + + public static IIcon Icon; + public static int renderID; + public static GodforgeGlassBlock INSTANCE; + + public GodforgeGlassBlock() { + super(Material.iron); + setBlockBounds(0, 0, 0, 1, 1, 1); + setBlockName("spatiallyTranscendentGravitationalLens"); + setHarvestLevel("wrench", 3); + setHardness(50); + setResistance(30); + setLightOpacity(0); + setStepSound(Block.soundTypeGlass); + setBlockTextureName(MODID + ":blockSpatiallyTranscendentGravitationalLens"); + setCreativeTab(creativeTabTecTech); + } + + @Override + public boolean isBeaconBase(IBlockAccess worldObj, int x, int y, int z, int beaconX, int beaconY, int beaconZ) { + return true; + } + + @Override + public boolean isOpaqueCube() { + return false; + } + + @Override + public boolean getCanBlockGrass() { + return false; + } + + @Override + public boolean canBeReplacedByLeaves(IBlockAccess world, int x, int y, int z) { + return false; + } + + @Override + @SideOnly(Side.CLIENT) + public int getRenderBlockPass() { + return 1; + } + + @Override + public boolean renderAsNormalBlock() { + return false; + } + + @Override + @SideOnly(Side.CLIENT) + public boolean shouldSideBeRendered(IBlockAccess worldIn, int x, int y, int z, int side) { + Block block = worldIn.getBlock(x, y, z); + return block != this; + } + + @Override + public int getRenderType() { + return renderID; + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister reg) { + super.registerBlockIcons(reg); + Icon = blockIcon; + } + + public static void run() { + INSTANCE = new GodforgeGlassBlock(); + GameRegistry.registerBlock(INSTANCE, GodforgeGlassItem.class, INSTANCE.getUnlocalizedName()); + GregTech_API.registerMachineBlock(INSTANCE, -1); + } + + @Override + public void breakBlock(World aWorld, int aX, int aY, int aZ, Block aBlock, int aMeta) { + if (GregTech_API.isMachineBlock(this, aWorld.getBlockMetadata(aX, aY, aZ))) { + GregTech_API.causeMachineUpdate(aWorld, aX, aY, aZ); + } + } + + @Override + public void onBlockAdded(World aWorld, int aX, int aY, int aZ) { + if (GregTech_API.isMachineBlock(this, aWorld.getBlockMetadata(aX, aY, aZ))) { + GregTech_API.causeMachineUpdate(aWorld, aX, aY, aZ); + } + } +} diff --git a/src/main/java/com/github/technus/tectech/thing/block/GodforgeGlassItem.java b/src/main/java/com/github/technus/tectech/thing/block/GodforgeGlassItem.java new file mode 100644 index 0000000000..0e6b0d17c6 --- /dev/null +++ b/src/main/java/com/github/technus/tectech/thing/block/GodforgeGlassItem.java @@ -0,0 +1,30 @@ +package com.github.technus.tectech.thing.block; + +import static com.github.technus.tectech.util.CommonValues.GODFORGE_MARK; +import static net.minecraft.util.StatCollector.translateToLocal; + +import java.util.List; + +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; + +public class GodforgeGlassItem extends ItemBlock { + + public static GodforgeGlassItem INSTANCE; + + public GodforgeGlassItem(Block block) { + super(block); +