cleaned up and fixed the raw ore to smelting recipes #1566
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
- Fixed Electric Greenhouse log recipes so they're back to only needing half an amp of LV (#1564) @TomPlop
|
||||
- Fixed missing quern recipes for softwood/hardwood pulp (#1561) @Pyritie
|
||||
- Fixed duplicate red alloy mixing recipe (#1565) @Pyritie
|
||||
- Fixed many raw ores missing smelting recipes (#1566) @Pyritie
|
||||
|
||||
## [0.10.7] - 07-08-2025
|
||||
- Fixed an issue with mod dependencies
|
||||
|
||||
@@ -183,7 +183,8 @@ function registerGTCEUMetalRecipes(event) {
|
||||
if (material.hasFlag(MaterialFlags.GENERATE_PLATE)
|
||||
&& material !== GTMaterials.Wood
|
||||
&& material !== GTMaterials.TreatedWood
|
||||
&& !material.hasProperty(PropertyKey.POLYMER)) {
|
||||
&& !material.hasProperty(PropertyKey.POLYMER))
|
||||
{
|
||||
const plateStack = ChemicalHelper.get(TagPrefix.plate, material, 1)
|
||||
const blockStack = ChemicalHelper.get(TagPrefix.block, material, 1)
|
||||
|
||||
@@ -386,6 +387,38 @@ function registerGTCEUMetalRecipes(event) {
|
||||
.EUt(GTValues.VA[GTValues.ULV])
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {com.gregtechceu.gtceu.api.data.chemical.material.Material_} material
|
||||
* @param {*} oreProperty
|
||||
* @param {number} multiplier
|
||||
* @param {Internal.ItemStack} oreItem
|
||||
* @param {string} type
|
||||
*/
|
||||
function smeltOre(material, oreProperty, multiplier, oreItem, type) {
|
||||
const smeltingMaterial = oreProperty.getDirectSmeltResult().isNull() ? material : oreProperty.getDirectSmeltResult();
|
||||
if (!material.hasProperty(PropertyKey.BLAST) && !material.hasFlag(MaterialFlags.NO_ORE_SMELTING)) {
|
||||
let ingotItem;
|
||||
if (smeltingMaterial.hasProperty(PropertyKey.INGOT)) {
|
||||
ingotItem = ChemicalHelper.getIngot(smeltingMaterial, GTValues.M * multiplier)
|
||||
}
|
||||
else if (smeltingMaterial.hasProperty(PropertyKey.GEM)) {
|
||||
if (multiplier >= 1) {
|
||||
ingotItem = ChemicalHelper.get(TagPrefix.gem, smeltingMaterial, multiplier)
|
||||
}
|
||||
else {
|
||||
ingotItem = ChemicalHelper.get(TagPrefix.gemFlawed, smeltingMaterial, 1)
|
||||
}
|
||||
}
|
||||
else {
|
||||
ingotItem = ChemicalHelper.getDust(smeltingMaterial, GTValues.M * multiplier)
|
||||
}
|
||||
|
||||
if (!ingotItem.isEmpty()) {
|
||||
event.smelting(ingotItem, oreItem).id(`gtceu:smelting/smelt_${type}_${material.getName()}_ore_to_ingot`)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {com.gregtechceu.gtceu.api.data.chemical.material.Material_} material
|
||||
*/
|
||||
@@ -396,15 +429,7 @@ function registerGTCEUMetalRecipes(event) {
|
||||
if (poorOreItem === null || crushedOreItem === null) return;
|
||||
|
||||
const oreProperty = material.getProperty(PropertyKey.ORE)
|
||||
const smeltingMaterial = oreProperty.getDirectSmeltResult() === null ? material : oreProperty.getDirectSmeltResult();
|
||||
const multiplier = oreProperty.getOreMultiplier();
|
||||
|
||||
let ingotItem;
|
||||
if (smeltingMaterial.hasProperty(PropertyKey.INGOT)) ingotItem = ChemicalHelper.get(TagPrefix.nugget, smeltingMaterial, 5)
|
||||
else if (smeltingMaterial.hasProperty(PropertyKey.GEM)) ingotItem = ChemicalHelper.get(TagPrefix.gemFlawed, smeltingMaterial, 1)
|
||||
else ingotItem = ChemicalHelper.get(TagPrefix.dustSmall, smeltingMaterial, 1)
|
||||
|
||||
ingotItem.setCount(ingotItem.getCount() * multiplier)
|
||||
crushedOreItem.setCount(crushedOreItem.getCount() * multiplier)
|
||||
|
||||
// Forge hammer
|
||||
@@ -462,9 +487,7 @@ function registerGTCEUMetalRecipes(event) {
|
||||
}
|
||||
|
||||
// Smelting
|
||||
if (!material.hasProperty(PropertyKey.BLAST) && !ingotItem.isEmpty()) {
|
||||
event.smelting(ingotItem, poorOreItem).id(`gtceu:smelting/smelt_poor_raw_${material.getName()}_ore_to_ingot`)
|
||||
}
|
||||
smeltOre(material, oreProperty, multiplier / 2, poorOreItem, 'poor')
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -479,16 +502,6 @@ function registerGTCEUMetalRecipes(event) {
|
||||
if (normalOreItem === null || crushedOreItem === null)
|
||||
return;
|
||||
|
||||
const smeltingMaterial = oreProperty.getDirectSmeltResult() === null ? material : oreProperty.getDirectSmeltResult();
|
||||
|
||||
let ingotItem;
|
||||
if (smeltingMaterial.hasProperty(PropertyKey.INGOT))
|
||||
ingotItem = ChemicalHelper.get(TagPrefix.ingot, smeltingMaterial, multiplier)
|
||||
else if (smeltingMaterial.hasProperty(PropertyKey.GEM))
|
||||
ingotItem = ChemicalHelper.get(TagPrefix.gem, smeltingMaterial, multiplier)
|
||||
else
|
||||
ingotItem = ChemicalHelper.get(TagPrefix.dust, smeltingMaterial, multiplier)
|
||||
|
||||
// Forge hammer
|
||||
let hammerRecipe = event.recipes.gtceu.forge_hammer(`hammer_raw_${material.getName()}_to_crushed_ore`)
|
||||
.itemInputs(normalOreItem)
|
||||
@@ -531,14 +544,12 @@ function registerGTCEUMetalRecipes(event) {
|
||||
event.recipes.tfc.quern(crushedOreItem, normalOreItem)
|
||||
.id(`tfg:quern/${material.getName()}_crushed_ore_from_normal_raw_ore`)
|
||||
|
||||
// Smelting
|
||||
if (!material.hasProperty(PropertyKey.BLAST) && !ingotItem.isEmpty()) {
|
||||
event.smelting(ingotItem, normalOreItem).id(`gtceu:smelting/smelt_raw_${material.getName()}_ore_to_ingot`)
|
||||
}
|
||||
|
||||
// Remove ore block recipes
|
||||
event.remove({ id: `gtceu:compressor/compress_${material.getName()}_to_raw_ore_block` })
|
||||
event.remove({ id: `gtceu:forge_hammer/decompress_${material.getName()}_to_raw_ore` })
|
||||
|
||||
// Smelting
|
||||
smeltOre(material, oreProperty, multiplier, normalOreItem, 'raw')
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -553,16 +564,6 @@ function registerGTCEUMetalRecipes(event) {
|
||||
if (richOreItem === null || crushedOreItem === null)
|
||||
return;
|
||||
|
||||
const smeltingMaterial = oreProperty.getDirectSmeltResult() === null ? material : oreProperty.getDirectSmeltResult();
|
||||
|
||||
let ingotItem;
|
||||
if (smeltingMaterial.hasProperty(PropertyKey.INGOT))
|
||||
ingotItem = ChemicalHelper.get(TagPrefix.ingot, smeltingMaterial, multiplier)
|
||||
else if (smeltingMaterial.hasProperty(PropertyKey.GEM))
|
||||
ingotItem = ChemicalHelper.get(TagPrefix.gem, smeltingMaterial, multiplier)
|
||||
else
|
||||
ingotItem = ChemicalHelper.get(TagPrefix.dust, smeltingMaterial, multiplier)
|
||||
|
||||
// Forge hammer
|
||||
let hammerRecipe = event.recipes.gtceu.forge_hammer(`hammer_rich_raw_${material.getName()}_to_crushed_ore`)
|
||||
.itemInputs(richOreItem)
|
||||
@@ -604,9 +605,7 @@ function registerGTCEUMetalRecipes(event) {
|
||||
.id(`tfg:quern/${material.getName()}_crushed_ore_from_rich_raw_ore`)
|
||||
|
||||
// Smelting
|
||||
if (!material.hasProperty(PropertyKey.BLAST) && !ingotItem.isEmpty()) {
|
||||
event.smelting(ingotItem, richOreItem).id(`gtceu:smelting/smelt_rich_raw_${material.getName()}_ore_to_ingot`)
|
||||
}
|
||||
smeltOre(material, oreProperty, multiplier, richOreItem, 'rich')
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user