Skip to content

Commit 464618e

Browse files
authored
Fix Missing ABS Recipes for Alloys Without Molten Fluids (#67)
1 parent 267b5bc commit 464618e

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

src/main/java/gregicality/multiblocks/api/fluids/GeneratedFluidHandler.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
import gregtech.api.GregTechAPI;
77
import gregtech.api.fluids.FluidBuilder;
8-
import gregtech.api.fluids.store.FluidStorageKeys;
98
import gregtech.api.unification.material.Material;
109
import gregtech.api.unification.material.properties.BlastProperty;
1110
import gregtech.api.unification.material.properties.FluidProperty;
@@ -48,9 +47,8 @@ public static void createMoltenFluid(@NotNull Material material) {
4847
if (alloyBlastProperty.shouldGenerateMolten(material)) {
4948
fluidProperty.getStorage().enqueueRegistration(GCYMFluidStorageKeys.MOLTEN, new FluidBuilder()
5049
.temperature(alloyBlastProperty.getTemperature()));
51-
} else {
52-
// not hot enough to produce molten fluid, so produce regular fluid
53-
fluidProperty.getStorage().store(GCYMFluidStorageKeys.MOLTEN, material.getFluid(FluidStorageKeys.LIQUID));
5450
}
51+
// if it is not hot enough to produce molten fluid, ABS Producer grabs normal liquid,
52+
// thus we don't need to do anything.
5553
}
5654
}

src/main/java/gregicality/multiblocks/api/recipes/alloyblast/AlloyBlastRecipeProducer.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,20 +47,23 @@ public void produce(@NotNull Material material, @NotNull BlastProperty blastProp
4747
if (componentAmount < 2) return;
4848

4949
// get the output fluid
50-
Fluid molten = material.getFluid(GCYMFluidStorageKeys.MOLTEN);
51-
if (molten == null) return;
50+
Fluid output = material.getFluid(GCYMFluidStorageKeys.MOLTEN);
51+
if (output == null) {
52+
output = material.getFluid(FluidStorageKeys.LIQUID);
53+
if (output == null) return;
54+
}
5255

5356
RecipeBuilder<BlastRecipeBuilder> builder = createBuilder(blastProperty, material);
5457

5558
int outputAmount = addInputs(material, builder);
5659
if (outputAmount <= 0) return;
5760

58-
buildRecipes(blastProperty, molten, outputAmount, componentAmount, builder);
61+
buildRecipes(blastProperty, output, outputAmount, componentAmount, builder);
5962

6063
// if the material does not need a vacuum freezer, exit
6164
if (!OrePrefix.ingotHot.doGenerateItem(material)) return;
6265

63-
addFreezerRecipes(material, molten, blastProperty);
66+
addFreezerRecipes(material, output, blastProperty);
6467
}
6568

6669
/**

0 commit comments

Comments
 (0)