From 4987ff4136bea938018ee184d5f156bbdb71b9a4 Mon Sep 17 00:00:00 2001 From: GDCloud Date: Tue, 3 Sep 2024 23:30:30 +0200 Subject: [PATCH 01/57] remove multi-step and t4+ plasmas from exotic module plasma pool --- .../java/tectech/loader/recipe/Godforge.java | 34 +------------------ 1 file changed, 1 insertion(+), 33 deletions(-) diff --git a/src/main/java/tectech/loader/recipe/Godforge.java b/src/main/java/tectech/loader/recipe/Godforge.java index 20db967ec42..8909b4669c3 100644 --- a/src/main/java/tectech/loader/recipe/Godforge.java +++ b/src/main/java/tectech/loader/recipe/Godforge.java @@ -370,15 +370,12 @@ public void run() { 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, @@ -394,29 +391,22 @@ public void run() { 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, @@ -431,7 +421,6 @@ public void run() { Materials.Tantalum, Materials.Tellurium, Materials.Terbium, - Materials.Thorium, Materials.Thulium, Materials.Tin, Materials.Titanium, @@ -454,15 +443,12 @@ public void run() { 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 */, @@ -478,29 +464,22 @@ public void run() { 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 */, @@ -515,7 +494,6 @@ public void run() { 6000 /* Tantalum */, 2000 /* Tellurium */, 1000 /* Terbium */, - 500 /* Thorium */, 6000 /* Thulium */, 10000 /* Tin */, 10000 /* Titanium */, @@ -537,20 +515,10 @@ public void run() { exoticModulePlasmaItemMap.put(MaterialsElements.getInstance().RHENIUM.getTinyDust(1), 2000); exoticModulePlasmaItemMap.put(MaterialsElements.getInstance().RHODIUM.getTinyDust(1), 6000); exoticModulePlasmaItemMap.put(MaterialsElements.getInstance().IODINE.getTinyDust(1), 6000); - exoticModulePlasmaItemMap.put(MaterialsElements.STANDALONE.ASTRAL_TITANIUM.getTinyDust(1), 8000); - exoticModulePlasmaItemMap.put(MaterialsElements.STANDALONE.ADVANCED_NITINOL.getTinyDust(1), 8000); - exoticModulePlasmaItemMap.put(MaterialsElements.STANDALONE.FORCE.getTinyDust(1), 8000); exoticModulePlasmaItemMap.put(MaterialsElements.getInstance().HAFNIUM.getTinyDust(1), 6000); - exoticModulePlasmaItemMap.put(MaterialsElements.getInstance().CALIFORNIUM.getTinyDust(1), 1000); - exoticModulePlasmaItemMap.put(MaterialsElements.STANDALONE.RUNITE.getTinyDust(1), 8000); - exoticModulePlasmaFluidMap.put(new FluidStack(MaterialsElements.getInstance().XENON.getFluid(), 1), 8000); - exoticModulePlasmaFluidMap.put(new FluidStack(MaterialsElements.getInstance().KRYPTON.getFluid(), 1), 8000); - exoticModulePlasmaFluidMap.put(new FluidStack(MaterialsElements.getInstance().NEON.getFluid(), 1), 8000); - // These are here because they cant be solidified + // This is here because it cant be solidified exoticModulePlasmaFluidMap.put(new FluidStack(MaterialsElements.getInstance().CURIUM.getFluid(), 1), 10000); - exoticModulePlasmaFluidMap.put(new FluidStack(MaterialsElements.getInstance().NEPTUNIUM.getFluid(), 1), 800); - exoticModulePlasmaFluidMap.put(new FluidStack(MaterialsElements.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); From fd14a60b02ca798d3286e285279fd5fc6e939e82 Mon Sep 17 00:00:00 2001 From: GDCloud Date: Tue, 3 Sep 2024 23:31:23 +0200 Subject: [PATCH 02/57] fix missing word --- src/main/resources/assets/tectech/lang/en_US.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/assets/tectech/lang/en_US.lang b/src/main/resources/assets/tectech/lang/en_US.lang index 5ae57eb9e01..82133793277 100644 --- a/src/main/resources/assets/tectech/lang/en_US.lang +++ b/src/main/resources/assets/tectech/lang/en_US.lang @@ -1094,7 +1094,7 @@ gt.blockmachines.multimachine.FOG.modules=Modules gt.blockmachines.multimachine.FOG.upgrades=Upgrades gt.blockmachines.multimachine.FOG.milestones=Milestones gt.blockmachines.multimachine.FOG.fuelinfotext=Once the structure of the Forge is built and the multiblock is formed, just simply turning it on is not sufficient to make it functional. The Forge must be supplied with a certain amount of Star Fuel (the item) to actually boot up. The amount of Star Fuel needed depends on the current fuel consumption factor, which can be set in the fuel configuration menu. By default the maximum is 5, but it can be increased later on with upgrades. Star Fuel scaling is as follows: factor*25*1.2^factor. Star Fuel can be supplied via an input bus, it gets consumed periodically and stored internally. Once there is enough Star Fuel stored in the multi, it turns on for real (allowing modules to connect) and converts the consumed Star Fuel into stored Stellar Fuel. From this point onwards, the Forge must be fueled via one of the liquid fuels (type can be selected in the fuel config menu). If there isn't enough of the selected fuel present in the input hatch, the stored fuel amount will decrease and if it reaches 0, the Forge enters the previous 'off' state where modules disconnect and it has to be supplied with Star Fuel again. The amount of internally stored Stellar Fuel (liquid) can be increased by turning on battery charging, this will cause the fuel usage to double, but half of it will be stored in the internal battery. -gt.blockmachines.multimachine.FOG.moduleinfotext=There are 4 types of modules that can be used in the Forge, the Helioflare Power Forge, Helioflux Melting Core, Heliothermal Plasma Fabricator and Heliofusion Exoticizer. These modules are separate multiblocks that have to be built into the Godforge structure at their designated spots. Once built, these modules have to connect to the Godforge, which happens automatically if all requirements for the respective module are met. Alternatively, there is a button to refresh their status without waiting for the timer. Each of these modules has its specialized functionality & requirements and is affected differently by certain upgrades. The first unlocked module is the §BHelioflare Power Forge§6, which simply put is a blast furnace even more powerful than the mega version. Additionally, this module has a furnace mode, turning it into a hyper powerful multi smelter. This module is unlocked by default and has 1024 base parallel. The second unlock is the §BHelioflux Melting Core§6, which also processes blast furnace recipes, but with a twist, the outputs are ejected in their molten form instead of hot/regular ingots. If an output does not have a molten form, it will output its regular form. This module has to be unlocked by an upgrade to function and has 512 base parallel. The third module is the §BHeliothermal Plasma Fabricator§6, which possesses a unique recipemap featuring direct material to plasma conversion recipes. These recipes are grouped by two properties, fusion tier and steps required, limiting which recipes can be processed before their respective upgrades are unlocked. Unlike regular fusion, these recipes produce the plasma of the input material. This module has 384 base parallel. The fourth and last module is the §BHeliofusion Exoticizer§6, a module capable of producing quark gluon plasma and later on magmatter. This module has unique automation challenges for both materials, so it is recommended to have two of these, as they have to be locked to either one of the materials. The common rule for both modes' automation challenges is as follows: the module outputs materials at the start of a recipe cycle and waits for the correct inputs to arrive before starting the actual processing of the output material. If producing quark-gluon plasma, the module outputs up 7 different fluids/tiny piles with amounts between 1 and 64, and their corresponding plasmas and amounts have to be returned in order for the recipe to process. For each L of fluid, a bucket of plasma and for each tiny pile an ingot's worth of plasma must be returned for the recipe to work. The amount of initial outputs scales with parallel amount. If magmatter mode is active, the automation challenge changes. Now the module outputs 1-50L of tachyon rich temporal fluid, 51-100L of spatially enlarged fluid and one tiny pile of a high tier material. The challenge is to return both the tachyon rich and spatially enlarged fluids, plus as much plasma of the tiny pile's material (in ingots) as the difference between the amounts of spatially enlarged and tachyon rich fluid. Once all of these have been returned in the correct amounts, the recipe will start to process and output magmatter. The initial input amounts (except the tiny pile) scale with parallel. This module has 36 base parallel and only scales in multiples of nine. +gt.blockmachines.multimachine.FOG.moduleinfotext=There are 4 types of modules that can be used in the Forge, the Helioflare Power Forge, Helioflux Melting Core, Heliothermal Plasma Fabricator and Heliofusion Exoticizer. These modules are separate multiblocks that have to be built into the Godforge structure at their designated spots. Once built, these modules have to connect to the Godforge, which happens automatically if all requirements for the respective module are met. Alternatively, there is a button to refresh their status without waiting for the timer. Each of these modules has its specialized functionality & requirements and is affected differently by certain upgrades. The first unlocked module is the §BHelioflare Power Forge§6, which simply put is a blast furnace even more powerful than the mega version. Additionally, this module has a furnace mode, turning it into a hyper powerful multi smelter. This module is unlocked by default and has 1024 base parallel. The second unlock is the §BHelioflux Melting Core§6, which also processes blast furnace recipes, but with a twist, the outputs are ejected in their molten form instead of hot/regular ingots. If an output does not have a molten form, it will output its regular form. This module has to be unlocked by an upgrade to function and has 512 base parallel. The third module is the §BHeliothermal Plasma Fabricator§6, which possesses a unique recipemap featuring direct material to plasma conversion recipes. These recipes are grouped by two properties, fusion tier and steps required, limiting which recipes can be processed before their respective upgrades are unlocked. Unlike regular fusion, these recipes produce the plasma of the input material. This module has 384 base parallel. The fourth and last module is the §BHeliofusion Exoticizer§6, a module capable of producing quark gluon plasma and later on magmatter. This module has unique automation challenges for both materials, so it is recommended to have two of these, as they have to be locked to either one of the materials. The common rule for both modes' automation challenges is as follows: the module outputs materials at the start of a recipe cycle and waits for the correct inputs to arrive before starting the actual processing of the output material. If producing quark-gluon plasma, the module outputs up to 7 different fluids/tiny piles with amounts between 1 and 64, and their corresponding plasmas and amounts have to be returned in order for the recipe to process. For each L of fluid, a bucket of plasma and for each tiny pile an ingot's worth of plasma must be returned for the recipe to work. The amount of initial outputs scales with parallel amount. If magmatter mode is active, the automation challenge changes. Now the module outputs 1-50L of tachyon rich temporal fluid, 51-100L of spatially enlarged fluid and one tiny pile of a high tier material. The challenge is to return both the tachyon rich and spatially enlarged fluids, plus as much plasma of the tiny pile's material (in ingots) as the difference between the amounts of spatially enlarged and tachyon rich fluid. Once all of these have been returned in the correct amounts, the recipe will start to process and output magmatter. The initial input amounts (except the tiny pile) scale with parallel. This module has 36 base parallel and only scales in multiples of nine. gt.blockmachines.multimachine.FOG.upgradeinfotext=Uprades are the heart and soul of the Godforge, they unlock most of its functionality and processing power. The upgrade tree can be accessed via its button on the main gui and each upgrade node can be clicked for more information on its effects and unlock requirements. In general, each upgrade can only be unlocked if the prior one is unlocked and there are enough available graviton shards. One exception to this is the first upgrade, as that one has no prior upgrade. Some upgrades can also have extra material costs, which are denoted next to the unlock button if applicable. If an upgrade has more than 1 connected prior upgrade, then there are two options, either the upgrade requires ALL connected prior upgrades or AT LEAST ONE (indicated by the connection's color). Upgrades can be refunded by simply pressing the unlock button again, but this only works if ALL connected later upgrades are not active/unlocked. The block of upgrades following the unlock of the Heliufusion Exoticizer module are special, as they are what is considered §Bthe Split§6. As the name suggests, only one path out of the three may be chosen at first, and the others will be locked. Each path has specialized buffs that are primarily targeted towards a specific module, and thus affect other module types with reduced effect (unless stated otherwise). The amount of unlockable paths depends on the amount of rings the Godforge has, which in turn are limited by later upgrades. gt.blockmachines.multimachine.FOG.milestoneinfotext=Milestones are essential for upgrading the Godforge, as they are the source of graviton shards, the main currency needed for unlocking upgrades. In essence, milestones are just what their name suggests, thresholds that when reached, grant graviton shards. There are four types of milestones, Charge, Conversion, Catalyst and Composition, each referring to a stat of the Godforge. Each milestone has 7 tiers, each being harder to reach than the last, but also granting more graviton shards. The first tier grants 1 graviton shard, the second 2, etc. The §BCharge§6 milestone scales off total power consumption of all modules combined, the first tier being unlocked at 1e15 EU consumed, and each subsequent milestone scaling by 9x. The §BConversion§6 milestone scales off total recipes processed across all modules (excluding the Helioflare Power Forge's furnace mode) and its first tier is unlocked at 10M processed recipes. Following tiers scale by 6x. The §BCatalyst§6 milestone is based on the Forge's fuel consumption, counted in Stellar Fuel units (the number entered in the fuel config menu). Reaching the first tier requires 10,000 fuel units to be consumed, and each tier above scales by 3x. Last but not least, the §BComposition§6 milestone works a bit differently, as it scales off the Forge's structure. Milestone levels are granted for each unique type of module present in the structure (Helifusion Exoticizer modules on quark-gluon and magmatter mode count as unique) and for each additional ring built. Your research suggests that something strange might happen if all milestones reach their final tier... Make sure to check back! From 31a99bac96293b0fec765a4fdab5db8c899e5173 Mon Sep 17 00:00:00 2001 From: GDCloud Date: Wed, 4 Sep 2024 20:46:34 +0200 Subject: [PATCH 03/57] adjust upgrade costs --- src/main/java/tectech/loader/recipe/Godforge.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/tectech/loader/recipe/Godforge.java b/src/main/java/tectech/loader/recipe/Godforge.java index 8909b4669c3..aab9b271dc7 100644 --- a/src/main/java/tectech/loader/recipe/Godforge.java +++ b/src/main/java/tectech/loader/recipe/Godforge.java @@ -617,7 +617,7 @@ public void run() { MaterialsElements.STANDALONE.HYPOGEN.getFrameBox(64), MaterialsElements.STANDALONE.DRAGON_METAL.getFrameBox(64), CustomItemList.EOH_Reinforced_Spatial_Casing.get(64), - CustomItemList.EOH_Infinite_Energy_Casing.get(8), ItemList.ZPM6.get(4), + CustomItemList.EOH_Infinite_Energy_Casing.get(8), ItemList.ZPM6.get(2), ItemList.Field_Generator_UMV.get(32) }); godforgeUpgradeMats.put( @@ -625,9 +625,9 @@ public void run() { new ItemStack[] { GTOreDictUnificator.get(OrePrefixes.frameGt, MaterialsUEVplus.WhiteDwarfMatter, 64), GTOreDictUnificator.get(OrePrefixes.frameGt, MaterialsUEVplus.BlackDwarfMatter, 64), GTOreDictUnificator.get(OrePrefixes.frameGt, MaterialsUEVplus.Eternity, 16), - GTOreDictUnificator.get(OrePrefixes.frameGt, MaterialsUEVplus.Universium, 4), + GTOreDictUnificator.get(OrePrefixes.frameGt, MaterialsUEVplus.Universium, 2), CustomItemList.EOH_Infinite_Energy_Casing.get(64), - CustomItemList.StabilisationFieldGeneratorTier5.get(16), ItemList.ZPM6.get(16), + CustomItemList.StabilisationFieldGeneratorTier5.get(16), ItemList.ZPM6.get(6), ItemList.Field_Generator_UMV.get(64) }); godforgeUpgradeMats.put( From 52eef476fbc23d3193162e135999b44bf90ab26e Mon Sep 17 00:00:00 2001 From: BucketBrigade <138534411+CookieBrigade@users.noreply.github.com> Date: Wed, 4 Sep 2024 15:00:02 -0500 Subject: [PATCH 04/57] Godforge Renderer (#3054) --- .../thing/block/RenderForgeOfGods.java | 410 ++++++++++++++++-- .../thing/block/TileEntityForgeOfGods.java | 191 +++++++- .../metaTileEntity/multi/MTEForgeOfGods.java | 58 ++- .../tectech/util/FaceCulledRenderBlocks.java | 62 +++ .../java/tectech/util/FaceVisibility.java | 7 + src/main/java/tectech/util/StructureVBO.java | 112 +++++ .../tectech/shaders/gorgeBeam.frag.glsl | 28 ++ .../tectech/shaders/gorgeBeam.vert.glsl | 77 ++++ .../assets/tectech/shaders/star.frag.glsl | 34 ++ .../assets/tectech/shaders/star.vert.glsl | 10 + 10 files changed, 929 insertions(+), 60 deletions(-) create mode 100644 src/main/java/tectech/util/FaceCulledRenderBlocks.java create mode 100644 src/main/java/tectech/util/FaceVisibility.java create mode 100644 src/main/java/tectech/util/StructureVBO.java create mode 100644 src/main/resources/assets/tectech/shaders/gorgeBeam.frag.glsl create mode 100644 src/main/resources/assets/tectech/shaders/gorgeBeam.vert.glsl create mode 100644 src/main/resources/assets/tectech/shaders/star.frag.glsl create mode 100644 src/main/resources/assets/tectech/shaders/star.vert.glsl diff --git a/src/main/java/tectech/thing/block/RenderForgeOfGods.java b/src/main/java/tectech/thing/block/RenderForgeOfGods.java index 976dd6da8e5..d693ade061a 100644 --- a/src/main/java/tectech/thing/block/RenderForgeOfGods.java +++ b/src/main/java/tectech/thing/block/RenderForgeOfGods.java @@ -1,52 +1,406 @@ package tectech.thing.block; -import static tectech.Reference.MODID; -import static tectech.rendering.EOH.EOHRenderingUtils.renderStarLayer; -import static tectech.rendering.EOH.EOHTileEntitySR.STAR_LAYER_0; -import static tectech.rendering.EOH.EOHTileEntitySR.STAR_LAYER_1; -import static tectech.rendering.EOH.EOHTileEntitySR.STAR_LAYER_2; - -import java.awt.Color; +import com.gtnewhorizon.gtnhlib.client.renderer.shader.ShaderProgram; +import com.gtnewhorizon.gtnhlib.client.renderer.vbo.VertexBuffer; +import net.minecraft.client.renderer.ActiveRenderInfo; +import net.minecraft.client.renderer.texture.TextureMap; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.model.AdvancedModelLoader; import net.minecraftforge.client.model.IModelCustom; - +import org.joml.Matrix4fStack; +import org.joml.Vector3f; +import org.joml.Vector4f; +import org.lwjgl.BufferUtils; import org.lwjgl.opengl.GL11; +import org.lwjgl.opengl.GL13; +import org.lwjgl.opengl.GL15; +import org.lwjgl.opengl.GL20; +import tectech.Reference; +import tectech.thing.metaTileEntity.multi.ForgeOfGodsRingsStructureString; +import tectech.thing.metaTileEntity.multi.ForgeOfGodsStructureString; +import tectech.util.StructureVBO; + +import java.nio.FloatBuffer; + +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static tectech.rendering.EOH.EOHTileEntitySR.STAR_LAYER_0; +import static tectech.rendering.EOH.EOHTileEntitySR.STAR_LAYER_1; +import static tectech.rendering.EOH.EOHTileEntitySR.STAR_LAYER_2; +import static tectech.thing.casing.TTCasingsContainer.GodforgeCasings; public class RenderForgeOfGods extends TileEntitySpecialRenderer { - public static IModelCustom starModel; - public RenderForgeOfGods() { - starModel = AdvancedModelLoader.loadModel(new ResourceLocation(MODID, "models/Star.obj")); + private static ShaderProgram starProgram; + private static IModelCustom starModel; + private static float modelNormalize = .0067f * 2; + + + private static boolean initialized = false; + private static int u_Color = -1, u_ModelMatrix = -1, u_Gamma = -1; + private Matrix4fStack starModelMatrix = new Matrix4fStack(3); + + private static ShaderProgram beamProgram; + private static int a_VertexID = -1; + private static int u_BeamModelMatrix = -1; + private static int u_CameraPosition = -1, u_SegmentArray = -1, u_SegmentQuads = -1; + private static int u_BeamIntensity = -1, u_BeamColor = -1, u_BeamTime = -1; + private static int beam_vboID = -1; + private static int maxSegments = -1; + private static final int beamSegmentQuads = 16; + private static Matrix4fStack beamModelMatrix = new Matrix4fStack(2); + + + private VertexBuffer ringOne, ringTwo, ringThree; + //These are nudges/translations for each ring to align with the structure + private static final Vector3f ringOneNudge = new Vector3f(0,-1,0); + private static final Vector3f ringTwoNudge = new Vector3f(0,-1,0); + private static final Vector3f ringThreeNudge = new Vector3f(.5f,-1,0); + + private void init(){ + try{ + starProgram = new ShaderProgram(Reference.MODID, + "shaders/star.vert.glsl", + "shaders/star.frag.glsl"); + + u_Color = starProgram.getUniformLocation("u_Color"); + u_Gamma = starProgram.getUniformLocation("u_Gamma"); + u_ModelMatrix = starProgram.getUniformLocation("u_ModelMatrix"); + + }catch(Exception e){ + System.out.println(e.getMessage()); + return; + } + + starModel = AdvancedModelLoader.loadModel(new ResourceLocation(Reference.MODID, "models/Star.obj")); + + try{ + beamProgram = new ShaderProgram(Reference.MODID, + "shaders/gorgeBeam.vert.glsl", + "shaders/gorgeBeam.frag.glsl"); + + + u_BeamModelMatrix = beamProgram.getUniformLocation("u_ModelMatrix"); + u_CameraPosition = beamProgram.getUniformLocation("u_CameraPosition"); + u_SegmentQuads = beamProgram.getUniformLocation("u_SegmentQuads"); + u_SegmentArray = beamProgram.getUniformLocation("u_SegmentArray"); + u_BeamColor = beamProgram.getUniformLocation("u_Color"); + u_BeamIntensity = beamProgram.getUniformLocation("u_Intensity"); + u_BeamTime = beamProgram.getUniformLocation("u_Time"); + + + + a_VertexID = beamProgram.getAttribLocation("a_VertexID"); + }catch(Exception e){ + System.out.println(e.getMessage()); + return; + } + + + beamProgram.use(); + GL20.glUniform1f(u_SegmentQuads,(float)beamSegmentQuads); + maxSegments = 10;//GL20.glGetActiveUniformSize(beamProgram.getProgram(), u_SegmentArray); + + FloatBuffer buffer = BufferUtils.createFloatBuffer(maxSegments*beamSegmentQuads*6*3); + + + for (int i = 0; i < maxSegments; i++) { + for (int j = 0; j < beamSegmentQuads; j++) { + for (int v = 0; v < 6; v++) { + int segID = i*beamSegmentQuads*6; + int quadID = j*6; + int vertID = segID+quadID+v; + buffer.put(vertID); + buffer.put(0); + buffer.put(0); + } + } + } + + buffer.flip(); + beam_vboID = GL15.glGenBuffers(); + GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, beam_vboID); + GL15.glBufferData(GL15.GL_ARRAY_BUFFER, buffer, GL15.GL_STATIC_DRAW); + GL20.glVertexAttribPointer(a_VertexID, 1, GL11.GL_FLOAT, false, 3 * Float.BYTES, 0); + GL11.glVertexPointer(3, GL11.GL_FLOAT, 0, 0); + + GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, 0); + ShaderProgram.clear(); + initialized = true; } - @Override - public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float timeSinceLastTick) { - if (!(tile instanceof TileEntityForgeOfGods)) return; + private void initRings(){ + StructureVBO ringStructure = (new StructureVBO()) + .addMapping('H', BlockGodforgeGlass.INSTANCE, 0) + .addMapping('B', GodforgeCasings, 0) + .addMapping('C', GodforgeCasings, 1) + .addMapping('D', GodforgeCasings, 2) + .addMapping('E', GodforgeCasings, 3) + .addMapping('G', GodforgeCasings, 5) + .addMapping('K', GodforgeCasings, 6) + .addMapping('I', GodforgeCasings, 7); - { - GL11.glPushMatrix(); - GL11.glTranslated(x + 0.5, y + 0.5, z + 0.5); - GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS); - GL11.glDisable(GL11.GL_LIGHTING); - GL11.glDisable(GL11.GL_BLEND); + ringOne = ringStructure.assignStructure(ForgeOfGodsStructureString.FIRST_RING).build(); + ringTwo = ringStructure.assignStructure(ForgeOfGodsRingsStructureString.SECOND_RING).build(); + ringThree = ringStructure.assignStructure(ForgeOfGodsRingsStructureString.THIRD_RING).build(); + } + + public void RenderStarLayer(Vector4f color, ResourceLocation texture, float size, Vector3f rotationAxis, float degrees){ + starModelMatrix.pushMatrix(); + starModelMatrix.rotate((degrees/180f*((float) Math.PI)), rotationAxis.x,rotationAxis.y,rotationAxis.z); + starModelMatrix.scale(size,size,size); + + this.bindTexture(texture); + GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS); + + //Enable transparency if needed + if (color.w < 1 && color.w > 0){ + GL11.glEnable(GL11.GL_BLEND); + GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); + GL11.glEnable(GL11.GL_DEPTH_TEST); + GL11.glDepthMask(false); // Disable depth writing for transparency + } - // Innermost layer should be opaque - enableOpaqueColorInversion(); - renderStarLayer(0, STAR_LAYER_0, new Color(1.0f, 0.4f, 0.05f, 1.0f), 1.0f, 25); - disableOpaqueColorInversion(); + FloatBuffer matrixBuffer = BufferUtils.createFloatBuffer(16); + GL20.glUniformMatrix4(u_ModelMatrix,false, starModelMatrix.get(matrixBuffer)); + GL20.glUniform4f(u_Color,color.x,color.y,color.z,color.w); + starModel.renderAll(); + GL11.glPopAttrib(); + starModelMatrix.popMatrix(); + } + + public void RenderEntireStar(TileEntityForgeOfGods tile, double x, double y, double z, float timer){ + GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS); + GL13.glActiveTexture(GL13.GL_TEXTURE0); + GL11.glDisable(GL11.GL_LIGHTING); + + starProgram.use(); + + float cx = (float)x+.5f; + float cy = (float)y+.5f; + float cz = (float)z+.5f; + float size = modelNormalize; + starModelMatrix.clear(); + starModelMatrix.translate(cx,cy,cz); + + size *= tile.getStarRadius(); + + timer *= tile.getRotationSpeed(); + + float r = tile.getColorR(), g = tile.getColorG(), b = tile.getColorB(); + GL20.glUniform1f(u_Gamma,tile.getGamma()); + RenderStarLayer(new Vector4f(r,g,b,1f),STAR_LAYER_0, size, + new Vector3f( 0F, 1F, 1).normalize(),130 + (timer) % 360000); + RenderStarLayer(new Vector4f(r,g,b,0.4f),STAR_LAYER_1, size*1.02f, + new Vector3f(1F, 1F, 0F).normalize(),-49 + (timer) % 360000); + RenderStarLayer(new Vector4f(r,g,b,0.2f),STAR_LAYER_2, size*1.04f, + new Vector3f(1F, 0F, 1F).normalize(),67 + (timer) % 360000); + + ShaderProgram.clear(); + GL11.glPopAttrib(); + } + + public void bufferSoftBeam(TileEntityForgeOfGods tile){ + FloatBuffer buffer = BufferUtils.createFloatBuffer(maxSegments*3); + + float angle = tile.getStartAngle(); + float radius = tile.getStarRadius()*1.1f; + float startx = -radius*((float) Math.cos(angle)); + float starty = radius*((float) Math.sin(angle)); + + buffer.put(starty); + buffer.put(startx); + buffer.put(0); + + for (int i = tile.getRingCount()-1; i >=0; i--) { + buffer.put(tile.getLenRadius(i)); + buffer.put(tile.getLensDistance(i)); + buffer.put(1f); + } - enablePseudoTransparentColorInversion(); - renderStarLayer(1, STAR_LAYER_1, new Color(1.0f, 0.4f, 0.05f, 1.0f), 0.4f, 25); - renderStarLayer(2, STAR_LAYER_2, new Color(1.0f, 0.4f, 0.05f, 1.0f), 0.2f, 25); + buffer.put(TileEntityForgeOfGods.BACK_PLATE_RADIUS); + buffer.put(TileEntityForgeOfGods.BACK_PLATE_DISTANCE); + buffer.put(-.05f); - GL11.glPopAttrib(); + buffer.rewind(); + GL20.glUniform3(u_SegmentArray, buffer); + } + + + public void bufferIntenseBeam(TileEntityForgeOfGods tile){ + FloatBuffer buffer = BufferUtils.createFloatBuffer(maxSegments*3); + float angle = tile.getStartAngle(); + float radius = tile.getStarRadius()*1.05f; + float startx = -radius*((float) Math.cos(angle)); + float starty = radius*((float) Math.sin(angle)); + + //first lens means the one closest to the star + int firstLens = tile.getRingCount()-1; + + float nextx = tile.getLensDistance(firstLens); + float nexty = tile.getLenRadius(firstLens)*.75f; + + float backx = Math.max(-radius,(nextx+radius)/2); + float backy = TileEntityForgeOfGods.interpolate(startx,nextx,starty,nexty,backx); + + buffer.put(backy); + buffer.put(backx); + buffer.put(0); + + float transparency = .2f; + for (int i = tile.getRingCount()-1; i >=0; i--) { + buffer.put(tile.getLenRadius(i)/2); + buffer.put(tile.getLensDistance(i)); + buffer.put(transparency); + transparency+= .3f; + } + + float currx = tile.getLensDistance(0); + float curry = tile.getLenRadius(0)/2; + float lastx = TileEntityForgeOfGods.BACK_PLATE_DISTANCE; + float lasty = Math.min(tile.getLenRadius(firstLens),TileEntityForgeOfGods.BACK_PLATE_RADIUS); + + + float midx = lastx+8f; + float midy = TileEntityForgeOfGods.interpolate(currx,lastx,curry,lasty,midx); + + buffer.put(midy); + buffer.put(midx); + buffer.put(transparency); + + buffer.put(lasty); + buffer.put(lastx); + buffer.put(0f); + + buffer.rewind(); + GL20.glUniform3(u_SegmentArray, buffer); + //return buffer; + } + + + + public void RenderBeamSegment(TileEntityForgeOfGods tile, double x, double y, double z, float timer){ + GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS); + //GL11.glDisable(GL11.GL_TEXTURE_2D); + //GL11.glDisable(GL11.GL_CULL_FACE); + GL11.glDisable(GL11.GL_ALPHA_TEST); + GL11.glDisable(GL11.GL_LIGHTING); + GL13.glActiveTexture(GL13.GL_TEXTURE0); + this.bindTexture(new ResourceLocation(Reference.MODID, "models/spaceLayer.png")); + + float cx = (float)x+.5f; + float cy = (float)y+.5f; + float cz = (float)z+.5f; + beamModelMatrix.clear(); + beamModelMatrix.translate(cx,cy,cz); + + beamModelMatrix.rotate(tile.getRotAngle()/180*((float)Math.PI), tile.getRotAxisX(), tile.getRotAxisY(), tile.getRotAxisZ()); + beamModelMatrix.rotate((float)Math.PI/2f,0,1,0); + + beamProgram.use(); + + GL11.glEnable(GL11.GL_BLEND); + GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); + + GL11.glEnable(GL11.GL_DEPTH_TEST); + GL11.glDepthMask(false); // Disable depth writing for transparency + + bufferSoftBeam(tile); + + FloatBuffer matrixBuffer = BufferUtils.createFloatBuffer(16); + GL20.glUniformMatrix4(u_BeamModelMatrix,false, beamModelMatrix.get(matrixBuffer)); + + beamModelMatrix.invert(); + + Vector4f cameraPosition = new Vector4f(ActiveRenderInfo.objectX,ActiveRenderInfo.objectY,ActiveRenderInfo.objectZ,1); + cameraPosition = beamModelMatrix.transform(cameraPosition); + GL20.glUniform3f(u_CameraPosition,cameraPosition.x,cameraPosition.y,cameraPosition.z); + GL20.glUniform3f(u_BeamColor,tile.getColorR(), tile.getColorG(), tile.getColorB()); + GL20.glUniform1f(u_BeamIntensity,2); + GL20.glUniform1f(u_BeamTime,timer); + + GL20.glEnableVertexAttribArray(a_VertexID); + GL11.glEnableClientState(GL11.GL_VERTEX_ARRAY); + + GL11.glDrawArrays(GL11.GL_TRIANGLES, 0, maxSegments*beamSegmentQuads*6); + + GL20.glUniform3f(u_BeamColor,1,1,1); + GL20.glUniform1f(u_BeamIntensity,4); + bufferIntenseBeam(tile); + GL11.glDrawArrays(GL11.GL_TRIANGLES, 0, maxSegments*beamSegmentQuads*6); + + GL20.glDisableVertexAttribArray(a_VertexID); + GL11.glDisableClientState(GL11.GL_VERTEX_ARRAY); + + GL11.glPopAttrib(); + ShaderProgram.clear(); + } + + private void RenderRings(TileEntityForgeOfGods tile, double x, double y, double z, float timer){ + bindTexture(TextureMap.locationBlocksTexture); + GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS); + GL11.glEnable(GL11.GL_BLEND); + GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); + + GL11.glPushMatrix(); + GL11.glTranslated(x+.5f,y+.5f,z+.5f); + GL11.glRotatef(tile.getRotAngle(),tile.getRotAxisX(),tile.getRotAxisY(),tile.getRotAxisZ()); + GL11.glRotatef(timer/6*7,1,0,0); + GL11.glTranslated(ringOneNudge.x,ringOneNudge.y,ringOneNudge.z); + + ringOne.render(); + GL11.glPopMatrix(); + if (tile.getRingCount() > 1){ + GL11.glPushMatrix(); + GL11.glTranslated(x+.5f,y+.5f,z+.5f); + GL11.glRotatef(tile.getRotAngle(),tile.getRotAxisX(),tile.getRotAxisY(),tile.getRotAxisZ()); + GL11.glRotatef(-timer/4*5,1,0,0); + GL11.glTranslated(ringTwoNudge.x,ringTwoNudge.y,ringTwoNudge.z); + ringTwo.render(); GL11.glPopMatrix(); + + if (tile.getRingCount() > 2){ + GL11.glPushMatrix(); + GL11.glTranslated(x+.5f,y+.5f,z+.5f); + GL11.glRotatef(tile.getRotAngle(),tile.getRotAxisX(),tile.getRotAxisY(),tile.getRotAxisZ()); + GL11.glRotatef(timer*3,1,0,0); + GL11.glTranslated(ringThreeNudge.x,ringThreeNudge.y,ringThreeNudge.z); + ringThree.render(); + GL11.glPopMatrix(); + } + } + + GL11.glPopAttrib(); + } + + + + @Override + public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float timeSinceLastTick) { + if (!(tile instanceof TileEntityForgeOfGods forgeTile)) return; + if (forgeTile.getRingCount() < 1) return; + + if (!initialized){ + init(); + initRings(); + if(!initialized) + return; } + + + + float timer = forgeTile.getWorldObj().getWorldInfo().getWorldTotalTime()%(20*36000) + timeSinceLastTick; + + RenderRings(forgeTile,x,y,z,timer); + + RenderEntireStar(forgeTile,x,y,z,timer); + + RenderBeamSegment(forgeTile,x,y,z,timer); + + } public static void enablePseudoTransparentColorInversion() { diff --git a/src/main/java/tectech/thing/block/TileEntityForgeOfGods.java b/src/main/java/tectech/thing/block/TileEntityForgeOfGods.java index 7c671b8a314..7d5d39e6b98 100644 --- a/src/main/java/tectech/thing/block/TileEntityForgeOfGods.java +++ b/src/main/java/tectech/thing/block/TileEntityForgeOfGods.java @@ -7,10 +7,33 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; +import net.minecraftforge.common.util.ForgeDirection; +import com.gtnewhorizon.structurelib.alignment.enumerable.Rotation; + public class TileEntityForgeOfGods extends TileEntity { - private float size = 10; + private float radius = 32; private float rotationSpeed = 10; + private int ringCount = 1; + private float colorR = .7f, colorG = .8f, colorB = 1f, gamma = 3f; + private float rotAngle = 0, rotAxisX = 1, rotAxisY = 0, rotAxisZ = 0; + + + private static final String NBT_TAG = "FOG:"; + private static final String ROTATION_SPEED_NBT_TAG = NBT_TAG + "ROTATION"; + private static final String SIZE_NBT_TAG = NBT_TAG + "RADIUS"; + private static final String RINGS_NBT_TAG = NBT_TAG + "RINGS"; + private static final String COLOR_RED_NBT_TAG = NBT_TAG + "COLOR_RED"; + private static final String COLOR_GREEN_NBT_TAG = NBT_TAG + "COLOR_GREEN"; + private static final String COLOR_BLUE_NBT_TAG = NBT_TAG + "COLOR_BLUE"; + private static final String COLOR_GAMMA_NBT_TAG = NBT_TAG + "COLOR_GAMMA"; + private static final String ROT_ANGLE_NBT_TAG = NBT_TAG + "ROT_ANGLE"; + private static final String ROT_AXIS_X_NBT_TAG = NBT_TAG + "ROT_AXIS_X"; + private static final String ROT_AXIS_Y_NBT_TAG = NBT_TAG + "ROT_AXIS_Y"; + private static final String ROT_AXIS_Z_NBT_TAG = NBT_TAG + "ROT_AXIS_Z"; + + public static final float BACK_PLATE_DISTANCE = -121.5f, BACK_PLATE_RADIUS = 13f; + @Override public AxisAlignedBB getRenderBoundingBox() { @@ -19,53 +42,169 @@ public AxisAlignedBB getRenderBoundingBox() { @Override public double getMaxRenderDistanceSquared() { - return 25600; + return 51200; } - public void setRenderSize(float size) { - this.size = size; + public void setStarRadius(float size) { + this.radius = size; } - public void setRenderRotationSpeed(float rotationSpeed) { - this.rotationSpeed = rotationSpeed; + public float getStarRadius() { + return radius; } - public float getRenderSize() { - return size; + public float getRotationSpeed() { + return rotationSpeed; } - public float getRenderRotationSpeed() { - return rotationSpeed; + public void setRotationSpeed(float speed){ + this.rotationSpeed = speed; } - @Override - public void updateEntity() { - angle += 10.0f; + public float getColorR() { + return colorR; + } + + public float getColorG() { + return colorG; + } + + public float getColorB() { + return colorB; + } + + public float getGamma() { + return gamma; + } + + public void setColor(float r, float g, float b){ + setColor(r,g,b,1); + } + + public void setColor(float r, float g, float b, float gamma){ + colorR = r; + colorG = g; + colorB = b; + this.gamma = gamma; + } + + public int getRingCount(){ + return ringCount; + } + + public void setRingCount(int count){ + if (ringCount < 1) return; + ringCount = count; + } + + public float getRotAngle(){ + return rotAngle; } - // Used to track the rotation of the star - public float angle; + public float getRotAxisX(){ + return rotAxisX; + } + + public float getRotAxisY(){ + return rotAxisY; + } - private static final String FOG_NBT_TAG = "FOG:"; - private static final String ROTATION_SPEED_NBT_TAG = FOG_NBT_TAG + "renderRotationSpeed"; - private static final String SIZE_NBT_TAG = FOG_NBT_TAG + "renderSize"; + public float getRotAxisZ(){ + return rotAxisZ; + } + + public void setRenderRotation(Rotation rotation, ForgeDirection direction) { + //System.out.println(rotation); + System.out.println(direction); + /* + switch (rotation) { + case NORMAL -> rotAngle = 0; + case CLOCKWISE -> rotAngle = 90; + case COUNTER_CLOCKWISE -> rotAngle = -90; + case UPSIDE_DOWN -> rotAngle = 180; + } + */ + switch (direction) { + case SOUTH -> rotAngle = 90; + case NORTH -> rotAngle = 90; + case WEST -> rotAngle = 0; + case EAST -> rotAngle = 180; + case UP -> rotAngle = -90; + case DOWN -> rotAngle = -90; + } + rotAxisX = 0; + rotAxisY = direction.offsetZ + direction.offsetX; + rotAxisZ = direction.offsetY; + System.out.println(direction.offsetX); + System.out.println(direction.offsetY); + System.out.println(direction.offsetZ); + + updateToClient(); + } + + public float getLensDistance(int lensID) { + return switch (lensID) { + case 0 -> -61.5f; + case 1 -> -54.5f; + case 2 -> -44.5f; + default -> throw new IllegalStateException("Unexpected value: " + lensID); + }; + } + + public float getLenRadius(int lensID){ + return switch (lensID) { + case 0 -> 1.1f; + case 1 -> 3.5f; + case 2 -> 5f; + default -> throw new IllegalStateException("Unexpected value: " + lensID); + }; + } + + public float getStartAngle(){ + float x = -getLensDistance(getRingCount()-1); + float y = getLenRadius(getRingCount()-1); + float alpha = (float) Math.atan2(y,x); + float beta = (float) Math.asin(radius/Math.sqrt(x*x+y*y)); + return alpha + ((float)Math.PI/2 - beta); + } + + public static float interpolate(float x0, float x1, float y0, float y1, float x) { + return y0 + ((x - x0) * (y1 - y0)) / (x1 - x0); + } @Override public void writeToNBT(NBTTagCompound compound) { super.writeToNBT(compound); - - // Save stats compound.setFloat(ROTATION_SPEED_NBT_TAG, rotationSpeed); - compound.setFloat(SIZE_NBT_TAG, size); + compound.setFloat(SIZE_NBT_TAG, radius); + compound.setInteger(RINGS_NBT_TAG,ringCount); + compound.setFloat(COLOR_RED_NBT_TAG,colorR); + compound.setFloat(COLOR_GREEN_NBT_TAG,colorG); + compound.setFloat(COLOR_BLUE_NBT_TAG,colorB); + compound.setFloat(COLOR_GAMMA_NBT_TAG,gamma); + compound.setFloat(ROT_ANGLE_NBT_TAG,rotAngle); + compound.setFloat(ROT_AXIS_X_NBT_TAG,rotAxisX); + compound.setFloat(ROT_AXIS_Y_NBT_TAG,rotAxisY); + compound.setFloat(ROT_AXIS_Z_NBT_TAG,rotAxisZ); } @Override public void readFromNBT(NBTTagCompound compound) { super.readFromNBT(compound); - - // Load stats rotationSpeed = compound.getFloat(ROTATION_SPEED_NBT_TAG); - size = compound.getFloat(SIZE_NBT_TAG); + radius = compound.getFloat(SIZE_NBT_TAG); + + ringCount = compound.getInteger(RINGS_NBT_TAG); + if (ringCount < 1) ringCount = 1; + + colorR = compound.getFloat(COLOR_RED_NBT_TAG); + colorG = compound.getFloat(COLOR_GREEN_NBT_TAG); + colorB = compound.getFloat(COLOR_BLUE_NBT_TAG); + gamma = compound.getFloat(COLOR_GAMMA_NBT_TAG); + rotAngle = compound.getFloat(ROT_ANGLE_NBT_TAG); + rotAxisX = compound.getFloat(ROT_AXIS_X_NBT_TAG); + rotAxisY = compound.getFloat(ROT_AXIS_Y_NBT_TAG); + rotAxisZ = compound.getFloat(ROT_AXIS_Z_NBT_TAG); } @Override @@ -79,4 +218,8 @@ public Packet getDescriptionPacket() { public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) { readFromNBT(pkt.func_148857_g()); } + + public void updateToClient(){ + worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); + } } diff --git a/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java b/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java index 181ee0d6d4d..06953eb1695 100644 --- a/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java +++ b/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java @@ -38,6 +38,7 @@ import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumChatFormatting; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; @@ -178,7 +179,7 @@ public class MTEForgeOfGods extends TTMultiblockBase implements IConstructable, private static final ItemStack STELLAR_FUEL = Avaritia.isModLoaded() ? getModItem(Avaritia.ID, "Resource", 1, 8) : GTOreDictUnificator.get(OrePrefixes.block, Materials.CosmicNeutronium, 1); - private final boolean debugMode = false; + private final boolean debugMode = true; public int survivalConstruct(ItemStack stackSize, int elementBudget, ISurvivalBuildEnvironment env) { if (mMachine) return -1; @@ -309,7 +310,6 @@ public void construct(ItemStack stackSize, boolean hintsOnly) { public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { moduleHatches.clear(); - // Check structure of multi if (isRenderActive) { if (!structureCheck_EM(STRUCTURE_PIECE_SHAFT, 63, 14, 1) @@ -324,7 +324,6 @@ public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStac if (internalBattery != 0 && !isRenderActive) { createRenderer(); } - // Check there is 1 input bus if (mInputBusses.size() != 1) { return false; @@ -340,7 +339,6 @@ public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStac return false; } } - // Make sure there are no energy hatches { if (mEnergyHatches.size() > 0) { @@ -356,7 +354,6 @@ public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStac if (mInputHatches.size() != 1) { return false; } - if (isUpgradeActive(26)) { if (checkPiece(STRUCTURE_PIECE_SECOND_RING, 55, 11, -67)) { ringAmount = 2; @@ -548,6 +545,39 @@ public IGTHatchAdder adder() { } } + private TileEntityForgeOfGods getRenderer() { + IGregTechTileEntity gregTechTileEntity = this.getBaseMetaTileEntity(); + + int x = gregTechTileEntity.getXCoord(); + int y = gregTechTileEntity.getYCoord(); + int z = gregTechTileEntity.getZCoord(); + + double xOffset = 122 * getExtendedFacing().getRelativeBackInWorld().offsetX; + double zOffset = 122 * getExtendedFacing().getRelativeBackInWorld().offsetZ; + double yOffset = 122 * getExtendedFacing().getRelativeBackInWorld().offsetY; + + + TileEntity tile = this.getBaseMetaTileEntity() + .getWorld() + .getTileEntity((int) (x + xOffset), (int) (y + yOffset), (int) (z + zOffset)); + + if (tile instanceof TileEntityForgeOfGods forgeTile) { + return forgeTile; + } + return null; + } + + private void UpdateRenderer(){ + TileEntityForgeOfGods tile = getRenderer(); + if (tile == null) return; + + tile.setRingCount(ringAmount); + tile.setStarRadius(20); + tile.setRotationSpeed(5); + + tile.updateToClient(); + } + private void createRenderer() { IGregTechTileEntity gregTechTileEntity = this.getBaseMetaTileEntity(); @@ -570,9 +600,6 @@ private void createRenderer() { .getWorld() .getTileEntity((int) (x + xOffset), (int) (y + yOffset), (int) (z + zOffset)); - rendererTileEntity.setRenderSize(20); - rendererTileEntity.setRenderRotationSpeed(5); - switch (ringAmount) { case 2 -> { buildPiece(STRUCTURE_PIECE_FIRST_RING_AIR, null, false, 63, 14, -59); @@ -588,6 +615,9 @@ private void createRenderer() { } } + rendererTileEntity.setRenderRotation(getRotation(),getDirection()); + UpdateRenderer(); + isRenderActive = true; } @@ -625,6 +655,18 @@ private void destroyRenderer() { isRenderActive = false; } + @Override + public final void onScrewdriverRightClick(ForgeDirection side, EntityPlayer aPlayer, float aX, float aY, float aZ) { + if (isRenderActive){ + destroyRenderer(); + isRenderActive = false; + }else{ + ringAmount = 3; + createRenderer(); + isRenderActive = true; + } + } + @Override public void onBlockDestroyed() { super.onBlockDestroyed(); diff --git a/src/main/java/tectech/util/FaceCulledRenderBlocks.java b/src/main/java/tectech/util/FaceCulledRenderBlocks.java new file mode 100644 index 00000000000..51d17ce2917 --- /dev/null +++ b/src/main/java/tectech/util/FaceCulledRenderBlocks.java @@ -0,0 +1,62 @@ +package tectech.util; + +import net.minecraft.util.IIcon; +import net.minecraft.block.Block; +import net.minecraft.world.IBlockAccess; +import net.minecraft.client.renderer.RenderBlocks; + +public class FaceCulledRenderBlocks extends RenderBlocks { + + FaceVisibility faceVisibility; + + public FaceCulledRenderBlocks(IBlockAccess world){ + super(world); + } + + public void setFaceVisibility(FaceVisibility faceVisibility) { + this.faceVisibility = faceVisibility; + } + + @Override + public void renderFaceYNeg(Block block, double x, double y, double z, IIcon icon) { + if (this.faceVisibility.bottom) { + super.renderFaceYNeg(block, 0, 0, 0, icon); + } + } + + @Override + public void renderFaceYPos(Block block, double x, double y, double z, IIcon icon) { + if (this.faceVisibility.top) { + super.renderFaceYPos(block, 0, 0, 0, icon); + } + } + + @Override + public void renderFaceZNeg(Block block, double x, double y, double z, IIcon icon) { + if (this.faceVisibility.back) { + super.renderFaceZNeg(block, 0, 0, 0, icon); + } + } + + @Override + public void renderFaceZPos(Block block, double x, double y, double z, IIcon icon) { + if (this.faceVisibility.front) { + super.renderFaceZPos(block, 0, 0, 0, icon); + } + } + + @Override + public void renderFaceXNeg(Block block, double x, double y, double z, IIcon icon) { + if (this.faceVisibility.left) { + super.renderFaceXNeg(block, 0, 0, 0, icon); + } + } + + @Override + public void renderFaceXPos(Block block, double x, double y, double z, IIcon icon) { + if (this.faceVisibility.right) { + super.renderFaceXPos(block, 0, 0, 0, icon); + } + } + +} diff --git a/src/main/java/tectech/util/FaceVisibility.java b/src/main/java/tectech/util/FaceVisibility.java new file mode 100644 index 00000000000..ad776c6f7f6 --- /dev/null +++ b/src/main/java/tectech/util/FaceVisibility.java @@ -0,0 +1,7 @@ +package tectech.util; + +public class FaceVisibility { + public boolean front = true, back = true; + public boolean left = true, right = true; + public boolean top = true, bottom = true; +} diff --git a/src/main/java/tectech/util/StructureVBO.java b/src/main/java/tectech/util/StructureVBO.java new file mode 100644 index 00000000000..58139ba280d --- /dev/null +++ b/src/main/java/tectech/util/StructureVBO.java @@ -0,0 +1,112 @@ +package tectech.util; + +import net.minecraft.block.Block; +import com.gtnewhorizon.gtnhlib.client.renderer.CapturingTessellator; +import com.gtnewhorizon.gtnhlib.client.renderer.TessellatorManager; +import com.gtnewhorizon.gtnhlib.client.renderer.vbo.VertexBuffer; +import com.gtnewhorizon.gtnhlib.client.renderer.vertex.DefaultVertexFormat; + +import net.minecraft.client.Minecraft; +import net.minecraft.init.Blocks; +import org.apache.commons.lang3.tuple.Pair; + +import java.util.HashMap; +import java.util.HashSet; + +public class StructureVBO { + + + private String[][] structure; + + private HashSet values = new HashSet<>(); + private HashMap> mapper = new HashMap<>(); + + public StructureVBO assignStructure(String[][] structure){ + this.structure = structure; + return this; + } + + public StructureVBO addMapping(char letter, Block block){ + mapper.put(letter,Pair.of(block,0)); + return this; + } + public StructureVBO addMapping(char letter, Block block, int meta){ + mapper.put(letter,Pair.of(block,meta)); + return this; + } + + private boolean isOpaqueAt(int x, int y, int z){ + char letter = structure[x][y].charAt(z); + if (letter == ' ') + return false; + Pair info = mapper.get(letter); + if (info == null) + return false; + if (info.getLeft() == Blocks.air) + return false; + return info.getLeft().isOpaqueCube(); + } + + private FaceVisibility getVisibleFaces(int x, int y, int z){ + FaceVisibility visibility = new FaceVisibility(); + int maxX = structure.length-1; + int maxY = structure[0].length-1; + int maxZ = structure[0][0].length()-1; + //X is ordered from left to right + if ((x > 0) && (isOpaqueAt(x-1,y,z))) + visibility.left = false; + if ((x < maxX) && (isOpaqueAt(x+1,y,z))) + visibility.right = false; + //Y is ordered from top to bottom + if ((y > 0) && (isOpaqueAt(x,y-1,z))) + visibility.top = false; + if ((y < maxY) && (isOpaqueAt(x,y+1,z))) + visibility.bottom = false; + //Z is ordered from front to back + if ((z > 0) && (isOpaqueAt(x,y,z-1))) + visibility.back = false; + if ((z < maxZ) && (isOpaqueAt(x,y,z+1))) + visibility.front = false; + return visibility; + } + + public VertexBuffer build(){ + TessellatorManager.startCapturing(); + CapturingTessellator tess = (CapturingTessellator) TessellatorManager.get(); + FaceCulledRenderBlocks renderer = new FaceCulledRenderBlocks(Minecraft.getMinecraft().theWorld); + renderer.enableAO = false; + + for (int x = 0; x < structure.length; x++) { + String[] plane = structure[x]; + for (int y = 0; y < plane.length; y++) { + String row = plane[y]; + for (int z = 0; z < row.length(); z++) { + char letter = row.charAt(z); + if (letter == ' ') continue; + Pair info = mapper.get(letter); + if (info == null) { + values.add(letter); + continue; + } + if (info.getLeft() == Blocks.air) continue; + + FaceVisibility faceInfo = getVisibleFaces(x,y,z); + renderer.setFaceVisibility(faceInfo); + //The floor division is intended to produce proper offsets + tess.setTranslation( + -structure.length/2f + x, + plane.length/2f - y, //y needs to be drawn from top to bottom + -row.length()/2f + z + ); + renderer.renderBlockAsItem(info.getLeft(),info.getRight(),1f); + } + } + } + + for (char value : values) { + System.out.println(value); + } + + return TessellatorManager.stopCapturingToVBO(DefaultVertexFormat.POSITION_TEXTURE_NORMAL); + } +} diff --git a/src/main/resources/assets/tectech/shaders/gorgeBeam.frag.glsl b/src/main/resources/assets/tectech/shaders/gorgeBeam.frag.glsl new file mode 100644 index 00000000000..1ee45d3764d --- /dev/null +++ b/src/main/resources/assets/tectech/shaders/gorgeBeam.frag.glsl @@ -0,0 +1,28 @@ +#version 120 + +uniform float u_Intensity; +uniform vec3 u_CameraPosition; +uniform sampler2D u_Texture; +uniform vec3 u_Color; + + +varying vec2 v_TexCoord; +varying vec2 v_localPosition; +varying float v_Transparency; + +float luminanceTransform(vec3 color){ + return 0.2126*color.r+0.7152*color.g+0.0722*color.b; + //return (color.r+color.g+color.b)/3.0; +} + + +void main() { + float v_effect = dot(normalize(u_CameraPosition.xy),normalize(v_localPosition)); + float transparency = (v_effect-.5)*2; + transparency = pow(transparency,u_Intensity); + + vec4 texColor = texture2D(u_Texture,v_TexCoord); + float luminance = 1-luminanceTransform(texColor.xyz); + luminance = mix(luminance,1,1-pow(transparency,6)); + gl_FragColor = vec4(u_Color,transparency*v_Transparency*luminance); +} diff --git a/src/main/resources/assets/tectech/shaders/gorgeBeam.vert.glsl b/src/main/resources/assets/tectech/shaders/gorgeBeam.vert.glsl new file mode 100644 index 00000000000..696d4d0df76 --- /dev/null +++ b/src/main/resources/assets/tectech/shaders/gorgeBeam.vert.glsl @@ -0,0 +1,77 @@ +#version 120 + +attribute float a_VertexID; + + +uniform float u_SegmentQuads; +uniform float u_Time; + +//X = radius +//Y = z offset +//Z = transparency +uniform vec3 u_SegmentArray[11]; +uniform vec3 u_CameraPosition; +uniform mat4 u_ModelMatrix; + + + +varying vec2 v_TexCoord; +varying vec2 v_localPosition; +varying float v_Transparency; + + +const float PI = 3.1415926535897; + +float getAngle(int quadID, int localID){ + int id_offset = (localID > 1 && localID < 5)? 0:1; + return ((PI)*(quadID+id_offset))/u_SegmentQuads; +} + +void main() { + + int id = int(a_VertexID); + int segments = (u_SegmentArray.length()-1); + int quads = int(u_SegmentQuads); + + int localID = int(mod(a_VertexID,6.0)); //Local id of the vertex within a face + int quadID = int(mod(float(id/6),quads)); //Local id of a quad within a segment + int segmentID = int(id/(quads*6)); + segmentID = int(min(float(segmentID),float(segments-1))); + + float radius0 = u_SegmentArray[segmentID].x; + float radius1 = u_SegmentArray[segmentID+1].x; + + float offset0 = u_SegmentArray[segmentID].y; + float offset1 = u_SegmentArray[segmentID+1].y; + + float trans0 = u_SegmentArray[segmentID].z; + float trans1 = u_SegmentArray[segmentID+1].z; + + float slope = (radius1-radius0)/(offset1-offset0); + + + float cameraAngle = atan(u_CameraPosition.y,u_CameraPosition.x); + float staticAngle = getAngle(quadID,localID); + + + float angle = staticAngle+(cameraAngle-PI/2); + + float offset = (localID > 0 && localID < 4)?offset0:offset1; + float radius = (localID > 0 && localID < 4)?radius0:radius1; + v_Transparency = (localID > 0 && localID < 4)?trans0:trans1; + + //radius = min(radius,length(u_CameraPosition.xy)); + + vec3 localPosition = vec3(cos(angle)*radius,sin(angle)*radius,offset); + vec4 worldPosition = u_ModelMatrix*vec4(localPosition,1); + + gl_Position = gl_ModelViewProjectionMatrix * worldPosition; + + v_localPosition = localPosition.xy; + + float timer = u_Time/240; + + float heightOffset = (offset/256) + timer; + v_TexCoord = vec2(heightOffset,angle/(2*PI)+heightOffset/3 + timer); +} + diff --git a/src/main/resources/assets/tectech/shaders/star.frag.glsl b/src/main/resources/assets/tectech/shaders/star.frag.glsl new file mode 100644 index 00000000000..b5c3300ae78 --- /dev/null +++ b/src/main/resources/assets/tectech/shaders/star.frag.glsl @@ -0,0 +1,34 @@ +uniform sampler2D u_Texture; +uniform vec4 u_Color; +uniform float u_Gamma; + +varying vec2 v_TexCoord; + +const float PI = 3.1415926535897; + +//const vec3 baseAngle = PI/4; + +vec3 toYIQ(vec3 rgb){ + return mat3( 0.299, 1.0, 0.40462981, 0.587, -0.46081557, -1.0, 0.114, -0.53918443, 0.59537019 ) * rgb; +} + +vec3 toRGB(vec3 yiq){ + return mat3( 1.0, 1.0, 1.0, 0.5696804, -0.1620848, -0.6590654, 0.3235513, -0.3381869, 0.8901581 ) * yiq; +} + +void main() { + vec3 texture = texture2D(u_Texture, v_TexCoord).rgb; + + vec3 original = toYIQ(texture); + + if (length(original.xy) < .01){ + gl_FragColor = vec4(texture,1); + } else { + vec3 targetYIQ = toYIQ(u_Color); + vec3 originalYIQ = toYIQ(texture); + vec3 yiqColor = vec3(original.x,targetYIQ.yz); + vec3 finalrgb = toRGB(yiqColor); + finalrgb = pow(finalrgb,vec3(1/u_Gamma)); + gl_FragColor = vec4(finalrgb,u_Color.a); + } +} diff --git a/src/main/resources/assets/tectech/shaders/star.vert.glsl b/src/main/resources/assets/tectech/shaders/star.vert.glsl new file mode 100644 index 00000000000..7dab1d35003 --- /dev/null +++ b/src/main/resources/assets/tectech/shaders/star.vert.glsl @@ -0,0 +1,10 @@ +#version 120 + + +uniform mat4 u_ModelMatrix; +varying vec2 v_TexCoord; + +void main() { + v_TexCoord = gl_MultiTexCoord0.xy; + gl_Position = gl_ModelViewProjectionMatrix * u_ModelMatrix * gl_Vertex; +} From 9138d73ff81c23d6e281dc660c450ae18e1156d0 Mon Sep 17 00:00:00 2001 From: GDCloud Date: Thu, 5 Sep 2024 01:37:43 +0200 Subject: [PATCH 05/57] another missing word --- src/main/resources/assets/tectech/lang/en_US.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/assets/tectech/lang/en_US.lang b/src/main/resources/assets/tectech/lang/en_US.lang index 82133793277..0fc3124c3eb 100644 --- a/src/main/resources/assets/tectech/lang/en_US.lang +++ b/src/main/resources/assets/tectech/lang/en_US.lang @@ -1004,7 +1004,7 @@ fog.upgrade.text.19=Improves the EBF energy reduction heat bonus from 5% to 8% a fog.upgrade.text.20=EBF heat bonuses are granted above 30,000K, but the heat value used in heat bonus calculations is determined by this formula: Actual Heat = 30000 + (Current Heat - 30000)^0.85 fog.upgrade.text.21=Unlocks a multiplier to maximum parallel based on total amount of purchased upgrades. This bonus is calculated via this formula: Multiplier = 1 + Upgrade Amount / 5 fog.upgrade.text.22=Improves IGCC based on current maximum parallel. Improved Formula: Multiplier = (1 / Heat^0.01) / (Parallel^0.02) -fog.upgrade.text.23=Increases maximum processing voltage by 1 per active ring. +fog.upgrade.text.23=Increases maximum processing voltage by 1 tier per active ring. fog.upgrade.text.24=Allows the Heliothermal Plasma Fabricator to process up to T5 plasmas. fog.upgrade.text.25=Allows the Heliofusion Exoticizer to be affected by other upgrade benefits, but those benefits are square rooted first. The overclock bonus is adjusted via the following formula: OC Factor = 2 + (Base OC Factor - 2)^2 fog.upgrade.text.26=Allows construction of the second ring and adds 4 module slots. From a8f5425f5d7a41e43ef72541edb0ac6d81ff93ad Mon Sep 17 00:00:00 2001 From: GDCloud Date: Thu, 5 Sep 2024 23:31:21 +0200 Subject: [PATCH 06/57] fix auutobuild not working while formed --- .../java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java b/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java index 06953eb1695..d038851d39f 100644 --- a/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java +++ b/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java @@ -182,7 +182,6 @@ public class MTEForgeOfGods extends TTMultiblockBase implements IConstructable, private final boolean debugMode = true; public int survivalConstruct(ItemStack stackSize, int elementBudget, ISurvivalBuildEnvironment env) { - if (mMachine) return -1; int realBudget = elementBudget >= 1000 ? elementBudget : Math.min(1000, elementBudget * 5); // 1000 blocks max per placement. int built = survivialBuildPiece(STRUCTURE_PIECE_MAIN, stackSize, 63, 14, 1, realBudget, env, false, true); From 28925f93b5fb8e13db5cdeddda3db76c65aee939 Mon Sep 17 00:00:00 2001 From: GDCloud Date: Thu, 5 Sep 2024 23:31:59 +0200 Subject: [PATCH 07/57] output bus has to be ME variant --- .../java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java b/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java index d038851d39f..b7650140667 100644 --- a/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java +++ b/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java @@ -2516,7 +2516,7 @@ public MultiblockTooltipBuilder createTooltip() { EnumChatFormatting.GOLD + "36" + EnumChatFormatting.GRAY + " Stellar Energy Siphon Casing") .addStructureInfo("--------------------------------------------") .addStructureInfo("Requires " + EnumChatFormatting.GOLD + 1 + EnumChatFormatting.GRAY + " Input Hatch") - .addStructureInfo("Requires " + EnumChatFormatting.GOLD + 1 + EnumChatFormatting.GRAY + " Output Bus") + .addStructureInfo("Requires " + EnumChatFormatting.GOLD + 1 + EnumChatFormatting.GRAY + " Output Bus (ME)") .addStructureInfo("Requires " + EnumChatFormatting.GOLD + 1 + EnumChatFormatting.GRAY + " Input Bus") .addStructureInfo("--------------------------------------------") .toolTipFinisher(CommonValues.GODFORGE_MARK); From b51ae1bb3c9cfa297b780c49b4f109ec387aac8b Mon Sep 17 00:00:00 2001 From: GDCloud Date: Fri, 6 Sep 2024 02:53:03 +0200 Subject: [PATCH 08/57] fix dot --- .../java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java b/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java index b7650140667..c5ffbd60c88 100644 --- a/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java +++ b/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java @@ -241,7 +241,7 @@ public IStructureDefinition getStructure_EM() { HatchElementBuilder.builder() .atLeast(moduleElement.Module) .casingIndex(TEXTURE_INDEX) - .dot(3) + .dot(2) .buildAndChain(GodforgeCasings, 0)) .addElement('K', ofBlock(GodforgeCasings, 6)) .addElement('L', ofBlock(Blocks.air, 0)) From fa46ce27b62aa56149ee5faf9423748b374aaab1 Mon Sep 17 00:00:00 2001 From: GDCloud Date: Fri, 6 Sep 2024 03:04:13 +0200 Subject: [PATCH 09/57] fix first ring materializing out of nowhere when controller is broken --- .../tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java b/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java index c5ffbd60c88..115f331bf85 100644 --- a/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java +++ b/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java @@ -669,7 +669,9 @@ public final void onScrewdriverRightClick(ForgeDirection side, EntityPlayer aPla @Override public void onBlockDestroyed() { super.onBlockDestroyed(); - destroyRenderer(); + if (isRenderActive) { + destroyRenderer(); + } } @Override From 24ca67a03159ef1ee40cc6215c2b2439e71c3183 Mon Sep 17 00:00:00 2001 From: GDCloud Date: Fri, 6 Sep 2024 03:06:05 +0200 Subject: [PATCH 10/57] spotless --- .../thing/block/RenderForgeOfGods.java | 279 +++++++++--------- .../thing/block/TileEntityForgeOfGods.java | 74 +++-- .../metaTileEntity/multi/MTEForgeOfGods.java | 9 +- .../tectech/util/FaceCulledRenderBlocks.java | 8 +- .../java/tectech/util/FaceVisibility.java | 1 + src/main/java/tectech/util/StructureVBO.java | 94 +++--- 6 files changed, 231 insertions(+), 234 deletions(-) diff --git a/src/main/java/tectech/thing/block/RenderForgeOfGods.java b/src/main/java/tectech/thing/block/RenderForgeOfGods.java index d693ade061a..a002e23ee55 100644 --- a/src/main/java/tectech/thing/block/RenderForgeOfGods.java +++ b/src/main/java/tectech/thing/block/RenderForgeOfGods.java @@ -1,8 +1,12 @@ package tectech.thing.block; +import static tectech.rendering.EOH.EOHTileEntitySR.STAR_LAYER_0; +import static tectech.rendering.EOH.EOHTileEntitySR.STAR_LAYER_1; +import static tectech.rendering.EOH.EOHTileEntitySR.STAR_LAYER_2; +import static tectech.thing.casing.TTCasingsContainer.GodforgeCasings; + +import java.nio.FloatBuffer; -import com.gtnewhorizon.gtnhlib.client.renderer.shader.ShaderProgram; -import com.gtnewhorizon.gtnhlib.client.renderer.vbo.VertexBuffer; import net.minecraft.client.renderer.ActiveRenderInfo; import net.minecraft.client.renderer.texture.TextureMap; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; @@ -10,6 +14,7 @@ import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.model.AdvancedModelLoader; import net.minecraftforge.client.model.IModelCustom; + import org.joml.Matrix4fStack; import org.joml.Vector3f; import org.joml.Vector4f; @@ -18,27 +23,21 @@ import org.lwjgl.opengl.GL13; import org.lwjgl.opengl.GL15; import org.lwjgl.opengl.GL20; + +import com.gtnewhorizon.gtnhlib.client.renderer.shader.ShaderProgram; +import com.gtnewhorizon.gtnhlib.client.renderer.vbo.VertexBuffer; + import tectech.Reference; import tectech.thing.metaTileEntity.multi.ForgeOfGodsRingsStructureString; import tectech.thing.metaTileEntity.multi.ForgeOfGodsStructureString; import tectech.util.StructureVBO; -import java.nio.FloatBuffer; - -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; -import static tectech.rendering.EOH.EOHTileEntitySR.STAR_LAYER_0; -import static tectech.rendering.EOH.EOHTileEntitySR.STAR_LAYER_1; -import static tectech.rendering.EOH.EOHTileEntitySR.STAR_LAYER_2; -import static tectech.thing.casing.TTCasingsContainer.GodforgeCasings; - public class RenderForgeOfGods extends TileEntitySpecialRenderer { - private static ShaderProgram starProgram; private static IModelCustom starModel; private static float modelNormalize = .0067f * 2; - private static boolean initialized = false; private static int u_Color = -1, u_ModelMatrix = -1, u_Gamma = -1; private Matrix4fStack starModelMatrix = new Matrix4fStack(3); @@ -53,36 +52,33 @@ public class RenderForgeOfGods extends TileEntitySpecialRenderer { private static final int beamSegmentQuads = 16; private static Matrix4fStack beamModelMatrix = new Matrix4fStack(2); - private VertexBuffer ringOne, ringTwo, ringThree; - //These are nudges/translations for each ring to align with the structure - private static final Vector3f ringOneNudge = new Vector3f(0,-1,0); - private static final Vector3f ringTwoNudge = new Vector3f(0,-1,0); - private static final Vector3f ringThreeNudge = new Vector3f(.5f,-1,0); + // These are nudges/translations for each ring to align with the structure + private static final Vector3f ringOneNudge = new Vector3f(0, -1, 0); + private static final Vector3f ringTwoNudge = new Vector3f(0, -1, 0); + private static final Vector3f ringThreeNudge = new Vector3f(.5f, -1, 0); - private void init(){ - try{ - starProgram = new ShaderProgram(Reference.MODID, - "shaders/star.vert.glsl", - "shaders/star.frag.glsl"); + private void init() { + try { + starProgram = new ShaderProgram(Reference.MODID, "shaders/star.vert.glsl", "shaders/star.frag.glsl"); u_Color = starProgram.getUniformLocation("u_Color"); u_Gamma = starProgram.getUniformLocation("u_Gamma"); u_ModelMatrix = starProgram.getUniformLocation("u_ModelMatrix"); - }catch(Exception e){ + } catch (Exception e) { System.out.println(e.getMessage()); return; } starModel = AdvancedModelLoader.loadModel(new ResourceLocation(Reference.MODID, "models/Star.obj")); - try{ - beamProgram = new ShaderProgram(Reference.MODID, + try { + beamProgram = new ShaderProgram( + Reference.MODID, "shaders/gorgeBeam.vert.glsl", "shaders/gorgeBeam.frag.glsl"); - u_BeamModelMatrix = beamProgram.getUniformLocation("u_ModelMatrix"); u_CameraPosition = beamProgram.getUniformLocation("u_CameraPosition"); u_SegmentQuads = beamProgram.getUniformLocation("u_SegmentQuads"); @@ -91,28 +87,24 @@ private void init(){ u_BeamIntensity = beamProgram.getUniformLocation("u_Intensity"); u_BeamTime = beamProgram.getUniformLocation("u_Time"); - - a_VertexID = beamProgram.getAttribLocation("a_VertexID"); - }catch(Exception e){ + } catch (Exception e) { System.out.println(e.getMessage()); return; } - beamProgram.use(); - GL20.glUniform1f(u_SegmentQuads,(float)beamSegmentQuads); - maxSegments = 10;//GL20.glGetActiveUniformSize(beamProgram.getProgram(), u_SegmentArray); - - FloatBuffer buffer = BufferUtils.createFloatBuffer(maxSegments*beamSegmentQuads*6*3); + GL20.glUniform1f(u_SegmentQuads, (float) beamSegmentQuads); + maxSegments = 10;// GL20.glGetActiveUniformSize(beamProgram.getProgram(), u_SegmentArray); + FloatBuffer buffer = BufferUtils.createFloatBuffer(maxSegments * beamSegmentQuads * 6 * 3); for (int i = 0; i < maxSegments; i++) { for (int j = 0; j < beamSegmentQuads; j++) { for (int v = 0; v < 6; v++) { - int segID = i*beamSegmentQuads*6; - int quadID = j*6; - int vertID = segID+quadID+v; + int segID = i * beamSegmentQuads * 6; + int quadID = j * 6; + int vertID = segID + quadID + v; buffer.put(vertID); buffer.put(0); buffer.put(0); @@ -132,9 +124,8 @@ private void init(){ initialized = true; } - private void initRings(){ - StructureVBO ringStructure = (new StructureVBO()) - .addMapping('H', BlockGodforgeGlass.INSTANCE, 0) + private void initRings() { + StructureVBO ringStructure = (new StructureVBO()).addMapping('H', BlockGodforgeGlass.INSTANCE, 0) .addMapping('B', GodforgeCasings, 0) .addMapping('C', GodforgeCasings, 1) .addMapping('D', GodforgeCasings, 2) @@ -143,21 +134,25 @@ private void initRings(){ .addMapping('K', GodforgeCasings, 6) .addMapping('I', GodforgeCasings, 7); - ringOne = ringStructure.assignStructure(ForgeOfGodsStructureString.FIRST_RING).build(); - ringTwo = ringStructure.assignStructure(ForgeOfGodsRingsStructureString.SECOND_RING).build(); - ringThree = ringStructure.assignStructure(ForgeOfGodsRingsStructureString.THIRD_RING).build(); + ringOne = ringStructure.assignStructure(ForgeOfGodsStructureString.FIRST_RING) + .build(); + ringTwo = ringStructure.assignStructure(ForgeOfGodsRingsStructureString.SECOND_RING) + .build(); + ringThree = ringStructure.assignStructure(ForgeOfGodsRingsStructureString.THIRD_RING) + .build(); } - public void RenderStarLayer(Vector4f color, ResourceLocation texture, float size, Vector3f rotationAxis, float degrees){ + public void RenderStarLayer(Vector4f color, ResourceLocation texture, float size, Vector3f rotationAxis, + float degrees) { starModelMatrix.pushMatrix(); - starModelMatrix.rotate((degrees/180f*((float) Math.PI)), rotationAxis.x,rotationAxis.y,rotationAxis.z); - starModelMatrix.scale(size,size,size); + starModelMatrix.rotate((degrees / 180f * ((float) Math.PI)), rotationAxis.x, rotationAxis.y, rotationAxis.z); + starModelMatrix.scale(size, size, size); this.bindTexture(texture); GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS); - //Enable transparency if needed - if (color.w < 1 && color.w > 0){ + // Enable transparency if needed + if (color.w < 1 && color.w > 0) { GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GL11.glEnable(GL11.GL_DEPTH_TEST); @@ -165,57 +160,69 @@ public void RenderStarLayer(Vector4f color, ResourceLocation texture, float size } FloatBuffer matrixBuffer = BufferUtils.createFloatBuffer(16); - GL20.glUniformMatrix4(u_ModelMatrix,false, starModelMatrix.get(matrixBuffer)); - GL20.glUniform4f(u_Color,color.x,color.y,color.z,color.w); + GL20.glUniformMatrix4(u_ModelMatrix, false, starModelMatrix.get(matrixBuffer)); + GL20.glUniform4f(u_Color, color.x, color.y, color.z, color.w); starModel.renderAll(); GL11.glPopAttrib(); starModelMatrix.popMatrix(); } - public void RenderEntireStar(TileEntityForgeOfGods tile, double x, double y, double z, float timer){ + public void RenderEntireStar(TileEntityForgeOfGods tile, double x, double y, double z, float timer) { GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS); GL13.glActiveTexture(GL13.GL_TEXTURE0); GL11.glDisable(GL11.GL_LIGHTING); starProgram.use(); - float cx = (float)x+.5f; - float cy = (float)y+.5f; - float cz = (float)z+.5f; + float cx = (float) x + .5f; + float cy = (float) y + .5f; + float cz = (float) z + .5f; float size = modelNormalize; starModelMatrix.clear(); - starModelMatrix.translate(cx,cy,cz); + starModelMatrix.translate(cx, cy, cz); size *= tile.getStarRadius(); timer *= tile.getRotationSpeed(); float r = tile.getColorR(), g = tile.getColorG(), b = tile.getColorB(); - GL20.glUniform1f(u_Gamma,tile.getGamma()); - RenderStarLayer(new Vector4f(r,g,b,1f),STAR_LAYER_0, size, - new Vector3f( 0F, 1F, 1).normalize(),130 + (timer) % 360000); - RenderStarLayer(new Vector4f(r,g,b,0.4f),STAR_LAYER_1, size*1.02f, - new Vector3f(1F, 1F, 0F).normalize(),-49 + (timer) % 360000); - RenderStarLayer(new Vector4f(r,g,b,0.2f),STAR_LAYER_2, size*1.04f, - new Vector3f(1F, 0F, 1F).normalize(),67 + (timer) % 360000); + GL20.glUniform1f(u_Gamma, tile.getGamma()); + RenderStarLayer( + new Vector4f(r, g, b, 1f), + STAR_LAYER_0, + size, + new Vector3f(0F, 1F, 1).normalize(), + 130 + (timer) % 360000); + RenderStarLayer( + new Vector4f(r, g, b, 0.4f), + STAR_LAYER_1, + size * 1.02f, + new Vector3f(1F, 1F, 0F).normalize(), + -49 + (timer) % 360000); + RenderStarLayer( + new Vector4f(r, g, b, 0.2f), + STAR_LAYER_2, + size * 1.04f, + new Vector3f(1F, 0F, 1F).normalize(), + 67 + (timer) % 360000); ShaderProgram.clear(); GL11.glPopAttrib(); } - public void bufferSoftBeam(TileEntityForgeOfGods tile){ - FloatBuffer buffer = BufferUtils.createFloatBuffer(maxSegments*3); + public void bufferSoftBeam(TileEntityForgeOfGods tile) { + FloatBuffer buffer = BufferUtils.createFloatBuffer(maxSegments * 3); float angle = tile.getStartAngle(); - float radius = tile.getStarRadius()*1.1f; - float startx = -radius*((float) Math.cos(angle)); - float starty = radius*((float) Math.sin(angle)); + float radius = tile.getStarRadius() * 1.1f; + float startx = -radius * ((float) Math.cos(angle)); + float starty = radius * ((float) Math.sin(angle)); buffer.put(starty); buffer.put(startx); buffer.put(0); - for (int i = tile.getRingCount()-1; i >=0; i--) { + for (int i = tile.getRingCount() - 1; i >= 0; i--) { buffer.put(tile.getLenRadius(i)); buffer.put(tile.getLensDistance(i)); buffer.put(1f); @@ -229,43 +236,41 @@ public void bufferSoftBeam(TileEntityForgeOfGods tile){ GL20.glUniform3(u_SegmentArray, buffer); } - - public void bufferIntenseBeam(TileEntityForgeOfGods tile){ - FloatBuffer buffer = BufferUtils.createFloatBuffer(maxSegments*3); + public void bufferIntenseBeam(TileEntityForgeOfGods tile) { + FloatBuffer buffer = BufferUtils.createFloatBuffer(maxSegments * 3); float angle = tile.getStartAngle(); - float radius = tile.getStarRadius()*1.05f; - float startx = -radius*((float) Math.cos(angle)); - float starty = radius*((float) Math.sin(angle)); + float radius = tile.getStarRadius() * 1.05f; + float startx = -radius * ((float) Math.cos(angle)); + float starty = radius * ((float) Math.sin(angle)); - //first lens means the one closest to the star - int firstLens = tile.getRingCount()-1; + // first lens means the one closest to the star + int firstLens = tile.getRingCount() - 1; float nextx = tile.getLensDistance(firstLens); - float nexty = tile.getLenRadius(firstLens)*.75f; + float nexty = tile.getLenRadius(firstLens) * .75f; - float backx = Math.max(-radius,(nextx+radius)/2); - float backy = TileEntityForgeOfGods.interpolate(startx,nextx,starty,nexty,backx); + float backx = Math.max(-radius, (nextx + radius) / 2); + float backy = TileEntityForgeOfGods.interpolate(startx, nextx, starty, nexty, backx); buffer.put(backy); buffer.put(backx); buffer.put(0); float transparency = .2f; - for (int i = tile.getRingCount()-1; i >=0; i--) { - buffer.put(tile.getLenRadius(i)/2); + for (int i = tile.getRingCount() - 1; i >= 0; i--) { + buffer.put(tile.getLenRadius(i) / 2); buffer.put(tile.getLensDistance(i)); buffer.put(transparency); - transparency+= .3f; + transparency += .3f; } float currx = tile.getLensDistance(0); - float curry = tile.getLenRadius(0)/2; + float curry = tile.getLenRadius(0) / 2; float lastx = TileEntityForgeOfGods.BACK_PLATE_DISTANCE; - float lasty = Math.min(tile.getLenRadius(firstLens),TileEntityForgeOfGods.BACK_PLATE_RADIUS); - + float lasty = Math.min(tile.getLenRadius(firstLens), TileEntityForgeOfGods.BACK_PLATE_RADIUS); - float midx = lastx+8f; - float midy = TileEntityForgeOfGods.interpolate(currx,lastx,curry,lasty,midx); + float midx = lastx + 8f; + float midy = TileEntityForgeOfGods.interpolate(currx, lastx, curry, lasty, midx); buffer.put(midy); buffer.put(midx); @@ -277,28 +282,30 @@ public void bufferIntenseBeam(TileEntityForgeOfGods tile){ buffer.rewind(); GL20.glUniform3(u_SegmentArray, buffer); - //return buffer; + // return buffer; } - - - public void RenderBeamSegment(TileEntityForgeOfGods tile, double x, double y, double z, float timer){ + public void RenderBeamSegment(TileEntityForgeOfGods tile, double x, double y, double z, float timer) { GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS); - //GL11.glDisable(GL11.GL_TEXTURE_2D); - //GL11.glDisable(GL11.GL_CULL_FACE); + // GL11.glDisable(GL11.GL_TEXTURE_2D); + // GL11.glDisable(GL11.GL_CULL_FACE); GL11.glDisable(GL11.GL_ALPHA_TEST); GL11.glDisable(GL11.GL_LIGHTING); GL13.glActiveTexture(GL13.GL_TEXTURE0); this.bindTexture(new ResourceLocation(Reference.MODID, "models/spaceLayer.png")); - float cx = (float)x+.5f; - float cy = (float)y+.5f; - float cz = (float)z+.5f; + float cx = (float) x + .5f; + float cy = (float) y + .5f; + float cz = (float) z + .5f; beamModelMatrix.clear(); - beamModelMatrix.translate(cx,cy,cz); + beamModelMatrix.translate(cx, cy, cz); - beamModelMatrix.rotate(tile.getRotAngle()/180*((float)Math.PI), tile.getRotAxisX(), tile.getRotAxisY(), tile.getRotAxisZ()); - beamModelMatrix.rotate((float)Math.PI/2f,0,1,0); + beamModelMatrix.rotate( + tile.getRotAngle() / 180 * ((float) Math.PI), + tile.getRotAxisX(), + tile.getRotAxisY(), + tile.getRotAxisZ()); + beamModelMatrix.rotate((float) Math.PI / 2f, 0, 1, 0); beamProgram.use(); @@ -311,26 +318,30 @@ public void RenderBeamSegment(TileEntityForgeOfGods tile, double x, double y, do bufferSoftBeam(tile); FloatBuffer matrixBuffer = BufferUtils.createFloatBuffer(16); - GL20.glUniformMatrix4(u_BeamModelMatrix,false, beamModelMatrix.get(matrixBuffer)); + GL20.glUniformMatrix4(u_BeamModelMatrix, false, beamModelMatrix.get(matrixBuffer)); beamModelMatrix.invert(); - Vector4f cameraPosition = new Vector4f(ActiveRenderInfo.objectX,ActiveRenderInfo.objectY,ActiveRenderInfo.objectZ,1); + Vector4f cameraPosition = new Vector4f( + ActiveRenderInfo.objectX, + ActiveRenderInfo.objectY, + ActiveRenderInfo.objectZ, + 1); cameraPosition = beamModelMatrix.transform(cameraPosition); - GL20.glUniform3f(u_CameraPosition,cameraPosition.x,cameraPosition.y,cameraPosition.z); - GL20.glUniform3f(u_BeamColor,tile.getColorR(), tile.getColorG(), tile.getColorB()); - GL20.glUniform1f(u_BeamIntensity,2); - GL20.glUniform1f(u_BeamTime,timer); + GL20.glUniform3f(u_CameraPosition, cameraPosition.x, cameraPosition.y, cameraPosition.z); + GL20.glUniform3f(u_BeamColor, tile.getColorR(), tile.getColorG(), tile.getColorB()); + GL20.glUniform1f(u_BeamIntensity, 2); + GL20.glUniform1f(u_BeamTime, timer); GL20.glEnableVertexAttribArray(a_VertexID); GL11.glEnableClientState(GL11.GL_VERTEX_ARRAY); - GL11.glDrawArrays(GL11.GL_TRIANGLES, 0, maxSegments*beamSegmentQuads*6); + GL11.glDrawArrays(GL11.GL_TRIANGLES, 0, maxSegments * beamSegmentQuads * 6); - GL20.glUniform3f(u_BeamColor,1,1,1); - GL20.glUniform1f(u_BeamIntensity,4); + GL20.glUniform3f(u_BeamColor, 1, 1, 1); + GL20.glUniform1f(u_BeamIntensity, 4); bufferIntenseBeam(tile); - GL11.glDrawArrays(GL11.GL_TRIANGLES, 0, maxSegments*beamSegmentQuads*6); + GL11.glDrawArrays(GL11.GL_TRIANGLES, 0, maxSegments * beamSegmentQuads * 6); GL20.glDisableVertexAttribArray(a_VertexID); GL11.glDisableClientState(GL11.GL_VERTEX_ARRAY); @@ -339,35 +350,35 @@ public void RenderBeamSegment(TileEntityForgeOfGods tile, double x, double y, do ShaderProgram.clear(); } - private void RenderRings(TileEntityForgeOfGods tile, double x, double y, double z, float timer){ + private void RenderRings(TileEntityForgeOfGods tile, double x, double y, double z, float timer) { bindTexture(TextureMap.locationBlocksTexture); GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS); GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GL11.glPushMatrix(); - GL11.glTranslated(x+.5f,y+.5f,z+.5f); - GL11.glRotatef(tile.getRotAngle(),tile.getRotAxisX(),tile.getRotAxisY(),tile.getRotAxisZ()); - GL11.glRotatef(timer/6*7,1,0,0); - GL11.glTranslated(ringOneNudge.x,ringOneNudge.y,ringOneNudge.z); + GL11.glTranslated(x + .5f, y + .5f, z + .5f); + GL11.glRotatef(tile.getRotAngle(), tile.getRotAxisX(), tile.getRotAxisY(), tile.getRotAxisZ()); + GL11.glRotatef(timer / 6 * 7, 1, 0, 0); + GL11.glTranslated(ringOneNudge.x, ringOneNudge.y, ringOneNudge.z); ringOne.render(); GL11.glPopMatrix(); - if (tile.getRingCount() > 1){ + if (tile.getRingCount() > 1) { GL11.glPushMatrix(); - GL11.glTranslated(x+.5f,y+.5f,z+.5f); - GL11.glRotatef(tile.getRotAngle(),tile.getRotAxisX(),tile.getRotAxisY(),tile.getRotAxisZ()); - GL11.glRotatef(-timer/4*5,1,0,0); - GL11.glTranslated(ringTwoNudge.x,ringTwoNudge.y,ringTwoNudge.z); + GL11.glTranslated(x + .5f, y + .5f, z + .5f); + GL11.glRotatef(tile.getRotAngle(), tile.getRotAxisX(), tile.getRotAxisY(), tile.getRotAxisZ()); + GL11.glRotatef(-timer / 4 * 5, 1, 0, 0); + GL11.glTranslated(ringTwoNudge.x, ringTwoNudge.y, ringTwoNudge.z); ringTwo.render(); GL11.glPopMatrix(); - if (tile.getRingCount() > 2){ + if (tile.getRingCount() > 2) { GL11.glPushMatrix(); - GL11.glTranslated(x+.5f,y+.5f,z+.5f); - GL11.glRotatef(tile.getRotAngle(),tile.getRotAxisX(),tile.getRotAxisY(),tile.getRotAxisZ()); - GL11.glRotatef(timer*3,1,0,0); - GL11.glTranslated(ringThreeNudge.x,ringThreeNudge.y,ringThreeNudge.z); + GL11.glTranslated(x + .5f, y + .5f, z + .5f); + GL11.glRotatef(tile.getRotAngle(), tile.getRotAxisX(), tile.getRotAxisY(), tile.getRotAxisZ()); + GL11.glRotatef(timer * 3, 1, 0, 0); + GL11.glTranslated(ringThreeNudge.x, ringThreeNudge.y, ringThreeNudge.z); ringThree.render(); GL11.glPopMatrix(); } @@ -376,30 +387,26 @@ private void RenderRings(TileEntityForgeOfGods tile, double x, double y, double GL11.glPopAttrib(); } - - @Override public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float timeSinceLastTick) { if (!(tile instanceof TileEntityForgeOfGods forgeTile)) return; if (forgeTile.getRingCount() < 1) return; - if (!initialized){ + if (!initialized) { init(); initRings(); - if(!initialized) - return; + if (!initialized) return; } + float timer = forgeTile.getWorldObj() + .getWorldInfo() + .getWorldTotalTime() % (20 * 36000) + timeSinceLastTick; + RenderRings(forgeTile, x, y, z, timer); - float timer = forgeTile.getWorldObj().getWorldInfo().getWorldTotalTime()%(20*36000) + timeSinceLastTick; - - RenderRings(forgeTile,x,y,z,timer); - - RenderEntireStar(forgeTile,x,y,z,timer); - - RenderBeamSegment(forgeTile,x,y,z,timer); + RenderEntireStar(forgeTile, x, y, z, timer); + RenderBeamSegment(forgeTile, x, y, z, timer); } diff --git a/src/main/java/tectech/thing/block/TileEntityForgeOfGods.java b/src/main/java/tectech/thing/block/TileEntityForgeOfGods.java index 7d5d39e6b98..b4892855b70 100644 --- a/src/main/java/tectech/thing/block/TileEntityForgeOfGods.java +++ b/src/main/java/tectech/thing/block/TileEntityForgeOfGods.java @@ -6,8 +6,8 @@ import net.minecraft.network.play.server.S35PacketUpdateTileEntity; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; - import net.minecraftforge.common.util.ForgeDirection; + import com.gtnewhorizon.structurelib.alignment.enumerable.Rotation; public class TileEntityForgeOfGods extends TileEntity { @@ -18,7 +18,6 @@ public class TileEntityForgeOfGods extends TileEntity { private float colorR = .7f, colorG = .8f, colorB = 1f, gamma = 3f; private float rotAngle = 0, rotAxisX = 1, rotAxisY = 0, rotAxisZ = 0; - private static final String NBT_TAG = "FOG:"; private static final String ROTATION_SPEED_NBT_TAG = NBT_TAG + "ROTATION"; private static final String SIZE_NBT_TAG = NBT_TAG + "RADIUS"; @@ -34,7 +33,6 @@ public class TileEntityForgeOfGods extends TileEntity { public static final float BACK_PLATE_DISTANCE = -121.5f, BACK_PLATE_RADIUS = 13f; - @Override public AxisAlignedBB getRenderBoundingBox() { return INFINITE_EXTENT_AABB; @@ -57,7 +55,7 @@ public float getRotationSpeed() { return rotationSpeed; } - public void setRotationSpeed(float speed){ + public void setRotationSpeed(float speed) { this.rotationSpeed = speed; } @@ -77,53 +75,53 @@ public float getGamma() { return gamma; } - public void setColor(float r, float g, float b){ - setColor(r,g,b,1); + public void setColor(float r, float g, float b) { + setColor(r, g, b, 1); } - public void setColor(float r, float g, float b, float gamma){ + public void setColor(float r, float g, float b, float gamma) { colorR = r; colorG = g; colorB = b; this.gamma = gamma; } - public int getRingCount(){ + public int getRingCount() { return ringCount; } - public void setRingCount(int count){ + public void setRingCount(int count) { if (ringCount < 1) return; ringCount = count; } - public float getRotAngle(){ + public float getRotAngle() { return rotAngle; } - public float getRotAxisX(){ + public float getRotAxisX() { return rotAxisX; } - public float getRotAxisY(){ + public float getRotAxisY() { return rotAxisY; } - public float getRotAxisZ(){ + public float getRotAxisZ() { return rotAxisZ; } public void setRenderRotation(Rotation rotation, ForgeDirection direction) { - //System.out.println(rotation); + // System.out.println(rotation); System.out.println(direction); /* - switch (rotation) { - case NORMAL -> rotAngle = 0; - case CLOCKWISE -> rotAngle = 90; - case COUNTER_CLOCKWISE -> rotAngle = -90; - case UPSIDE_DOWN -> rotAngle = 180; - } - */ + * switch (rotation) { + * case NORMAL -> rotAngle = 0; + * case CLOCKWISE -> rotAngle = 90; + * case COUNTER_CLOCKWISE -> rotAngle = -90; + * case UPSIDE_DOWN -> rotAngle = 180; + * } + */ switch (direction) { case SOUTH -> rotAngle = 90; case NORTH -> rotAngle = 90; @@ -151,7 +149,7 @@ public float getLensDistance(int lensID) { }; } - public float getLenRadius(int lensID){ + public float getLenRadius(int lensID) { return switch (lensID) { case 0 -> 1.1f; case 1 -> 3.5f; @@ -160,12 +158,12 @@ public float getLenRadius(int lensID){ }; } - public float getStartAngle(){ - float x = -getLensDistance(getRingCount()-1); - float y = getLenRadius(getRingCount()-1); - float alpha = (float) Math.atan2(y,x); - float beta = (float) Math.asin(radius/Math.sqrt(x*x+y*y)); - return alpha + ((float)Math.PI/2 - beta); + public float getStartAngle() { + float x = -getLensDistance(getRingCount() - 1); + float y = getLenRadius(getRingCount() - 1); + float alpha = (float) Math.atan2(y, x); + float beta = (float) Math.asin(radius / Math.sqrt(x * x + y * y)); + return alpha + ((float) Math.PI / 2 - beta); } public static float interpolate(float x0, float x1, float y0, float y1, float x) { @@ -177,15 +175,15 @@ public void writeToNBT(NBTTagCompound compound) { super.writeToNBT(compound); compound.setFloat(ROTATION_SPEED_NBT_TAG, rotationSpeed); compound.setFloat(SIZE_NBT_TAG, radius); - compound.setInteger(RINGS_NBT_TAG,ringCount); - compound.setFloat(COLOR_RED_NBT_TAG,colorR); - compound.setFloat(COLOR_GREEN_NBT_TAG,colorG); - compound.setFloat(COLOR_BLUE_NBT_TAG,colorB); - compound.setFloat(COLOR_GAMMA_NBT_TAG,gamma); - compound.setFloat(ROT_ANGLE_NBT_TAG,rotAngle); - compound.setFloat(ROT_AXIS_X_NBT_TAG,rotAxisX); - compound.setFloat(ROT_AXIS_Y_NBT_TAG,rotAxisY); - compound.setFloat(ROT_AXIS_Z_NBT_TAG,rotAxisZ); + compound.setInteger(RINGS_NBT_TAG, ringCount); + compound.setFloat(COLOR_RED_NBT_TAG, colorR); + compound.setFloat(COLOR_GREEN_NBT_TAG, colorG); + compound.setFloat(COLOR_BLUE_NBT_TAG, colorB); + compound.setFloat(COLOR_GAMMA_NBT_TAG, gamma); + compound.setFloat(ROT_ANGLE_NBT_TAG, rotAngle); + compound.setFloat(ROT_AXIS_X_NBT_TAG, rotAxisX); + compound.setFloat(ROT_AXIS_Y_NBT_TAG, rotAxisY); + compound.setFloat(ROT_AXIS_Z_NBT_TAG, rotAxisZ); } @Override @@ -219,7 +217,7 @@ public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) { readFromNBT(pkt.func_148857_g()); } - public void updateToClient(){ + public void updateToClient() { worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); } } diff --git a/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java b/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java index 115f331bf85..6404710d8ca 100644 --- a/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java +++ b/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java @@ -555,7 +555,6 @@ private TileEntityForgeOfGods getRenderer() { double zOffset = 122 * getExtendedFacing().getRelativeBackInWorld().offsetZ; double yOffset = 122 * getExtendedFacing().getRelativeBackInWorld().offsetY; - TileEntity tile = this.getBaseMetaTileEntity() .getWorld() .getTileEntity((int) (x + xOffset), (int) (y + yOffset), (int) (z + zOffset)); @@ -566,7 +565,7 @@ private TileEntityForgeOfGods getRenderer() { return null; } - private void UpdateRenderer(){ + private void UpdateRenderer() { TileEntityForgeOfGods tile = getRenderer(); if (tile == null) return; @@ -614,7 +613,7 @@ private void createRenderer() { } } - rendererTileEntity.setRenderRotation(getRotation(),getDirection()); + rendererTileEntity.setRenderRotation(getRotation(), getDirection()); UpdateRenderer(); isRenderActive = true; @@ -656,10 +655,10 @@ private void destroyRenderer() { @Override public final void onScrewdriverRightClick(ForgeDirection side, EntityPlayer aPlayer, float aX, float aY, float aZ) { - if (isRenderActive){ + if (isRenderActive) { destroyRenderer(); isRenderActive = false; - }else{ + } else { ringAmount = 3; createRenderer(); isRenderActive = true; diff --git a/src/main/java/tectech/util/FaceCulledRenderBlocks.java b/src/main/java/tectech/util/FaceCulledRenderBlocks.java index 51d17ce2917..468ac527a00 100644 --- a/src/main/java/tectech/util/FaceCulledRenderBlocks.java +++ b/src/main/java/tectech/util/FaceCulledRenderBlocks.java @@ -1,19 +1,19 @@ package tectech.util; -import net.minecraft.util.IIcon; import net.minecraft.block.Block; -import net.minecraft.world.IBlockAccess; import net.minecraft.client.renderer.RenderBlocks; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; public class FaceCulledRenderBlocks extends RenderBlocks { FaceVisibility faceVisibility; - public FaceCulledRenderBlocks(IBlockAccess world){ + public FaceCulledRenderBlocks(IBlockAccess world) { super(world); } - public void setFaceVisibility(FaceVisibility faceVisibility) { + public void setFaceVisibility(FaceVisibility faceVisibility) { this.faceVisibility = faceVisibility; } diff --git a/src/main/java/tectech/util/FaceVisibility.java b/src/main/java/tectech/util/FaceVisibility.java index ad776c6f7f6..3d48bdbc564 100644 --- a/src/main/java/tectech/util/FaceVisibility.java +++ b/src/main/java/tectech/util/FaceVisibility.java @@ -1,6 +1,7 @@ package tectech.util; public class FaceVisibility { + public boolean front = true, back = true; public boolean left = true, right = true; public boolean top = true, bottom = true; diff --git a/src/main/java/tectech/util/StructureVBO.java b/src/main/java/tectech/util/StructureVBO.java index 58139ba280d..b0a43cd6224 100644 --- a/src/main/java/tectech/util/StructureVBO.java +++ b/src/main/java/tectech/util/StructureVBO.java @@ -1,76 +1,69 @@ package tectech.util; -import net.minecraft.block.Block; -import com.gtnewhorizon.gtnhlib.client.renderer.CapturingTessellator; -import com.gtnewhorizon.gtnhlib.client.renderer.TessellatorManager; -import com.gtnewhorizon.gtnhlib.client.renderer.vbo.VertexBuffer; -import com.gtnewhorizon.gtnhlib.client.renderer.vertex.DefaultVertexFormat; +import java.util.HashMap; +import java.util.HashSet; +import net.minecraft.block.Block; import net.minecraft.client.Minecraft; import net.minecraft.init.Blocks; + import org.apache.commons.lang3.tuple.Pair; -import java.util.HashMap; -import java.util.HashSet; +import com.gtnewhorizon.gtnhlib.client.renderer.CapturingTessellator; +import com.gtnewhorizon.gtnhlib.client.renderer.TessellatorManager; +import com.gtnewhorizon.gtnhlib.client.renderer.vbo.VertexBuffer; +import com.gtnewhorizon.gtnhlib.client.renderer.vertex.DefaultVertexFormat; public class StructureVBO { - private String[][] structure; private HashSet values = new HashSet<>(); - private HashMap> mapper = new HashMap<>(); + private HashMap> mapper = new HashMap<>(); - public StructureVBO assignStructure(String[][] structure){ + public StructureVBO assignStructure(String[][] structure) { this.structure = structure; return this; } - public StructureVBO addMapping(char letter, Block block){ - mapper.put(letter,Pair.of(block,0)); + public StructureVBO addMapping(char letter, Block block) { + mapper.put(letter, Pair.of(block, 0)); return this; } - public StructureVBO addMapping(char letter, Block block, int meta){ - mapper.put(letter,Pair.of(block,meta)); + + public StructureVBO addMapping(char letter, Block block, int meta) { + mapper.put(letter, Pair.of(block, meta)); return this; } - private boolean isOpaqueAt(int x, int y, int z){ + private boolean isOpaqueAt(int x, int y, int z) { char letter = structure[x][y].charAt(z); - if (letter == ' ') - return false; - Pair info = mapper.get(letter); - if (info == null) - return false; - if (info.getLeft() == Blocks.air) - return false; - return info.getLeft().isOpaqueCube(); + if (letter == ' ') return false; + Pair info = mapper.get(letter); + if (info == null) return false; + if (info.getLeft() == Blocks.air) return false; + return info.getLeft() + .isOpaqueCube(); } - private FaceVisibility getVisibleFaces(int x, int y, int z){ + private FaceVisibility getVisibleFaces(int x, int y, int z) { FaceVisibility visibility = new FaceVisibility(); - int maxX = structure.length-1; - int maxY = structure[0].length-1; - int maxZ = structure[0][0].length()-1; - //X is ordered from left to right - if ((x > 0) && (isOpaqueAt(x-1,y,z))) - visibility.left = false; - if ((x < maxX) && (isOpaqueAt(x+1,y,z))) - visibility.right = false; - //Y is ordered from top to bottom - if ((y > 0) && (isOpaqueAt(x,y-1,z))) - visibility.top = false; - if ((y < maxY) && (isOpaqueAt(x,y+1,z))) - visibility.bottom = false; - //Z is ordered from front to back - if ((z > 0) && (isOpaqueAt(x,y,z-1))) - visibility.back = false; - if ((z < maxZ) && (isOpaqueAt(x,y,z+1))) - visibility.front = false; + int maxX = structure.length - 1; + int maxY = structure[0].length - 1; + int maxZ = structure[0][0].length() - 1; + // X is ordered from left to right + if ((x > 0) && (isOpaqueAt(x - 1, y, z))) visibility.left = false; + if ((x < maxX) && (isOpaqueAt(x + 1, y, z))) visibility.right = false; + // Y is ordered from top to bottom + if ((y > 0) && (isOpaqueAt(x, y - 1, z))) visibility.top = false; + if ((y < maxY) && (isOpaqueAt(x, y + 1, z))) visibility.bottom = false; + // Z is ordered from front to back + if ((z > 0) && (isOpaqueAt(x, y, z - 1))) visibility.back = false; + if ((z < maxZ) && (isOpaqueAt(x, y, z + 1))) visibility.front = false; return visibility; } - public VertexBuffer build(){ + public VertexBuffer build() { TessellatorManager.startCapturing(); CapturingTessellator tess = (CapturingTessellator) TessellatorManager.get(); FaceCulledRenderBlocks renderer = new FaceCulledRenderBlocks(Minecraft.getMinecraft().theWorld); @@ -83,22 +76,21 @@ public VertexBuffer build(){ for (int z = 0; z < row.length(); z++) { char letter = row.charAt(z); if (letter == ' ') continue; - Pair info = mapper.get(letter); + Pair info = mapper.get(letter); if (info == null) { values.add(letter); continue; } if (info.getLeft() == Blocks.air) continue; - FaceVisibility faceInfo = getVisibleFaces(x,y,z); + FaceVisibility faceInfo = getVisibleFaces(x, y, z); renderer.setFaceVisibility(faceInfo); - //The floor division is intended to produce proper offsets + // The floor division is intended to produce proper offsets tess.setTranslation( - -structure.length/2f + x, - plane.length/2f - y, //y needs to be drawn from top to bottom - -row.length()/2f + z - ); - renderer.renderBlockAsItem(info.getLeft(),info.getRight(),1f); + -structure.length / 2f + x, + plane.length / 2f - y, // y needs to be drawn from top to bottom + -row.length() / 2f + z); + renderer.renderBlockAsItem(info.getLeft(), info.getRight(), 1f); } } } From 3675f4d6438019a554872d98bcfc954c7dbe01b1 Mon Sep 17 00:00:00 2001 From: GDCloud Date: Fri, 6 Sep 2024 16:51:02 +0200 Subject: [PATCH 11/57] typo --- .../metaTileEntity/multi/godforge_modules/MTEMoltenModule.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTEMoltenModule.java b/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTEMoltenModule.java index 5cdb0bc95cb..c6b8ab0f824 100644 --- a/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTEMoltenModule.java +++ b/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTEMoltenModule.java @@ -213,7 +213,7 @@ public String[] getInfoData() { public MultiblockTooltipBuilder createTooltip() { final MultiblockTooltipBuilder tt = new MultiblockTooltipBuilder(); tt.addMachineType("Blast Smelter") - .addInfo("Controller block for the Helioflux Meltig Core, a module of the Godforge.") + .addInfo("Controller block for the Helioflux Melting Core, a module of the Godforge.") .addInfo("Must be part of a Godforge to function.") .addInfo("Used for high temperature material liquefaction.") .addInfo(TOOLTIP_BAR) From 97657fe6e2fa7837769f85166d958200d6f4be02 Mon Sep 17 00:00:00 2001 From: GDCloud Date: Fri, 6 Sep 2024 19:42:46 +0200 Subject: [PATCH 12/57] typo 213124 --- src/main/resources/assets/tectech/lang/en_US.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/assets/tectech/lang/en_US.lang b/src/main/resources/assets/tectech/lang/en_US.lang index 0fc3124c3eb..971f309a0e7 100644 --- a/src/main/resources/assets/tectech/lang/en_US.lang +++ b/src/main/resources/assets/tectech/lang/en_US.lang @@ -1095,7 +1095,7 @@ gt.blockmachines.multimachine.FOG.upgrades=Upgrades gt.blockmachines.multimachine.FOG.milestones=Milestones gt.blockmachines.multimachine.FOG.fuelinfotext=Once the structure of the Forge is built and the multiblock is formed, just simply turning it on is not sufficient to make it functional. The Forge must be supplied with a certain amount of Star Fuel (the item) to actually boot up. The amount of Star Fuel needed depends on the current fuel consumption factor, which can be set in the fuel configuration menu. By default the maximum is 5, but it can be increased later on with upgrades. Star Fuel scaling is as follows: factor*25*1.2^factor. Star Fuel can be supplied via an input bus, it gets consumed periodically and stored internally. Once there is enough Star Fuel stored in the multi, it turns on for real (allowing modules to connect) and converts the consumed Star Fuel into stored Stellar Fuel. From this point onwards, the Forge must be fueled via one of the liquid fuels (type can be selected in the fuel config menu). If there isn't enough of the selected fuel present in the input hatch, the stored fuel amount will decrease and if it reaches 0, the Forge enters the previous 'off' state where modules disconnect and it has to be supplied with Star Fuel again. The amount of internally stored Stellar Fuel (liquid) can be increased by turning on battery charging, this will cause the fuel usage to double, but half of it will be stored in the internal battery. gt.blockmachines.multimachine.FOG.moduleinfotext=There are 4 types of modules that can be used in the Forge, the Helioflare Power Forge, Helioflux Melting Core, Heliothermal Plasma Fabricator and Heliofusion Exoticizer. These modules are separate multiblocks that have to be built into the Godforge structure at their designated spots. Once built, these modules have to connect to the Godforge, which happens automatically if all requirements for the respective module are met. Alternatively, there is a button to refresh their status without waiting for the timer. Each of these modules has its specialized functionality & requirements and is affected differently by certain upgrades. The first unlocked module is the §BHelioflare Power Forge§6, which simply put is a blast furnace even more powerful than the mega version. Additionally, this module has a furnace mode, turning it into a hyper powerful multi smelter. This module is unlocked by default and has 1024 base parallel. The second unlock is the §BHelioflux Melting Core§6, which also processes blast furnace recipes, but with a twist, the outputs are ejected in their molten form instead of hot/regular ingots. If an output does not have a molten form, it will output its regular form. This module has to be unlocked by an upgrade to function and has 512 base parallel. The third module is the §BHeliothermal Plasma Fabricator§6, which possesses a unique recipemap featuring direct material to plasma conversion recipes. These recipes are grouped by two properties, fusion tier and steps required, limiting which recipes can be processed before their respective upgrades are unlocked. Unlike regular fusion, these recipes produce the plasma of the input material. This module has 384 base parallel. The fourth and last module is the §BHeliofusion Exoticizer§6, a module capable of producing quark gluon plasma and later on magmatter. This module has unique automation challenges for both materials, so it is recommended to have two of these, as they have to be locked to either one of the materials. The common rule for both modes' automation challenges is as follows: the module outputs materials at the start of a recipe cycle and waits for the correct inputs to arrive before starting the actual processing of the output material. If producing quark-gluon plasma, the module outputs up to 7 different fluids/tiny piles with amounts between 1 and 64, and their corresponding plasmas and amounts have to be returned in order for the recipe to process. For each L of fluid, a bucket of plasma and for each tiny pile an ingot's worth of plasma must be returned for the recipe to work. The amount of initial outputs scales with parallel amount. If magmatter mode is active, the automation challenge changes. Now the module outputs 1-50L of tachyon rich temporal fluid, 51-100L of spatially enlarged fluid and one tiny pile of a high tier material. The challenge is to return both the tachyon rich and spatially enlarged fluids, plus as much plasma of the tiny pile's material (in ingots) as the difference between the amounts of spatially enlarged and tachyon rich fluid. Once all of these have been returned in the correct amounts, the recipe will start to process and output magmatter. The initial input amounts (except the tiny pile) scale with parallel. This module has 36 base parallel and only scales in multiples of nine. -gt.blockmachines.multimachine.FOG.upgradeinfotext=Uprades are the heart and soul of the Godforge, they unlock most of its functionality and processing power. The upgrade tree can be accessed via its button on the main gui and each upgrade node can be clicked for more information on its effects and unlock requirements. In general, each upgrade can only be unlocked if the prior one is unlocked and there are enough available graviton shards. One exception to this is the first upgrade, as that one has no prior upgrade. Some upgrades can also have extra material costs, which are denoted next to the unlock button if applicable. If an upgrade has more than 1 connected prior upgrade, then there are two options, either the upgrade requires ALL connected prior upgrades or AT LEAST ONE (indicated by the connection's color). Upgrades can be refunded by simply pressing the unlock button again, but this only works if ALL connected later upgrades are not active/unlocked. The block of upgrades following the unlock of the Heliufusion Exoticizer module are special, as they are what is considered §Bthe Split§6. As the name suggests, only one path out of the three may be chosen at first, and the others will be locked. Each path has specialized buffs that are primarily targeted towards a specific module, and thus affect other module types with reduced effect (unless stated otherwise). The amount of unlockable paths depends on the amount of rings the Godforge has, which in turn are limited by later upgrades. +gt.blockmachines.multimachine.FOG.upgradeinfotext=Upgrades are the heart and soul of the Godforge, they unlock most of its functionality and processing power. The upgrade tree can be accessed via its button on the main gui and each upgrade node can be clicked for more information on its effects and unlock requirements. In general, each upgrade can only be unlocked if the prior one is unlocked and there are enough available graviton shards. One exception to this is the first upgrade, as that one has no prior upgrade. Some upgrades can also have extra material costs, which are denoted next to the unlock button if applicable. If an upgrade has more than 1 connected prior upgrade, then there are two options, either the upgrade requires ALL connected prior upgrades or AT LEAST ONE (indicated by the connection's color). Upgrades can be refunded by simply pressing the unlock button again, but this only works if ALL connected later upgrades are not active/unlocked. The block of upgrades following the unlock of the Heliufusion Exoticizer module are special, as they are what is considered §Bthe Split§6. As the name suggests, only one path out of the three may be chosen at first, and the others will be locked. Each path has specialized buffs that are primarily targeted towards a specific module, and thus affect other module types with reduced effect (unless stated otherwise). The amount of unlockable paths depends on the amount of rings the Godforge has, which in turn are limited by later upgrades. gt.blockmachines.multimachine.FOG.milestoneinfotext=Milestones are essential for upgrading the Godforge, as they are the source of graviton shards, the main currency needed for unlocking upgrades. In essence, milestones are just what their name suggests, thresholds that when reached, grant graviton shards. There are four types of milestones, Charge, Conversion, Catalyst and Composition, each referring to a stat of the Godforge. Each milestone has 7 tiers, each being harder to reach than the last, but also granting more graviton shards. The first tier grants 1 graviton shard, the second 2, etc. The §BCharge§6 milestone scales off total power consumption of all modules combined, the first tier being unlocked at 1e15 EU consumed, and each subsequent milestone scaling by 9x. The §BConversion§6 milestone scales off total recipes processed across all modules (excluding the Helioflare Power Forge's furnace mode) and its first tier is unlocked at 10M processed recipes. Following tiers scale by 6x. The §BCatalyst§6 milestone is based on the Forge's fuel consumption, counted in Stellar Fuel units (the number entered in the fuel config menu). Reaching the first tier requires 10,000 fuel units to be consumed, and each tier above scales by 3x. Last but not least, the §BComposition§6 milestone works a bit differently, as it scales off the Forge's structure. Milestone levels are granted for each unique type of module present in the structure (Helifusion Exoticizer modules on quark-gluon and magmatter mode count as unique) and for each additional ring built. Your research suggests that something strange might happen if all milestones reach their final tier... Make sure to check back! gt.blockmachines.multimachine.FOG.hint.0=1 - Classic Hatches or Transcendentally Amplified Magnetic Confinement Casing From 02346a5ea34ee4a9697cd615ec81a8aab71e301c Mon Sep 17 00:00:00 2001 From: GDCloud Date: Fri, 6 Sep 2024 20:27:19 +0200 Subject: [PATCH 13/57] fix recipes not loading --- src/main/java/tectech/loader/recipe/BaseRecipeLoader.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/tectech/loader/recipe/BaseRecipeLoader.java b/src/main/java/tectech/loader/recipe/BaseRecipeLoader.java index 8b6c40c6f86..9e08460fb6e 100644 --- a/src/main/java/tectech/loader/recipe/BaseRecipeLoader.java +++ b/src/main/java/tectech/loader/recipe/BaseRecipeLoader.java @@ -42,7 +42,6 @@ public void run() { new Crafting().run(); new Extractor().run(); new ResearchStationAssemblyLine().run(); - } else { new Godforge().run(); } } From 82de25cd285019a75a0d4126085c375638f99cf5 Mon Sep 17 00:00:00 2001 From: GDCloud Date: Fri, 6 Sep 2024 23:22:07 +0200 Subject: [PATCH 14/57] load everything godforge related --- .../java/tectech/loader/TecTechConfig.java | 15 ------ .../java/tectech/loader/recipe/Godforge.java | 1 - .../recipe/ResearchStationAssemblyLine.java | 3 +- .../tectech/loader/thing/MachineLoader.java | 48 +++++++++---------- .../tectech/loader/thing/ThingsLoader.java | 10 ++-- src/main/java/tectech/proxy/ClientProxy.java | 13 +++-- .../tectech/thing/block/BlockForgeOfGods.java | 6 +-- 7 files changed, 36 insertions(+), 60 deletions(-) diff --git a/src/main/java/tectech/loader/TecTechConfig.java b/src/main/java/tectech/loader/TecTechConfig.java index 06ded34e018..c33a838490b 100644 --- a/src/main/java/tectech/loader/TecTechConfig.java +++ b/src/main/java/tectech/loader/TecTechConfig.java @@ -2,8 +2,6 @@ import java.io.File; -import net.minecraft.launchwrapper.Launch; - import eu.usrv.yamcore.config.ConfigManager; public class TecTechConfig extends ConfigManager { @@ -15,11 +13,6 @@ public TecTechConfig(File pConfigBaseDirectory, String pModCollectionDirectory, // 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; @@ -81,8 +74,6 @@ protected void PreInit() { TESLA_SINGLE_LOSS_PER_BLOCK = 1; TESLA_SINGLE_RANGE = 20; TESLA_VISUAL_EFFECT = true; - - ENABLE_GOD_FORGE = (boolean) Launch.blackboard.get("fml.deobfuscatedEnvironment"); } /** @@ -94,12 +85,6 @@ protected void Init() { .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", diff --git a/src/main/java/tectech/loader/recipe/Godforge.java b/src/main/java/tectech/loader/recipe/Godforge.java index aab9b271dc7..8a06efdffca 100644 --- a/src/main/java/tectech/loader/recipe/Godforge.java +++ b/src/main/java/tectech/loader/recipe/Godforge.java @@ -50,7 +50,6 @@ public class Godforge implements Runnable { @Override public void run() { - if (!tectech.TecTech.configTecTech.ENABLE_GOD_FORGE) return; // Solid to plasma recipes { // Fusion tier 1-3 diff --git a/src/main/java/tectech/loader/recipe/ResearchStationAssemblyLine.java b/src/main/java/tectech/loader/recipe/ResearchStationAssemblyLine.java index 76b6b68dfec..7d44a315362 100644 --- a/src/main/java/tectech/loader/recipe/ResearchStationAssemblyLine.java +++ b/src/main/java/tectech/loader/recipe/ResearchStationAssemblyLine.java @@ -2986,7 +2986,6 @@ private void addEOHRecipes() { } private void addGodforgeRecipes() { - if (!tectech.TecTech.configTecTech.ENABLE_GOD_FORGE) return; if (EternalSingularity.isModLoaded()) { // Controller @@ -3682,7 +3681,7 @@ private void addWirelessEnergyRecipes() { } public void runLateRecipes() { - if (tectech.TecTech.configTecTech.ENABLE_GOD_FORGE && EternalSingularity.isModLoaded()) { + if (EternalSingularity.isModLoaded()) { // Shielding Casing TTRecipeAdder.addResearchableAssemblylineRecipe( GTOreDictUnificator.get(OrePrefixes.block, MaterialsUEVplus.TranscendentMetal, 1), diff --git a/src/main/java/tectech/loader/thing/MachineLoader.java b/src/main/java/tectech/loader/thing/MachineLoader.java index 237ab8a8492..d7f148c1cd6 100644 --- a/src/main/java/tectech/loader/thing/MachineLoader.java +++ b/src/main/java/tectech/loader/thing/MachineLoader.java @@ -2228,32 +2228,28 @@ public void run() { .set(new MTEEnergyInfuser(EnergyInfuser.ID, "multimachine.em.infuser", "Energy Infuser").getStackForm(1)); Machine_Multi_EyeOfHarmony.set( new MTEEyeOfHarmony(EyeofHarmony.ID, "multimachine.em.eye_of_harmony", "Eye of Harmony").getStackForm(1L)); - if (tectech.TecTech.configTecTech.ENABLE_GOD_FORGE) { - Machine_Multi_ForgeOfGods.set( - new MTEForgeOfGods(ForgeoftheGods.ID, "multimachine.em.forge_of_gods", "Forge of the Gods") - .getStackForm(1L)); - addItemTooltip(Machine_Multi_ForgeOfGods.get(1), GTValues.AuthorCloud); - Machine_Multi_SmeltingModule.set( - new MTESmeltingModule( - HelioflarePowerForge.ID, - "multimachine.em.smelting_module", - "Helioflare Power Forge").getStackForm(1L)); - addItemTooltip(Machine_Multi_SmeltingModule.get(1), GTValues.AuthorCloud); - Machine_Multi_MoltenModule.set( - new MTEMoltenModule(HeliofluxMeltingCore.ID, "multimachine.em.molten_module", "Helioflux Melting Core") - .getStackForm(1L)); - addItemTooltip(Machine_Multi_MoltenModule.get(1), GTValues.AuthorCloud); - Machine_Multi_PlasmaModule.set( - new MTEPlasmaModule( - HeliothermalPlasmaFabricator.ID, - "multimachine.em.plasma_module", - "Heliothermal Plasma Fabricator").getStackForm(1L)); - addItemTooltip(Machine_Multi_PlasmaModule.get(1), GTValues.AuthorCloud); - Machine_Multi_QuarkGluonPlasmaModule.set( - new MTEExoticModule(HeliofusionExoticizer.ID, "multimachine.em.exotic_module", "Heliofusion Exoticizer") - .getStackForm(1L)); - addItemTooltip(Machine_Multi_QuarkGluonPlasmaModule.get(1), GTValues.AuthorCloud); - } + Machine_Multi_ForgeOfGods.set( + new MTEForgeOfGods(ForgeoftheGods.ID, "multimachine.em.forge_of_gods", "Forge of the Gods") + .getStackForm(1L)); + addItemTooltip(Machine_Multi_ForgeOfGods.get(1), GTValues.AuthorCloud); + Machine_Multi_SmeltingModule.set( + new MTESmeltingModule(HelioflarePowerForge.ID, "multimachine.em.smelting_module", "Helioflare Power Forge") + .getStackForm(1L)); + addItemTooltip(Machine_Multi_SmeltingModule.get(1), GTValues.AuthorCloud); + Machine_Multi_MoltenModule.set( + new MTEMoltenModule(HeliofluxMeltingCore.ID, "multimachine.em.molten_module", "Helioflux Melting Core") + .getStackForm(1L)); + addItemTooltip(Machine_Multi_MoltenModule.get(1), GTValues.AuthorCloud); + Machine_Multi_PlasmaModule.set( + new MTEPlasmaModule( + HeliothermalPlasmaFabricator.ID, + "multimachine.em.plasma_module", + "Heliothermal Plasma Fabricator").getStackForm(1L)); + addItemTooltip(Machine_Multi_PlasmaModule.get(1), GTValues.AuthorCloud); + Machine_Multi_QuarkGluonPlasmaModule.set( + new MTEExoticModule(HeliofusionExoticizer.ID, "multimachine.em.exotic_module", "Heliofusion Exoticizer") + .getStackForm(1L)); + addItemTooltip(Machine_Multi_QuarkGluonPlasmaModule.get(1), GTValues.AuthorCloud); // =================================================================================================== // Hatches diff --git a/src/main/java/tectech/loader/thing/ThingsLoader.java b/src/main/java/tectech/loader/thing/ThingsLoader.java index 35f3454ce26..7844a6865e9 100644 --- a/src/main/java/tectech/loader/thing/ThingsLoader.java +++ b/src/main/java/tectech/loader/thing/ThingsLoader.java @@ -61,13 +61,11 @@ public void run() { TTCasingsContainer.StabilisationFieldGenerators = new StabilisationFieldCasing(); - if (tectech.TecTech.configTecTech.ENABLE_GOD_FORGE) { - TTCasingsContainer.GodforgeCasings = new BlockGodforgeCasings(); - TecTech.LOGGER.info("Godforge blocks registered."); + TTCasingsContainer.GodforgeCasings = new BlockGodforgeCasings(); + TecTech.LOGGER.info("Godforge blocks registered."); - BlockGodforgeGlass.run(); - TecTech.LOGGER.info("Godforge Glass registered"); - } + BlockGodforgeGlass.run(); + TecTech.LOGGER.info("Godforge Glass registered"); BlockQuantumGlass.run(); TecTech.LOGGER.info("Quantum Glass registered"); diff --git a/src/main/java/tectech/proxy/ClientProxy.java b/src/main/java/tectech/proxy/ClientProxy.java index 145ff7c5b39..0abb6ca1d7a 100644 --- a/src/main/java/tectech/proxy/ClientProxy.java +++ b/src/main/java/tectech/proxy/ClientProxy.java @@ -44,14 +44,13 @@ public void registerRenderInfo() { .registerItemRenderer(Item.getItemFromBlock(eyeOfHarmonyRenderBlock), new EOHItemRenderer()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityEyeOfHarmony.class, new EOHTileEntitySR()); - if (tectech.TecTech.configTecTech.ENABLE_GOD_FORGE) { - BlockGodforgeGlass.renderID = RenderingRegistry.getNextAvailableRenderId(); - RenderingRegistry.registerBlockHandler(BlockGodforgeGlass.renderID, new RenderGodforgeGlass()); + BlockGodforgeGlass.renderID = RenderingRegistry.getNextAvailableRenderId(); + RenderingRegistry.registerBlockHandler(BlockGodforgeGlass.renderID, new RenderGodforgeGlass()); + + MinecraftForgeClient + .registerItemRenderer(Item.getItemFromBlock(forgeOfGodsRenderBlock), new ItemRenderForgeOfGods()); + ClientRegistry.bindTileEntitySpecialRenderer(TileEntityForgeOfGods.class, new RenderForgeOfGods()); - MinecraftForgeClient - .registerItemRenderer(Item.getItemFromBlock(forgeOfGodsRenderBlock), new ItemRenderForgeOfGods()); - ClientRegistry.bindTileEntitySpecialRenderer(TileEntityForgeOfGods.class, new RenderForgeOfGods()); - } } @Override diff --git a/src/main/java/tectech/thing/block/BlockForgeOfGods.java b/src/main/java/tectech/thing/block/BlockForgeOfGods.java index a53299f2299..70cda8fb104 100644 --- a/src/main/java/tectech/thing/block/BlockForgeOfGods.java +++ b/src/main/java/tectech/thing/block/BlockForgeOfGods.java @@ -23,9 +23,9 @@ public BlockForgeOfGods() { this.setCreativeTab(TecTech.creativeTabTecTech); this.setBlockName("Forge of the Gods Renderer"); this.setLightLevel(100.0f); - if (TecTech.configTecTech.ENABLE_GOD_FORGE) { - registerOther(this); - } + + registerOther(this); + } @Override From 520299b307edaf21232225f77f2698e0a18196dd Mon Sep 17 00:00:00 2001 From: GDCloud Date: Fri, 6 Sep 2024 23:23:54 +0200 Subject: [PATCH 15/57] disable debug --- .../java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java b/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java index 6404710d8ca..2bc8a8100bb 100644 --- a/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java +++ b/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java @@ -179,7 +179,7 @@ public class MTEForgeOfGods extends TTMultiblockBase implements IConstructable, private static final ItemStack STELLAR_FUEL = Avaritia.isModLoaded() ? getModItem(Avaritia.ID, "Resource", 1, 8) : GTOreDictUnificator.get(OrePrefixes.block, Materials.CosmicNeutronium, 1); - private final boolean debugMode = true; + private final boolean debugMode = false; public int survivalConstruct(ItemStack stackSize, int elementBudget, ISurvivalBuildEnvironment env) { int realBudget = elementBudget >= 1000 ? elementBudget : Math.min(1000, elementBudget * 5); From 1a52489d75f527a709e39ec961a71751510eeed5 Mon Sep 17 00:00:00 2001 From: GDCloud Date: Sat, 7 Sep 2024 03:05:59 +0200 Subject: [PATCH 16/57] decouple exotic module automation from parallel --- .../godforge_modules/MTEExoticModule.java | 36 +++++-------------- 1 file changed, 9 insertions(+), 27 deletions(-) diff --git a/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTEExoticModule.java b/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTEExoticModule.java index c94549a5752..f4381d49e00 100644 --- a/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTEExoticModule.java +++ b/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTEExoticModule.java @@ -120,10 +120,9 @@ protected Stream findRecipeMatches(@Nullable RecipeMap map) { randomizedFluidInput = new FluidStack[] { MaterialsUEVplus.Time.getMolten(timeAmount * 1000L), MaterialsUEVplus.Space.getMolten(spaceAmount * 1000L) }; inputPlasmas = new ArrayList<>( - Arrays.asList( - convertItemToPlasma(randomizedItemInput, (spaceAmount - timeAmount) * actualParallel))); - inputPlasmas.add(MaterialsUEVplus.Time.getMolten(timeAmount * actualParallel)); - inputPlasmas.add(MaterialsUEVplus.Space.getMolten(spaceAmount * actualParallel)); + Arrays.asList(convertItemToPlasma(randomizedItemInput, spaceAmount - timeAmount))); + inputPlasmas.add(MaterialsUEVplus.Time.getMolten(timeAmount)); + inputPlasmas.add(MaterialsUEVplus.Space.getMolten(spaceAmount)); outputFluid = MaterialsUEVplus.MagMatter.getMolten(144 * actualParallel); } else { numberOfFluids = GodforgeMath.getRandomIntInRange(0, NUMBER_OF_INPUTS); @@ -139,13 +138,12 @@ protected Stream findRecipeMatches(@Nullable RecipeMap map) { if (numberOfItems != 0) { for (ItemStack itemStack : randomizedItemInput) { - itemStack.stackSize = GodforgeMath.getRandomIntInRange(1, 64); + itemStack.stackSize = 9 * GodforgeMath.getRandomIntInRange(1, 7); } } - inputPlasmas = new ArrayList<>( - Arrays.asList(convertItemToPlasma(randomizedItemInput, actualParallel))); - inputPlasmas.addAll(Arrays.asList(convertFluidToPlasma(randomizedFluidInput, actualParallel))); + inputPlasmas = new ArrayList<>(Arrays.asList(convertItemToPlasma(randomizedItemInput, 1))); + inputPlasmas.addAll(Arrays.asList(convertFluidToPlasma(randomizedFluidInput, 1))); } plasmaRecipe = new GTRecipe( false, @@ -155,7 +153,7 @@ protected Stream findRecipeMatches(@Nullable RecipeMap map) { null, inputPlasmas.toArray(new FluidStack[0]), new FluidStack[] { outputFluid }, - 10 * SECONDS * (int) actualParallel, + 10 * SECONDS, (int) TierEU.RECIPE_MAX, 0); @@ -180,30 +178,14 @@ protected CheckRecipeResult validateRecipe(@Nonnull GTRecipe recipe) { for (FluidStack fluidStack : randomizedFluidInput) { dumpFluid( mOutputHatches, - new FluidStack( - fluidStack.getFluid(), - (int) (fluidStack.amount / 1000 * actualParallel)), + new FluidStack(fluidStack.getFluid(), fluidStack.amount / 1000), false); } } if (numberOfItems != 0) { - long multiplier = actualParallel; - if (magmatterMode) { - multiplier = 1; - } for (ItemStack itemStack : randomizedItemInput) { - int stacksize = (int) (itemStack.stackSize * multiplier); - ItemStack tmpItem = itemStack.copy(); - // split itemStacks > 64 - while (stacksize >= 64) { - tmpItem.stackSize = 64; - addOutput(tmpItem); - stacksize -= 64; - } - tmpItem.stackSize = stacksize; - addOutput(tmpItem); - + addOutput(itemStack); } } From cdd183710eeb42b3df7eedd68a268258c1af1868 Mon Sep 17 00:00:00 2001 From: GDCloud Date: Sat, 7 Sep 2024 03:06:39 +0200 Subject: [PATCH 17/57] enforce output bus and hatch on exotic module --- .../multi/godforge_modules/MTEBaseModule.java | 8 ++++++++ .../multi/godforge_modules/MTEExoticModule.java | 2 ++ 2 files changed, 10 insertions(+) diff --git a/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTEBaseModule.java b/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTEBaseModule.java index b403dba74f1..dd93e64d9ed 100644 --- a/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTEBaseModule.java +++ b/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTEBaseModule.java @@ -263,6 +263,14 @@ public void construct(ItemStack stackSize, boolean hintsOnly) { @Override public boolean checkMachine_EM(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + if (this instanceof MTESmeltingModule) { + if (mOutputHatches.size() < 1) { + return false; + } + if (mOutputBusses.size() < 1) { + return false; + } + } return structureCheck_EM(STRUCTURE_PIECE_MAIN, 3, 3, 0); } diff --git a/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTEExoticModule.java b/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTEExoticModule.java index f4381d49e00..990e59a0ba7 100644 --- a/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTEExoticModule.java +++ b/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTEExoticModule.java @@ -501,6 +501,8 @@ public MultiblockTooltipBuilder createTooltip() { .addStructureInfo( EnumChatFormatting.GOLD + "5" + EnumChatFormatting.GRAY + " Celestial Matter Guidance Casing") .addStructureInfo(EnumChatFormatting.GOLD + "1" + EnumChatFormatting.GRAY + " Stellar Energy Siphon Casing") + .addStructureInfo("Requires " + EnumChatFormatting.GOLD + 1 + EnumChatFormatting.GRAY + " Output Hatch") + .addStructureInfo("Requires " + EnumChatFormatting.GOLD + 1 + EnumChatFormatting.GRAY + " Output Bus") .toolTipFinisher(CommonValues.GODFORGE_MARK); return tt; } From 9486203ac12afe9ac5980b3bb0ea6a13763a7b2c Mon Sep 17 00:00:00 2001 From: GDCloud Date: Sat, 7 Sep 2024 03:07:21 +0200 Subject: [PATCH 18/57] wrong module --- .../metaTileEntity/multi/godforge_modules/MTEBaseModule.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTEBaseModule.java b/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTEBaseModule.java index dd93e64d9ed..cf4ca7c1ce4 100644 --- a/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTEBaseModule.java +++ b/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTEBaseModule.java @@ -263,7 +263,7 @@ public void construct(ItemStack stackSize, boolean hintsOnly) { @Override public boolean checkMachine_EM(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - if (this instanceof MTESmeltingModule) { + if (this instanceof MTEExoticModule) { if (mOutputHatches.size() < 1) { return false; } From df6a17b72ff76992657f5a0a861fdfddbc2c4825 Mon Sep 17 00:00:00 2001 From: GDCloud Date: Sat, 7 Sep 2024 03:36:14 +0200 Subject: [PATCH 19/57] shuffle structurecheck around so it actually works --- .../multi/godforge_modules/MTEBaseModule.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTEBaseModule.java b/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTEBaseModule.java index cf4ca7c1ce4..c797dd83bcb 100644 --- a/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTEBaseModule.java +++ b/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTEBaseModule.java @@ -263,6 +263,11 @@ public void construct(ItemStack stackSize, boolean hintsOnly) { @Override public boolean checkMachine_EM(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + + if (!structureCheck_EM(STRUCTURE_PIECE_MAIN, 3, 3, 0)) { + return false; + } + if (this instanceof MTEExoticModule) { if (mOutputHatches.size() < 1) { return false; @@ -271,7 +276,8 @@ public boolean checkMachine_EM(IGregTechTileEntity aBaseMetaTileEntity, ItemStac return false; } } - return structureCheck_EM(STRUCTURE_PIECE_MAIN, 3, 3, 0); + + return true; } @Override From adc625adde05b0a14fa7aa4bb9c2f2fe5c50bdad Mon Sep 17 00:00:00 2001 From: GDCloud Date: Sat, 7 Sep 2024 15:52:32 +0200 Subject: [PATCH 20/57] adjust button textures a little --- .../tectech/textures/gui/button/purple.png | Bin 315 -> 323 bytes .../textures/gui/button/purple_pressed.png | Bin 318 -> 325 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/src/main/resources/assets/tectech/textures/gui/button/purple.png b/src/main/resources/assets/tectech/textures/gui/button/purple.png index 60af6ebc6f4b3713ae78700adfed36c783b73461..28f2835c992a0ec05642be94c6a12889182ba616 100644 GIT binary patch delta 267 zcmV+m0rdX60>c83L4Pe!OjJdD7pim+o=*;LItx-zBV|b*URWz|UO9JRJ$zCwX=g%$ zSTt}}5_UiiT1FINR(_;%00009a7bBm000ic000ic0Tn1pfB*mhpGibPR4C6?j=K>8 zF$_d?IRVfDB`CgZeTEzb$K;sx2YhH;z-8X@9SZ0IA|}uy zIzYP1u>#=gYjKczsGWtAJA#NgI%}}423E}6=2t22oGoQ~IIy~u{A6bS0QGuJJy|LR R$^ZZW07*qoL<VGd005myL_t(2&sC1i4Z<)CgZ*dzz-2g(ZzyJUM07*qo IM6N<$g78RVhyVZp diff --git a/src/main/resources/assets/tectech/textures/gui/button/purple_pressed.png b/src/main/resources/assets/tectech/textures/gui/button/purple_pressed.png index 88339c7576fb717fca1c8a2cd470640915e2b441..92a11ff2e22d3623034c533aebe947495796c86b 100644 GIT binary patch delta 269 zcmV+o0rLL70>uK5L4Pn%OjJcc4q7@3QbrVFPY!Nw43$tLWl0`hSSxUJ5T0H+cVRtz zQZ8v{LV{Q{a8?p_d>5*A?wlh4000SaNLh0L01m26k0j ztVMu54p`M1BJPh6k|FuisJ09SQL-Z=ReLgJppMw}<$q;x%l4#YV(ggo2lCQ5gZq@S zEG2aYkt1jsGhp{lmjcMA$Aafn4)wEm^$vuTLE{6S>R@ALk8hP*!)F15nb{9lU1kFO TP@b3o0000xF00 delta 261 zcmV+g0s8*M0=@!}L4PVxOjJcY8%;JBMnWM~NgiHgBYsdLWmqe4YAA+YId@?_d{QoH zXF`HlG;nh;kqJ@wdjJ3c32;bRa{vGi!vFvd!vV){sAK>D0G&xhK~yNuRgTLI0x=9k z2PEzw8bE0waG{OWEP?x4LKNT=CzKYp0cxR!J<$txvL7*rWPbc)dkpNVwpfP%>~X-V z)(FA;5rJeA?P*0iHi{r*CKE+^GCB}L%zgRa4(@KRQYOZZNq@kXrWrh@lw~O?Ge{gk z$K-(d6Hf(@FN+0lu^eh=@oXJvqJ!23EY-k9RiED~vx>_C236G`Vq{q5uqE4C00000 LNkvXXu0mjfFOy=t From e85fb4b04202846494e7cf193f64cd67b78e1295 Mon Sep 17 00:00:00 2001 From: BucketBrigade <138534411+CookieBrigade@users.noreply.github.com> Date: Sat, 7 Sep 2024 10:38:17 -0500 Subject: [PATCH 21/57] Temp fix attempt (#3103) --- src/main/java/tectech/thing/block/RenderForgeOfGods.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/tectech/thing/block/RenderForgeOfGods.java b/src/main/java/tectech/thing/block/RenderForgeOfGods.java index a002e23ee55..ebc2a69f343 100644 --- a/src/main/java/tectech/thing/block/RenderForgeOfGods.java +++ b/src/main/java/tectech/thing/block/RenderForgeOfGods.java @@ -354,7 +354,7 @@ private void RenderRings(TileEntityForgeOfGods tile, double x, double y, double bindTexture(TextureMap.locationBlocksTexture); GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS); GL11.glEnable(GL11.GL_BLEND); - GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); + GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_ZERO); GL11.glPushMatrix(); GL11.glTranslated(x + .5f, y + .5f, z + .5f); From b69e04738149818a70fc76d7e5120d3b1d29714b Mon Sep 17 00:00:00 2001 From: GDCloud Date: Sat, 7 Sep 2024 20:37:25 +0200 Subject: [PATCH 22/57] buff magmatter --- .../multi/godforge_modules/MTEExoticModule.java | 2 +- src/main/java/tectech/util/GodforgeMath.java | 4 ++-- src/main/resources/assets/tectech/lang/en_US.lang | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTEExoticModule.java b/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTEExoticModule.java index 990e59a0ba7..7c4b36147f1 100644 --- a/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTEExoticModule.java +++ b/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTEExoticModule.java @@ -123,7 +123,7 @@ protected Stream findRecipeMatches(@Nullable RecipeMap map) { Arrays.asList(convertItemToPlasma(randomizedItemInput, spaceAmount - timeAmount))); inputPlasmas.add(MaterialsUEVplus.Time.getMolten(timeAmount)); inputPlasmas.add(MaterialsUEVplus.Space.getMolten(spaceAmount)); - outputFluid = MaterialsUEVplus.MagMatter.getMolten(144 * actualParallel); + outputFluid = MaterialsUEVplus.MagMatter.getMolten(576 * actualParallel); } else { numberOfFluids = GodforgeMath.getRandomIntInRange(0, NUMBER_OF_INPUTS); numberOfItems = NUMBER_OF_INPUTS - numberOfFluids; diff --git a/src/main/java/tectech/util/GodforgeMath.java b/src/main/java/tectech/util/GodforgeMath.java index c11a71be027..a552b59375c 100644 --- a/src/main/java/tectech/util/GodforgeMath.java +++ b/src/main/java/tectech/util/GodforgeMath.java @@ -138,7 +138,7 @@ public static void calculateMaxParallelForModules(MTEBaseModule module, MTEForge baseParallel = 384; } if (module instanceof MTEExoticModule) { - baseParallel = 36; + baseParallel = 64; } if (module instanceof MTEMoltenModule @@ -185,7 +185,7 @@ public static void calculateMaxParallelForModules(MTEBaseModule module, MTEForge if (module instanceof MTEExoticModule) { if (godforge.isUpgradeActive(25)) { - maxParallel = (int) Math.max(9 * Math.floor(Math.sqrt(maxParallel) / 9), 36); + maxParallel = (int) Math.max(Math.sqrt(maxParallel), 36); } else { maxParallel = baseParallel; } diff --git a/src/main/resources/assets/tectech/lang/en_US.lang b/src/main/resources/assets/tectech/lang/en_US.lang index 971f309a0e7..fd7075b74bc 100644 --- a/src/main/resources/assets/tectech/lang/en_US.lang +++ b/src/main/resources/assets/tectech/lang/en_US.lang @@ -1094,7 +1094,7 @@ gt.blockmachines.multimachine.FOG.modules=Modules gt.blockmachines.multimachine.FOG.upgrades=Upgrades gt.blockmachines.multimachine.FOG.milestones=Milestones gt.blockmachines.multimachine.FOG.fuelinfotext=Once the structure of the Forge is built and the multiblock is formed, just simply turning it on is not sufficient to make it functional. The Forge must be supplied with a certain amount of Star Fuel (the item) to actually boot up. The amount of Star Fuel needed depends on the current fuel consumption factor, which can be set in the fuel configuration menu. By default the maximum is 5, but it can be increased later on with upgrades. Star Fuel scaling is as follows: factor*25*1.2^factor. Star Fuel can be supplied via an input bus, it gets consumed periodically and stored internally. Once there is enough Star Fuel stored in the multi, it turns on for real (allowing modules to connect) and converts the consumed Star Fuel into stored Stellar Fuel. From this point onwards, the Forge must be fueled via one of the liquid fuels (type can be selected in the fuel config menu). If there isn't enough of the selected fuel present in the input hatch, the stored fuel amount will decrease and if it reaches 0, the Forge enters the previous 'off' state where modules disconnect and it has to be supplied with Star Fuel again. The amount of internally stored Stellar Fuel (liquid) can be increased by turning on battery charging, this will cause the fuel usage to double, but half of it will be stored in the internal battery. -gt.blockmachines.multimachine.FOG.moduleinfotext=There are 4 types of modules that can be used in the Forge, the Helioflare Power Forge, Helioflux Melting Core, Heliothermal Plasma Fabricator and Heliofusion Exoticizer. These modules are separate multiblocks that have to be built into the Godforge structure at their designated spots. Once built, these modules have to connect to the Godforge, which happens automatically if all requirements for the respective module are met. Alternatively, there is a button to refresh their status without waiting for the timer. Each of these modules has its specialized functionality & requirements and is affected differently by certain upgrades. The first unlocked module is the §BHelioflare Power Forge§6, which simply put is a blast furnace even more powerful than the mega version. Additionally, this module has a furnace mode, turning it into a hyper powerful multi smelter. This module is unlocked by default and has 1024 base parallel. The second unlock is the §BHelioflux Melting Core§6, which also processes blast furnace recipes, but with a twist, the outputs are ejected in their molten form instead of hot/regular ingots. If an output does not have a molten form, it will output its regular form. This module has to be unlocked by an upgrade to function and has 512 base parallel. The third module is the §BHeliothermal Plasma Fabricator§6, which possesses a unique recipemap featuring direct material to plasma conversion recipes. These recipes are grouped by two properties, fusion tier and steps required, limiting which recipes can be processed before their respective upgrades are unlocked. Unlike regular fusion, these recipes produce the plasma of the input material. This module has 384 base parallel. The fourth and last module is the §BHeliofusion Exoticizer§6, a module capable of producing quark gluon plasma and later on magmatter. This module has unique automation challenges for both materials, so it is recommended to have two of these, as they have to be locked to either one of the materials. The common rule for both modes' automation challenges is as follows: the module outputs materials at the start of a recipe cycle and waits for the correct inputs to arrive before starting the actual processing of the output material. If producing quark-gluon plasma, the module outputs up to 7 different fluids/tiny piles with amounts between 1 and 64, and their corresponding plasmas and amounts have to be returned in order for the recipe to process. For each L of fluid, a bucket of plasma and for each tiny pile an ingot's worth of plasma must be returned for the recipe to work. The amount of initial outputs scales with parallel amount. If magmatter mode is active, the automation challenge changes. Now the module outputs 1-50L of tachyon rich temporal fluid, 51-100L of spatially enlarged fluid and one tiny pile of a high tier material. The challenge is to return both the tachyon rich and spatially enlarged fluids, plus as much plasma of the tiny pile's material (in ingots) as the difference between the amounts of spatially enlarged and tachyon rich fluid. Once all of these have been returned in the correct amounts, the recipe will start to process and output magmatter. The initial input amounts (except the tiny pile) scale with parallel. This module has 36 base parallel and only scales in multiples of nine. +gt.blockmachines.multimachine.FOG.moduleinfotext=There are 4 types of modules that can be used in the Forge, the Helioflare Power Forge, Helioflux Melting Core, Heliothermal Plasma Fabricator and Heliofusion Exoticizer. These modules are separate multiblocks that have to be built into the Godforge structure at their designated spots. Once built, these modules have to connect to the Godforge, which happens automatically if all requirements for the respective module are met. Alternatively, there is a button to refresh their status without waiting for the timer. Each of these modules has its specialized functionality & requirements and is affected differently by certain upgrades. The first unlocked module is the §BHelioflare Power Forge§6, which simply put is a blast furnace even more powerful than the mega version. Additionally, this module has a furnace mode, turning it into a hyper powerful multi smelter. This module is unlocked by default and has 1024 base parallel. The second unlock is the §BHelioflux Melting Core§6, which also processes blast furnace recipes, but with a twist, the outputs are ejected in their molten form instead of hot/regular ingots. If an output does not have a molten form, it will output its regular form. This module has to be unlocked by an upgrade to function and has 512 base parallel. The third module is the §BHeliothermal Plasma Fabricator§6, which possesses a unique recipemap featuring direct material to plasma conversion recipes. These recipes are grouped by two properties, fusion tier and steps required, limiting which recipes can be processed before their respective upgrades are unlocked. Unlike regular fusion, these recipes produce the plasma of the input material. This module has 384 base parallel. The fourth and last module is the §BHeliofusion Exoticizer§6, a module capable of producing quark gluon plasma and later on magmatter. This module has unique automation challenges for both materials, so it is recommended to have two of these, as they have to be locked to either one of the materials. The common rule for both modes' automation challenges is as follows: the module outputs materials at the start of a recipe cycle and waits for the correct inputs to arrive before starting the actual processing of the output material. If producing quark-gluon plasma, the module outputs up to 7 different fluids/tiny piles with amounts between 1 and 64, and their corresponding plasmas and amounts have to be returned in order for the recipe to process. For each L of fluid, a bucket of plasma and for each tiny pile an ingot's worth of plasma must be returned for the recipe to work. If magmatter mode is active, the automation challenge changes. Now the module outputs 1-50L of tachyon rich temporal fluid, 51-100L of spatially enlarged fluid and one tiny pile of a high tier material. The challenge is to return both the tachyon rich and spatially enlarged fluids, plus as much plasma of the tiny pile's material (in ingots) as the difference between the amounts of spatially enlarged and tachyon rich fluid. Once all of these have been returned in the correct amounts, the recipe will start to process and output magmatter. This module has 64 base parallel. gt.blockmachines.multimachine.FOG.upgradeinfotext=Upgrades are the heart and soul of the Godforge, they unlock most of its functionality and processing power. The upgrade tree can be accessed via its button on the main gui and each upgrade node can be clicked for more information on its effects and unlock requirements. In general, each upgrade can only be unlocked if the prior one is unlocked and there are enough available graviton shards. One exception to this is the first upgrade, as that one has no prior upgrade. Some upgrades can also have extra material costs, which are denoted next to the unlock button if applicable. If an upgrade has more than 1 connected prior upgrade, then there are two options, either the upgrade requires ALL connected prior upgrades or AT LEAST ONE (indicated by the connection's color). Upgrades can be refunded by simply pressing the unlock button again, but this only works if ALL connected later upgrades are not active/unlocked. The block of upgrades following the unlock of the Heliufusion Exoticizer module are special, as they are what is considered §Bthe Split§6. As the name suggests, only one path out of the three may be chosen at first, and the others will be locked. Each path has specialized buffs that are primarily targeted towards a specific module, and thus affect other module types with reduced effect (unless stated otherwise). The amount of unlockable paths depends on the amount of rings the Godforge has, which in turn are limited by later upgrades. gt.blockmachines.multimachine.FOG.milestoneinfotext=Milestones are essential for upgrading the Godforge, as they are the source of graviton shards, the main currency needed for unlocking upgrades. In essence, milestones are just what their name suggests, thresholds that when reached, grant graviton shards. There are four types of milestones, Charge, Conversion, Catalyst and Composition, each referring to a stat of the Godforge. Each milestone has 7 tiers, each being harder to reach than the last, but also granting more graviton shards. The first tier grants 1 graviton shard, the second 2, etc. The §BCharge§6 milestone scales off total power consumption of all modules combined, the first tier being unlocked at 1e15 EU consumed, and each subsequent milestone scaling by 9x. The §BConversion§6 milestone scales off total recipes processed across all modules (excluding the Helioflare Power Forge's furnace mode) and its first tier is unlocked at 10M processed recipes. Following tiers scale by 6x. The §BCatalyst§6 milestone is based on the Forge's fuel consumption, counted in Stellar Fuel units (the number entered in the fuel config menu). Reaching the first tier requires 10,000 fuel units to be consumed, and each tier above scales by 3x. Last but not least, the §BComposition§6 milestone works a bit differently, as it scales off the Forge's structure. Milestone levels are granted for each unique type of module present in the structure (Helifusion Exoticizer modules on quark-gluon and magmatter mode count as unique) and for each additional ring built. Your research suggests that something strange might happen if all milestones reach their final tier... Make sure to check back! From 742210225f8668b46fdbba21fbffa031b23cdfd4 Mon Sep 17 00:00:00 2001 From: BucketBrigade <138534411+CookieBrigade@users.noreply.github.com> Date: Sat, 7 Sep 2024 15:23:00 -0500 Subject: [PATCH 23/57] Gorge render attempt #2 (#3109) --- .../java/tectech/thing/block/RenderForgeOfGods.java | 4 +--- src/main/java/tectech/util/StructureVBO.java | 11 +++++------ 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/main/java/tectech/thing/block/RenderForgeOfGods.java b/src/main/java/tectech/thing/block/RenderForgeOfGods.java index ebc2a69f343..51699e9f2fd 100644 --- a/src/main/java/tectech/thing/block/RenderForgeOfGods.java +++ b/src/main/java/tectech/thing/block/RenderForgeOfGods.java @@ -354,7 +354,7 @@ private void RenderRings(TileEntityForgeOfGods tile, double x, double y, double bindTexture(TextureMap.locationBlocksTexture); GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS); GL11.glEnable(GL11.GL_BLEND); - GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_ZERO); + GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GL11.glPushMatrix(); GL11.glTranslated(x + .5f, y + .5f, z + .5f); @@ -403,9 +403,7 @@ public void renderTileEntityAt(TileEntity tile, double x, double y, double z, fl .getWorldTotalTime() % (20 * 36000) + timeSinceLastTick; RenderRings(forgeTile, x, y, z, timer); - RenderEntireStar(forgeTile, x, y, z, timer); - RenderBeamSegment(forgeTile, x, y, z, timer); } diff --git a/src/main/java/tectech/util/StructureVBO.java b/src/main/java/tectech/util/StructureVBO.java index b0a43cd6224..bde35dc261b 100644 --- a/src/main/java/tectech/util/StructureVBO.java +++ b/src/main/java/tectech/util/StructureVBO.java @@ -13,6 +13,7 @@ import com.gtnewhorizon.gtnhlib.client.renderer.TessellatorManager; import com.gtnewhorizon.gtnhlib.client.renderer.vbo.VertexBuffer; import com.gtnewhorizon.gtnhlib.client.renderer.vertex.DefaultVertexFormat; +import com.gtnewhorizon.gtnhlib.client.renderer.vbo.VBOManager; public class StructureVBO { @@ -94,11 +95,9 @@ public VertexBuffer build() { } } } - - for (char value : values) { - System.out.println(value); - } - - return TessellatorManager.stopCapturingToVBO(DefaultVertexFormat.POSITION_TEXTURE_NORMAL); + VertexBuffer vertexBuffer = TessellatorManager.stopCapturingToVBO(DefaultVertexFormat.POSITION_TEXTURE_NORMAL); + final int vboID = VBOManager.generateDisplayLists(1); + VBOManager.registerVBO(vboID, vertexBuffer); + return vertexBuffer; } } From 222659953ef8ace1569f3e07bf388216e161808e Mon Sep 17 00:00:00 2001 From: GDCloud Date: Sat, 7 Sep 2024 22:28:03 +0200 Subject: [PATCH 24/57] spotless --- src/main/java/tectech/util/StructureVBO.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/tectech/util/StructureVBO.java b/src/main/java/tectech/util/StructureVBO.java index bde35dc261b..92239d8c6d2 100644 --- a/src/main/java/tectech/util/StructureVBO.java +++ b/src/main/java/tectech/util/StructureVBO.java @@ -11,9 +11,9 @@ import com.gtnewhorizon.gtnhlib.client.renderer.CapturingTessellator; import com.gtnewhorizon.gtnhlib.client.renderer.TessellatorManager; +import com.gtnewhorizon.gtnhlib.client.renderer.vbo.VBOManager; import com.gtnewhorizon.gtnhlib.client.renderer.vbo.VertexBuffer; import com.gtnewhorizon.gtnhlib.client.renderer.vertex.DefaultVertexFormat; -import com.gtnewhorizon.gtnhlib.client.renderer.vbo.VBOManager; public class StructureVBO { From 5398ac63f22854aa9bf41d2149c5e736dfe9af5e Mon Sep 17 00:00:00 2001 From: GDCloud Date: Sun, 8 Sep 2024 00:23:59 +0200 Subject: [PATCH 25/57] lock render spawner behind debug mode --- .../java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java b/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java index 2bc8a8100bb..2233133126e 100644 --- a/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java +++ b/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java @@ -655,6 +655,7 @@ private void destroyRenderer() { @Override public final void onScrewdriverRightClick(ForgeDirection side, EntityPlayer aPlayer, float aX, float aY, float aZ) { + if (!debugMode) return; if (isRenderActive) { destroyRenderer(); isRenderActive = false; From 7ee38425702557f32a0d3c328384a61dcd7b89f6 Mon Sep 17 00:00:00 2001 From: GDCloud Date: Sun, 8 Sep 2024 01:18:40 +0200 Subject: [PATCH 26/57] add alternate phonon crystal solution recipe --- .../postload/recipes/BlastFurnaceRecipes.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/main/java/gregtech/loaders/postload/recipes/BlastFurnaceRecipes.java b/src/main/java/gregtech/loaders/postload/recipes/BlastFurnaceRecipes.java index 478b6f15143..7be5ca5940d 100644 --- a/src/main/java/gregtech/loaders/postload/recipes/BlastFurnaceRecipes.java +++ b/src/main/java/gregtech/loaders/postload/recipes/BlastFurnaceRecipes.java @@ -13,6 +13,7 @@ import net.minecraftforge.fluids.FluidStack; import bartworks.system.material.WerkstoffLoader; +import goodgenerator.items.GGMaterial; import gregtech.GTMod; import gregtech.api.enums.GTValues; import gregtech.api.enums.ItemList; @@ -664,6 +665,20 @@ public void registerBlastFurnaceRecipes() { .metadata(COIL_HEAT, 17000) .addTo(blastFurnaceRecipes); + GTValues.RA.stdBuilder() + .itemInputs( + ItemList.Phononic_Seed_Crystal.get(2), + MaterialsUEVplus.Eternity.getDust(8), + GGMaterial.shirabon.get(OrePrefixes.dust, 8), + GTUtility.getIntegratedCircuit(2)) + .fluidInputs(MaterialsUEVplus.Mellion.getMolten(512 * 144L)) + .fluidOutputs(MaterialsUEVplus.PhononCrystalSolution.getFluid(3000)) + .duration(200 * SECONDS) + .eut((int) TierEU.RECIPE_UXV) + .metadata(COIL_HEAT, 50000) + .noOptimize() + .addTo(blastFurnaceRecipes); + GTValues.RA.stdBuilder() .itemInputs(MaterialsUEVplus.Mellion.getDust(1), GTUtility.getIntegratedCircuit(11)) .itemOutputs(GTOreDictUnificator.get(OrePrefixes.ingotHot, MaterialsUEVplus.Mellion, 1)) From 5d21dc87ca4f9e97c7d802c999973b1029c71bbd Mon Sep 17 00:00:00 2001 From: BucketBrigade <138534411+CookieBrigade@users.noreply.github.com> Date: Sat, 7 Sep 2024 19:38:59 -0500 Subject: [PATCH 27/57] Gorge fixed with jank (#3111) --- .../thing/block/RenderForgeOfGods.java | 21 ++++++++++++++++--- .../java/tectech/util/FaceVisibility.java | 4 ++++ src/main/java/tectech/util/StructureVBO.java | 12 +++++++---- .../tectech/shaders/fadebypass.frag.glsl | 7 +++++++ .../tectech/shaders/fadebypass.vert.glsl | 7 +++++++ 5 files changed, 44 insertions(+), 7 deletions(-) create mode 100644 src/main/resources/assets/tectech/shaders/fadebypass.frag.glsl create mode 100644 src/main/resources/assets/tectech/shaders/fadebypass.vert.glsl diff --git a/src/main/java/tectech/thing/block/RenderForgeOfGods.java b/src/main/java/tectech/thing/block/RenderForgeOfGods.java index 51699e9f2fd..8520efe8707 100644 --- a/src/main/java/tectech/thing/block/RenderForgeOfGods.java +++ b/src/main/java/tectech/thing/block/RenderForgeOfGods.java @@ -7,7 +7,9 @@ import java.nio.FloatBuffer; +import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.ActiveRenderInfo; +import net.minecraft.client.renderer.OpenGlHelper; import net.minecraft.client.renderer.texture.TextureMap; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.tileentity.TileEntity; @@ -20,6 +22,7 @@ import org.joml.Vector4f; import org.lwjgl.BufferUtils; import org.lwjgl.opengl.GL11; +import org.lwjgl.opengl.GL12; import org.lwjgl.opengl.GL13; import org.lwjgl.opengl.GL15; import org.lwjgl.opengl.GL20; @@ -58,6 +61,9 @@ public class RenderForgeOfGods extends TileEntitySpecialRenderer { private static final Vector3f ringTwoNudge = new Vector3f(0, -1, 0); private static final Vector3f ringThreeNudge = new Vector3f(.5f, -1, 0); + + private static ShaderProgram fadeBypassProgram; + private void init() { try { starProgram = new ShaderProgram(Reference.MODID, "shaders/star.vert.glsl", "shaders/star.frag.glsl"); @@ -125,7 +131,8 @@ private void init() { } private void initRings() { - StructureVBO ringStructure = (new StructureVBO()).addMapping('H', BlockGodforgeGlass.INSTANCE, 0) + StructureVBO ringStructure = (new StructureVBO()) + .addMapping('H', BlockGodforgeGlass.INSTANCE, 0) .addMapping('B', GodforgeCasings, 0) .addMapping('C', GodforgeCasings, 1) .addMapping('D', GodforgeCasings, 2) @@ -140,6 +147,11 @@ private void initRings() { .build(); ringThree = ringStructure.assignStructure(ForgeOfGodsRingsStructureString.THIRD_RING) .build(); + + fadeBypassProgram = new ShaderProgram( + Reference.MODID, + "shaders/fadebypass.vert.glsl", + "shaders/fadebypass.frag.glsl"); } public void RenderStarLayer(Vector4f color, ResourceLocation texture, float size, Vector3f rotationAxis, @@ -355,6 +367,8 @@ private void RenderRings(TileEntityForgeOfGods tile, double x, double y, double GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS); GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); + fadeBypassProgram.use(); + GL11.glPushMatrix(); GL11.glTranslated(x + .5f, y + .5f, z + .5f); @@ -383,7 +397,7 @@ private void RenderRings(TileEntityForgeOfGods tile, double x, double y, double GL11.glPopMatrix(); } } - + ShaderProgram.clear(); GL11.glPopAttrib(); } @@ -402,8 +416,9 @@ public void renderTileEntityAt(TileEntity tile, double x, double y, double z, fl .getWorldInfo() .getWorldTotalTime() % (20 * 36000) + timeSinceLastTick; - RenderRings(forgeTile, x, y, z, timer); RenderEntireStar(forgeTile, x, y, z, timer); + RenderRings(forgeTile, x, y, z, timer); + RenderBeamSegment(forgeTile, x, y, z, timer); } diff --git a/src/main/java/tectech/util/FaceVisibility.java b/src/main/java/tectech/util/FaceVisibility.java index 3d48bdbc564..aebf3f7b192 100644 --- a/src/main/java/tectech/util/FaceVisibility.java +++ b/src/main/java/tectech/util/FaceVisibility.java @@ -5,4 +5,8 @@ public class FaceVisibility { public boolean front = true, back = true; public boolean left = true, right = true; public boolean top = true, bottom = true; + + public boolean isEntireObscured(){ + return !front && !back && !left && !right && !top && !bottom; + } } diff --git a/src/main/java/tectech/util/StructureVBO.java b/src/main/java/tectech/util/StructureVBO.java index 92239d8c6d2..94e6d152969 100644 --- a/src/main/java/tectech/util/StructureVBO.java +++ b/src/main/java/tectech/util/StructureVBO.java @@ -85,19 +85,23 @@ public VertexBuffer build() { if (info.getLeft() == Blocks.air) continue; FaceVisibility faceInfo = getVisibleFaces(x, y, z); + + if (faceInfo.isEntireObscured()) continue; + renderer.setFaceVisibility(faceInfo); + + // The floor division is intended to produce proper offsets tess.setTranslation( -structure.length / 2f + x, plane.length / 2f - y, // y needs to be drawn from top to bottom -row.length() / 2f + z); + renderer.renderBlockAsItem(info.getLeft(), info.getRight(), 1f); } } } - VertexBuffer vertexBuffer = TessellatorManager.stopCapturingToVBO(DefaultVertexFormat.POSITION_TEXTURE_NORMAL); - final int vboID = VBOManager.generateDisplayLists(1); - VBOManager.registerVBO(vboID, vertexBuffer); - return vertexBuffer; + + return TessellatorManager.stopCapturingToVBO(DefaultVertexFormat.POSITION_TEXTURE_NORMAL); } } diff --git a/src/main/resources/assets/tectech/shaders/fadebypass.frag.glsl b/src/main/resources/assets/tectech/shaders/fadebypass.frag.glsl new file mode 100644 index 00000000000..5102d76abb4 --- /dev/null +++ b/src/main/resources/assets/tectech/shaders/fadebypass.frag.glsl @@ -0,0 +1,7 @@ +#version 120 +uniform sampler2D u_Texture; +varying vec2 v_TexCoord; + +void main() { + gl_FragColor = texture2D(u_Texture, v_TexCoord); +} diff --git a/src/main/resources/assets/tectech/shaders/fadebypass.vert.glsl b/src/main/resources/assets/tectech/shaders/fadebypass.vert.glsl new file mode 100644 index 00000000000..294497100ad --- /dev/null +++ b/src/main/resources/assets/tectech/shaders/fadebypass.vert.glsl @@ -0,0 +1,7 @@ +#version 120 +varying vec2 v_TexCoord; + +void main() { + v_TexCoord = gl_MultiTexCoord0.xy; + gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; +} From 333bdb4104cfa1bc33aacda7cf0ab2ce0847dd7e Mon Sep 17 00:00:00 2001 From: GDCloud Date: Sun, 8 Sep 2024 02:42:03 +0200 Subject: [PATCH 28/57] spotless --- src/main/java/tectech/thing/block/RenderForgeOfGods.java | 8 +------- src/main/java/tectech/util/FaceVisibility.java | 2 +- src/main/java/tectech/util/StructureVBO.java | 2 -- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/main/java/tectech/thing/block/RenderForgeOfGods.java b/src/main/java/tectech/thing/block/RenderForgeOfGods.java index 8520efe8707..13c7e795d62 100644 --- a/src/main/java/tectech/thing/block/RenderForgeOfGods.java +++ b/src/main/java/tectech/thing/block/RenderForgeOfGods.java @@ -7,9 +7,7 @@ import java.nio.FloatBuffer; -import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.ActiveRenderInfo; -import net.minecraft.client.renderer.OpenGlHelper; import net.minecraft.client.renderer.texture.TextureMap; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.tileentity.TileEntity; @@ -22,7 +20,6 @@ import org.joml.Vector4f; import org.lwjgl.BufferUtils; import org.lwjgl.opengl.GL11; -import org.lwjgl.opengl.GL12; import org.lwjgl.opengl.GL13; import org.lwjgl.opengl.GL15; import org.lwjgl.opengl.GL20; @@ -61,7 +58,6 @@ public class RenderForgeOfGods extends TileEntitySpecialRenderer { private static final Vector3f ringTwoNudge = new Vector3f(0, -1, 0); private static final Vector3f ringThreeNudge = new Vector3f(.5f, -1, 0); - private static ShaderProgram fadeBypassProgram; private void init() { @@ -131,8 +127,7 @@ private void init() { } private void initRings() { - StructureVBO ringStructure = (new StructureVBO()) - .addMapping('H', BlockGodforgeGlass.INSTANCE, 0) + StructureVBO ringStructure = (new StructureVBO()).addMapping('H', BlockGodforgeGlass.INSTANCE, 0) .addMapping('B', GodforgeCasings, 0) .addMapping('C', GodforgeCasings, 1) .addMapping('D', GodforgeCasings, 2) @@ -369,7 +364,6 @@ private void RenderRings(TileEntityForgeOfGods tile, double x, double y, double GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); fadeBypassProgram.use(); - GL11.glPushMatrix(); GL11.glTranslated(x + .5f, y + .5f, z + .5f); GL11.glRotatef(tile.getRotAngle(), tile.getRotAxisX(), tile.getRotAxisY(), tile.getRotAxisZ()); diff --git a/src/main/java/tectech/util/FaceVisibility.java b/src/main/java/tectech/util/FaceVisibility.java index aebf3f7b192..da981a98d8a 100644 --- a/src/main/java/tectech/util/FaceVisibility.java +++ b/src/main/java/tectech/util/FaceVisibility.java @@ -6,7 +6,7 @@ public class FaceVisibility { public boolean left = true, right = true; public boolean top = true, bottom = true; - public boolean isEntireObscured(){ + public boolean isEntireObscured() { return !front && !back && !left && !right && !top && !bottom; } } diff --git a/src/main/java/tectech/util/StructureVBO.java b/src/main/java/tectech/util/StructureVBO.java index 94e6d152969..9e9d1b6caa4 100644 --- a/src/main/java/tectech/util/StructureVBO.java +++ b/src/main/java/tectech/util/StructureVBO.java @@ -11,7 +11,6 @@ import com.gtnewhorizon.gtnhlib.client.renderer.CapturingTessellator; import com.gtnewhorizon.gtnhlib.client.renderer.TessellatorManager; -import com.gtnewhorizon.gtnhlib.client.renderer.vbo.VBOManager; import com.gtnewhorizon.gtnhlib.client.renderer.vbo.VertexBuffer; import com.gtnewhorizon.gtnhlib.client.renderer.vertex.DefaultVertexFormat; @@ -90,7 +89,6 @@ public VertexBuffer build() { renderer.setFaceVisibility(faceInfo); - // The floor division is intended to produce proper offsets tess.setTranslation( -structure.length / 2f + x, From fcfbcc92f9a5d2cc148da6e37265c5f9fe9625e4 Mon Sep 17 00:00:00 2001 From: GDCloud Date: Sun, 8 Sep 2024 17:14:48 +0200 Subject: [PATCH 29/57] curium can be solidified now --- src/main/java/tectech/loader/recipe/Godforge.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/tectech/loader/recipe/Godforge.java b/src/main/java/tectech/loader/recipe/Godforge.java index 8a06efdffca..4c9b07caea6 100644 --- a/src/main/java/tectech/loader/recipe/Godforge.java +++ b/src/main/java/tectech/loader/recipe/Godforge.java @@ -515,9 +515,8 @@ public void run() { exoticModulePlasmaItemMap.put(MaterialsElements.getInstance().RHODIUM.getTinyDust(1), 6000); exoticModulePlasmaItemMap.put(MaterialsElements.getInstance().IODINE.getTinyDust(1), 6000); exoticModulePlasmaItemMap.put(MaterialsElements.getInstance().HAFNIUM.getTinyDust(1), 6000); + exoticModulePlasmaItemMap.put(MaterialsElements.getInstance().CURIUM.getTinyDust(1), 10000); - // This is here because it cant be solidified - exoticModulePlasmaFluidMap.put(new FluidStack(MaterialsElements.getInstance().CURIUM.getFluid(), 1), 10000); // Mercury is weird, it has neither dust nor gas, so it needs to be added separately exoticModulePlasmaFluidMap.put(Materials.Mercury.getFluid(1), 6000); From 8cdc0e1fdd7fd0334b2f9d394e0c6d48e9eccaf1 Mon Sep 17 00:00:00 2001 From: GDCloud Date: Sun, 8 Sep 2024 17:15:13 +0200 Subject: [PATCH 30/57] fix eu/t and parallel not resetting --- .../multi/godforge_modules/MTEExoticModule.java | 11 +++++++++-- .../multi/godforge_modules/MTEMoltenModule.java | 11 +++++++++-- .../multi/godforge_modules/MTEPlasmaModule.java | 11 +++++++++-- .../multi/godforge_modules/MTESmeltingModule.java | 11 +++++++++-- 4 files changed, 36 insertions(+), 8 deletions(-) diff --git a/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTEExoticModule.java b/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTEExoticModule.java index 7c4b36147f1..03ab89b2b22 100644 --- a/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTEExoticModule.java +++ b/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTEExoticModule.java @@ -519,9 +519,16 @@ public String[] getInfoData() { + formatNumbers(mMaxProgresstime / 20) + RESET + " s"); - str.add("Currently using: " + RED + formatNumbers(EUt) + RESET + " EU/t"); + str.add( + "Currently using: " + RED + + (getBaseMetaTileEntity().isActive() ? formatNumbers(EUt) : "0") + + RESET + + " EU/t"); str.add(YELLOW + "Max Parallel: " + RESET + formatNumbers(getMaxParallel())); - str.add(YELLOW + "Current Parallel: " + RESET + formatNumbers(getMaxParallel())); + str.add( + YELLOW + "Current Parallel: " + + RESET + + (getBaseMetaTileEntity().isActive() ? formatNumbers(getMaxParallel()) : "0")); str.add(YELLOW + "Recipe time multiplier: " + RESET + formatNumbers(getSpeedBonus())); str.add(YELLOW + "Energy multiplier: " + RESET + formatNumbers(getEnergyDiscount())); str.add(YELLOW + "Recipe time divisor per non-perfect OC: " + RESET + formatNumbers(getOverclockTimeFactor())); diff --git a/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTEMoltenModule.java b/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTEMoltenModule.java index c6b8ab0f824..22ca7475580 100644 --- a/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTEMoltenModule.java +++ b/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTEMoltenModule.java @@ -198,9 +198,16 @@ public String[] getInfoData() { + formatNumbers(mMaxProgresstime / 20) + RESET + " s"); - str.add("Currently using: " + RED + formatNumbers(EUt) + RESET + " EU/t"); + str.add( + "Currently using: " + RED + + (getBaseMetaTileEntity().isActive() ? formatNumbers(EUt) : "0") + + RESET + + " EU/t"); str.add(YELLOW + "Max Parallel: " + RESET + formatNumbers(getMaxParallel())); - str.add(YELLOW + "Current Parallel: " + RESET + formatNumbers(currentParallel)); + str.add( + YELLOW + "Current Parallel: " + + RESET + + (getBaseMetaTileEntity().isActive() ? formatNumbers(currentParallel) : "0")); str.add(YELLOW + "Heat Capacity: " + RESET + formatNumbers(getHeat())); str.add(YELLOW + "Effective Heat Capacity: " + RESET + formatNumbers(getHeatForOC())); str.add(YELLOW + "Recipe time multiplier: " + RESET + formatNumbers(getSpeedBonus())); diff --git a/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTEPlasmaModule.java b/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTEPlasmaModule.java index 7923089f8b6..84cd7c5b189 100644 --- a/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTEPlasmaModule.java +++ b/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTEPlasmaModule.java @@ -201,9 +201,16 @@ public String[] getInfoData() { + formatNumbers(mMaxProgresstime / 20) + RESET + " s"); - str.add("Currently using: " + RED + formatNumbers(EUt) + RESET + " EU/t"); + str.add( + "Currently using: " + RED + + (getBaseMetaTileEntity().isActive() ? formatNumbers(EUt) : "0") + + RESET + + " EU/t"); str.add(YELLOW + "Max Parallel: " + RESET + formatNumbers(getMaxParallel())); - str.add(YELLOW + "Current Parallel: " + RESET + formatNumbers(currentParallel)); + str.add( + YELLOW + "Current Parallel: " + + RESET + + (getBaseMetaTileEntity().isActive() ? formatNumbers(currentParallel) : "0")); str.add(YELLOW + "Recipe time multiplier: " + RESET + formatNumbers(getSpeedBonus())); str.add(YELLOW + "Energy multiplier: " + RESET + formatNumbers(getEnergyDiscount())); str.add(YELLOW + "Recipe time divisor per non-perfect OC: " + RESET + formatNumbers(getOverclockTimeFactor())); diff --git a/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTESmeltingModule.java b/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTESmeltingModule.java index 8c45060653c..ac67042ad65 100644 --- a/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTESmeltingModule.java +++ b/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTESmeltingModule.java @@ -200,9 +200,16 @@ public String[] getInfoData() { + formatNumbers(mMaxProgresstime / 20) + RESET + " s"); - str.add("Currently using: " + RED + formatNumbers(EUt) + RESET + " EU/t"); + str.add( + "Currently using: " + RED + + (getBaseMetaTileEntity().isActive() ? formatNumbers(EUt) : "0") + + RESET + + " EU/t"); str.add(YELLOW + "Max Parallel: " + RESET + formatNumbers(getMaxParallel())); - str.add(YELLOW + "Current Parallel: " + RESET + formatNumbers(currentParallel)); + str.add( + YELLOW + "Current Parallel: " + + RESET + + (getBaseMetaTileEntity().isActive() ? formatNumbers(currentParallel) : "0")); str.add(YELLOW + "Heat Capacity: " + RESET + formatNumbers(getHeat())); str.add(YELLOW + "Effective Heat Capacity: " + RESET + formatNumbers(getHeatForOC())); str.add(YELLOW + "Recipe time multiplier: " + RESET + formatNumbers(getSpeedBonus())); From b37c98a6106ef8b424e259da3944097837cf38a1 Mon Sep 17 00:00:00 2001 From: GDCloud Date: Sun, 8 Sep 2024 17:15:40 +0200 Subject: [PATCH 31/57] fix milestone window bg not resetting --- .../tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java b/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java index 2233133126e..bc804f1d85d 100644 --- a/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java +++ b/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java @@ -1320,6 +1320,11 @@ private Widget createMilestoneButton(int milestoneID, int width, int height, Pos return new ButtonWidget().setOnClick((clickData, widget) -> { currentMilestoneID = milestoneID; if (!widget.isClient()) { + if (widget.getContext() + .isWindowOpen(INDIVIDUAL_MILESTONE_WINDOW_ID)) { + widget.getContext() + .closeWindow(INDIVIDUAL_MILESTONE_WINDOW_ID); + } widget.getContext() .openSyncedWindow(INDIVIDUAL_MILESTONE_WINDOW_ID); } From 38bfcd423b4c8bef1cc8a0dfa4728151a899ede9 Mon Sep 17 00:00:00 2001 From: GDCloud Date: Mon, 9 Sep 2024 00:31:57 +0200 Subject: [PATCH 32/57] tie debug mode to config --- .../tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java | 3 ++- .../metaTileEntity/multi/godforge_modules/MTEPlasmaModule.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java b/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java index bc804f1d85d..5d9af1905b2 100644 --- a/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java +++ b/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java @@ -98,6 +98,7 @@ import gregtech.common.tileentities.machines.MTEHatchInputME; import gregtech.common.tileentities.machines.MTEHatchOutputBusME; import tectech.TecTech; +import tectech.loader.TecTechConfig; import tectech.thing.block.BlockGodforgeGlass; import tectech.thing.block.TileEntityForgeOfGods; import tectech.thing.gui.TecTechUITextures; @@ -179,7 +180,7 @@ public class MTEForgeOfGods extends TTMultiblockBase implements IConstructable, private static final ItemStack STELLAR_FUEL = Avaritia.isModLoaded() ? getModItem(Avaritia.ID, "Resource", 1, 8) : GTOreDictUnificator.get(OrePrefixes.block, Materials.CosmicNeutronium, 1); - private final boolean debugMode = false; + private final boolean debugMode = TecTechConfig.DEBUG_MODE; public int survivalConstruct(ItemStack stackSize, int elementBudget, ISurvivalBuildEnvironment env) { int realBudget = elementBudget >= 1000 ? elementBudget : Math.min(1000, elementBudget * 5); diff --git a/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTEPlasmaModule.java b/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTEPlasmaModule.java index 84cd7c5b189..8d15d6e364a 100644 --- a/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTEPlasmaModule.java +++ b/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTEPlasmaModule.java @@ -42,6 +42,7 @@ import gregtech.api.util.GTRecipe; import gregtech.api.util.MultiblockTooltipBuilder; import gregtech.api.util.OverclockCalculator; +import tectech.loader.TecTechConfig; import tectech.recipe.TecTechRecipeMaps; import tectech.util.CommonValues; @@ -49,7 +50,7 @@ public class MTEPlasmaModule extends MTEBaseModule { private long EUt = 0; private int currentParallel = 0; - private boolean debug = false; + private boolean debug = TecTechConfig.DEBUG_MODE; private int inputMaxParallel = 0; public MTEPlasmaModule(int aID, String aName, String aNameRegional) { From 1b259c323a057995a55c2bb6611b54e547e6cee1 Mon Sep 17 00:00:00 2001 From: BucketBrigade <138534411+CookieBrigade@users.noreply.github.com> Date: Sun, 8 Sep 2024 18:10:56 -0500 Subject: [PATCH 33/57] Gorge fixed with jank part 2 (#3129) thats the name of the game --- .../thing/block/RenderForgeOfGods.java | 5 +++ src/main/java/tectech/util/StructureVBO.java | 9 +++++ .../tectech/util/TextureUpdateRequester.java | 38 +++++++++++++++++++ 3 files changed, 52 insertions(+) create mode 100644 src/main/java/tectech/util/TextureUpdateRequester.java diff --git a/src/main/java/tectech/thing/block/RenderForgeOfGods.java b/src/main/java/tectech/thing/block/RenderForgeOfGods.java index 13c7e795d62..30d849ffc48 100644 --- a/src/main/java/tectech/thing/block/RenderForgeOfGods.java +++ b/src/main/java/tectech/thing/block/RenderForgeOfGods.java @@ -31,6 +31,7 @@ import tectech.thing.metaTileEntity.multi.ForgeOfGodsRingsStructureString; import tectech.thing.metaTileEntity.multi.ForgeOfGodsStructureString; import tectech.util.StructureVBO; +import tectech.util.TextureUpdateRequester; public class RenderForgeOfGods extends TileEntitySpecialRenderer { @@ -59,6 +60,7 @@ public class RenderForgeOfGods extends TileEntitySpecialRenderer { private static final Vector3f ringThreeNudge = new Vector3f(.5f, -1, 0); private static ShaderProgram fadeBypassProgram; + private static TextureUpdateRequester textureUpdater; private void init() { try { @@ -147,6 +149,8 @@ private void initRings() { Reference.MODID, "shaders/fadebypass.vert.glsl", "shaders/fadebypass.frag.glsl"); + + textureUpdater = ringStructure.getTextureUpdateRequestor(); } public void RenderStarLayer(Vector4f color, ResourceLocation texture, float size, Vector3f rotationAxis, @@ -362,6 +366,7 @@ private void RenderRings(TileEntityForgeOfGods tile, double x, double y, double GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS); GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); + textureUpdater.requestUpdate(); fadeBypassProgram.use(); GL11.glPushMatrix(); diff --git a/src/main/java/tectech/util/StructureVBO.java b/src/main/java/tectech/util/StructureVBO.java index 9e9d1b6caa4..1e1206d4c93 100644 --- a/src/main/java/tectech/util/StructureVBO.java +++ b/src/main/java/tectech/util/StructureVBO.java @@ -36,6 +36,15 @@ public StructureVBO addMapping(char letter, Block block, int meta) { return this; } + public TextureUpdateRequester getTextureUpdateRequestor() { + TextureUpdateRequester textureUpdateRequester = new TextureUpdateRequester(); + for (char key : mapper.keySet()) { + Pair pair = mapper.get(key); + textureUpdateRequester.add(pair.getLeft(), pair.getRight()); + } + return textureUpdateRequester; + } + private boolean isOpaqueAt(int x, int y, int z) { char letter = structure[x][y].charAt(z); if (letter == ' ') return false; diff --git a/src/main/java/tectech/util/TextureUpdateRequester.java b/src/main/java/tectech/util/TextureUpdateRequester.java new file mode 100644 index 00000000000..250686686f5 --- /dev/null +++ b/src/main/java/tectech/util/TextureUpdateRequester.java @@ -0,0 +1,38 @@ +package tectech.util; + +import java.util.HashSet; + +import net.minecraft.block.Block; +import net.minecraft.client.Minecraft; + +import org.apache.commons.lang3.tuple.Pair; +import org.lwjgl.opengl.GL11; + +import com.gtnewhorizon.gtnhlib.client.renderer.CapturingTessellator; +import com.gtnewhorizon.gtnhlib.client.renderer.TessellatorManager; +import com.gtnewhorizon.gtnhlib.client.renderer.vertex.DefaultVertexFormat; + +// Ugly hack to wake up angelica/hodgepodge to update the texture by fake rendering out a block +public class TextureUpdateRequester { + + private final HashSet> blocks = new HashSet<>(); + + public void add(Block block, int meta) { + blocks.add(Pair.of(block, meta)); + } + + // Using capturing tesselator just to make sure we dont render anything out + public void requestUpdate() { + GL11.glPushMatrix(); + TessellatorManager.startCapturing(); + CapturingTessellator tess = (CapturingTessellator) TessellatorManager.get(); + FaceCulledRenderBlocks renderer = new FaceCulledRenderBlocks(Minecraft.getMinecraft().theWorld); + renderer.setFaceVisibility(new FaceVisibility()); + for (Pair block : blocks) { + renderer.renderBlockAsItem(block.getLeft(), block.getRight(), 1f); + } + tess.setTranslation(0, 0, 0); + TessellatorManager.stopCapturingToBuffer(DefaultVertexFormat.POSITION_TEXTURE_NORMAL); + GL11.glPopMatrix(); + } +} From 60fcc76be92eb661a5ec4630118e6eaf41cff7d8 Mon Sep 17 00:00:00 2001 From: GDCloud Date: Mon, 9 Sep 2024 03:23:53 +0200 Subject: [PATCH 34/57] missed oxygen plasma --- src/main/java/tectech/loader/recipe/Godforge.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/main/java/tectech/loader/recipe/Godforge.java b/src/main/java/tectech/loader/recipe/Godforge.java index 4c9b07caea6..0cddff53940 100644 --- a/src/main/java/tectech/loader/recipe/Godforge.java +++ b/src/main/java/tectech/loader/recipe/Godforge.java @@ -403,7 +403,6 @@ public void run() { Materials.Niobium, Materials.Nitrogen, Materials.Oriharukon, - Materials.Oxygen, Materials.Palladium, Materials.Phosphorus, Materials.Potassium, @@ -476,7 +475,6 @@ public void run() { 10000 /* Niobium */, 10000 /* Nitrogen */, 6000 /* Oriharukon */, - 8000 /* Oxygen */, 6000 /* Palladium */, 6000 /* Phosphorus */, 6000 /* Potassium */, From b72b21ca52e92fd6012b5c254973fe41d8a2b664 Mon Sep 17 00:00:00 2001 From: GDCloud Date: Mon, 9 Sep 2024 03:40:58 +0200 Subject: [PATCH 35/57] rework parallel bonus calcs a bit --- src/main/java/tectech/util/GodforgeMath.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/main/java/tectech/util/GodforgeMath.java b/src/main/java/tectech/util/GodforgeMath.java index a552b59375c..a3105e08a12 100644 --- a/src/main/java/tectech/util/GodforgeMath.java +++ b/src/main/java/tectech/util/GodforgeMath.java @@ -178,19 +178,18 @@ public static void calculateMaxParallelForModules(MTEBaseModule module, MTEForge } } - int maxParallel = (int) (baseParallel * node53 - * fuelFactorMultiplier - * heatMultiplier - * upgradeAmountMultiplier); + float totalBonuses = node53 * fuelFactorMultiplier * heatMultiplier * upgradeAmountMultiplier; if (module instanceof MTEExoticModule) { if (godforge.isUpgradeActive(25)) { - maxParallel = (int) Math.max(Math.sqrt(maxParallel), 36); + totalBonuses = (float) Math.sqrt(totalBonuses); } else { - maxParallel = baseParallel; + totalBonuses = 1; } } + int maxParallel = (int) (baseParallel * totalBonuses); + module.setMaxParallel(maxParallel); } From 81dcd62095f15363721d0f55d61aca64fedea4b4 Mon Sep 17 00:00:00 2001 From: serenibyss <10861407+serenibyss@users.noreply.github.com> Date: Mon, 9 Sep 2024 00:57:01 -0500 Subject: [PATCH 36/57] Fix upgrade window rendering, allow nei functions --- .../metaTileEntity/multi/MTEForgeOfGods.java | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java b/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java index 5d9af1905b2..2b48250230f 100644 --- a/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java +++ b/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java @@ -51,9 +51,9 @@ import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment; import com.gtnewhorizons.modularui.api.ModularUITextures; import com.gtnewhorizons.modularui.api.drawable.IDrawable; -import com.gtnewhorizons.modularui.api.drawable.ItemDrawable; import com.gtnewhorizons.modularui.api.drawable.Text; import com.gtnewhorizons.modularui.api.drawable.UITexture; +import com.gtnewhorizons.modularui.api.forge.IItemHandlerModifiable; import com.gtnewhorizons.modularui.api.forge.ItemStackHandler; import com.gtnewhorizons.modularui.api.math.Alignment; import com.gtnewhorizons.modularui.api.math.Color; @@ -73,6 +73,7 @@ import com.gtnewhorizons.modularui.common.widget.ProgressBar; import com.gtnewhorizons.modularui.common.widget.Scrollable; import com.gtnewhorizons.modularui.common.widget.SlotGroup; +import com.gtnewhorizons.modularui.common.widget.SlotWidget; import com.gtnewhorizons.modularui.common.widget.TextWidget; import com.gtnewhorizons.modularui.common.widget.textfield.NumericWidget; @@ -2170,25 +2171,26 @@ protected ModularWindow createManualInsertionWindow(final EntityPlayer player) { .setPos(5, 82) .setSize(179, 16)); + IItemHandlerModifiable upgradeMatsHandler = new ItemStackHandler(12); int uniqueItems = inputs.length; for (int i = 0; i < 12; i++) { int index = i; int cleanDiv4 = index / 4; if (i < uniqueItems) { + ItemStack stack = inputs[index]; + if (stack != null) { + stack = stack.copy(); + stack.stackSize = 1; + upgradeMatsHandler.setStackInSlot(index, stack); + } builder.widget( new DrawableWidget().setDrawable(GTUITextures.BUTTON_STANDARD_PRESSED) .setPos(5 + cleanDiv4 * 36, 6 + index % 4 * 18) .setSize(18, 18)); columnList.get(cleanDiv4) .addChild( - new ItemDrawable().setItem(inputs[index]) - .asWidget() - .dynamicTooltip(() -> { - List tooltip = new ArrayList<>(); - tooltip.add(inputs[index] != null ? inputs[index].getDisplayName() : ""); - return tooltip; - }) - .setSize(16, 16)); + new SlotWidget(upgradeMatsHandler, index).setAccess(false, false) + .disableInteraction()); columnList.get(cleanDiv4 + 3) .addChild( new TextWidget("x" + inputs[i].stackSize).setTextAlignment(Alignment.CenterLeft) @@ -2204,9 +2206,9 @@ protected ModularWindow createManualInsertionWindow(final EntityPlayer player) { int counter = 0; for (DynamicPositionedColumn column : columnList) { - int spacing = 2; - int xCord = 1 + counter * 36; - int yCord = 1; + int spacing = 0; + int xCord = counter * 36; + int yCord = 0; if (counter > 2) { spacing = 10; xCord = 19 + (counter - 3) * 36; From 473d5772d2a4d966c8d1d28505984e1d68093872 Mon Sep 17 00:00:00 2001 From: BucketBrigade <138534411+CookieBrigade@users.noreply.github.com> Date: Mon, 9 Sep 2024 12:58:54 -0500 Subject: [PATCH 37/57] Gorge stuttering fix (#3136) --- .../java/tectech/thing/block/RenderForgeOfGods.java | 8 +++++--- .../tectech/thing/block/TileEntityForgeOfGods.java | 13 ------------- 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/src/main/java/tectech/thing/block/RenderForgeOfGods.java b/src/main/java/tectech/thing/block/RenderForgeOfGods.java index 30d849ffc48..04c46155c04 100644 --- a/src/main/java/tectech/thing/block/RenderForgeOfGods.java +++ b/src/main/java/tectech/thing/block/RenderForgeOfGods.java @@ -411,9 +411,11 @@ public void renderTileEntityAt(TileEntity tile, double x, double y, double z, fl if (!initialized) return; } - float timer = forgeTile.getWorldObj() - .getWorldInfo() - .getWorldTotalTime() % (20 * 36000) + timeSinceLastTick; + // Based on system time to prevent tps issues from causing stutters + // Need to look into different timing system to prevent stutters based on tps issues + // But prevent bypassing the pause menu + long millis = System.currentTimeMillis() % (1000 * 36000); + float timer = millis / (50f); // to ticks RenderEntireStar(forgeTile, x, y, z, timer); RenderRings(forgeTile, x, y, z, timer); diff --git a/src/main/java/tectech/thing/block/TileEntityForgeOfGods.java b/src/main/java/tectech/thing/block/TileEntityForgeOfGods.java index b4892855b70..dfe4bab143a 100644 --- a/src/main/java/tectech/thing/block/TileEntityForgeOfGods.java +++ b/src/main/java/tectech/thing/block/TileEntityForgeOfGods.java @@ -112,16 +112,6 @@ public float getRotAxisZ() { } public void setRenderRotation(Rotation rotation, ForgeDirection direction) { - // System.out.println(rotation); - System.out.println(direction); - /* - * switch (rotation) { - * case NORMAL -> rotAngle = 0; - * case CLOCKWISE -> rotAngle = 90; - * case COUNTER_CLOCKWISE -> rotAngle = -90; - * case UPSIDE_DOWN -> rotAngle = 180; - * } - */ switch (direction) { case SOUTH -> rotAngle = 90; case NORTH -> rotAngle = 90; @@ -133,9 +123,6 @@ public void setRenderRotation(Rotation rotation, ForgeDirection direction) { rotAxisX = 0; rotAxisY = direction.offsetZ + direction.offsetX; rotAxisZ = direction.offsetY; - System.out.println(direction.offsetX); - System.out.println(direction.offsetY); - System.out.println(direction.offsetZ); updateToClient(); } From 65a959074d65fc3eb5e8debca3005a48909d3b32 Mon Sep 17 00:00:00 2001 From: GDCloud Date: Tue, 10 Sep 2024 19:22:41 +0200 Subject: [PATCH 38/57] decrease smelting module nei priority --- .../multi/godforge_modules/MTESmeltingModule.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTESmeltingModule.java b/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTESmeltingModule.java index ac67042ad65..08d99bde8c4 100644 --- a/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTESmeltingModule.java +++ b/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTESmeltingModule.java @@ -75,6 +75,11 @@ public Collection> getAvailableRecipeMaps() { return Arrays.asList(RecipeMaps.blastFurnaceRecipes, RecipeMaps.furnaceRecipes); } + @Override + public int getRecipeCatalystPriority() { + return -10; + } + long wirelessEUt = 0; @Override From df32c89dc4a7f3effc4ec747a0e61229e07178e1 Mon Sep 17 00:00:00 2001 From: GDCloud Date: Tue, 10 Sep 2024 19:24:49 +0200 Subject: [PATCH 39/57] make upgrade deconstruction more lenient and fix some structure update issues --- .../metaTileEntity/multi/MTEForgeOfGods.java | 107 ++++++++++++++---- 1 file changed, 86 insertions(+), 21 deletions(-) diff --git a/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java b/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java index 2b48250230f..1c5914b5488 100644 --- a/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java +++ b/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java @@ -355,22 +355,42 @@ public boolean checkMachine_EM(IGregTechTileEntity iGregTechTileEntity, ItemStac if (mInputHatches.size() != 1) { return false; } + if (isUpgradeActive(26)) { if (checkPiece(STRUCTURE_PIECE_SECOND_RING, 55, 11, -67)) { ringAmount = 2; + destroySecondRing(); + UpdateRenderer(); } if (isRenderActive && ringAmount >= 2 && !checkPiece(STRUCTURE_PIECE_SECOND_RING_AIR, 55, 11, -67)) { destroyRenderer(); } + } else { + if (ringAmount == 3) { + buildThirdRing(); + } + if (ringAmount >= 2) { + ringAmount = 1; + UpdateRenderer(); + buildSecondRing(); + } } if (isUpgradeActive(29)) { if (checkPiece(STRUCTURE_PIECE_THIRD_RING, 47, 13, -76)) { ringAmount = 3; + destroyThirdRing(); + UpdateRenderer(); } if (isRenderActive && ringAmount == 3 && !checkPiece(STRUCTURE_PIECE_THIRD_RING_AIR, 47, 13, -76)) { destroyRenderer(); } + } else { + if (ringAmount == 3) { + ringAmount = 2; + UpdateRenderer(); + buildThirdRing(); + } } return true; @@ -602,16 +622,16 @@ private void createRenderer() { switch (ringAmount) { case 2 -> { - buildPiece(STRUCTURE_PIECE_FIRST_RING_AIR, null, false, 63, 14, -59); - buildPiece(STRUCTURE_PIECE_SECOND_RING_AIR, null, false, 55, 11, -67); + destroyFirstRing(); + destroySecondRing(); } case 3 -> { - buildPiece(STRUCTURE_PIECE_FIRST_RING_AIR, null, false, 63, 14, -59); - buildPiece(STRUCTURE_PIECE_SECOND_RING_AIR, null, false, 55, 11, -67); - buildPiece(STRUCTURE_PIECE_THIRD_RING_AIR, null, false, 47, 13, -76); + destroyFirstRing(); + destroySecondRing(); + destroyThirdRing(); } default -> { - buildPiece(STRUCTURE_PIECE_FIRST_RING_AIR, null, false, 63, 14, -59); + destroyFirstRing(); } } @@ -639,22 +659,46 @@ private void destroyRenderer() { switch (ringAmount) { case 2 -> { - buildPiece(STRUCTURE_PIECE_FIRST_RING, null, false, 63, 14, -59); - buildPiece(STRUCTURE_PIECE_SECOND_RING, null, false, 55, 11, -67); + buildFirstRing(); + buildSecondRing(); } case 3 -> { - buildPiece(STRUCTURE_PIECE_FIRST_RING, null, false, 63, 14, -59); - buildPiece(STRUCTURE_PIECE_SECOND_RING, null, false, 55, 11, -67); - buildPiece(STRUCTURE_PIECE_THIRD_RING, null, false, 47, 13, -76); + buildFirstRing(); + buildSecondRing(); + buildThirdRing(); } default -> { - buildPiece(STRUCTURE_PIECE_FIRST_RING, null, false, 63, 14, -59); + buildFirstRing(); } } isRenderActive = false; } + private void destroyFirstRing() { + buildPiece(STRUCTURE_PIECE_FIRST_RING_AIR, null, false, 63, 14, -59); + } + + private void destroySecondRing() { + buildPiece(STRUCTURE_PIECE_SECOND_RING_AIR, null, false, 55, 11, -67); + } + + private void destroyThirdRing() { + buildPiece(STRUCTURE_PIECE_THIRD_RING_AIR, null, false, 47, 13, -76); + } + + private void buildFirstRing() { + buildPiece(STRUCTURE_PIECE_FIRST_RING, null, false, 63, 14, -59); + } + + private void buildSecondRing() { + buildPiece(STRUCTURE_PIECE_SECOND_RING, null, false, 55, 11, -67); + } + + private void buildThirdRing() { + buildPiece(STRUCTURE_PIECE_THIRD_RING, null, false, 47, 13, -76); + } + @Override public final void onScrewdriverRightClick(ForgeDirection side, EntityPlayer aPlayer, float aX, float aY, float aZ) { if (!debugMode) return; @@ -1347,11 +1391,11 @@ private Widget createMilestoneButton(int milestoneID, int width, int height, Pos private int currentColorCode = 0; private int currentMilestoneBG = 0; private int gravitonShardCost = 0; - private int[] prereqUpgrades = new int[] {}; + private int[][] prereqUpgrades = new int[31][]; private int[] followupUpgrades = new int[] {}; - private boolean allPrereqRequired = false; private boolean isUpradeSplitStart = false; private boolean doesCurrentUpgradeRequireExtraMats = false; + private boolean[] allPrereqRequired = new boolean[31]; private boolean[] upgrades = new boolean[31]; private boolean[] materialPaidUpgrades = new boolean[7]; @@ -1931,10 +1975,9 @@ protected ModularWindow createIndividualUpgradeWindow(final EntityPlayer player) .widget(new MultiChildWidget().addChild(new ButtonWidget().setOnClick((clickData, widget) -> { int unlockedPrereqUpgrades = 0; - int unlockedFollowupUpgrades = 0; int unlockedSplitUpgrades = 0; if (!upgrades[currentUpgradeID]) { - for (int prereqUpgrade : prereqUpgrades) { + for (int prereqUpgrade : prereqUpgrades[currentUpgradeID]) { if (upgrades[prereqUpgrade]) { unlockedPrereqUpgrades++; } @@ -1942,14 +1985,14 @@ protected ModularWindow createIndividualUpgradeWindow(final EntityPlayer player) if (!doesCurrentUpgradeRequireExtraMats || materialPaidUpgrades[Arrays.asList(UPGRADE_MATERIAL_ID_CONVERSION) .indexOf(currentUpgradeID)]) { - if (allPrereqRequired) { - if (unlockedPrereqUpgrades == prereqUpgrades.length + if (allPrereqRequired[currentUpgradeID]) { + if (unlockedPrereqUpgrades == prereqUpgrades[currentUpgradeID].length && gravitonShardsAvailable >= gravitonShardCost) { gravitonShardsAvailable -= gravitonShardCost; gravitonShardsSpent += gravitonShardCost; upgrades[currentUpgradeID] = true; } - } else if (unlockedPrereqUpgrades > 0 || prereqUpgrades.length == 0) { + } else if (unlockedPrereqUpgrades > 0 || prereqUpgrades[currentUpgradeID].length == 0) { if (isUpradeSplitStart) { for (int splitUpgrade : FIRST_SPLIT_UPGRADES) { if (upgrades[splitUpgrade]) { @@ -1966,11 +2009,33 @@ protected ModularWindow createIndividualUpgradeWindow(final EntityPlayer player) } } } else { + int unlockedFollowupUpgrades = 0; + int unlockedNeighboringUpgrades = 0; + boolean doesFollowupRequireAllPrereqs = false; + boolean canFollowupSpareAConnection = true; + for (int followupUpgrade : followupUpgrades) { if (upgrades[followupUpgrade]) { unlockedFollowupUpgrades++; } + if (allPrereqRequired[followupUpgrade]) { + doesFollowupRequireAllPrereqs = true; + } + int[] currentPrereqs = prereqUpgrades[followupUpgrade]; + for (int prereqUpgrade : currentPrereqs) { + if (upgrades[prereqUpgrade]) { + unlockedNeighboringUpgrades++; + } + } + if (unlockedNeighboringUpgrades <= 1) { + canFollowupSpareAConnection = false; + } } + + if (!doesFollowupRequireAllPrereqs && followupUpgrades.length > 0 && canFollowupSpareAConnection) { + unlockedFollowupUpgrades = 0; + } + if (unlockedFollowupUpgrades == 0) { gravitonShardsAvailable += gravitonShardCost; gravitonShardsSpent -= gravitonShardCost; @@ -2056,13 +2121,13 @@ private Widget createMaterialInputButton(int upgradeID, int xCoord, int yCoord, private Widget createUpgradeBox(int upgradeID, int colorCode, int milestone, int[] prerequisiteUpgradeIDs, boolean requireAllPrerequisites, int[] followingUpgradeIDs, boolean isStartOfSplit, boolean requiresExtraMaterials, int shardCost, Pos2d pos, IWidgetBuilder builder) { + prereqUpgrades[upgradeID] = prerequisiteUpgradeIDs; + allPrereqRequired[upgradeID] = requireAllPrerequisites; return new MultiChildWidget().addChild(new ButtonWidget().setOnClick((clickData, widget) -> { currentUpgradeID = upgradeID; currentColorCode = colorCode; currentMilestoneBG = milestone; gravitonShardCost = shardCost; - prereqUpgrades = prerequisiteUpgradeIDs; - allPrereqRequired = requireAllPrerequisites; followupUpgrades = followingUpgradeIDs; isUpradeSplitStart = isStartOfSplit; doesCurrentUpgradeRequireExtraMats = requiresExtraMaterials; From dfefc5d19b06f56f58ff9ad7ea0b35570d3e5528 Mon Sep 17 00:00:00 2001 From: GDCloud Date: Tue, 10 Sep 2024 19:58:06 +0200 Subject: [PATCH 40/57] display different text when respec-ing upgrades --- .../metaTileEntity/multi/MTEForgeOfGods.java | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java b/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java index 1c5914b5488..15c3f85fc07 100644 --- a/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java +++ b/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java @@ -2051,10 +2051,11 @@ protected ModularWindow createIndividualUpgradeWindow(final EntityPlayer player) return new IDrawable[] { GTUITextures.BUTTON_STANDARD }; } }) - .addTooltip(translateToLocal("fog.upgrade.confirm")) + .dynamicTooltip(this::constructionStatus) .setTooltipShowUpDelay(TOOLTIP_DELAY)) .addChild( - new TextWidget(translateToLocal("fog.upgrade.confirm")).setTextAlignment(Alignment.Center) + TextWidget.dynamicText(this::constructionStatusText) + .setTextAlignment(Alignment.Center) .setScale(0.7f) .setMaxWidth(36) .setPos(3, 5)) @@ -3004,6 +3005,18 @@ private Text inversionInfoText() { : new Text(""); } + private Text constructionStatusText() { + return upgrades[currentUpgradeID] ? new Text(translateToLocal("fog.upgrade.respec")) + : new Text(translateToLocal("fog.upgrade.confirm")); + } + + private List constructionStatus() { + if (upgrades[currentUpgradeID]) { + return ImmutableList.of(translateToLocal("fog.upgrade.respec")); + } + return ImmutableList.of(translateToLocal("fog.upgrade.confirm")); + } + private List upgradeMaterialRequirements() { if (materialPaidUpgrades[Arrays.asList(UPGRADE_MATERIAL_ID_CONVERSION) .indexOf(currentUpgradeID)]) { From 3b3d2cab0ed6c81034d1a6dcbfd2c1b4ec9df8f6 Mon Sep 17 00:00:00 2001 From: GDCloud Date: Tue, 10 Sep 2024 19:58:43 +0200 Subject: [PATCH 41/57] fix neighboring upgrades not being reset --- .../java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java b/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java index 15c3f85fc07..8325dd4486d 100644 --- a/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java +++ b/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java @@ -2030,6 +2030,7 @@ protected ModularWindow createIndividualUpgradeWindow(final EntityPlayer player) if (unlockedNeighboringUpgrades <= 1) { canFollowupSpareAConnection = false; } + unlockedNeighboringUpgrades = 0; } if (!doesFollowupRequireAllPrereqs && followupUpgrades.length > 0 && canFollowupSpareAConnection) { From ec24e50705b8bd16af567bc052f7258b6f31140e Mon Sep 17 00:00:00 2001 From: GDCloud Date: Tue, 10 Sep 2024 19:59:00 +0200 Subject: [PATCH 42/57] respec localization --- src/main/resources/assets/tectech/lang/en_US.lang | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/resources/assets/tectech/lang/en_US.lang b/src/main/resources/assets/tectech/lang/en_US.lang index fd7075b74bc..c5aad0a44a1 100644 --- a/src/main/resources/assets/tectech/lang/en_US.lang +++ b/src/main/resources/assets/tectech/lang/en_US.lang @@ -884,6 +884,7 @@ achievement.gt.stabilisation_field_generator.8=Gallifreyan Stabilisation Field G # Forge of the Gods / Godforge fog.upgrade.confirm=Construct +fog.upgrade.respec=Respec fog.upgrade.tt.0=upgrade start fog.upgrade.tt.1=Improved Gravitational Convection Coils From 9bcc50f1cf2c7a63deaafad785b473544b396471 Mon Sep 17 00:00:00 2001 From: GDCloud Date: Wed, 11 Sep 2024 03:24:13 +0200 Subject: [PATCH 43/57] make exotic module power consumption scale with parallel and add expected inputs window --- .../godforge_modules/MTEExoticModule.java | 124 ++++++++++++++---- .../resources/assets/tectech/lang/en_US.lang | 2 + 2 files changed, 103 insertions(+), 23 deletions(-) diff --git a/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTEExoticModule.java b/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTEExoticModule.java index 03ab89b2b22..f6034958f72 100644 --- a/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTEExoticModule.java +++ b/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTEExoticModule.java @@ -26,6 +26,7 @@ import javax.annotation.Nonnull; +import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumChatFormatting; @@ -36,14 +37,23 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +import com.gtnewhorizons.modularui.api.ModularUITextures; import com.gtnewhorizons.modularui.api.drawable.IDrawable; import com.gtnewhorizons.modularui.api.drawable.UITexture; +import com.gtnewhorizons.modularui.api.fluids.FluidTanksHandler; +import com.gtnewhorizons.modularui.api.fluids.IFluidTanksHandler; +import com.gtnewhorizons.modularui.api.math.Alignment; +import com.gtnewhorizons.modularui.api.math.Pos2d; +import com.gtnewhorizons.modularui.api.math.Size; import com.gtnewhorizons.modularui.api.screen.ModularWindow; import com.gtnewhorizons.modularui.api.screen.UIBuildContext; import com.gtnewhorizons.modularui.api.widget.IWidgetBuilder; import com.gtnewhorizons.modularui.api.widget.Widget; import com.gtnewhorizons.modularui.common.widget.ButtonWidget; +import com.gtnewhorizons.modularui.common.widget.DrawableWidget; import com.gtnewhorizons.modularui.common.widget.FakeSyncWidget; +import com.gtnewhorizons.modularui.common.widget.FluidSlotWidget; +import com.gtnewhorizons.modularui.common.widget.TextWidget; import gregtech.api.enums.MaterialsUEVplus; import gregtech.api.enums.TierEU; @@ -68,7 +78,6 @@ public class MTEExoticModule extends MTEBaseModule { private int numberOfFluids = 0; private int numberOfItems = 0; - private long wirelessEUt = 0; private long EUt = 0; private long actualParallel = 0; private boolean recipeInProgress = false; @@ -77,15 +86,13 @@ public class MTEExoticModule extends MTEBaseModule { private ItemStack[] randomizedItemInput = new ItemStack[] {}; List inputPlasmas = new ArrayList<>(); private GTRecipe plasmaRecipe = null; - private static RecipeMap tempRecipeMap = RecipeMapBuilder.of("bye") - .maxIO(0, 0, 7, 2) - .disableRegisterNEI() - .build(); - private static final RecipeMap emptyRecipeMap = RecipeMapBuilder.of("hey") + private BigInteger powerForRecipe = BigInteger.ZERO; + private static RecipeMap tempRecipeMap = RecipeMapBuilder.of("godforgeExoticTempRecipeMap") .maxIO(0, 0, 7, 2) .disableRegisterNEI() .build(); private static final int NUMBER_OF_INPUTS = 7; + private static final int INPUT_LIST_WINDOW_ID = 10; public MTEExoticModule(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); @@ -110,7 +117,8 @@ protected Stream findRecipeMatches(@Nullable RecipeMap map) { if (!recipeInProgress) { actualParallel = getMaxParallel(); FluidStack outputFluid = MaterialsUEVplus.QuarkGluonPlasma.getFluid(1000 * actualParallel); - tempRecipeMap = emptyRecipeMap; + tempRecipeMap.getBackend() + .clearRecipes(); if (magmatterMode) { randomizedItemInput = getRandomItemInputs(exoticModuleMagmatterItemMap, 1); numberOfItems = 1; @@ -167,11 +175,12 @@ protected Stream findRecipeMatches(@Nullable RecipeMap map) { @Override protected CheckRecipeResult validateRecipe(@Nonnull GTRecipe recipe) { if (!recipeInProgress) { - maxParallel = 1; - wirelessEUt = (long) recipe.mEUt * maxParallel; - if (getUserEU(userUUID).compareTo(BigInteger.valueOf(wirelessEUt * recipe.mDuration)) < 0) { - tempRecipeMap = emptyRecipeMap; - return CheckRecipeResultRegistry.insufficientPower(wirelessEUt * recipe.mDuration); + powerForRecipe = BigInteger.valueOf(getProcessingVoltage()) + .multiply(BigInteger.valueOf(recipe.mDuration * actualParallel)); + if (getUserEU(userUUID).compareTo(powerForRecipe) < 0) { + tempRecipeMap.getBackend() + .clearRecipes(); + return CheckRecipeResultRegistry.insufficientStartupPower(powerForRecipe); } if (numberOfFluids != 0) { @@ -200,17 +209,19 @@ protected CheckRecipeResult validateRecipe(@Nonnull GTRecipe recipe) { @NotNull @Override protected CheckRecipeResult onRecipeStart(@Nonnull GTRecipe recipe) { - wirelessEUt = (long) recipe.mEUt * maxParallel; - if (!addEUToGlobalEnergyMap(userUUID, -calculatedEut * duration)) { - return CheckRecipeResultRegistry.insufficientPower(wirelessEUt * recipe.mDuration); + EUt = calculatedEut; + powerForRecipe = BigInteger.valueOf(EUt) + .multiply(BigInteger.valueOf(duration * actualParallel)); + + if (!addEUToGlobalEnergyMap(userUUID, powerForRecipe.negate())) { + return CheckRecipeResultRegistry.insufficientStartupPower(powerForRecipe); } - addToPowerTally( - BigInteger.valueOf(calculatedEut) - .multiply(BigInteger.valueOf(duration))); + + addToPowerTally(powerForRecipe); addToRecipeTally(calculatedParallels); - EUt = calculatedEut; setCalculatedEut(0); - tempRecipeMap = emptyRecipeMap; + tempRecipeMap.getBackend() + .clearRecipes(); recipeInProgress = false; return CheckRecipeResultRegistry.SUCCESSFUL; } @@ -352,6 +363,7 @@ public void saveNBTData(NBTTagCompound NBT) { NBT.setBoolean("recipeInProgress", recipeInProgress); NBT.setBoolean("magmatterMode", magmatterMode); + NBT.setLong("maxParallel", actualParallel); // Store damage values/stack sizes of input plasmas NBTTagCompound fluidStackListNBTTag = new NBTTagCompound(); @@ -377,6 +389,7 @@ public void loadNBTData(final NBTTagCompound NBT) { recipeInProgress = NBT.getBoolean("recipeInProgress"); magmatterMode = NBT.getBoolean("magmatterMode"); + actualParallel = NBT.getLong("maxParallel"); // Load damage values/fluid amounts of input plasmas and convert back to fluids NBTTagCompound tempFluidTag = NBT.getCompoundTag("inputPlasmas"); @@ -392,10 +405,10 @@ public void loadNBTData(final NBTTagCompound NBT) { inputPlasmas.add(new FluidStack(fluidStack, fluidAmount)); } - FluidStack outputFluid = MaterialsUEVplus.QuarkGluonPlasma.getFluid(1000); + FluidStack outputFluid = MaterialsUEVplus.QuarkGluonPlasma.getFluid(1000L * actualParallel); if (magmatterMode) { - outputFluid = MaterialsUEVplus.MagMatter.getMolten(144); + outputFluid = MaterialsUEVplus.MagMatter.getMolten(576L * actualParallel); } tempRecipeMap.add( @@ -416,9 +429,74 @@ public void loadNBTData(final NBTTagCompound NBT) { @Override public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) { + builder.widget( + new DrawableWidget().setPos(8, 69) + .setSize(16, 16) + .addTooltip(translateToLocal("fog.button.exoticinputs.tooltip")) + .setTooltipShowUpDelay(TOOLTIP_DELAY)); super.addUIWidgets(builder, buildContext); + buildContext.addSyncedWindow(INPUT_LIST_WINDOW_ID, this::createInputListWindow); builder.widget(magmatterSwitch(builder)); + builder.widget(createExpectedInputsButton()); + builder.widget( + new DrawableWidget().setDrawable(ModularUITextures.ICON_INFO) + .setPos(8, 69) + .setSize(16, 16)); + + } + protected ModularWindow createInputListWindow(final EntityPlayer player) { + final int WIDTH = 100; + final int HEIGHT = 60; + final int PARENT_WIDTH = getGUIWidth(); + final int PARENT_HEIGHT = getGUIHeight(); + final Pos2d[] slotPositions = new Pos2d[] { new Pos2d(23, 35), new Pos2d(41, 35), new Pos2d(59, 35), + new Pos2d(14, 17), new Pos2d(32, 17), new Pos2d(50, 17), new Pos2d(68, 17) }; + ModularWindow.Builder builder = ModularWindow.builder(WIDTH, HEIGHT); + builder.setBackground(GTUITextures.BACKGROUND_SINGLEBLOCK_DEFAULT); + builder.setGuiTint(getGUIColorization()); + builder.setDraggable(true); + builder.setPos( + (size, window) -> Alignment.Center.getAlignedPos(size, new Size(PARENT_WIDTH, PARENT_HEIGHT)) + .add(Alignment.TopLeft.getAlignedPos(new Size(PARENT_WIDTH, PARENT_HEIGHT), new Size(WIDTH, HEIGHT))) + .subtract(100, -47)); + + IFluidTanksHandler tanksHandler = new FluidTanksHandler(7, 128000); + for (int i = 0; i < 7; i++) { + if (i < inputPlasmas.size()) { + FluidStack plasma = inputPlasmas.get(i); + tanksHandler.setFluidInTank(i, plasma.getFluid(), plasma.amount); + } + builder.widget( + new DrawableWidget().setDrawable(ModularUITextures.FLUID_SLOT) + .setSize(18, 18) + .setPos(slotPositions[i])) + .widget( + new FluidSlotWidget(tanksHandler, i).setInteraction(false, false) + .setSize(18, 18) + .setPos(slotPositions[i])); + } + + builder.widget( + new TextWidget(translateToLocal("gt.blockmachines.multimachine.FOG.expectedinputs")) + .setDefaultColor(EnumChatFormatting.BLACK) + .setTextAlignment(Alignment.Center) + .setSize(100, 9) + .setPos(0, 6)); + + return builder.build(); + } + + private Widget createExpectedInputsButton() { + return new ButtonWidget().setOnClick((clickData, widget) -> { + if (!widget.isClient()) { + widget.getContext() + .openSyncedWindow(INPUT_LIST_WINDOW_ID); + } + }) + .setPlayClickSound(true) + .setSize(16, 16) + .setPos(8, 69); } protected ButtonWidget magmatterSwitch(IWidgetBuilder builder) { @@ -521,7 +599,7 @@ public String[] getInfoData() { + " s"); str.add( "Currently using: " + RED - + (getBaseMetaTileEntity().isActive() ? formatNumbers(EUt) : "0") + + (getBaseMetaTileEntity().isActive() ? formatNumbers(EUt * actualParallel) : "0") + RESET + " EU/t"); str.add(YELLOW + "Max Parallel: " + RESET + formatNumbers(getMaxParallel())); diff --git a/src/main/resources/assets/tectech/lang/en_US.lang b/src/main/resources/assets/tectech/lang/en_US.lang index c5aad0a44a1..1f6f06d9ff1 100644 --- a/src/main/resources/assets/tectech/lang/en_US.lang +++ b/src/main/resources/assets/tectech/lang/en_US.lang @@ -1034,6 +1034,7 @@ fog.button.materialrequirementsmet.tooltip=All materials supplied fog.button.materialrequirements.tooltip.clickhere=Click to open material insertion window fog.button.ejection.tooltip=Toggle Graviton Shard Ejection fog.button.formatting.tooltip=Toggle Number Formatting +fog.button.exoticinputs.tooltip=Click to display expected inputs achievement.gt.blockmachines.multimachine.em.forge_of_gods=Forge of the Gods @@ -1075,6 +1076,7 @@ gt.blockmachines.multimachine.FOG.milestonecomplete=Milestone Complete gt.blockmachines.multimachine.FOG.milestoneinfo=View Milestone Progress gt.blockmachines.multimachine.FOG.inversionactive=Inversion Active gt.blockmachines.multimachine.FOG.inversion=Inversion +gt.blockmachines.multimachine.FOG.expectedinputs=Expected Inputs gt.blockmachines.multimachine.FOG.inversioninfotext=Once all milestones of the Forge reach tier 7, inversion activates. This uncaps the maximum tier of all milestones and allows to scale infinitely. The scaling of each milestone changes from exponential to linear, but the granted graviton shard amount keeps increasing. The amount of progress needed for each subsequent milestone is as much as needed for the 7th tier of each milestone. The Composition milestone is once again an exception, as that continues to scale by 1 each tier, with it's own formula for calculating progress. Each module type is given a value, ranging from 1 for the Helioflare Power Forge to 5 for the Heliofusion Exoticizer in magmatter mode, then the amount of each module present is substracted by 1 and multiplied by its value. These values are added up and divided by 5, this is the final milestone tier on top of the base 7. gt.blockmachines.multimachine.FOG.powermilestone=Charge gt.blockmachines.multimachine.FOG.recipemilestone=Conversion From 3a768f6fd175129f66353446ccbbd8c2ca14ca86 Mon Sep 17 00:00:00 2001 From: GDCloud Date: Thu, 12 Sep 2024 03:00:35 +0200 Subject: [PATCH 44/57] switch specialvalue to metadata and add alternate molten -> plasma recipes --- .../gregtech/api/util/GTRecipeConstants.java | 6 + .../java/tectech/loader/recipe/Godforge.java | 261 ++++++++++++------ .../recipe/GodforgePlasmaFrontend.java | 7 +- 3 files changed, 189 insertions(+), 85 deletions(-) diff --git a/src/main/java/gregtech/api/util/GTRecipeConstants.java b/src/main/java/gregtech/api/util/GTRecipeConstants.java index 82a477756a6..e516d712560 100644 --- a/src/main/java/gregtech/api/util/GTRecipeConstants.java +++ b/src/main/java/gregtech/api/util/GTRecipeConstants.java @@ -124,6 +124,12 @@ public class GTRecipeConstants { public static final RecipeMetadataKey FOG_PLASMA_TIER = SimpleRecipeMetadataKey .create(Integer.class, "fog_plasma_tier"); + /** + * FOG Plasma multistep requirement. + */ + public static final RecipeMetadataKey FOG_PLASMA_MULTISTEP = SimpleRecipeMetadataKey + .create(Boolean.class, "fog_plasma_multistep"); + /** * DEFC Casing tier. */ diff --git a/src/main/java/tectech/loader/recipe/Godforge.java b/src/main/java/tectech/loader/recipe/Godforge.java index 0cddff53940..94e28f5ad49 100644 --- a/src/main/java/tectech/loader/recipe/Godforge.java +++ b/src/main/java/tectech/loader/recipe/Godforge.java @@ -6,6 +6,7 @@ import static gregtech.api.util.GTRecipeBuilder.SECONDS; import static gregtech.api.util.GTRecipeBuilder.TICKS; import static gregtech.api.util.GTRecipeConstants.FOG_EXOTIC_TIER; +import static gregtech.api.util.GTRecipeConstants.FOG_PLASMA_MULTISTEP; import static gregtech.api.util.GTRecipeConstants.FOG_PLASMA_TIER; import static tectech.recipe.TecTechRecipeMaps.godforgeExoticMatterRecipes; import static tectech.recipe.TecTechRecipeMaps.godforgePlasmaRecipes; @@ -17,7 +18,9 @@ import java.util.List; import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.oredict.OreDictionary; import goodgenerator.items.GGMaterial; import goodgenerator.util.ItemRefer; @@ -48,6 +51,20 @@ public class Godforge implements Runnable { public static final List magmatterSpaceFluidItemsForNEI = new ArrayList<>(); public static final List magmatterItemsForNEI = new ArrayList<>(); + private FluidStack[] convertToFluid(ItemStack[] items) { + List molten = new ArrayList<>(); + + for (ItemStack itemStack : items) { + String dict = OreDictionary.getOreName(OreDictionary.getOreIDs(itemStack)[0]); + // substring 4 because dust is 4 characters long and there is no other possible oreDict + String strippedOreDict = dict.substring(4); + molten.add(FluidRegistry.getFluidStack("molten." + strippedOreDict.toLowerCase(), 144)); + + } + + return molten.toArray(new FluidStack[0]); + } + @Override public void run() { // Solid to plasma recipes @@ -85,6 +102,9 @@ public void run() { MaterialsElements.getInstance().IODINE.getDust(1), MaterialsElements.getInstance().HAFNIUM.getDust(1), MaterialsElements.getInstance().CURIUM.getDust(1) }; + + FluidStack[] molten_t0_1step = convertToFluid(solids_t0_1step); + FluidStack[] solid_plasmas_t0_1step = { Materials.Aluminium.getPlasma(144), Materials.Iron.getPlasma(144), Materials.Calcium.getPlasma(144), Materials.Sulfur.getPlasma(144), Materials.Zinc.getPlasma(144), Materials.Niobium.getPlasma(144), Materials.Tin.getPlasma(144), @@ -124,139 +144,216 @@ public void run() { new FluidStack(MaterialsElements.getInstance().CURIUM.getPlasma(), 144) }; for (int i = 0; i < solids_t0_1step.length; i++) { - boolean multistep = false; GTValues.RA.stdBuilder() .itemInputs(solids_t0_1step[i]) .fluidOutputs(solid_plasmas_t0_1step[i]) .duration(10 * TICKS) .eut(TierEU.RECIPE_MAX) - .special(multistep) + .metadata(FOG_PLASMA_MULTISTEP, false) .metadata(FOG_PLASMA_TIER, 0) .noOptimize() .addTo(godforgePlasmaRecipes); + + if (molten_t0_1step[i] != null) { + GTValues.RA.stdBuilder() + .fluidInputs(molten_t0_1step[i]) + .fluidOutputs(solid_plasmas_t0_1step[i]) + .duration(10 * TICKS) + .eut(TierEU.RECIPE_MAX) + .metadata(FOG_PLASMA_MULTISTEP, false) + .metadata(FOG_PLASMA_TIER, 0) + .noOptimize() + .addTo(godforgePlasmaRecipes); + } } + } - // Multi-step - ItemStack[] solids_t0_xstep = { Materials.Force.getDust(1), Materials.Bismuth.getDust(1), - MaterialsElements.STANDALONE.ADVANCED_NITINOL.getDust(1), Materials.Boron.getDust(1), - MaterialsElements.STANDALONE.ASTRAL_TITANIUM.getDust(1), - MaterialsElements.STANDALONE.RUNITE.getDust(1), - MaterialsElements.STANDALONE.CELESTIAL_TUNGSTEN.getDust(1), Materials.Iridium.getDust(1), - Materials.Naquadah.getDust(1), Materials.Osmium.getDust(1), Materials.Platinum.getDust(1), - Materials.Plutonium.getDust(1), MaterialsElements.getInstance().CALIFORNIUM.getDust(1), - Materials.Chrome.getDust(1) }; - FluidStack[] solid_plasmas_t0_xstep = { - new FluidStack(MaterialsElements.STANDALONE.FORCE.getPlasma(), 144), - Materials.Bismuth.getPlasma(144), - new FluidStack(MaterialsElements.STANDALONE.ADVANCED_NITINOL.getPlasma(), 144), - Materials.Boron.getPlasma(144), - new FluidStack(MaterialsElements.STANDALONE.ASTRAL_TITANIUM.getPlasma(), 144), - new FluidStack(MaterialsElements.STANDALONE.RUNITE.getPlasma(), 144), - new FluidStack(MaterialsElements.STANDALONE.CELESTIAL_TUNGSTEN.getPlasma(), 144), - Materials.Iridium.getPlasma(144), Materials.Naquadah.getPlasma(144), - Materials.Osmium.getPlasma(144), Materials.Platinum.getPlasma(144), - Materials.Plutonium.getPlasma(144), - new FluidStack(MaterialsElements.getInstance().CALIFORNIUM.getPlasma(), 144), - Materials.Chrome.getPlasma(144), }; - - for (int i = 0; i < solids_t0_xstep.length; i++) { - boolean multistep = true; + // Multi-step + ItemStack[] solids_t0_xstep = { Materials.Force.getDust(1), Materials.Bismuth.getDust(1), + MaterialsElements.STANDALONE.ADVANCED_NITINOL.getDust(1), Materials.Boron.getDust(1), + MaterialsElements.STANDALONE.ASTRAL_TITANIUM.getDust(1), MaterialsElements.STANDALONE.RUNITE.getDust(1), + MaterialsElements.STANDALONE.CELESTIAL_TUNGSTEN.getDust(1), Materials.Iridium.getDust(1), + Materials.Naquadah.getDust(1), Materials.Osmium.getDust(1), Materials.Platinum.getDust(1), + Materials.Plutonium.getDust(1), MaterialsElements.getInstance().CALIFORNIUM.getDust(1), + Materials.Chrome.getDust(1) }; + + FluidStack[] molten_t0_xstep = convertToFluid(solids_t0_xstep); + + FluidStack[] solid_plasmas_t0_xstep = { new FluidStack(MaterialsElements.STANDALONE.FORCE.getPlasma(), 144), + Materials.Bismuth.getPlasma(144), + new FluidStack(MaterialsElements.STANDALONE.ADVANCED_NITINOL.getPlasma(), 144), + Materials.Boron.getPlasma(144), + new FluidStack(MaterialsElements.STANDALONE.ASTRAL_TITANIUM.getPlasma(), 144), + new FluidStack(MaterialsElements.STANDALONE.RUNITE.getPlasma(), 144), + new FluidStack(MaterialsElements.STANDALONE.CELESTIAL_TUNGSTEN.getPlasma(), 144), + Materials.Iridium.getPlasma(144), Materials.Naquadah.getPlasma(144), Materials.Osmium.getPlasma(144), + Materials.Platinum.getPlasma(144), Materials.Plutonium.getPlasma(144), + new FluidStack(MaterialsElements.getInstance().CALIFORNIUM.getPlasma(), 144), + Materials.Chrome.getPlasma(144), }; + + for (int i = 0; i < solids_t0_xstep.length; i++) { + GTValues.RA.stdBuilder() + .itemInputs(solids_t0_xstep[i]) + .fluidOutputs(solid_plasmas_t0_xstep[i]) + .duration(2 * SECONDS) + .eut(TierEU.RECIPE_MAX) + .metadata(FOG_PLASMA_MULTISTEP, true) + .metadata(FOG_PLASMA_TIER, 0) + .noOptimize() + .addTo(godforgePlasmaRecipes); + + if (molten_t0_xstep[i] != null) { GTValues.RA.stdBuilder() - .itemInputs(solids_t0_xstep[i]) + .fluidInputs(molten_t0_xstep[i]) .fluidOutputs(solid_plasmas_t0_xstep[i]) .duration(2 * SECONDS) .eut(TierEU.RECIPE_MAX) - .special(multistep) + .metadata(FOG_PLASMA_MULTISTEP, true) .metadata(FOG_PLASMA_TIER, 0) .noOptimize() .addTo(godforgePlasmaRecipes); } } - // Fusion tier 4-5 - { - // Single step - ItemStack[] solids_t1_1step = { Materials.Lead.getDust(1), Materials.Plutonium241.getDust(1), - Materials.Thorium.getDust(1) }; - FluidStack[] solid_plasmas_t1_1step = { Materials.Lead.getPlasma(144), - Materials.Plutonium241.getPlasma(144), Materials.Thorium.getPlasma(144) }; - - for (int i = 0; i < solids_t1_1step.length; i++) { - boolean multistep = false; + } + // Fusion tier 4-5 + { + // Single step + ItemStack[] solids_t1_1step = { Materials.Lead.getDust(1), Materials.Plutonium241.getDust(1), + Materials.Thorium.getDust(1) }; + + FluidStack[] molten_t1_1step = convertToFluid(solids_t1_1step); + + FluidStack[] solid_plasmas_t1_1step = { Materials.Lead.getPlasma(144), + Materials.Plutonium241.getPlasma(144), Materials.Thorium.getPlasma(144) }; + + for (int i = 0; i < solids_t1_1step.length; i++) { + GTValues.RA.stdBuilder() + .itemInputs(solids_t1_1step[i]) + .fluidOutputs(solid_plasmas_t1_1step[i]) + .duration(5 * SECONDS) + .eut(TierEU.RECIPE_MAX) + .metadata(FOG_PLASMA_MULTISTEP, false) + .metadata(FOG_PLASMA_TIER, 1) + .noOptimize() + .addTo(godforgePlasmaRecipes); + + if (molten_t1_1step[i] != null) { GTValues.RA.stdBuilder() - .itemInputs(solids_t1_1step[i]) + .fluidInputs(molten_t1_1step[i]) .fluidOutputs(solid_plasmas_t1_1step[i]) .duration(5 * SECONDS) .eut(TierEU.RECIPE_MAX) - .special(multistep) + .metadata(FOG_PLASMA_MULTISTEP, false) .metadata(FOG_PLASMA_TIER, 1) .noOptimize() .addTo(godforgePlasmaRecipes); } + } - // Multi-step - ItemStack[] solids_t1_xstep = { MaterialsElements.getInstance().NEPTUNIUM.getDust(1), - MaterialsElements.getInstance().FERMIUM.getDust(1) }; - FluidStack[] solid_plasmas_t1_xstep = { - new FluidStack(MaterialsElements.getInstance().NEPTUNIUM.getPlasma(), 144), - new FluidStack(MaterialsElements.getInstance().FERMIUM.getPlasma(), 144) }; + // Multi-step + ItemStack[] solids_t1_xstep = { MaterialsElements.getInstance().NEPTUNIUM.getDust(1), + MaterialsElements.getInstance().FERMIUM.getDust(1) }; - for (int i = 0; i < solids_t1_xstep.length; i++) { - boolean multistep = true; + FluidStack[] molten_t1_xstep = convertToFluid(solids_t1_xstep); + + FluidStack[] solid_plasmas_t1_xstep = { + new FluidStack(MaterialsElements.getInstance().NEPTUNIUM.getPlasma(), 144), + new FluidStack(MaterialsElements.getInstance().FERMIUM.getPlasma(), 144) }; + + for (int i = 0; i < solids_t1_xstep.length; i++) { + GTValues.RA.stdBuilder() + .itemInputs(solids_t1_xstep[i]) + .fluidOutputs(solid_plasmas_t1_xstep[i]) + .duration(7 * SECONDS) + .eut(TierEU.RECIPE_MAX) + .metadata(FOG_PLASMA_MULTISTEP, true) + .metadata(FOG_PLASMA_TIER, 1) + .noOptimize() + .addTo(godforgePlasmaRecipes); + + if (molten_t1_xstep[i] != null) { GTValues.RA.stdBuilder() - .itemInputs(solids_t1_xstep[i]) + .fluidInputs(molten_t1_xstep[i]) .fluidOutputs(solid_plasmas_t1_xstep[i]) .duration(7 * SECONDS) .eut(TierEU.RECIPE_MAX) - .special(multistep) + .metadata(FOG_PLASMA_MULTISTEP, true) .metadata(FOG_PLASMA_TIER, 1) .noOptimize() .addTo(godforgePlasmaRecipes); } } - // Exotic Plasmas - { - // Single step - ItemStack[] solids_t2_1step = { MaterialsElements.STANDALONE.RHUGNOR.getDust(1), - MaterialsElements.STANDALONE.DRAGON_METAL.getDust(1), - MaterialsElements.STANDALONE.CHRONOMATIC_GLASS.getDust(1), Materials.CosmicNeutronium.getDust(1), - Materials.Draconium.getDust(1), Materials.DraconiumAwakened.getDust(1), - Materials.Ichorium.getDust(1) }; - FluidStack[] solid_plasmas_t2_1step = { - new FluidStack(MaterialsElements.STANDALONE.RHUGNOR.getPlasma(), 144), - new FluidStack(MaterialsElements.STANDALONE.DRAGON_METAL.getPlasma(), 144), - new FluidStack(MaterialsElements.STANDALONE.CHRONOMATIC_GLASS.getPlasma(), 144), - Materials.CosmicNeutronium.getPlasma(144), Materials.Draconium.getPlasma(144), - Materials.DraconiumAwakened.getPlasma(144), Materials.Ichorium.getPlasma(144) }; - - for (int i = 0; i < solids_t2_1step.length; i++) { - boolean multistep = false; + } + // Exotic Plasmas + { + // Single step + ItemStack[] solids_t2_1step = { MaterialsElements.STANDALONE.RHUGNOR.getDust(1), + MaterialsElements.STANDALONE.DRAGON_METAL.getDust(1), + MaterialsElements.STANDALONE.CHRONOMATIC_GLASS.getDust(1), Materials.CosmicNeutronium.getDust(1), + Materials.Draconium.getDust(1), Materials.DraconiumAwakened.getDust(1), Materials.Ichorium.getDust(1) }; + + FluidStack[] molten_t2_1step = convertToFluid(solids_t2_1step); + + FluidStack[] solid_plasmas_t2_1step = { + new FluidStack(MaterialsElements.STANDALONE.RHUGNOR.getPlasma(), 144), + new FluidStack(MaterialsElements.STANDALONE.DRAGON_METAL.getPlasma(), 144), + new FluidStack(MaterialsElements.STANDALONE.CHRONOMATIC_GLASS.getPlasma(), 144), + Materials.CosmicNeutronium.getPlasma(144), Materials.Draconium.getPlasma(144), + Materials.DraconiumAwakened.getPlasma(144), Materials.Ichorium.getPlasma(144) }; + + for (int i = 0; i < solids_t2_1step.length; i++) { + GTValues.RA.stdBuilder() + .itemInputs(solids_t2_1step[i]) + .fluidOutputs(solid_plasmas_t2_1step[i]) + .duration(15 * SECONDS) + .eut(TierEU.RECIPE_MAX) + .metadata(FOG_PLASMA_MULTISTEP, false) + .metadata(FOG_PLASMA_TIER, 2) + .noOptimize() + .addTo(godforgePlasmaRecipes); + + if (molten_t2_1step[i] != null) { GTValues.RA.stdBuilder() - .itemInputs(solids_t2_1step[i]) + .fluidInputs(molten_t2_1step[i]) .fluidOutputs(solid_plasmas_t2_1step[i]) .duration(15 * SECONDS) .eut(TierEU.RECIPE_MAX) - .special(multistep) + .metadata(FOG_PLASMA_MULTISTEP, false) .metadata(FOG_PLASMA_TIER, 2) .noOptimize() .addTo(godforgePlasmaRecipes); } + } - // Multi-step - ItemStack[] solids_t2_xstep = { MaterialsElements.STANDALONE.HYPOGEN.getDust(1), - Materials.Tritanium.getDust(1), Materials.Flerovium.getDust(1), Materials.Neutronium.getDust(1), }; - FluidStack[] solid_plasmas_t2_xstep = { - new FluidStack(MaterialsElements.STANDALONE.HYPOGEN.getPlasma(), 144), - Materials.Tritanium.getPlasma(144), Materials.Flerovium.getPlasma(144), - Materials.Neutronium.getPlasma(144), }; - - for (int i = 0; i < solids_t2_xstep.length; i++) { - boolean multistep = true; + // Multi-step + ItemStack[] solids_t2_xstep = { MaterialsElements.STANDALONE.HYPOGEN.getDust(1), + Materials.Tritanium.getDust(1), Materials.Flerovium.getDust(1), Materials.Neutronium.getDust(1) }; + + FluidStack[] molten_t2_xstep = convertToFluid(solids_t2_xstep); + + FluidStack[] solid_plasmas_t2_xstep = { + new FluidStack(MaterialsElements.STANDALONE.HYPOGEN.getPlasma(), 144), + Materials.Tritanium.getPlasma(144), Materials.Flerovium.getPlasma(144), + Materials.Neutronium.getPlasma(144), }; + + for (int i = 0; i < solids_t2_xstep.length; i++) { + GTValues.RA.stdBuilder() + .itemInputs(solids_t2_xstep[i]) + .fluidOutputs(solid_plasmas_t2_xstep[i]) + .duration(25 * SECONDS) + .eut(TierEU.RECIPE_MAX) + .metadata(FOG_PLASMA_MULTISTEP, true) + .metadata(FOG_PLASMA_TIER, 2) + .noOptimize() + .addTo(godforgePlasmaRecipes); + + if (molten_t2_xstep[i] != null) { GTValues.RA.stdBuilder() - .itemInputs(solids_t2_xstep[i]) + .fluidInputs(molten_t2_xstep[i]) .fluidOutputs(solid_plasmas_t2_xstep[i]) .duration(25 * SECONDS) .eut(TierEU.RECIPE_MAX) - .special(multistep) + .metadata(FOG_PLASMA_MULTISTEP, true) .metadata(FOG_PLASMA_TIER, 2) .noOptimize() .addTo(godforgePlasmaRecipes); diff --git a/src/main/java/tectech/recipe/GodforgePlasmaFrontend.java b/src/main/java/tectech/recipe/GodforgePlasmaFrontend.java index 5dfc46b1cfb..f5297702b51 100644 --- a/src/main/java/tectech/recipe/GodforgePlasmaFrontend.java +++ b/src/main/java/tectech/recipe/GodforgePlasmaFrontend.java @@ -1,5 +1,7 @@ package tectech.recipe; +import static gregtech.api.util.GTRecipeConstants.FOG_PLASMA_MULTISTEP; +import static gregtech.api.util.GTRecipeConstants.FOG_PLASMA_TIER; import static gregtech.api.util.GTUtility.trans; import static net.minecraft.util.StatCollector.translateToLocal; @@ -52,11 +54,10 @@ 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")) { + if (recipeInfo.recipe.getMetadataOrDefault(FOG_PLASMA_MULTISTEP, false)) { multistep = "Yes"; } - String requiredUpgrade = switch (recipeInfo.recipe.mSpecialValue) { + String requiredUpgrade = switch (recipeInfo.recipe.getMetadataOrDefault(FOG_PLASMA_TIER, 0)) { case 1 -> "T4-T5"; case 2 -> "Exotic"; default -> "T1-T3"; From 772036b7e36f3cc42bc1f9c7949d586a22369ba9 Mon Sep 17 00:00:00 2001 From: GDCloud Date: Thu, 12 Sep 2024 19:44:32 +0200 Subject: [PATCH 45/57] make plasma module use recipe metadata --- .../multi/godforge_modules/MTEPlasmaModule.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTEPlasmaModule.java b/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTEPlasmaModule.java index 8d15d6e364a..e0c2e8965cd 100644 --- a/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTEPlasmaModule.java +++ b/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTEPlasmaModule.java @@ -1,6 +1,8 @@ package tectech.thing.metaTileEntity.multi.godforge_modules; import static gregtech.api.metatileentity.BaseTileEntity.TOOLTIP_DELAY; +import static gregtech.api.util.GTRecipeConstants.FOG_PLASMA_MULTISTEP; +import static gregtech.api.util.GTRecipeConstants.FOG_PLASMA_TIER; import static gregtech.api.util.GTUtility.formatNumbers; import static gregtech.common.misc.WirelessNetworkManager.addEUToGlobalEnergyMap; import static gregtech.common.misc.WirelessNetworkManager.getUserEU; @@ -11,7 +13,6 @@ import java.math.BigInteger; import java.util.ArrayList; -import java.util.Objects; import javax.annotation.Nonnull; @@ -79,8 +80,8 @@ protected CheckRecipeResult validateRecipe(@Nonnull GTRecipe recipe) { if (getUserEU(userUUID).compareTo(BigInteger.valueOf(wirelessEUt * recipe.mDuration)) < 0) { return CheckRecipeResultRegistry.insufficientPower(wirelessEUt * recipe.mDuration); } - if (recipe.mSpecialValue > getPlasmaTier() - || Objects.equals(recipe.mSpecialItems.toString(), "true") && !isMultiStepPlasmaCapable) { + if (recipe.getMetadataOrDefault(FOG_PLASMA_TIER, 0) > getPlasmaTier() + || (recipe.getMetadataOrDefault(FOG_PLASMA_MULTISTEP, false) && !isMultiStepPlasmaCapable)) { return SimpleCheckRecipeResult.ofFailure("missing_upgrades"); } return CheckRecipeResultRegistry.SUCCESSFUL; From bae3f9e2f9c0209ab9248b8fce518823fe19edb5 Mon Sep 17 00:00:00 2001 From: GDCloud Date: Thu, 12 Sep 2024 19:45:15 +0200 Subject: [PATCH 46/57] refactor exotic module processing logic a bit and add recipe reset button --- .../godforge_modules/MTEExoticModule.java | 181 +++++++++++++----- .../resources/assets/tectech/lang/en_US.lang | 3 + 2 files changed, 136 insertions(+), 48 deletions(-) diff --git a/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTEExoticModule.java b/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTEExoticModule.java index f6034958f72..ee8b5396ad2 100644 --- a/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTEExoticModule.java +++ b/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTEExoticModule.java @@ -37,6 +37,7 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +import com.google.common.collect.ImmutableList; import com.gtnewhorizons.modularui.api.ModularUITextures; import com.gtnewhorizons.modularui.api.drawable.IDrawable; import com.gtnewhorizons.modularui.api.drawable.UITexture; @@ -71,6 +72,7 @@ import gregtech.api.util.MultiblockTooltipBuilder; import gregtech.api.util.OverclockCalculator; import tectech.recipe.TecTechRecipeMaps; +import tectech.thing.gui.TecTechUITextures; import tectech.util.CommonValues; import tectech.util.GodforgeMath; @@ -78,9 +80,11 @@ public class MTEExoticModule extends MTEBaseModule { private int numberOfFluids = 0; private int numberOfItems = 0; + private long ticker = 0; private long EUt = 0; private long actualParallel = 0; private boolean recipeInProgress = false; + private boolean recipeRegenerated = false; private boolean magmatterMode = false; private FluidStack[] randomizedFluidInput = new FluidStack[] {}; private ItemStack[] randomizedItemInput = new ItemStack[] {}; @@ -115,55 +119,12 @@ protected ProcessingLogic createProcessingLogic() { @Override protected Stream findRecipeMatches(@Nullable RecipeMap map) { if (!recipeInProgress) { - actualParallel = getMaxParallel(); - FluidStack outputFluid = MaterialsUEVplus.QuarkGluonPlasma.getFluid(1000 * actualParallel); - tempRecipeMap.getBackend() - .clearRecipes(); + if (magmatterMode) { - randomizedItemInput = getRandomItemInputs(exoticModuleMagmatterItemMap, 1); - numberOfItems = 1; - numberOfFluids = 2; - int timeAmount = GodforgeMath.getRandomIntInRange(1, 50); - int spaceAmount = GodforgeMath.getRandomIntInRange(51, 100); - randomizedFluidInput = new FluidStack[] { MaterialsUEVplus.Time.getMolten(timeAmount * 1000L), - MaterialsUEVplus.Space.getMolten(spaceAmount * 1000L) }; - inputPlasmas = new ArrayList<>( - Arrays.asList(convertItemToPlasma(randomizedItemInput, spaceAmount - timeAmount))); - inputPlasmas.add(MaterialsUEVplus.Time.getMolten(timeAmount)); - inputPlasmas.add(MaterialsUEVplus.Space.getMolten(spaceAmount)); - outputFluid = MaterialsUEVplus.MagMatter.getMolten(576 * actualParallel); + plasmaRecipe = generateMagmatterRecipe(); } else { - numberOfFluids = GodforgeMath.getRandomIntInRange(0, NUMBER_OF_INPUTS); - numberOfItems = NUMBER_OF_INPUTS - numberOfFluids; - randomizedFluidInput = getRandomFluidInputs(exoticModulePlasmaFluidMap, numberOfFluids); - randomizedItemInput = getRandomItemInputs(exoticModulePlasmaItemMap, numberOfItems); - - if (numberOfFluids != 0) { - for (FluidStack fluidStack : randomizedFluidInput) { - fluidStack.amount = 1000 * GodforgeMath.getRandomIntInRange(1, 64); - } - } - - if (numberOfItems != 0) { - for (ItemStack itemStack : randomizedItemInput) { - itemStack.stackSize = 9 * GodforgeMath.getRandomIntInRange(1, 7); - } - } - - inputPlasmas = new ArrayList<>(Arrays.asList(convertItemToPlasma(randomizedItemInput, 1))); - inputPlasmas.addAll(Arrays.asList(convertFluidToPlasma(randomizedFluidInput, 1))); + plasmaRecipe = generateQuarkGluonRecipe(); } - plasmaRecipe = new GTRecipe( - false, - null, - null, - null, - null, - inputPlasmas.toArray(new FluidStack[0]), - new FluidStack[] { outputFluid }, - 10 * SECONDS, - (int) TierEU.RECIPE_MAX, - 0); tempRecipeMap.add(plasmaRecipe); } @@ -174,7 +135,7 @@ protected Stream findRecipeMatches(@Nullable RecipeMap map) { @NotNull @Override protected CheckRecipeResult validateRecipe(@Nonnull GTRecipe recipe) { - if (!recipeInProgress) { + if (!recipeInProgress || recipeRegenerated) { powerForRecipe = BigInteger.valueOf(getProcessingVoltage()) .multiply(BigInteger.valueOf(recipe.mDuration * actualParallel)); if (getUserEU(userUUID).compareTo(powerForRecipe) < 0) { @@ -199,6 +160,7 @@ protected CheckRecipeResult validateRecipe(@Nonnull GTRecipe recipe) { } recipeInProgress = true; + recipeRegenerated = false; } if (new HashSet<>(Arrays.asList(inputFluids)).containsAll(inputPlasmas)) { return CheckRecipeResultRegistry.SUCCESSFUL; @@ -250,6 +212,72 @@ public RecipeMap getRecipeMap() { return TecTechRecipeMaps.godforgeExoticMatterRecipes; } + private GTRecipe generateQuarkGluonRecipe() { + actualParallel = getMaxParallel(); + tempRecipeMap.getBackend() + .clearRecipes(); + numberOfFluids = GodforgeMath.getRandomIntInRange(0, NUMBER_OF_INPUTS); + numberOfItems = NUMBER_OF_INPUTS - numberOfFluids; + randomizedFluidInput = getRandomFluidInputs(exoticModulePlasmaFluidMap, numberOfFluids); + randomizedItemInput = getRandomItemInputs(exoticModulePlasmaItemMap, numberOfItems); + + if (numberOfFluids != 0) { + for (FluidStack fluidStack : randomizedFluidInput) { + fluidStack.amount = 1000 * GodforgeMath.getRandomIntInRange(1, 64); + } + } + + if (numberOfItems != 0) { + for (ItemStack itemStack : randomizedItemInput) { + itemStack.stackSize = 9 * GodforgeMath.getRandomIntInRange(1, 7); + } + } + + inputPlasmas = new ArrayList<>(Arrays.asList(convertItemToPlasma(randomizedItemInput, 1))); + inputPlasmas.addAll(Arrays.asList(convertFluidToPlasma(randomizedFluidInput, 1))); + + return new GTRecipe( + false, + null, + null, + null, + null, + inputPlasmas.toArray(new FluidStack[0]), + new FluidStack[] { MaterialsUEVplus.QuarkGluonPlasma.getFluid(1000 * actualParallel) }, + 10 * SECONDS, + (int) TierEU.RECIPE_MAX, + 0); + } + + private GTRecipe generateMagmatterRecipe() { + actualParallel = getMaxParallel(); + tempRecipeMap.getBackend() + .clearRecipes(); + randomizedItemInput = getRandomItemInputs(exoticModuleMagmatterItemMap, 1); + numberOfItems = 1; + numberOfFluids = 2; + int timeAmount = GodforgeMath.getRandomIntInRange(1, 50); + int spaceAmount = GodforgeMath.getRandomIntInRange(51, 100); + randomizedFluidInput = new FluidStack[] { MaterialsUEVplus.Time.getMolten(timeAmount * 1000L), + MaterialsUEVplus.Space.getMolten(spaceAmount * 1000L) }; + inputPlasmas = new ArrayList<>( + Arrays.asList(convertItemToPlasma(randomizedItemInput, spaceAmount - timeAmount))); + inputPlasmas.add(MaterialsUEVplus.Time.getMolten(timeAmount)); + inputPlasmas.add(MaterialsUEVplus.Space.getMolten(spaceAmount)); + + return new GTRecipe( + false, + null, + null, + null, + null, + inputPlasmas.toArray(new FluidStack[0]), + new FluidStack[] { MaterialsUEVplus.MagMatter.getMolten(576 * actualParallel) }, + 10 * SECONDS, + (int) TierEU.RECIPE_MAX, + 0); + } + private FluidStack[] getRandomFluidInputs(HashMap fluidMap, int numberOfFluids) { int cumulativeWeight = 0; @@ -427,6 +455,12 @@ public void loadNBTData(final NBTTagCompound NBT) { super.loadNBTData(NBT); } + @Override + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + super.onPostTick(aBaseMetaTileEntity, aTick); + ticker++; + } + @Override public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) { builder.widget( @@ -474,7 +508,11 @@ protected ModularWindow createInputListWindow(final EntityPlayer player) { .widget( new FluidSlotWidget(tanksHandler, i).setInteraction(false, false) .setSize(18, 18) - .setPos(slotPositions[i])); + .setPos(slotPositions[i]) + .attachSyncer( + new FakeSyncWidget.BooleanSyncer(() -> recipeInProgress, val -> recipeInProgress = val), + builder, + (widget, val) -> widget.checkNeedsRebuild())); } builder.widget( @@ -484,6 +522,41 @@ protected ModularWindow createInputListWindow(final EntityPlayer player) { .setSize(100, 9) .setPos(0, 6)); + builder.widget(new ButtonWidget().setOnClick((clickData, widget) -> { + if (!widget.isClient() && ticker > 1200) { + + if (magmatterMode) { + plasmaRecipe = generateMagmatterRecipe(); + } else { + plasmaRecipe = generateQuarkGluonRecipe(); + } + recipeRegenerated = true; + tempRecipeMap.add(plasmaRecipe); + + for (int i = 0; i < 7; i++) { + if (i < inputPlasmas.size()) { + FluidStack plasma = inputPlasmas.get(i); + tanksHandler.setFluidInTank(i, plasma.getFluid(), plasma.amount); + } + } + ticker = 0; + widget.getContext() + .closeWindow(INPUT_LIST_WINDOW_ID); + widget.getContext() + .openSyncedWindow(INPUT_LIST_WINDOW_ID); + } + }) + .setPlayClickSound(true) + .setBackground(TecTechUITextures.OVERLAY_CYCLIC_BLUE) + .dynamicTooltip(this::refreshTooltip) + .setTooltipShowUpDelay(TOOLTIP_DELAY) + .setSize(16, 16) + .setPos(5, 37) + .attachSyncer( + new FakeSyncWidget.LongSyncer(() -> ticker, val -> ticker = val), + builder, + (widget, val) -> widget.notifyTooltipChange())); + return builder.build(); } @@ -542,6 +615,18 @@ protected ButtonWidget magmatterSwitch(IWidgetBuilder builder) { return (ButtonWidget) button; } + private List refreshTooltip() { + if (ticker > 1200) { + return ImmutableList.of(translateToLocal("fog.button.reciperefresh.tooltip")); + } + + return ImmutableList.of( + translateToLocal("fog.button.refreshtimer.tooltip") + " " + + (int) Math.ceil((1200 - ticker) / 20d) + + " " + + translateToLocal("fog.button.seconds")); + } + public boolean isMagmatterModeOn() { return magmatterMode; } diff --git a/src/main/resources/assets/tectech/lang/en_US.lang b/src/main/resources/assets/tectech/lang/en_US.lang index f0b4988f41d..902f8e9c1f9 100644 --- a/src/main/resources/assets/tectech/lang/en_US.lang +++ b/src/main/resources/assets/tectech/lang/en_US.lang @@ -1036,6 +1036,9 @@ fog.button.materialrequirements.tooltip.clickhere=Click to open material inserti fog.button.ejection.tooltip=Toggle Graviton Shard Ejection fog.button.formatting.tooltip=Toggle Number Formatting fog.button.exoticinputs.tooltip=Click to display expected inputs +fog.button.reciperefresh.tooltip=Click to reset recipe +fog.button.refreshtimer.tooltip=Reset ready in +fog.button.seconds=Seconds achievement.gt.blockmachines.multimachine.em.forge_of_gods=Forge of the Gods From 5ef9d0bc75d3c5cbbd592abc802b764f054f0d28 Mon Sep 17 00:00:00 2001 From: Maya <10861407+serenibyss@users.noreply.github.com> Date: Fri, 13 Sep 2024 08:34:58 -0500 Subject: [PATCH 47/57] Rewrite Helioflux Module, add NEI support (#3174) --- src/main/java/bartworks/MainMod.java | 4 + .../java/tectech/loader/recipe/Godforge.java | 83 +++++++++++++++++ .../tectech/recipe/TecTechRecipeMaps.java | 10 +++ .../godforge_modules/MTEMoltenModule.java | 88 ++----------------- .../resources/assets/tectech/lang/en_US.lang | 1 + 5 files changed, 105 insertions(+), 81 deletions(-) diff --git a/src/main/java/bartworks/MainMod.java b/src/main/java/bartworks/MainMod.java index 7356fa9cc84..92ddb4e78dc 100644 --- a/src/main/java/bartworks/MainMod.java +++ b/src/main/java/bartworks/MainMod.java @@ -74,6 +74,7 @@ import gregtech.api.enums.Mods; import gregtech.api.recipe.RecipeMap; import gregtech.api.recipe.check.CheckRecipeResultRegistry; +import tectech.loader.recipe.Godforge; @Mod(modid = MainMod.MOD_ID, name = MainMod.NAME, version = GT_Version.VERSION, dependencies = """ required-after:IC2;\ @@ -210,5 +211,8 @@ public static void runOnPlayerJoined(boolean classicMode, boolean disableExtraGa .forEach( map -> map.getBackend() .reInit()); + + // because the above code runs so late that I couldn't find anywhere else to call this + Godforge.initMoltenModuleRecipes(); } } diff --git a/src/main/java/tectech/loader/recipe/Godforge.java b/src/main/java/tectech/loader/recipe/Godforge.java index daf2c62644c..d64b66917ec 100644 --- a/src/main/java/tectech/loader/recipe/Godforge.java +++ b/src/main/java/tectech/loader/recipe/Godforge.java @@ -3,6 +3,8 @@ import static gregtech.api.enums.Mods.EternalSingularity; import static gregtech.api.enums.Mods.GalaxySpace; import static gregtech.api.util.GTModHandler.getModItem; +import static gregtech.api.util.GTRecipeBuilder.BUCKETS; +import static gregtech.api.util.GTRecipeBuilder.INGOTS; import static gregtech.api.util.GTRecipeBuilder.SECONDS; import static gregtech.api.util.GTRecipeBuilder.TICKS; import static gregtech.api.util.GTRecipeConstants.FOG_EXOTIC_TIER; @@ -30,11 +32,18 @@ import gregtech.api.enums.MaterialsUEVplus; import gregtech.api.enums.OrePrefixes; import gregtech.api.enums.TierEU; +import gregtech.api.objects.ItemData; +import gregtech.api.recipe.RecipeMaps; import gregtech.api.util.GTOreDictUnificator; +import gregtech.api.util.GTRecipe; +import gregtech.api.util.GTRecipeBuilder; import gregtech.api.util.GTUtility; import gtPlusPlus.core.material.MaterialsAlloy; import gtPlusPlus.core.material.MaterialsElements; import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import it.unimi.dsi.fastutil.ints.IntArrayList; +import it.unimi.dsi.fastutil.ints.IntList; +import tectech.recipe.TecTechRecipeMaps; import tectech.thing.CustomItemList; public class Godforge implements Runnable { @@ -736,4 +745,78 @@ public void run() { } } + + public static void initMoltenModuleRecipes() { + for (GTRecipe recipe : RecipeMaps.blastFurnaceRecipes.getAllRecipes()) { + List itemOutputs = new ArrayList<>(1); + List fluidOutputs = new ArrayList<>(2); + + int[] originalChances = recipe.mChances; + IntList newChances = new IntArrayList(); + for (int i = 0; i < recipe.mOutputs.length; i++) { + ItemStack stack = recipe.getOutput(i); + if (stack == null) continue; + FluidStack potentialFluid = convertToMolten(stack); + if (potentialFluid != null) { + potentialFluid.amount *= stack.stackSize; + fluidOutputs.add(potentialFluid); + } else { + itemOutputs.add(stack); + if (originalChances != null) { + int chance = 10000; + if (originalChances.length > i) { + chance = originalChances[i]; + } + newChances.add(chance); + } + } + } + + fluidOutputs.addAll(Arrays.asList(recipe.mFluidOutputs)); + + GTRecipeBuilder builder = GTValues.RA.stdBuilder() + .noOptimize() + .itemOutputs(itemOutputs.toArray(new ItemStack[0])) + .fluidOutputs(fluidOutputs.toArray(new FluidStack[0])) + .duration(recipe.mDuration) + .eut(recipe.mEUt) + .specialValue(recipe.mSpecialValue); + + if (recipe.mInputs != null) builder.itemInputs(recipe.mInputs); + if (recipe.mFluidInputs != null) builder.fluidInputs(recipe.mFluidInputs); + if (!newChances.isEmpty()) builder.outputChances(newChances.toIntArray()); + + builder.addTo(TecTechRecipeMaps.godforgeMoltenRecipes); + } + } + + private static FluidStack convertToMolten(ItemStack stack) { + // if this is null it has to be a gt++ material + ItemData data = GTOreDictUnificator.getAssociation(stack); + Materials mat = data == null ? null : data.mMaterial.mMaterial; + if (mat != null) { + if (mat.mStandardMoltenFluid != null) { + return mat.getMolten(INGOTS * data.mMaterial.mAmount / GTValues.M); + } else if (mat.mFluid != null) { + return mat.getFluid(BUCKETS); + } + } + int[] oreIDs = OreDictionary.getOreIDs(stack); + if (oreIDs.length == 0) { + return null; + } + String dict = OreDictionary.getOreName(oreIDs[0]); + + // Check various oredicts + String strippedOreDict = null; + if (dict.startsWith("ingotHot")) { + strippedOreDict = dict.substring(8); + } else if (dict.startsWith("dustRoasted") && !dict.contains("Cobalt")) { + strippedOreDict = dict.substring(11); + } + if (strippedOreDict != null) { + return FluidRegistry.getFluidStack("molten." + strippedOreDict.toLowerCase(), INGOTS); + } + return null; + } } diff --git a/src/main/java/tectech/recipe/TecTechRecipeMaps.java b/src/main/java/tectech/recipe/TecTechRecipeMaps.java index b1c3608f459..d4908df5b7f 100644 --- a/src/main/java/tectech/recipe/TecTechRecipeMaps.java +++ b/src/main/java/tectech/recipe/TecTechRecipeMaps.java @@ -10,6 +10,7 @@ import gregtech.api.recipe.RecipeMapBackend; import gregtech.api.recipe.RecipeMapBuilder; import gregtech.api.util.GTRecipe; +import gregtech.nei.formatter.HeatingCoilSpecialValueFormatter; import tectech.thing.CustomItemList; import tectech.thing.gui.TecTechUITextures; @@ -74,5 +75,14 @@ public static void init() {} .neiTransferRect(78, 33, 20, 20) .frontend(GodforgeExoticFrontend::new) .build(); + public static final RecipeMap godforgeMoltenRecipes = RecipeMapBuilder.of("gt.recipe.fog_molten") + .maxIO(6, 6, 1, 2) + .minInputs(1, 0) + .progressBar(TecTechUITextures.PROGRESSBAR_GODFORGE_PLASMA, ProgressBar.Direction.RIGHT) + .neiSpecialInfoFormatter(HeatingCoilSpecialValueFormatter.INSTANCE) + .logo(TecTechUITextures.PICTURE_GODFORGE_LOGO) + .logoSize(18, 18) + .logoPos(151, 63) + .build(); } diff --git a/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTEMoltenModule.java b/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTEMoltenModule.java index 22ca7475580..e9907a86265 100644 --- a/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTEMoltenModule.java +++ b/src/main/java/tectech/thing/metaTileEntity/multi/godforge_modules/MTEMoltenModule.java @@ -1,11 +1,6 @@ package tectech.thing.metaTileEntity.multi.godforge_modules; -import static gregtech.api.util.GTOreDictUnificator.getAssociation; -import static gregtech.api.util.GTRecipeBuilder.BUCKETS; -import static gregtech.api.util.GTRecipeBuilder.INGOTS; import static gregtech.api.util.GTUtility.formatNumbers; -import static gregtech.api.util.ParallelHelper.addFluidsLong; -import static gregtech.api.util.ParallelHelper.addItemsLong; import static gregtech.common.misc.WirelessNetworkManager.addEUToGlobalEnergyMap; import static gregtech.common.misc.WirelessNetworkManager.getUserEU; import static net.minecraft.util.EnumChatFormatting.GREEN; @@ -18,25 +13,20 @@ import javax.annotation.Nonnull; -import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.oredict.OreDictionary; import org.jetbrains.annotations.NotNull; -import gregtech.api.enums.Materials; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.logic.ProcessingLogic; -import gregtech.api.objects.ItemData; +import gregtech.api.recipe.RecipeMap; import gregtech.api.recipe.check.CheckRecipeResult; import gregtech.api.recipe.check.CheckRecipeResultRegistry; import gregtech.api.util.GTRecipe; import gregtech.api.util.MultiblockTooltipBuilder; import gregtech.api.util.OverclockCalculator; -import gregtech.api.util.ParallelHelper; +import tectech.recipe.TecTechRecipeMaps; import tectech.util.CommonValues; public class MTEMoltenModule extends MTEBaseModule { @@ -63,12 +53,9 @@ public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { protected ProcessingLogic createProcessingLogic() { return new ProcessingLogic() { - private FluidStack[] meltableItems; - @NotNull @Override protected CheckRecipeResult validateRecipe(@Nonnull GTRecipe recipe) { - if (recipe.mSpecialValue > getHeat()) { return CheckRecipeResultRegistry.insufficientHeat(recipe.mSpecialValue); } @@ -76,31 +63,6 @@ protected CheckRecipeResult validateRecipe(@Nonnull GTRecipe recipe) { if (getUserEU(userUUID).compareTo(BigInteger.valueOf(wirelessEUt * recipe.mDuration)) < 0) { return CheckRecipeResultRegistry.insufficientPower(wirelessEUt * recipe.mDuration); } - - meltableItems = new FluidStack[recipe.mOutputs.length]; - for (int i = 0; i < recipe.mOutputs.length; i++) { - ItemStack item = recipe.getOutput(i); - if (item == null) { - continue; - } - // if this is null it has to be a gt++ material - ItemData data = getAssociation(item); - Materials mat = data == null ? null : data.mMaterial.mMaterial; - if (mat != null) { - if (mat.mStandardMoltenFluid != null) { - meltableItems[i] = mat.getMolten(INGOTS); - } else if (mat.mFluid != null) { - meltableItems[i] = mat.getFluid(BUCKETS); - } - } else { - String dict = OreDictionary.getOreName(OreDictionary.getOreIDs(item)[0]); - // substring 8 because ingotHot is 8 characters long - String strippedOreDict = dict.substring(8); - meltableItems[i] = FluidRegistry - .getFluidStack("molten." + strippedOreDict.toLowerCase(), INGOTS); - } - } - return CheckRecipeResultRegistry.SUCCESSFUL; } @@ -132,47 +94,6 @@ protected CheckRecipeResult onRecipeStart(@Nonnull GTRecipe recipe) { setCalculatedEut(0); return CheckRecipeResultRegistry.SUCCESSFUL; } - - @Nonnull - @Override - protected ParallelHelper createParallelHelper(@Nonnull GTRecipe recipe) { - return super.createParallelHelper(recipe).setCustomItemOutputCalculation(currentParallel -> { - ArrayList outputItems = new ArrayList<>(); - for (int i = 0; i < recipe.mOutputs.length; i++) { - ItemStack item = recipe.getOutput(i); - if (item == null || meltableItems[i] != null) { - continue; - } - ItemStack itemToAdd = item.copy(); - addItemsLong(outputItems, itemToAdd, (long) item.stackSize * currentParallel); - } - return outputItems.toArray(new ItemStack[0]); - }) - .setCustomFluidOutputCalculation(currentParallel -> { - ArrayList fluids = new ArrayList<>(); - - for (int i = 0; i < recipe.mOutputs.length; i++) { - FluidStack fluid = meltableItems[i]; - if (fluid == null) { - continue; - } - FluidStack fluidToAdd = fluid.copy(); - long fluidAmount = (long) fluidToAdd.amount * recipe.mOutputs[i].stackSize - * currentParallel; - addFluidsLong(fluids, fluidToAdd, fluidAmount); - } - - for (int i = 0; i < recipe.mFluidOutputs.length; i++) { - FluidStack fluid = recipe.getFluidOutput(i); - if (fluid == null) { - continue; - } - FluidStack fluidToAdd = fluid.copy(); - addFluidsLong(fluids, fluidToAdd, (long) fluidToAdd.amount * currentParallel); - } - return fluids.toArray(new FluidStack[0]); - }); - } }; } @@ -186,6 +107,11 @@ protected void setProcessingLogicPower(ProcessingLogic logic) { logic.setEuModifier(getEnergyDiscount()); } + @Override + public RecipeMap getRecipeMap() { + return TecTechRecipeMaps.godforgeMoltenRecipes; + } + @Override public String[] getInfoData() { ArrayList str = new ArrayList<>(); diff --git a/src/main/resources/assets/tectech/lang/en_US.lang b/src/main/resources/assets/tectech/lang/en_US.lang index 223953382b8..35379deff06 100644 --- a/src/main/resources/assets/tectech/lang/en_US.lang +++ b/src/main/resources/assets/tectech/lang/en_US.lang @@ -1254,6 +1254,7 @@ gt.recipe.eyeofharmony=Eye of Harmony gt.recipe.researchStation=Research Station gt.recipe.fog_plasma=Heliothermal Plasma Fabricator gt.recipe.fog_exotic=Heliofusion Exoticizer +gt.recipe.fog_molten=Helioflux Melting Core # NEI From ffd398e144e2c12c612b94b848e0972f7f0534d2 Mon Sep 17 00:00:00 2001 From: GDCloud Date: Fri, 13 Sep 2024 15:52:22 +0200 Subject: [PATCH 48/57] fix merge conflicts --- src/main/java/tectech/loader/TecTechConfig.java | 1 + .../java/tectech/loader/recipe/ResearchStationAssemblyLine.java | 1 - src/main/java/tectech/loader/thing/MachineLoader.java | 1 + src/main/java/tectech/proxy/ClientProxy.java | 1 - src/main/java/tectech/thing/block/BlockForgeOfGods.java | 2 -- 5 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/java/tectech/loader/TecTechConfig.java b/src/main/java/tectech/loader/TecTechConfig.java index c33a838490b..9c9425a9c99 100644 --- a/src/main/java/tectech/loader/TecTechConfig.java +++ b/src/main/java/tectech/loader/TecTechConfig.java @@ -85,6 +85,7 @@ protected void Init() { .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"); + BOOM_ENABLE = _mainConfig.getBoolean( "BoomEnable", "features", diff --git a/src/main/java/tectech/loader/recipe/ResearchStationAssemblyLine.java b/src/main/java/tectech/loader/recipe/ResearchStationAssemblyLine.java index 4ca043fd06e..a1c90752390 100644 --- a/src/main/java/tectech/loader/recipe/ResearchStationAssemblyLine.java +++ b/src/main/java/tectech/loader/recipe/ResearchStationAssemblyLine.java @@ -2986,7 +2986,6 @@ private void addEOHRecipes() { } private void addGodforgeRecipes() { - if (EternalSingularity.isModLoaded()) { // Controller TTRecipeAdder.addResearchableAssemblylineRecipe( diff --git a/src/main/java/tectech/loader/thing/MachineLoader.java b/src/main/java/tectech/loader/thing/MachineLoader.java index d7f148c1cd6..36b8b03c12a 100644 --- a/src/main/java/tectech/loader/thing/MachineLoader.java +++ b/src/main/java/tectech/loader/thing/MachineLoader.java @@ -2228,6 +2228,7 @@ public void run() { .set(new MTEEnergyInfuser(EnergyInfuser.ID, "multimachine.em.infuser", "Energy Infuser").getStackForm(1)); Machine_Multi_EyeOfHarmony.set( new MTEEyeOfHarmony(EyeofHarmony.ID, "multimachine.em.eye_of_harmony", "Eye of Harmony").getStackForm(1L)); + Machine_Multi_ForgeOfGods.set( new MTEForgeOfGods(ForgeoftheGods.ID, "multimachine.em.forge_of_gods", "Forge of the Gods") .getStackForm(1L)); diff --git a/src/main/java/tectech/proxy/ClientProxy.java b/src/main/java/tectech/proxy/ClientProxy.java index 0abb6ca1d7a..4d08681720d 100644 --- a/src/main/java/tectech/proxy/ClientProxy.java +++ b/src/main/java/tectech/proxy/ClientProxy.java @@ -50,7 +50,6 @@ public void registerRenderInfo() { MinecraftForgeClient .registerItemRenderer(Item.getItemFromBlock(forgeOfGodsRenderBlock), new ItemRenderForgeOfGods()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityForgeOfGods.class, new RenderForgeOfGods()); - } @Override diff --git a/src/main/java/tectech/thing/block/BlockForgeOfGods.java b/src/main/java/tectech/thing/block/BlockForgeOfGods.java index 70cda8fb104..3667ebfd1d9 100644 --- a/src/main/java/tectech/thing/block/BlockForgeOfGods.java +++ b/src/main/java/tectech/thing/block/BlockForgeOfGods.java @@ -23,9 +23,7 @@ public BlockForgeOfGods() { this.setCreativeTab(TecTech.creativeTabTecTech); this.setBlockName("Forge of the Gods Renderer"); this.setLightLevel(100.0f); - registerOther(this); - } @Override From 12afb66dc08328d200b800f99bc64f4030ee6b3d Mon Sep 17 00:00:00 2001 From: GDCloud Date: Fri, 13 Sep 2024 19:08:06 +0200 Subject: [PATCH 49/57] add contributors window --- .../tectech/thing/gui/TecTechUITextures.java | 3 + .../metaTileEntity/multi/MTEForgeOfGods.java | 145 ++++++++++++++++++ .../resources/assets/tectech/lang/en_US.lang | 16 ++ .../textures/gui/background/rainbow_glow.png | Bin 0 -> 28921 bytes .../textures/gui/overlay_button/heart.png | Bin 0 -> 531 bytes .../tectech/textures/gui/picture/thanks.png | Bin 0 -> 2914 bytes 6 files changed, 164 insertions(+) create mode 100644 src/main/resources/assets/tectech/textures/gui/background/rainbow_glow.png create mode 100644 src/main/resources/assets/tectech/textures/gui/overlay_button/heart.png create mode 100644 src/main/resources/assets/tectech/textures/gui/picture/thanks.png diff --git a/src/main/java/tectech/thing/gui/TecTechUITextures.java b/src/main/java/tectech/thing/gui/TecTechUITextures.java index d4bc73f8e18..40116af39f9 100644 --- a/src/main/java/tectech/thing/gui/TecTechUITextures.java +++ b/src/main/java/tectech/thing/gui/TecTechUITextures.java @@ -23,6 +23,7 @@ public class TecTechUITextures { public static final UITexture BACKGROUND_GLOW_BLUE = UITexture.fullImage(MODID, "gui/background/blue_glow"); public static final UITexture BACKGROUND_GLOW_GREEN = UITexture.fullImage(MODID, "gui/background/green_glow"); public static final UITexture BACKGROUND_GLOW_WHITE = UITexture.fullImage(MODID, "gui/background/white_glow"); + public static final UITexture BACKGROUND_GLOW_RAINBOW = UITexture.fullImage(MODID, "gui/background/rainbow_glow"); public static final UITexture BACKGROUND_SPACE = UITexture.fullImage(MODID, "gui/background/space"); public static final UITexture BUTTON_STANDARD_16x16 = UITexture.fullImage(MODID, "gui/button/standard_16x16"); @@ -82,6 +83,7 @@ public class TecTechUITextures { public static final UITexture OVERLAY_BUTTON_BATTERY_OFF = UITexture .fullImage(MODID, "gui/overlay_button/battery_off"); public static final UITexture OVERLAY_BUTTON_FLAG = UITexture.fullImage(MODID, "gui/overlay_button/flag"); + public static final UITexture OVERLAY_BUTTON_HEART = UITexture.fullImage(MODID, "gui/overlay_button/heart"); public static final UITexture OVERLAY_CYCLIC_BLUE = UITexture.fullImage(MODID, "gui/overlay_button/cyclic_blue"); public static final UITexture OVERLAY_EJECTION_LOCKED = UITexture .fullImage(MODID, "gui/overlay_button/eject_disabled"); @@ -176,6 +178,7 @@ public class TecTechUITextures { .fullImage(MODID, "gui/picture/milestone_catalyst"); public static final UITexture PICTURE_GODFORGE_MILESTONE_COMPOSITION = UITexture .fullImage(MODID, "gui/picture/milestone_composition"); + public static final UITexture PICTURE_GODFORGE_THANKS = UITexture.fullImage(MODID, "gui/picture/thanks"); public static final UITexture PICTURE_GODFORGE_MILESTONE_CHARGE_GLOW = UITexture .fullImage(MODID, "gui/picture/milestone_charge_glow"); public static final UITexture PICTURE_GODFORGE_MILESTONE_CONVERSION_GLOW = UITexture diff --git a/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java b/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java index 8325dd4486d..44da6c66b4c 100644 --- a/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java +++ b/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java @@ -67,6 +67,7 @@ import com.gtnewhorizons.modularui.common.widget.ButtonWidget; import com.gtnewhorizons.modularui.common.widget.DrawableWidget; import com.gtnewhorizons.modularui.common.widget.DynamicPositionedColumn; +import com.gtnewhorizons.modularui.common.widget.DynamicPositionedRow; import com.gtnewhorizons.modularui.common.widget.FakeSyncWidget; import com.gtnewhorizons.modularui.common.widget.FluidNameHolderWidget; import com.gtnewhorizons.modularui.common.widget.MultiChildWidget; @@ -153,6 +154,7 @@ public class MTEForgeOfGods extends TTMultiblockBase implements IConstructable, private static final int INDIVIDUAL_MILESTONE_WINDOW_ID = 14; private static final int MANUAL_INSERTION_WINDOW_ID = 15; private static final int GENERAL_INFO_WINDOW_ID = 16; + private static final int SPECIAL_THANKS_WINDOW_ID = 17; private static final int TEXTURE_INDEX = 960; private static final int[] FIRST_SPLIT_UPGRADES = new int[] { 12, 13, 14 }; private static final Integer[] UPGRADE_MATERIAL_ID_CONVERSION = { 0, 5, 7, 11, 26, 29, 30 }; @@ -762,6 +764,7 @@ public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildCont buildContext.addSyncedWindow(INDIVIDUAL_MILESTONE_WINDOW_ID, this::createIndividualMilestoneWindow); buildContext.addSyncedWindow(MANUAL_INSERTION_WINDOW_ID, this::createManualInsertionWindow); buildContext.addSyncedWindow(GENERAL_INFO_WINDOW_ID, this::createGeneralInfoWindow); + buildContext.addSyncedWindow(SPECIAL_THANKS_WINDOW_ID, this::createSpecialThanksWindow); builder.widget( new ButtonWidget().setOnClick( (clickData, widget) -> { @@ -854,6 +857,17 @@ public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildCont .setSize(18, 18) .addTooltip(translateToLocal("gt.blockmachines.multimachine.FOG.clickhere")) .setPos(172, 67) + .setTooltipShowUpDelay(TOOLTIP_DELAY)) + .widget( + new ButtonWidget().setOnClick( + (clickData, widget) -> { + if (!widget.isClient()) widget.getContext() + .openSyncedWindow(SPECIAL_THANKS_WINDOW_ID); + }) + .setSize(16, 16) + .addTooltip(translateToLocal("fog.button.thanks.tooltip")) + .setBackground(TecTechUITextures.OVERLAY_BUTTON_HEART) + .setPos(8, 69) .setTooltipShowUpDelay(TOOLTIP_DELAY)); } @@ -2454,6 +2468,137 @@ protected ModularWindow createGeneralInfoWindow(final EntityPlayer player) { return builder.build(); } + protected ModularWindow createSpecialThanksWindow(final EntityPlayer player) { + final int WIDTH = 200; + final int HEIGHT = 200; + ModularWindow.Builder builder = ModularWindow.builder(WIDTH, HEIGHT); + + builder.setBackground(TecTechUITextures.BACKGROUND_GLOW_RAINBOW); + builder.setDraggable(true); + builder.widget( + ButtonWidget.closeWindowButton(true) + .setPos(184, 4)) + .widget( + new DrawableWidget().setDrawable(TecTechUITextures.PICTURE_GODFORGE_THANKS) + .setPos(50, 50) + .setSize(100, 100)) + .widget( + new TextWidget(translateToLocal("gt.blockmachines.multimachine.FOG.contributors")) + .setDefaultColor(EnumChatFormatting.GOLD) + .setTextAlignment(Alignment.Center) + .setScale(1f) + .setPos(0, 5) + .setSize(200, 15)) + .widget( + new TextWidget( + EnumChatFormatting.UNDERLINE + translateToLocal("gt.blockmachines.multimachine.FOG.lead")) + .setScale(0.8f) + .setDefaultColor(EnumChatFormatting.GOLD) + .setTextAlignment(Alignment.CenterLeft) + .setPos(7, 30) + .setSize(60, 10)) + .widget( + new TextWidget(translateToLocal("gt.blockmachines.multimachine.FOG.cloud")).setScale(0.8f) + .setDefaultColor(EnumChatFormatting.AQUA) + .setTextAlignment(Alignment.CenterLeft) + .setPos(7, 40) + .setSize(60, 10)) + .widget( + new TextWidget( + EnumChatFormatting.UNDERLINE + translateToLocal("gt.blockmachines.multimachine.FOG.programming")) + .setScale(0.8f) + .setDefaultColor(EnumChatFormatting.GOLD) + .setTextAlignment(Alignment.CenterLeft) + .setPos(7, 55) + .setSize(60, 10)) + .widget( + new TextWidget( + EnumChatFormatting.DARK_AQUA + translateToLocal("gt.blockmachines.multimachine.FOG.teg") + + " " + + EnumChatFormatting.RESET + + translateToLocal("gt.blockmachines.multimachine.FOG.serenybiss")).setScale(0.8f) + .setTextAlignment(Alignment.CenterLeft) + .setPos(7, 67) + .setSize(60, 10)) + .widget( + new TextWidget( + EnumChatFormatting.UNDERLINE + translateToLocal("gt.blockmachines.multimachine.FOG.textures")) + .setScale(0.8f) + .setDefaultColor(EnumChatFormatting.GOLD) + .setTextAlignment(Alignment.CenterLeft) + .setPos(7, 85) + .setSize(100, 10)) + .widget( + new TextWidget(translateToLocal("gt.blockmachines.multimachine.FOG.ant")).setScale(0.8f) + .setDefaultColor(EnumChatFormatting.GREEN) + .setTextAlignment(Alignment.CenterLeft) + .setPos(7, 95) + .setSize(60, 10)) + .widget( + new TextWidget( + EnumChatFormatting.UNDERLINE + translateToLocal("gt.blockmachines.multimachine.FOG.rendering")) + .setScale(0.8f) + .setDefaultColor(EnumChatFormatting.GOLD) + .setTextAlignment(Alignment.CenterLeft) + .setPos(7, 110) + .setSize(100, 10)) + .widget( + new TextWidget(translateToLocal("gt.blockmachines.multimachine.FOG.bucket")).setScale(0.8f) + .setDefaultColor(EnumChatFormatting.WHITE) + .setTextAlignment(Alignment.CenterLeft) + .setPos(7, 120) + .setSize(60, 10)) + .widget( + new TextWidget( + EnumChatFormatting.UNDERLINE + translateToLocal("gt.blockmachines.multimachine.FOG.lore")) + .setScale(0.8f) + .setDefaultColor(EnumChatFormatting.GOLD) + .setTextAlignment(Alignment.CenterLeft) + .setPos(7, 135) + .setSize(100, 10)) + .widget( + delenoName().setSpace(-1) + .setAlignment(MainAxisAlignment.SPACE_BETWEEN) + .setPos(7, 145) + .setSize(60, 10)) + .widget( + new TextWidget( + EnumChatFormatting.UNDERLINE + translateToLocal("gt.blockmachines.multimachine.FOG.playtesting")) + .setScale(0.8f) + .setDefaultColor(EnumChatFormatting.GOLD) + .setTextAlignment(Alignment.CenterLeft) + .setPos(7, 160) + .setSize(100, 10)) + .widget( + new TextWidget(translateToLocal("gt.blockmachines.multimachine.FOG.misi")).setScale(0.8f) + .setDefaultColor(0xffc26f) + .setTextAlignment(Alignment.CenterLeft) + .setPos(7, 170) + .setSize(60, 10)) + .widget( + new TextWidget(EnumChatFormatting.ITALIC + translateToLocal("gt.blockmachines.multimachine.FOG.thanks")) + .setScale(0.8f) + .setDefaultColor(0xbbbdbd) + .setTextAlignment(Alignment.Center) + .setPos(90, 140) + .setSize(100, 60)); + return builder.build(); + } + + private DynamicPositionedRow delenoName() { + DynamicPositionedRow nameRow = new DynamicPositionedRow(); + String deleno = translateToLocal("gt.blockmachines.multimachine.FOG.deleno"); + int[] colors = new int[] { 0xffffff, 0xf6fff5, 0xecffec, 0xe3ffe2, 0xd9ffd9, 0xd0ffcf }; + + for (int i = 0; i < 6; i++) { + nameRow.addChild( + new TextWidget(Character.toString(deleno.charAt(i))).setDefaultColor(colors[i]) + .setScale(0.8f) + .setTextAlignment(Alignment.CenterLeft)); + } + return nameRow; + } + @Override public MultiblockTooltipBuilder createTooltip() { final MultiblockTooltipBuilder tt = new MultiblockTooltipBuilder(); diff --git a/src/main/resources/assets/tectech/lang/en_US.lang b/src/main/resources/assets/tectech/lang/en_US.lang index 35379deff06..8e1a8fd87c2 100644 --- a/src/main/resources/assets/tectech/lang/en_US.lang +++ b/src/main/resources/assets/tectech/lang/en_US.lang @@ -1043,6 +1043,7 @@ fog.button.exoticinputs.tooltip=Click to display expected inputs fog.button.reciperefresh.tooltip=Click to reset recipe fog.button.refreshtimer.tooltip=Reset ready in fog.button.seconds=Seconds +fog.button.thanks.tooltip=Open List of Contributors achievement.gt.blockmachines.multimachine.em.forge_of_gods=Forge of the Gods @@ -1108,6 +1109,21 @@ gt.blockmachines.multimachine.FOG.fuelinfotext=Once the structure of the Forge i gt.blockmachines.multimachine.FOG.moduleinfotext=There are 4 types of modules that can be used in the Forge, the Helioflare Power Forge, Helioflux Melting Core, Heliothermal Plasma Fabricator and Heliofusion Exoticizer. These modules are separate multiblocks that have to be built into the Godforge structure at their designated spots. Once built, these modules have to connect to the Godforge, which happens automatically if all requirements for the respective module are met. Alternatively, there is a button to refresh their status without waiting for the timer. Each of these modules has its specialized functionality & requirements and is affected differently by certain upgrades. The first unlocked module is the §BHelioflare Power Forge§6, which simply put is a blast furnace even more powerful than the mega version. Additionally, this module has a furnace mode, turning it into a hyper powerful multi smelter. This module is unlocked by default and has 1024 base parallel. The second unlock is the §BHelioflux Melting Core§6, which also processes blast furnace recipes, but with a twist, the outputs are ejected in their molten form instead of hot/regular ingots. If an output does not have a molten form, it will output its regular form. This module has to be unlocked by an upgrade to function and has 512 base parallel. The third module is the §BHeliothermal Plasma Fabricator§6, which possesses a unique recipemap featuring direct material to plasma conversion recipes. These recipes are grouped by two properties, fusion tier and steps required, limiting which recipes can be processed before their respective upgrades are unlocked. Unlike regular fusion, these recipes produce the plasma of the input material. This module has 384 base parallel. The fourth and last module is the §BHeliofusion Exoticizer§6, a module capable of producing quark gluon plasma and later on magmatter. This module has unique automation challenges for both materials, so it is recommended to have two of these, as they have to be locked to either one of the materials. The common rule for both modes' automation challenges is as follows: the module outputs materials at the start of a recipe cycle and waits for the correct inputs to arrive before starting the actual processing of the output material. If producing quark-gluon plasma, the module outputs up to 7 different fluids/tiny piles with amounts between 1 and 64, and their corresponding plasmas and amounts have to be returned in order for the recipe to process. For each L of fluid, a bucket of plasma and for each tiny pile an ingot's worth of plasma must be returned for the recipe to work. If magmatter mode is active, the automation challenge changes. Now the module outputs 1-50L of tachyon rich temporal fluid, 51-100L of spatially enlarged fluid and one tiny pile of a high tier material. The challenge is to return both the tachyon rich and spatially enlarged fluids, plus as much plasma of the tiny pile's material (in ingots) as the difference between the amounts of spatially enlarged and tachyon rich fluid. Once all of these have been returned in the correct amounts, the recipe will start to process and output magmatter. This module has 64 base parallel. gt.blockmachines.multimachine.FOG.upgradeinfotext=Upgrades are the heart and soul of the Godforge, they unlock most of its functionality and processing power. The upgrade tree can be accessed via its button on the main gui and each upgrade node can be clicked for more information on its effects and unlock requirements. In general, each upgrade can only be unlocked if the prior one is unlocked and there are enough available graviton shards. One exception to this is the first upgrade, as that one has no prior upgrade. Some upgrades can also have extra material costs, which are denoted next to the unlock button if applicable. If an upgrade has more than 1 connected prior upgrade, then there are two options, either the upgrade requires ALL connected prior upgrades or AT LEAST ONE (indicated by the connection's color). Upgrades can be refunded by simply pressing the unlock button again, but this only works if ALL connected later upgrades are not active/unlocked. The block of upgrades following the unlock of the Heliufusion Exoticizer module are special, as they are what is considered §Bthe Split§6. As the name suggests, only one path out of the three may be chosen at first, and the others will be locked. Each path has specialized buffs that are primarily targeted towards a specific module, and thus affect other module types with reduced effect (unless stated otherwise). The amount of unlockable paths depends on the amount of rings the Godforge has, which in turn are limited by later upgrades. gt.blockmachines.multimachine.FOG.milestoneinfotext=Milestones are essential for upgrading the Godforge, as they are the source of graviton shards, the main currency needed for unlocking upgrades. In essence, milestones are just what their name suggests, thresholds that when reached, grant graviton shards. There are four types of milestones, Charge, Conversion, Catalyst and Composition, each referring to a stat of the Godforge. Each milestone has 7 tiers, each being harder to reach than the last, but also granting more graviton shards. The first tier grants 1 graviton shard, the second 2, etc. The §BCharge§6 milestone scales off total power consumption of all modules combined, the first tier being unlocked at 1e15 EU consumed, and each subsequent milestone scaling by 9x. The §BConversion§6 milestone scales off total recipes processed across all modules (excluding the Helioflare Power Forge's furnace mode) and its first tier is unlocked at 10M processed recipes. Following tiers scale by 6x. The §BCatalyst§6 milestone is based on the Forge's fuel consumption, counted in Stellar Fuel units (the number entered in the fuel config menu). Reaching the first tier requires 10,000 fuel units to be consumed, and each tier above scales by 3x. Last but not least, the §BComposition§6 milestone works a bit differently, as it scales off the Forge's structure. Milestone levels are granted for each unique type of module present in the structure (Helifusion Exoticizer modules on quark-gluon and magmatter mode count as unique) and for each additional ring built. Your research suggests that something strange might happen if all milestones reach their final tier... Make sure to check back! +gt.blockmachines.multimachine.FOG.contributors=Contributors +gt.blockmachines.multimachine.FOG.lead=Project Lead +gt.blockmachines.multimachine.FOG.cloud=GDCloud +gt.blockmachines.multimachine.FOG.programming=Programming +gt.blockmachines.multimachine.FOG.teg=TheEpicGamer +gt.blockmachines.multimachine.FOG.serenybiss=§dSereni§5byss +gt.blockmachines.multimachine.FOG.textures=Textures & Structure +gt.blockmachines.multimachine.FOG.ant=Ant +gt.blockmachines.multimachine.FOG.lore=Loremaster +gt.blockmachines.multimachine.FOG.deleno=Deleno +gt.blockmachines.multimachine.FOG.rendering=Rendering Wizard +gt.blockmachines.multimachine.FOG.bucket=BucketBrigade +gt.blockmachines.multimachine.FOG.playtesting=Playtesting +gt.blockmachines.multimachine.FOG.misi=Misi +gt.blockmachines.multimachine.FOG.thanks=A huge thank you to these incredible people for helping to make this a reality! -Cloud gt.blockmachines.multimachine.FOG.hint.0=1 - Classic Hatches or Transcendentally Amplified Magnetic Confinement Casing gt.blockmachines.multimachine.FOG.hint.1=2 - Module Controllers or Singularity Reinforced Stellar Shielding Casing diff --git a/src/main/resources/assets/tectech/textures/gui/background/rainbow_glow.png b/src/main/resources/assets/tectech/textures/gui/background/rainbow_glow.png new file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O@R>ex@~V?`Q2%KVWVH(bbr2|Yo?mt4Lw8xM7feQu6peyyppd#p%lvSdG9d!xWp zDOs>EhT^2V1?ek3IhZvao#RXvCB#}w{@P?{bP2e7QeFz(VvQ&~B5{8qIwnBaXF1N@ zE>vCk+1aS&kr3Xn{`Q2N_xBgpg3}u0srXzw%rQunnWgSy!CNb>aPq6uu$T35 zvT(eDfE6DVbLabKjOP4UcAqIkv}LQfavXkm95T2l&*vnRJZzgGoK0=}Q#@K>DD6f* zMyC>~b;U`Qbw{&5C zoSVBIb82(P@2gpeDj2_iXE%h65Q@}s65>j4Mc`aPR-aSM*_b4~@_pBT>l;0fuSoUF z7k!xzE-cvnh&q3oXvG$9Y`LacQTFEr+-sn9-G#g~U(<{T4yom^mN$7W+C3@G^i5xdh}1GK0DL!v66v@09-oqi^lKy9R=mcRoR#Fn>7cGj`VL<9>?H>Cv)y)h(CSo zk$JyvXX!Mi5e?;u?#r%d!ZwC}b-}LJim6A;Qw82r0$#=#@PHE+h~XpD(>Go)M^8yy zl!bg!oI*3M{zeVDnf6va6T2t-cmgnPhd&2iCwa~}7Fe*}J@fV;xQ%d4$&ddwwdh|C Qj4LF1sHLy@8D<;#e_|@vi~s-t literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/tectech/textures/gui/overlay_button/heart.png b/src/main/resources/assets/tectech/textures/gui/overlay_button/heart.png new file mode 100644 index 0000000000000000000000000000000000000000..96cff19d893a596f98043ad4c71595d913400df7 GIT binary patch literal 531 zcmV+u0_^>XP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0jNntK~y+TrBlmF z!$1^0iNUr$iq=*|5rkH{5Zvj;*Tyf>?{MMgxD|CPx)lYX_$sC}t(BB!;yrhgl44zm zhfFdv_ndR@Jc9qiNxmrUp2kU6;a{B$W5jQ9moEk#cLI|$6--rXaJ@Vh_Rod__FXS0 zv8r;&O${9@_E22i!g6&RCXNxu5gK>r2!mHO$Q74RsUIMYVu>4kHXjf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b6^{C<^{}!{t&XiK3+T?gWQPm ztulO4w`nU`P6h{0-Qt{!PbI=D?iDJf2R}cLuO`Xy&Ok8V&D^Jv&jo2u;0%NG$4bXQ z#=CN*7m@$x$WOK{wz%4kMnOD&FH!k%A$#zX&T1j|m+!1I44gF2<+AUJOL#9D3DIoi zILoZ%WyLdhXMQEEmDw%xa>&nVAHI2)UEn?^Y2 Date: Sat, 14 Sep 2024 03:42:20 +0200 Subject: [PATCH 50/57] add crude lines --- .../tectech/thing/gui/TecTechUITextures.java | 25 ++++- .../metaTileEntity/multi/MTEForgeOfGods.java | 87 ++++++++++++++++++ .../resources/assets/tectech/lang/en_US.lang | 2 +- .../textures/gui/picture/connector.png | Bin 163 -> 0 bytes .../textures/gui/picture/connector_blue.png | Bin 0 -> 120 bytes .../gui/picture/connector_blue_opaque.png | Bin 0 -> 120 bytes .../textures/gui/picture/connector_empty.png | Bin 158 -> 0 bytes .../textures/gui/picture/connector_green.png | Bin 0 -> 120 bytes .../gui/picture/connector_green_opaque.png | Bin 0 -> 120 bytes .../textures/gui/picture/connector_orange.png | Bin 0 -> 120 bytes .../gui/picture/connector_orange_opaque.png | Bin 0 -> 120 bytes .../textures/gui/picture/connector_purple.png | Bin 0 -> 120 bytes .../gui/picture/connector_purple_opaque.png | Bin 0 -> 120 bytes .../textures/gui/picture/connector_red.png | Bin 0 -> 120 bytes .../gui/picture/connector_red_opaque.png | Bin 0 -> 120 bytes .../textures/gui/picture/connector_switch.png | Bin 189 -> 0 bytes 16 files changed, 108 insertions(+), 6 deletions(-) delete mode 100644 src/main/resources/assets/tectech/textures/gui/picture/connector.png create mode 100644 src/main/resources/assets/tectech/textures/gui/picture/connector_blue.png create mode 100644 src/main/resources/assets/tectech/textures/gui/picture/connector_blue_opaque.png delete 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_green.png create mode 100644 src/main/resources/assets/tectech/textures/gui/picture/connector_green_opaque.png create mode 100644 src/main/resources/assets/tectech/textures/gui/picture/connector_orange.png create mode 100644 src/main/resources/assets/tectech/textures/gui/picture/connector_orange_opaque.png create mode 100644 src/main/resources/assets/tectech/textures/gui/picture/connector_purple.png create mode 100644 src/main/resources/assets/tectech/textures/gui/picture/connector_purple_opaque.png create mode 100644 src/main/resources/assets/tectech/textures/gui/picture/connector_red.png create mode 100644 src/main/resources/assets/tectech/textures/gui/picture/connector_red_opaque.png delete mode 100644 src/main/resources/assets/tectech/textures/gui/picture/connector_switch.png diff --git a/src/main/java/tectech/thing/gui/TecTechUITextures.java b/src/main/java/tectech/thing/gui/TecTechUITextures.java index 40116af39f9..f2774dc42fa 100644 --- a/src/main/java/tectech/thing/gui/TecTechUITextures.java +++ b/src/main/java/tectech/thing/gui/TecTechUITextures.java @@ -164,11 +164,26 @@ public class TecTechUITextures { public static final UITexture PICTURE_PARAMETER_GRAY = UITexture.fullImage(MODID, "gui/picture/parameter_gray"); public static final UITexture PICTURE_UNCERTAINTY_MONITOR_MULTIMACHINE = UITexture .fullImage(MODID, "gui/picture/uncertainty/monitor_multimachine"); - public static final UITexture PICTURE_UPGRADE_CONNECTOR_FULL = UITexture.fullImage(MODID, "gui/picture/connector"); - public static final UITexture PICTURE_UPGRADE_CONNECTOR_EMPTY = UITexture - .fullImage(MODID, "gui/picture/connector_empty"); - public static final UITexture PICTURE_UPGRADE_CONNECTOR_SWITCH = UITexture - .fullImage(MODID, "gui/picture/connector_switch"); + public static final UITexture PICTURE_UPGRADE_CONNECTOR_PURPLE = UITexture + .fullImage(MODID, "gui/picture/connector_purple"); + public static final UITexture PICTURE_UPGRADE_CONNECTOR_GREEN = UITexture + .fullImage(MODID, "gui/picture/connector_green"); + public static final UITexture PICTURE_UPGRADE_CONNECTOR_ORANGE = UITexture + .fullImage(MODID, "gui/picture/connector_orange"); + public static final UITexture PICTURE_UPGRADE_CONNECTOR_BLUE = UITexture + .fullImage(MODID, "gui/picture/connector_blue"); + public static final UITexture PICTURE_UPGRADE_CONNECTOR_RED = UITexture + .fullImage(MODID, "gui/picture/connector_red"); + public static final UITexture PICTURE_UPGRADE_CONNECTOR_PURPLE_OPAQUE = UITexture + .fullImage(MODID, "gui/picture/connector_purple_opaque"); + public static final UITexture PICTURE_UPGRADE_CONNECTOR_GREEN_OPAQUE = UITexture + .fullImage(MODID, "gui/picture/connector_green_opaque"); + public static final UITexture PICTURE_UPGRADE_CONNECTOR_ORANGE_OPAQUE = UITexture + .fullImage(MODID, "gui/picture/connector_orange_opaque"); + public static final UITexture PICTURE_UPGRADE_CONNECTOR_BLUE_OPAQUE = UITexture + .fullImage(MODID, "gui/picture/connector_blue_opaque"); + public static final UITexture PICTURE_UPGRADE_CONNECTOR_RED_OPAQUE = UITexture + .fullImage(MODID, "gui/picture/connector_red_opaque"); public static final UITexture SLOT_OUTLINE_GREEN = UITexture.fullImage(MODID, "gui/picture/green_selector"); public static final UITexture PICTURE_GODFORGE_MILESTONE_CHARGE = UITexture .fullImage(MODID, "gui/picture/milestone_charge"); diff --git a/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java b/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java index 44da6c66b4c..c4991bc791b 100644 --- a/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java +++ b/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java @@ -1418,6 +1418,44 @@ protected ModularWindow createUpgradeTreeWindow(final EntityPlayer player) { final int PARENT_WIDTH = 300; final int PARENT_HEIGHT = 300; ModularWindow.Builder builder = ModularWindow.builder(PARENT_WIDTH, PARENT_HEIGHT); + + scrollable.widget(createUpgradeConnectorLine(new Pos2d(143, 71), 45, 0, 0, 0, 1)) + .widget(createUpgradeConnectorLine(new Pos2d(124, 124), 60, 27, 0, 1, 2)) + .widget(createUpgradeConnectorLine(new Pos2d(162, 124), 60, 333, 0, 1, 3)) + .widget(createUpgradeConnectorLine(new Pos2d(94, 184), 60, 27, 0, 2, 4)) + .widget(createUpgradeConnectorLine(new Pos2d(130, 184), 60, 336, 0, 2, 5)) + .widget(createUpgradeConnectorLine(new Pos2d(156, 184), 60, 24, 0, 3, 5)) + .widget(createUpgradeConnectorLine(new Pos2d(192, 184), 60, 333, 0, 3, 6)) + .widget(createUpgradeConnectorLine(new Pos2d(143, 251), 45, 0, 0, 5, 7)) + .widget(createUpgradeConnectorLine(new Pos2d(143, 311), 45, 0, 0, 7, 9)) + .widget(createUpgradeConnectorLine(new Pos2d(78, 250), 110, 5, 4, 4, 8)) + .widget(createUpgradeConnectorLine(new Pos2d(110, 290), 80, 40, 4, 7, 8)) + .widget(createUpgradeConnectorLine(new Pos2d(208, 250), 110, 355, 4, 6, 10)) + .widget(createUpgradeConnectorLine(new Pos2d(176, 290), 80, 320, 4, 7, 10)) + .widget(createUpgradeConnectorLine(new Pos2d(100, 355), 80, 313, 0, 8, 11)) + .widget(createUpgradeConnectorLine(new Pos2d(186, 355), 80, 47, 0, 10, 11)) + .widget(createUpgradeConnectorLine(new Pos2d(143, 430), 48, 0, 2, 11, 13)) + .widget(createUpgradeConnectorLine(new Pos2d(143, 490), 48, 0, 2, 13, 18)) + .widget(createUpgradeConnectorLine(new Pos2d(143, 550), 48, 0, 2, 18, 21)) + .widget(createUpgradeConnectorLine(new Pos2d(143, 610), 48, 0, 2, 21, 23)) + .widget(createUpgradeConnectorLine(new Pos2d(110, 410), 80, 40, 1, 11, 12)) + .widget(createUpgradeConnectorLine(new Pos2d(83, 490), 48, 0, 1, 12, 17)) + .widget(createUpgradeConnectorLine(new Pos2d(83, 550), 48, 0, 1, 17, 20)) + .widget(createUpgradeConnectorLine(new Pos2d(101, 590), 80, 320, 1, 20, 23)) + .widget(createUpgradeConnectorLine(new Pos2d(53, 536), 35, 45, 1, 17, 16)) + .widget(createUpgradeConnectorLine(new Pos2d(176, 410), 80, 320, 3, 11, 14)) + .widget(createUpgradeConnectorLine(new Pos2d(203, 490), 48, 0, 3, 14, 19)) + .widget(createUpgradeConnectorLine(new Pos2d(203, 550), 48, 0, 3, 19, 22)) + .widget(createUpgradeConnectorLine(new Pos2d(185, 590), 80, 40, 3, 22, 23)) + .widget(createUpgradeConnectorLine(new Pos2d(233, 476), 35, 315, 3, 14, 15)) + .widget(createUpgradeConnectorLine(new Pos2d(143, 670), 48, 0, 0, 23, 24)) + .widget(createUpgradeConnectorLine(new Pos2d(101, 707), 75, 62.3f, 0, 24, 25)) + .widget(createUpgradeConnectorLine(new Pos2d(53, 772), 78, 0, 0, 25, 26)) + .widget(createUpgradeConnectorLine(new Pos2d(95, 837), 75, 297.7f, 0, 26, 27)) + .widget(createUpgradeConnectorLine(new Pos2d(191, 837), 75, 62.3f, 0, 27, 28)) + .widget(createUpgradeConnectorLine(new Pos2d(233, 772), 78, 0, 0, 28, 29)) + .widget(createUpgradeConnectorLine(new Pos2d(191, 747), 75, 62.3f, 0, 29, 30)); + scrollable .widget( createUpgradeBox( @@ -2057,6 +2095,17 @@ protected ModularWindow createIndividualUpgradeWindow(final EntityPlayer player) upgrades[currentUpgradeID] = false; } } + if (!widget.getContext() + .isClient()) { + widget.getContext() + .closeWindow(INDIVIDUAL_UPGRADE_WINDOW_ID); + widget.getContext() + .closeWindow(UPGRADE_TREE_WINDOW_ID); + widget.getContext() + .openSyncedWindow(UPGRADE_TREE_WINDOW_ID); + widget.getContext() + .openSyncedWindow(INDIVIDUAL_UPGRADE_WINDOW_ID); + } }) .setSize(40, 15) .setBackground(() -> { @@ -2172,6 +2221,44 @@ private Widget createUpgradeBox(int upgradeID, int colorCode, int milestone, int builder); } + private Widget createUpgradeConnectorLine(Pos2d pos, int length, float rotationAngle, int colorCode, + int startUpgradeID, int endUpgradeID) { + return new DrawableWidget() + .setDrawable( + (upgrades[startUpgradeID] && upgrades[endUpgradeID]) + ? coloredLine(colorCode, true).withRotationDegree(rotationAngle) + : coloredLine(colorCode, false).withRotationDegree(rotationAngle)) + .setPos(pos) + .setSize(6, length); + } + + private IDrawable coloredLine(int colorCode, boolean opaque) { + IDrawable line; + switch (colorCode) { + case 1 -> { + line = opaque ? TecTechUITextures.PICTURE_UPGRADE_CONNECTOR_PURPLE_OPAQUE + : TecTechUITextures.PICTURE_UPGRADE_CONNECTOR_PURPLE; + } + case 2 -> { + line = opaque ? TecTechUITextures.PICTURE_UPGRADE_CONNECTOR_ORANGE_OPAQUE + : TecTechUITextures.PICTURE_UPGRADE_CONNECTOR_ORANGE; + } + case 3 -> { + line = opaque ? TecTechUITextures.PICTURE_UPGRADE_CONNECTOR_GREEN_OPAQUE + : TecTechUITextures.PICTURE_UPGRADE_CONNECTOR_GREEN; + } + case 4 -> { + line = opaque ? TecTechUITextures.PICTURE_UPGRADE_CONNECTOR_RED_OPAQUE + : TecTechUITextures.PICTURE_UPGRADE_CONNECTOR_RED; + } + default -> { + line = opaque ? TecTechUITextures.PICTURE_UPGRADE_CONNECTOR_BLUE_OPAQUE + : TecTechUITextures.PICTURE_UPGRADE_CONNECTOR_BLUE; + } + } + return line; + } + protected ModularWindow createManualInsertionWindow(final EntityPlayer player) { ItemStack[] inputs = godforgeUpgradeMats.get(currentUpgradeID); final int WIDTH = 189; diff --git a/src/main/resources/assets/tectech/lang/en_US.lang b/src/main/resources/assets/tectech/lang/en_US.lang index 8e1a8fd87c2..b970024c971 100644 --- a/src/main/resources/assets/tectech/lang/en_US.lang +++ b/src/main/resources/assets/tectech/lang/en_US.lang @@ -1107,7 +1107,7 @@ gt.blockmachines.multimachine.FOG.upgrades=Upgrades gt.blockmachines.multimachine.FOG.milestones=Milestones gt.blockmachines.multimachine.FOG.fuelinfotext=Once the structure of the Forge is built and the multiblock is formed, just simply turning it on is not sufficient to make it functional. The Forge must be supplied with a certain amount of Star Fuel (the item) to actually boot up. The amount of Star Fuel needed depends on the current fuel consumption factor, which can be set in the fuel configuration menu. By default the maximum is 5, but it can be increased later on with upgrades. Star Fuel scaling is as follows: factor*25*1.2^factor. Star Fuel can be supplied via an input bus, it gets consumed periodically and stored internally. Once there is enough Star Fuel stored in the multi, it turns on for real (allowing modules to connect) and converts the consumed Star Fuel into stored Stellar Fuel. From this point onwards, the Forge must be fueled via one of the liquid fuels (type can be selected in the fuel config menu). If there isn't enough of the selected fuel present in the input hatch, the stored fuel amount will decrease and if it reaches 0, the Forge enters the previous 'off' state where modules disconnect and it has to be supplied with Star Fuel again. The amount of internally stored Stellar Fuel (liquid) can be increased by turning on battery charging, this will cause the fuel usage to double, but half of it will be stored in the internal battery. gt.blockmachines.multimachine.FOG.moduleinfotext=There are 4 types of modules that can be used in the Forge, the Helioflare Power Forge, Helioflux Melting Core, Heliothermal Plasma Fabricator and Heliofusion Exoticizer. These modules are separate multiblocks that have to be built into the Godforge structure at their designated spots. Once built, these modules have to connect to the Godforge, which happens automatically if all requirements for the respective module are met. Alternatively, there is a button to refresh their status without waiting for the timer. Each of these modules has its specialized functionality & requirements and is affected differently by certain upgrades. The first unlocked module is the §BHelioflare Power Forge§6, which simply put is a blast furnace even more powerful than the mega version. Additionally, this module has a furnace mode, turning it into a hyper powerful multi smelter. This module is unlocked by default and has 1024 base parallel. The second unlock is the §BHelioflux Melting Core§6, which also processes blast furnace recipes, but with a twist, the outputs are ejected in their molten form instead of hot/regular ingots. If an output does not have a molten form, it will output its regular form. This module has to be unlocked by an upgrade to function and has 512 base parallel. The third module is the §BHeliothermal Plasma Fabricator§6, which possesses a unique recipemap featuring direct material to plasma conversion recipes. These recipes are grouped by two properties, fusion tier and steps required, limiting which recipes can be processed before their respective upgrades are unlocked. Unlike regular fusion, these recipes produce the plasma of the input material. This module has 384 base parallel. The fourth and last module is the §BHeliofusion Exoticizer§6, a module capable of producing quark gluon plasma and later on magmatter. This module has unique automation challenges for both materials, so it is recommended to have two of these, as they have to be locked to either one of the materials. The common rule for both modes' automation challenges is as follows: the module outputs materials at the start of a recipe cycle and waits for the correct inputs to arrive before starting the actual processing of the output material. If producing quark-gluon plasma, the module outputs up to 7 different fluids/tiny piles with amounts between 1 and 64, and their corresponding plasmas and amounts have to be returned in order for the recipe to process. For each L of fluid, a bucket of plasma and for each tiny pile an ingot's worth of plasma must be returned for the recipe to work. If magmatter mode is active, the automation challenge changes. Now the module outputs 1-50L of tachyon rich temporal fluid, 51-100L of spatially enlarged fluid and one tiny pile of a high tier material. The challenge is to return both the tachyon rich and spatially enlarged fluids, plus as much plasma of the tiny pile's material (in ingots) as the difference between the amounts of spatially enlarged and tachyon rich fluid. Once all of these have been returned in the correct amounts, the recipe will start to process and output magmatter. This module has 64 base parallel. -gt.blockmachines.multimachine.FOG.upgradeinfotext=Upgrades are the heart and soul of the Godforge, they unlock most of its functionality and processing power. The upgrade tree can be accessed via its button on the main gui and each upgrade node can be clicked for more information on its effects and unlock requirements. In general, each upgrade can only be unlocked if the prior one is unlocked and there are enough available graviton shards. One exception to this is the first upgrade, as that one has no prior upgrade. Some upgrades can also have extra material costs, which are denoted next to the unlock button if applicable. If an upgrade has more than 1 connected prior upgrade, then there are two options, either the upgrade requires ALL connected prior upgrades or AT LEAST ONE (indicated by the connection's color). Upgrades can be refunded by simply pressing the unlock button again, but this only works if ALL connected later upgrades are not active/unlocked. The block of upgrades following the unlock of the Heliufusion Exoticizer module are special, as they are what is considered §Bthe Split§6. As the name suggests, only one path out of the three may be chosen at first, and the others will be locked. Each path has specialized buffs that are primarily targeted towards a specific module, and thus affect other module types with reduced effect (unless stated otherwise). The amount of unlockable paths depends on the amount of rings the Godforge has, which in turn are limited by later upgrades. +gt.blockmachines.multimachine.FOG.upgradeinfotext=Upgrades are the heart and soul of the Godforge, they unlock most of its functionality and processing power. The upgrade tree can be accessed via its button on the main gui and each upgrade node can be clicked for more information on its effects and unlock requirements. In general, each upgrade can only be unlocked if the prior one is unlocked and there are enough available graviton shards. One exception to this is the first upgrade, as that one has no prior upgrade. Some upgrades can also have extra material costs, which are denoted next to the unlock button if applicable. If an upgrade has more than 1 connected prior upgrade, then there are two options, either the upgrade requires ALL connected prior upgrades or AT LEAST ONE (indicated by the connection's color, red means ALL, blue means AT LEAST ONE). Upgrades can be refunded by simply pressing the unlock button again, but this only works if ALL connected later upgrades are not active/unlocked. The block of upgrades following the unlock of the Heliufusion Exoticizer module are special, as they are what is considered §Bthe Split§6. As the name suggests, only one path out of the three may be chosen at first, and the others will be locked. Each path has specialized buffs that are primarily targeted towards a specific module, and thus affect other module types with reduced effect (unless stated otherwise). The amount of unlockable paths depends on the amount of rings the Godforge has, which in turn are limited by later upgrades. gt.blockmachines.multimachine.FOG.milestoneinfotext=Milestones are essential for upgrading the Godforge, as they are the source of graviton shards, the main currency needed for unlocking upgrades. In essence, milestones are just what their name suggests, thresholds that when reached, grant graviton shards. There are four types of milestones, Charge, Conversion, Catalyst and Composition, each referring to a stat of the Godforge. Each milestone has 7 tiers, each being harder to reach than the last, but also granting more graviton shards. The first tier grants 1 graviton shard, the second 2, etc. The §BCharge§6 milestone scales off total power consumption of all modules combined, the first tier being unlocked at 1e15 EU consumed, and each subsequent milestone scaling by 9x. The §BConversion§6 milestone scales off total recipes processed across all modules (excluding the Helioflare Power Forge's furnace mode) and its first tier is unlocked at 10M processed recipes. Following tiers scale by 6x. The §BCatalyst§6 milestone is based on the Forge's fuel consumption, counted in Stellar Fuel units (the number entered in the fuel config menu). Reaching the first tier requires 10,000 fuel units to be consumed, and each tier above scales by 3x. Last but not least, the §BComposition§6 milestone works a bit differently, as it scales off the Forge's structure. Milestone levels are granted for each unique type of module present in the structure (Helifusion Exoticizer modules on quark-gluon and magmatter mode count as unique) and for each additional ring built. Your research suggests that something strange might happen if all milestones reach their final tier... Make sure to check back! gt.blockmachines.multimachine.FOG.contributors=Contributors gt.blockmachines.multimachine.FOG.lead=Project Lead diff --git a/src/main/resources/assets/tectech/textures/gui/picture/connector.png b/src/main/resources/assets/tectech/textures/gui/picture/connector.png deleted file mode 100644 index c333d0ded821b95a3b9a9622e481bfa44d297e6a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 163 zcmeAS@N?(olHy`uVBq!ia0vp^Ahrz$8<30_)aC_JjKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBuf-vKbiP>*~f)<`Gjv*f2Z%-{`WKa+|e8A4yNY$B%$=l$> zoJ?1(lXs5YTfOSl+dt~gDIGi$6^&flP6$XYx}Ug-L9L0kJnZz`H9#{MJYD@<);T3K F0RUImFRK6m diff --git a/src/main/resources/assets/tectech/textures/gui/picture/connector_blue.png b/src/main/resources/assets/tectech/textures/gui/picture/connector_blue.png new file mode 100644 index 0000000000000000000000000000000000000000..9eeb1e78e1e7d789d66cfa08a8431bf5df1a6136 GIT binary patch literal 120 zcmeAS@N?(olHy`uVBq!ia0vp^j3CUx1|;Q0k92}K#X;^)4C~IxyaaMs(j9#r85lP9 zbN@+X1@buyJR*x382I*sFrx))unJI+*VDx@L?S%7fG_GI3j^~_#sk5BE^YxzFnGH9 KxvX*~g2tXMjv*f2Z%--mF&OY1KCt5d|KjVOhxH`C zG-@1>tWCf8_1q}|NhRl$4xWjMMlNkH%4f(}?Pn@ATY6wCP& literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/tectech/textures/gui/picture/connector_orange_opaque.png b/src/main/resources/assets/tectech/textures/gui/picture/connector_orange_opaque.png new file mode 100644 index 0000000000000000000000000000000000000000..0a6a5a5d2824b619330159203fec3bd9d060eb5e GIT binary patch literal 120 zcmeAS@N?(olHy`uVBq!ia0vp^j3CUx1|;Q0k92}K#X;^)4C~IxyaaMs(j9#r85lP9 zbN@+X1@buyJR*x382I*sFrx))unJI+*VDx@L?S%-#=RB)85vkNF-2IXYPtd?7(8A5 KT-G@yGywo;jT&+Q literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/tectech/textures/gui/picture/connector_purple.png b/src/main/resources/assets/tectech/textures/gui/picture/connector_purple.png new file mode 100644 index 0000000000000000000000000000000000000000..3eada4cd52a485110ae7b3f704a5a2f6a725089b GIT binary patch literal 120 zcmeAS@N?(olHy`uVBq!ia0vp^j3CUx1|;Q0k92}K#X;^)4C~IxyaaMs(j9#r85lP9 zbN@+X1@buyJR*x382I*sFrx))unJI+*VDx@L?S$ShW@@)oD3{;7$5&TxnU_#g2B_( K&t;ucLK6US)EmtJ literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/tectech/textures/gui/picture/connector_purple_opaque.png b/src/main/resources/assets/tectech/textures/gui/picture/connector_purple_opaque.png new file mode 100644 index 0000000000000000000000000000000000000000..dd90244d8a3a2b6849b76cf73a2753093457b1f3 GIT binary patch literal 120 zcmeAS@N?(olHy`uVBq!ia0vp^j3CUx1|;Q0k92}K#X;^)4C~IxyaaMs(j9#r85lP9 zbN@+X1@buyJR*x382I*sFrx))unJI+*VDx@L?S$ShW@@+%nYntOo1VmNB#jN7(8A5 KT-G@yGyworI~o`O literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/tectech/textures/gui/picture/connector_red.png b/src/main/resources/assets/tectech/textures/gui/picture/connector_red.png new file mode 100644 index 0000000000000000000000000000000000000000..edd307fa7e9ac5eb76af74b12a76821f4bb8db06 GIT binary patch literal 120 zcmeAS@N?(olHy`uVBq!ia0vp^j3CUx1|;Q0k92}K#X;^)4C~IxyaaMs(j9#r85lP9 zbN@+X1@buyJR*x382I*sFrx))unJI+*VDx@L?S$S#_|>SSQwZ$FlNpa7#UdP7_TSB#GL_3FnGH9 KxvXVM%xNb!1@J z*w6hZkrl}2EbxddW?8eR=R!5~i;$B+p3x92x<9x&ixaMZL;^WtB5;z(+R z`N}i$Cp Date: Sat, 14 Sep 2024 05:06:43 -0500 Subject: [PATCH 51/57] Gorge render mem leak - hopeful fix (#3184) --- src/main/resources/assets/tectech/shaders/star.frag.glsl | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/main/resources/assets/tectech/shaders/star.frag.glsl b/src/main/resources/assets/tectech/shaders/star.frag.glsl index b5c3300ae78..d5a6ff894e7 100644 --- a/src/main/resources/assets/tectech/shaders/star.frag.glsl +++ b/src/main/resources/assets/tectech/shaders/star.frag.glsl @@ -4,10 +4,6 @@ uniform float u_Gamma; varying vec2 v_TexCoord; -const float PI = 3.1415926535897; - -//const vec3 baseAngle = PI/4; - vec3 toYIQ(vec3 rgb){ return mat3( 0.299, 1.0, 0.40462981, 0.587, -0.46081557, -1.0, 0.114, -0.53918443, 0.59537019 ) * rgb; } @@ -24,7 +20,7 @@ void main() { if (length(original.xy) < .01){ gl_FragColor = vec4(texture,1); } else { - vec3 targetYIQ = toYIQ(u_Color); + vec3 targetYIQ = toYIQ(u_Color.rgb); vec3 originalYIQ = toYIQ(texture); vec3 yiqColor = vec3(original.x,targetYIQ.yz); vec3 finalrgb = toRGB(yiqColor); From ff34eed35e447221f81d5ceb7d229c25fbe483b9 Mon Sep 17 00:00:00 2001 From: serenibyss <10861407+serenibyss@users.noreply.github.com> Date: Sat, 14 Sep 2024 11:17:45 -0500 Subject: [PATCH 52/57] fix duplicated molten module recipes --- src/main/java/bartworks/MainMod.java | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/main/java/bartworks/MainMod.java b/src/main/java/bartworks/MainMod.java index 92ddb4e78dc..51358f7307c 100644 --- a/src/main/java/bartworks/MainMod.java +++ b/src/main/java/bartworks/MainMod.java @@ -198,13 +198,8 @@ public static void runOnPlayerJoined(boolean classicMode, boolean disableExtraGa OreDictHandler.adaptCacheForWorld(); CircuitImprintLoader.run(); BioVatLogicAdder.RadioHatch.runBasicItemIntegration(); - if (!recipesAdded) { - if (!disableExtraGasRecipes) StaticRecipeChangeLoaders.addEBFGasRecipes(); - - if (classicMode) DownTierLoader.run(); - - recipesAdded = true; - } + if (!recipesAdded && !disableExtraGasRecipes) StaticRecipeChangeLoaders.addEBFGasRecipes(); + if (!recipesAdded && classicMode) DownTierLoader.run(); // Accept recipe map changes into Buffers RecipeMap.ALL_RECIPE_MAPS.values() @@ -213,6 +208,8 @@ public static void runOnPlayerJoined(boolean classicMode, boolean disableExtraGa .reInit()); // because the above code runs so late that I couldn't find anywhere else to call this - Godforge.initMoltenModuleRecipes(); + if (!recipesAdded) Godforge.initMoltenModuleRecipes(); + + recipesAdded = true; } } From 52b418d9062c24a466636e3eca06109fd377f96a Mon Sep 17 00:00:00 2001 From: serenibyss <10861407+serenibyss@users.noreply.github.com> Date: Sat, 14 Sep 2024 12:16:24 -0500 Subject: [PATCH 53/57] Fix various UI issues - fixed issues with upgrade line sync when completing/respecing upgrades - fixed the panel not updating when you click another different button in the tree (havent figured out how to avoid repositioning the window yet but looking into it) - fixed the indivudual upgrade window staying open when you close the upgrade tree window --- .../metaTileEntity/multi/MTEForgeOfGods.java | 34 +++++++++++-------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java b/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java index c4991bc791b..d55bf32e902 100644 --- a/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java +++ b/src/main/java/tectech/thing/metaTileEntity/multi/MTEForgeOfGods.java @@ -1871,6 +1871,14 @@ protected ModularWindow createUpgradeTreeWindow(final EntityPlayer player) { .setPos(4, 4)) .widget( ButtonWidget.closeWindowButton(true) + .setOnClick((data, widget) -> { + if (!widget.isClient()) { + widget.getWindow() + .closeWindow(); + widget.getContext() + .closeWindow(INDIVIDUAL_UPGRADE_WINDOW_ID); + } + }) .setPos(282, 4)); if (debugMode) { builder.widget(new MultiChildWidget().addChild(new ButtonWidget().setOnClick((clickData, widget) -> { @@ -2095,17 +2103,6 @@ protected ModularWindow createIndividualUpgradeWindow(final EntityPlayer player) upgrades[currentUpgradeID] = false; } } - if (!widget.getContext() - .isClient()) { - widget.getContext() - .closeWindow(INDIVIDUAL_UPGRADE_WINDOW_ID); - widget.getContext() - .closeWindow(UPGRADE_TREE_WINDOW_ID); - widget.getContext() - .openSyncedWindow(UPGRADE_TREE_WINDOW_ID); - widget.getContext() - .openSyncedWindow(INDIVIDUAL_UPGRADE_WINDOW_ID); - } }) .setSize(40, 15) .setBackground(() -> { @@ -2196,8 +2193,17 @@ private Widget createUpgradeBox(int upgradeID, int colorCode, int milestone, int followupUpgrades = followingUpgradeIDs; isUpradeSplitStart = isStartOfSplit; doesCurrentUpgradeRequireExtraMats = requiresExtraMaterials; - if (!widget.isClient()) widget.getContext() - .openSyncedWindow(INDIVIDUAL_UPGRADE_WINDOW_ID); + if (!widget.isClient()) { + // unfortunately this is the easiest way to prevent this window desyncing. it causes the window to + // reposition itself on the screen which would be a good thing to not do. + if (widget.getContext() + .isWindowOpen(INDIVIDUAL_UPGRADE_WINDOW_ID)) { + widget.getContext() + .closeWindow(INDIVIDUAL_UPGRADE_WINDOW_ID); + } + widget.getContext() + .openSyncedWindow(INDIVIDUAL_UPGRADE_WINDOW_ID); + } }) .setSize(40, 15) .setBackground(() -> { @@ -2225,7 +2231,7 @@ private Widget createUpgradeConnectorLine(Pos2d pos, int length, float rotationA int startUpgradeID, int endUpgradeID) { return new DrawableWidget() .setDrawable( - (upgrades[startUpgradeID] && upgrades[endUpgradeID]) + () -> (upgrades[startUpgradeID] && upgrades[endUpgradeID]) ? coloredLine(colorCode, true).withRotationDegree(rotationAngle) : coloredLine(colorCode, false).withRotationDegree(rotationAngle)) .setPos(pos) From 9fe90fd01579815411fb067c775f419589cde8fe Mon Sep 17 00:00:00 2001 From: GDCloud Date: Sat, 14 Sep 2024 23:24:04 +0200 Subject: [PATCH 54/57] attempt to fix merge conflict --- src/main/java/bartworks/MainMod.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/bartworks/MainMod.java b/src/main/java/bartworks/MainMod.java index 51358f7307c..fe86164764e 100644 --- a/src/main/java/bartworks/MainMod.java +++ b/src/main/java/bartworks/MainMod.java @@ -198,8 +198,7 @@ public static void runOnPlayerJoined(boolean classicMode, boolean disableExtraGa OreDictHandler.adaptCacheForWorld(); CircuitImprintLoader.run(); BioVatLogicAdder.RadioHatch.runBasicItemIntegration(); - if (!recipesAdded && !disableExtraGasRecipes) StaticRecipeChangeLoaders.addEBFGasRecipes(); - if (!recipesAdded && classicMode) DownTierLoader.run(); + StaticRecipeChangeLoaders.addEBFGasRecipes(); // Accept recipe map changes into Buffers RecipeMap.ALL_RECIPE_MAPS.values() From 461b765e079aaf232627685be69d259bec7c9f70 Mon Sep 17 00:00:00 2001 From: GDCloud Date: Sat, 14 Sep 2024 23:24:49 +0200 Subject: [PATCH 55/57] attempt #2 --- src/main/java/bartworks/MainMod.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/bartworks/MainMod.java b/src/main/java/bartworks/MainMod.java index fe86164764e..153c5fd1996 100644 --- a/src/main/java/bartworks/MainMod.java +++ b/src/main/java/bartworks/MainMod.java @@ -198,7 +198,10 @@ public static void runOnPlayerJoined(boolean classicMode, boolean disableExtraGa OreDictHandler.adaptCacheForWorld(); CircuitImprintLoader.run(); BioVatLogicAdder.RadioHatch.runBasicItemIntegration(); - StaticRecipeChangeLoaders.addEBFGasRecipes(); + if (!recipesAdded) { + StaticRecipeChangeLoaders.addEBFGasRecipes(); + recipesAdded = true; + } // Accept recipe map changes into Buffers RecipeMap.ALL_RECIPE_MAPS.values() From 3a13e52c810e16226a7933e0c39bb1c7919b306b Mon Sep 17 00:00:00 2001 From: GDCloud Date: Sat, 14 Sep 2024 23:26:16 +0200 Subject: [PATCH 56/57] fix logic --- src/main/java/bartworks/MainMod.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/bartworks/MainMod.java b/src/main/java/bartworks/MainMod.java index 153c5fd1996..0164c45022f 100644 --- a/src/main/java/bartworks/MainMod.java +++ b/src/main/java/bartworks/MainMod.java @@ -200,7 +200,6 @@ public static void runOnPlayerJoined(boolean classicMode, boolean disableExtraGa BioVatLogicAdder.RadioHatch.runBasicItemIntegration(); if (!recipesAdded) { StaticRecipeChangeLoaders.addEBFGasRecipes(); - recipesAdded = true; } // Accept recipe map changes into Buffers From 6731ae77cc0540e662ca7486b5befa7eb92be4cf Mon Sep 17 00:00:00 2001 From: serenibyss <10861407+serenibyss@users.noreply.github.com> Date: Sun, 15 Sep 2024 12:29:49 -0500 Subject: [PATCH 57/57] reviews --- src/main/java/tectech/loader/recipe/Godforge.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/tectech/loader/recipe/Godforge.java b/src/main/java/tectech/loader/recipe/Godforge.java index d64b66917ec..414756a036e 100644 --- a/src/main/java/tectech/loader/recipe/Godforge.java +++ b/src/main/java/tectech/loader/recipe/Godforge.java @@ -7,6 +7,7 @@ import static gregtech.api.util.GTRecipeBuilder.INGOTS; import static gregtech.api.util.GTRecipeBuilder.SECONDS; import static gregtech.api.util.GTRecipeBuilder.TICKS; +import static gregtech.api.util.GTRecipeConstants.COIL_HEAT; import static gregtech.api.util.GTRecipeConstants.FOG_EXOTIC_TIER; import static gregtech.api.util.GTRecipeConstants.FOG_PLASMA_MULTISTEP; import static gregtech.api.util.GTRecipeConstants.FOG_PLASMA_TIER; @@ -228,12 +229,13 @@ public void run() { { // Single step ItemStack[] solids_t1_1step = { Materials.Lead.getDust(1), Materials.Plutonium241.getDust(1), - Materials.Thorium.getDust(1) }; + Materials.Thorium.getDust(1), Materials.Naquadria.getDust(1) }; FluidStack[] molten_t1_1step = convertToFluid(solids_t1_1step); FluidStack[] solid_plasmas_t1_1step = { Materials.Lead.getPlasma(144), - Materials.Plutonium241.getPlasma(144), Materials.Thorium.getPlasma(144) }; + Materials.Plutonium241.getPlasma(144), Materials.Thorium.getPlasma(144), + Materials.Naquadria.getPlasma(144) }; for (int i = 0; i < solids_t1_1step.length; i++) { GTValues.RA.stdBuilder() @@ -773,6 +775,7 @@ public static void initMoltenModuleRecipes() { } fluidOutputs.addAll(Arrays.asList(recipe.mFluidOutputs)); + Integer heat = recipe.getMetadata(COIL_HEAT); GTRecipeBuilder builder = GTValues.RA.stdBuilder() .noOptimize() @@ -785,6 +788,7 @@ public static void initMoltenModuleRecipes() { if (recipe.mInputs != null) builder.itemInputs(recipe.mInputs); if (recipe.mFluidInputs != null) builder.fluidInputs(recipe.mFluidInputs); if (!newChances.isEmpty()) builder.outputChances(newChances.toIntArray()); + if (heat != null) builder.metadata(COIL_HEAT, heat); builder.addTo(TecTechRecipeMaps.godforgeMoltenRecipes); }