diff --git a/src/main/java/gregtech/api/unification/material/Material.java b/src/main/java/gregtech/api/unification/material/Material.java index f3cfa882e57..c84b74e88ea 100644 --- a/src/main/java/gregtech/api/unification/material/Material.java +++ b/src/main/java/gregtech/api/unification/material/Material.java @@ -696,6 +696,12 @@ public Builder washedIn(Material m) { return this; } + public Builder washedIn(Material m, int washedAmount) { + properties.ensureSet(PropertyKey.ORE); + properties.getProperty(PropertyKey.ORE).setWashedIn(m, washedAmount); + return this; + } + public Builder separatedInto(Material... m) { properties.ensureSet(PropertyKey.ORE); properties.getProperty(PropertyKey.ORE).setSeparatedInto(m); diff --git a/src/main/java/gregtech/api/unification/material/properties/OreProperty.java b/src/main/java/gregtech/api/unification/material/properties/OreProperty.java index 44ef3b3fd23..09590da833e 100644 --- a/src/main/java/gregtech/api/unification/material/properties/OreProperty.java +++ b/src/main/java/gregtech/api/unification/material/properties/OreProperty.java @@ -1,6 +1,7 @@ package gregtech.api.unification.material.properties; import gregtech.api.unification.material.Material; +import org.apache.commons.lang3.tuple.Pair; import javax.annotation.Nullable; import java.util.ArrayList; @@ -53,6 +54,14 @@ public class OreProperty implements IMaterialProperty { @Nullable private Material washedIn; + /** + * The amount of Material that the ore should be washed in + * in the Chemical Bath. + *

+ * Default 100 mb + */ + private int washedAmount = 100; + /** * During Electromagnetic Separation, this Ore will be separated * into this Material and the Material specified by this field. @@ -105,9 +114,14 @@ public void setWashedIn(@Nullable Material m) { this.washedIn = m; } + public void setWashedIn(@Nullable Material m, int washedAmount) { + this.washedIn = m; + this.washedAmount = washedAmount; + } + @Nullable - public Material getWashedIn() { - return this.washedIn; + public Pair getWashedIn() { + return Pair.of(this.washedIn, this.washedAmount); } public void setSeparatedInto(Material... materials) { diff --git a/src/main/java/gregtech/loaders/oreprocessing/OreRecipeHandler.java b/src/main/java/gregtech/loaders/oreprocessing/OreRecipeHandler.java index c62a833b952..0e860e96fb1 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/OreRecipeHandler.java +++ b/src/main/java/gregtech/loaders/oreprocessing/OreRecipeHandler.java @@ -14,6 +14,7 @@ import gregtech.api.unification.stack.UnificationEntry; import gregtech.api.util.GTUtility; import net.minecraft.item.ItemStack; +import org.apache.commons.lang3.tuple.Pair; import java.util.List; @@ -168,9 +169,10 @@ public static void processCrushedOre(OrePrefix crushedPrefix, Material material, if (property.getWashedIn() != null) { Material washingByproduct = GTUtility.selectItemInList(3, material, property.getOreByProducts(), Material.class); + Pair washedInTuple = property.getWashedIn(); RecipeMaps.CHEMICAL_BATH_RECIPES.recipeBuilder() .input(crushedPrefix, material) - .fluidInputs(property.getWashedIn().getFluid(property.getWashedIn() == Materials.SodiumPersulfate ? 100 : 1000)) + .fluidInputs(washedInTuple.getKey().getFluid(washedInTuple.getRight())) .outputs(crushedPurifiedOre) .chancedOutput(OreDictUnifier.get(OrePrefix.dust, washingByproduct, property.getByProductMultiplier()), 7000, 580) .chancedOutput(OreDictUnifier.get(OrePrefix.dust, Materials.Stone), 4000, 650)