|
2 | 2 |
|
3 | 3 | import com.gregtechceu.gtceu.api.data.chemical.ChemicalHelper; |
4 | 4 | import com.gregtechceu.gtceu.api.data.chemical.material.Material; |
| 5 | +import com.gregtechceu.gtceu.api.data.chemical.material.info.MaterialFlag; |
| 6 | +import com.gregtechceu.gtceu.api.data.chemical.material.info.MaterialFlags; |
5 | 7 | import com.gregtechceu.gtceu.api.data.chemical.material.properties.OreProperty; |
6 | 8 | import com.gregtechceu.gtceu.api.data.chemical.material.properties.PropertyKey; |
7 | 9 | import com.gregtechceu.gtceu.api.data.chemical.material.stack.MaterialStack; |
@@ -54,7 +56,7 @@ private static void processMetalSmelting(TagPrefix crushedPrefix, Material mater |
54 | 56 | if (smeltingResult.hasProperty(PropertyKey.INGOT)) { |
55 | 57 | ItemStack ingotStack = ChemicalHelper.get(ingot, smeltingResult); |
56 | 58 |
|
57 | | - if (!ingotStack.isEmpty() && doesMaterialUseNormalFurnace(smeltingResult)) { |
| 59 | + if (!ingotStack.isEmpty() && doesMaterialUseNormalFurnace(smeltingResult) && !crushedPrefix.isIgnored(material)) { |
58 | 60 | VanillaRecipeHelper.addSmeltingRecipe(provider, "smelt_" + crushedPrefix.name + "_" + material.getName() + "_to_ingot", |
59 | 61 | ChemicalHelper.getTag(crushedPrefix, material), ingotStack, 0.5f); |
60 | 62 | } |
@@ -161,7 +163,7 @@ public static void processRawOre(TagPrefix orePrefix, Material material, OreProp |
161 | 163 | .save(provider); |
162 | 164 | } |
163 | 165 |
|
164 | | - //do not try to add smelting recipes for materials which require blast furnace |
| 166 | + //do not try to add smelting recipes for materials which require blast furnace, or don't have smelting recipes at all. |
165 | 167 | if (!ingotStack.isEmpty() && doesMaterialUseNormalFurnace(smeltingMaterial) && !orePrefix.isIgnored(material)) { |
166 | 168 | float xp = Math.round(((1 + property.getOreMultiplier() * 0.33f) / 3) * 10f) / 10f; |
167 | 169 | VanillaRecipeHelper.addSmeltingRecipe(provider, "smelt_" + orePrefix.name + "_" + material.getName() + "_ore_to_ingot", |
@@ -429,7 +431,7 @@ public static void processPureDust(TagPrefix purePrefix, Material material, OreP |
429 | 431 | } |
430 | 432 |
|
431 | 433 | private static boolean doesMaterialUseNormalFurnace(Material material) { |
432 | | - return !material.hasProperty(PropertyKey.BLAST); |
| 434 | + return !material.hasProperty(PropertyKey.BLAST) && !material.hasFlag(MaterialFlags.NO_SMELTING); |
433 | 435 | } |
434 | 436 |
|
435 | 437 |
|
|
0 commit comments