From a850d03377a64e64e8d8279aca14d6a408c6e3d9 Mon Sep 17 00:00:00 2001 From: Integer Limit <103940576+IntegerLimit@users.noreply.github.com> Date: Mon, 19 Feb 2024 19:18:11 +1100 Subject: [PATCH] Fix Duplicate Tooltip --- .../api/fluids/GeneratedFluidHandler.java | 12 ++---------- .../recipes/alloyblast/AlloyBlastRecipeProducer.java | 11 +++++++---- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/src/main/java/gregicality/multiblocks/api/fluids/GeneratedFluidHandler.java b/src/main/java/gregicality/multiblocks/api/fluids/GeneratedFluidHandler.java index 2ad25ecd..fee75579 100644 --- a/src/main/java/gregicality/multiblocks/api/fluids/GeneratedFluidHandler.java +++ b/src/main/java/gregicality/multiblocks/api/fluids/GeneratedFluidHandler.java @@ -1,13 +1,10 @@ package gregicality.multiblocks.api.fluids; -import net.minecraftforge.fluids.Fluid; - import org.jetbrains.annotations.ApiStatus; import org.jetbrains.annotations.NotNull; import gregtech.api.GregTechAPI; import gregtech.api.fluids.FluidBuilder; -import gregtech.api.fluids.store.FluidStorageKeys; import gregtech.api.unification.material.Material; import gregtech.api.unification.material.properties.BlastProperty; import gregtech.api.unification.material.properties.FluidProperty; @@ -50,13 +47,8 @@ public static void createMoltenFluid(@NotNull Material material) { if (alloyBlastProperty.shouldGenerateMolten(material)) { fluidProperty.getStorage().enqueueRegistration(GCYMFluidStorageKeys.MOLTEN, new FluidBuilder() .temperature(alloyBlastProperty.getTemperature())); - } else { - // not hot enough to produce molten fluid, so produce regular fluid - FluidBuilder liquidBuilder = fluidProperty.getStorage().getQueuedBuilder(FluidStorageKeys.LIQUID); - if (liquidBuilder == null) return; - - Fluid fluid = liquidBuilder.build(material.getModid(), material, FluidStorageKeys.LIQUID); - fluidProperty.getStorage().store(GCYMFluidStorageKeys.MOLTEN, fluid); } + // if it is not hot enough to produce molten fluid, ABS Producer grabs normal liquid, + // thus we don't need to do anything. } } diff --git a/src/main/java/gregicality/multiblocks/api/recipes/alloyblast/AlloyBlastRecipeProducer.java b/src/main/java/gregicality/multiblocks/api/recipes/alloyblast/AlloyBlastRecipeProducer.java index 4d244e27..4d70f516 100644 --- a/src/main/java/gregicality/multiblocks/api/recipes/alloyblast/AlloyBlastRecipeProducer.java +++ b/src/main/java/gregicality/multiblocks/api/recipes/alloyblast/AlloyBlastRecipeProducer.java @@ -47,20 +47,23 @@ public void produce(@NotNull Material material, @NotNull BlastProperty blastProp if (componentAmount < 2) return; // get the output fluid - Fluid molten = material.getFluid(GCYMFluidStorageKeys.MOLTEN); - if (molten == null) return; + Fluid output = material.getFluid(GCYMFluidStorageKeys.MOLTEN); + if (output == null) { + output = material.getFluid(FluidStorageKeys.LIQUID); + if (output == null) return; + } RecipeBuilder builder = createBuilder(blastProperty, material); int outputAmount = addInputs(material, builder); if (outputAmount <= 0) return; - buildRecipes(blastProperty, molten, outputAmount, componentAmount, builder); + buildRecipes(blastProperty, output, outputAmount, componentAmount, builder); // if the material does not need a vacuum freezer, exit if (!OrePrefix.ingotHot.doGenerateItem(material)) return; - addFreezerRecipes(material, molten, blastProperty); + addFreezerRecipes(material, output, blastProperty); } /**