Skip to content

Commit

Permalink
Fix Duplicate Tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
IntegerLimit committed Feb 19, 2024
1 parent 4d549f2 commit a850d03
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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.
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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<BlastRecipeBuilder> 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);
}

/**
Expand Down

0 comments on commit a850d03

Please sign in to comment.