Compare commits

...

2 Commits

Author SHA1 Message Date
IThundxr
2a4232a61a
Merge 7a7c65884f into 11787d845f 2024-09-18 19:41:44 +00:00
IThundxr
7a7c65884f
Fix #6916 2024-09-18 15:41:03 -04:00
9 changed files with 41 additions and 20 deletions

View File

@ -2359,7 +2359,7 @@ aec7192be51a921f7c2f9e52ca64e65cf92abf1f data/create/advancements/pipe_organ.jso
abf054890da41c46221fddc2474e18d077b3c1a2 data/create/advancements/precision_mechanism.json
9eb2508128ae938f0e654f3b316aa324dd6a18e8 data/create/advancements/pulley_maxed.json
99361c643eb6fd9e0a97420f6b5d3df8bf7dbc3f data/create/advancements/recipes/building_blocks/andesite_from_stone_types_andesite_stonecutting.json
0989187987645c6b13ed453e0499a59962b8c767 data/create/advancements/recipes/building_blocks/blasting/ingot_aluminum_compat_ic2.json
28d60ca8f6505017965426f65d842facafe44fec data/create/advancements/recipes/building_blocks/blasting/ingot_aluminium_compat_ic2.json
29a2f29f50306abaac8aa361102d3a30677fcd85 data/create/advancements/recipes/building_blocks/blasting/ingot_aluminum_compat_immersiveengineering.json
c6095aa02996b040d7a1ead9d32d720cd311ae7e data/create/advancements/recipes/building_blocks/blasting/ingot_lead_compat_immersiveengineering.json
60e56e5c1d38762c04634f9c8e43c5e42a002046 data/create/advancements/recipes/building_blocks/blasting/ingot_lead_compat_mekanism.json
@ -2389,7 +2389,7 @@ d252ea6ae1f88ab2286357d3a05a643eec7d92c3 data/create/advancements/recipes/buildi
78972bdf05d79e5357ff5771caa13d631e2c2740 data/create/advancements/recipes/building_blocks/smelting/glass_from_horizontal_framed_glass.json
c8edb1be5163aaeebdd94f4c25ef45bf839200c0 data/create/advancements/recipes/building_blocks/smelting/glass_from_tiled_glass.json
c70af1a552a80137cf25780b481387a585e551f3 data/create/advancements/recipes/building_blocks/smelting/glass_from_vertical_framed_glass.json
96fdd3a575b158b657ddd0709a05ffa7ab4b0457 data/create/advancements/recipes/building_blocks/smelting/ingot_aluminum_compat_ic2.json
9a36450a9b8f0752202eb4dfb48d0c10051270c5 data/create/advancements/recipes/building_blocks/smelting/ingot_aluminium_compat_ic2.json
4b86c2a3784cc837ab8b49c678517b53db188916 data/create/advancements/recipes/building_blocks/smelting/ingot_aluminum_compat_immersiveengineering.json
cd59dee91b03d293a8e6501acc734261858cdb56 data/create/advancements/recipes/building_blocks/smelting/ingot_lead_compat_immersiveengineering.json
80e276bd06ac555aa9203247a24f97c779cb80db data/create/advancements/recipes/building_blocks/smelting/ingot_lead_compat_mekanism.json
@ -3864,7 +3864,7 @@ a133d4d2542c0b9309873d06a72e7efff4cee219 data/create/recipes/asurine_pillar_from
288d80210f7efb4664e2e9c9d9111049863e5f60 data/create/recipes/birch_window_pane.json
70b34d9573875b9bc15f8d71baac81ecd7c0ab60 data/create/recipes/blasting/copper_ingot_from_crushed.json
9f9f50e6f65d3077ee7c39403fffb31fea3bb408 data/create/recipes/blasting/gold_ingot_from_crushed.json
1002fb0e5f3ab0068c381ebc6488b868671d9f66 data/create/recipes/blasting/ingot_aluminum_compat_ic2.json
7f7f9f631e3c96af0446ad5d87ac47fb7f70d08d data/create/recipes/blasting/ingot_aluminium_compat_ic2.json
172904335190876e7b52bad7031b7d8f3fba426e data/create/recipes/blasting/ingot_aluminum_compat_immersiveengineering.json
9ba4fc584e7a275cf5b3785fead3dd21fd0d2172 data/create/recipes/blasting/ingot_lead_compat_immersiveengineering.json
020618b989b39ab6e6d5ce5fcf786afc23fb0dc0 data/create/recipes/blasting/ingot_lead_compat_mekanism.json
@ -5752,7 +5752,7 @@ daaa640dbfaa86685de636b89afe2fdd74cd0cf9 data/create/recipes/smelting/glass_pane
48bdeff8ca1ae7bf732fc870fb0fa294de56188a data/create/recipes/smelting/glass_pane_from_tiled_glass_pane.json
7035be7cce5a38c794d9cc872801329af81bac46 data/create/recipes/smelting/glass_pane_from_vertical_framed_glass_pane.json
a4fb256e4cc6cd9e450b054e8489f26655f6a1d2 data/create/recipes/smelting/gold_ingot_from_crushed.json
1d173fd2909e08c70d52051789e838757df6a1fa data/create/recipes/smelting/ingot_aluminum_compat_ic2.json
373278db29392d1a9823e71f09b28ed55789cd2b data/create/recipes/smelting/ingot_aluminium_compat_ic2.json
57996aea2f6456c936e248e4fd84fa5387fd3c4f data/create/recipes/smelting/ingot_aluminum_compat_immersiveengineering.json
cadbfc99cab88f87a431cc8853e280d3871c4542 data/create/recipes/smelting/ingot_lead_compat_immersiveengineering.json
1b029da974db92f0bfa456c6aae9ffb709441ea7 data/create/recipes/smelting/ingot_lead_compat_mekanism.json
@ -5803,7 +5803,7 @@ fa9294fb2fbe22110ae122a616379b73ccf1d5c3 data/create/recipes/splashing/galospher
c4d680eed98791fe45fa93aeeae9e8dbd508d6f5 data/create/recipes/splashing/gravel.json
7af4d9ae50af13da0d4fc814687f9586ff872798 data/create/recipes/splashing/gray_concrete_powder.json
23fb61c0e4bcca58fa7241db9cbef07bf4bd9a9b data/create/recipes/splashing/green_concrete_powder.json
82707bd9a72c35926ebf116fea1c4d9aea9a127a data/create/recipes/splashing/ic2/crushed_raw_aluminum.json
2c934a49e7766b12dd708e557a8b0ebc5600753b data/create/recipes/splashing/ic2/crushed_raw_aluminum.json
f18f823c0274518a13da3be2850b916a6ece2900 data/create/recipes/splashing/ic2/crushed_raw_silver.json
71b4e6a4d62ec437f02bd2029455eb7ba5bb3943 data/create/recipes/splashing/ic2/crushed_raw_tin.json
8da1397c440f27a5af4cbfc169bcf74f83bf3c8a data/create/recipes/splashing/ic2/crushed_raw_uranium.json

View File

@ -2,7 +2,7 @@
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"create:blasting/ingot_aluminum_compat_ic2"
"create:blasting/ingot_aluminium_compat_ic2"
]
},
"criteria": {
@ -21,7 +21,7 @@
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "create:blasting/ingot_aluminum_compat_ic2"
"recipe": "create:blasting/ingot_aluminium_compat_ic2"
}
}
},

View File

@ -2,7 +2,7 @@
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"create:smelting/ingot_aluminum_compat_ic2"
"create:smelting/ingot_aluminium_compat_ic2"
]
},
"criteria": {
@ -21,7 +21,7 @@
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "create:smelting/ingot_aluminum_compat_ic2"
"recipe": "create:smelting/ingot_aluminium_compat_ic2"
}
}
},

View File

@ -3,7 +3,7 @@
"ingredient": {
"item": "create:crushed_raw_aluminum"
},
"result": "ic2:ingot_aluminum",
"result": "ic2:ingot_aluminium",
"experience": 0.1,
"cookingtime": 100,
"conditions": [

View File

@ -3,7 +3,7 @@
"ingredient": {
"item": "create:crushed_raw_aluminum"
},
"result": "ic2:ingot_aluminum",
"result": "ic2:ingot_aluminium",
"experience": 0.1,
"cookingtime": 200,
"conditions": [

View File

@ -7,7 +7,7 @@
],
"results": [
{
"item": "ic2:nugget_aluminum",
"item": "ic2:nugget_aluminium",
"count": 9
}
],

View File

@ -1,21 +1,25 @@
package com.simibubi.create.foundation.data.recipe;
import java.util.HashMap;
import java.util.Map;
import java.util.function.Consumer;
import com.simibubi.create.foundation.utility.Pair;
import net.minecraft.resources.ResourceLocation;
public enum Mods {
MEK("mekanism", b -> b.reverseMetalPrefix()),
MEK("mekanism", Builder::reverseMetalPrefix),
TH("thermal"),
IE("immersiveengineering", b -> b.reverseMetalPrefix()),
IE("immersiveengineering", Builder::reverseMetalPrefix),
FD("farmersdelight"),
ARS_N("ars_nouveau"),
BSK("blue_skies"),
BTN("botania", b -> b.omitWoodSuffix()),
BTN("botania", Builder::omitWoodSuffix),
FA("forbidden_arcanus", b -> b.omitWoodSuffix()),
HEX("hexcasting", b -> b.strippedWoodIsSuffix()),
ID("integrateddynamics", b -> b.strippedWoodIsSuffix()),
ID("integrateddynamics", Builder::strippedWoodIsSuffix),
BYG("byg"),
SG("silentgear"),
TIC("tconstruct"),
@ -24,9 +28,9 @@ public enum Mods {
BOP("biomesoplenty"),
TF("twilightforest"),
ECO("ecologics"),
IC2("ic2", b -> b.reverseMetalPrefix()),
IC2("ic2", b -> b.reverseMetalPrefix().addNameReplacements(Map.of("aluminum", "aluminium"))),
ATM("atmospheric"),
ATM_2("atmospheric", b -> b.omitWoodSuffix()),
ATM_2("atmospheric", Builder::omitWoodSuffix),
AUTUM("autumnity"),
DRUIDCRAFT("druidcraft"),
ENDER("endergetic"),
@ -64,6 +68,7 @@ public enum Mods {
public boolean reversedMetalPrefix;
public boolean strippedIsSuffix;
public boolean omitWoodSuffix;
public final Map<String, String> nameReplacements = new HashMap<>();
private Mods(String id) {
this(id, b -> {
@ -103,6 +108,7 @@ public enum Mods {
return id;
}
@SuppressWarnings("UnusedReturnValue")
class Builder {
Builder reverseMetalPrefix() {
@ -120,6 +126,12 @@ public enum Mods {
return this;
}
Builder addNameReplacements(Map<String, String> map) {
for (String p : map.keySet())
nameReplacements.put(p, map.get(p));
return this;
}
}
}

View File

@ -12,6 +12,7 @@ import static com.simibubi.create.foundation.data.recipe.CompatMetals.URANIUM;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.function.UnaryOperator;
import com.google.common.base.Supplier;
@ -1225,6 +1226,10 @@ public class StandardRecipeGen extends CreateRecipeProvider {
GeneratedRecipe blastModdedCrushedMetal(ItemEntry<? extends Item> ingredient, CompatMetals metal) {
String metalName = metal.getName();
for (Mods mod : metal.getMods()) {
for (Map.Entry<String, String> entry : mod.nameReplacements.entrySet()) {
metalName = metalName.replace(entry.getKey(), entry.getValue());
}
ResourceLocation ingot = mod.ingotOf(metalName);
String modId = mod.getId();
create(ingot).withSuffix("_compat_" + modId)

View File

@ -10,6 +10,7 @@ import static com.simibubi.create.foundation.data.recipe.CompatMetals.SILVER;
import static com.simibubi.create.foundation.data.recipe.CompatMetals.TIN;
import static com.simibubi.create.foundation.data.recipe.CompatMetals.URANIUM;
import java.util.Map;
import java.util.function.Supplier;
import com.simibubi.create.AllItems;
@ -135,9 +136,12 @@ public class WashingRecipeGen extends ProcessingRecipeGen {
public GeneratedRecipe moddedCrushedOre(ItemEntry<? extends Item> crushed, CompatMetals metal) {
String metalName = metal.getName();
for (Mods mod : metal.getMods()) {
for (Map.Entry<String, String> entry : mod.nameReplacements.entrySet()) {
metalName = metalName.replace(entry.getKey(), entry.getValue());
}
ResourceLocation nugget = mod.nuggetOf(metalName);
create(mod.getId() + "/" + crushed.getId()
.getPath(),
create(mod.getId() + "/" + crushed.getId().getPath(),
b -> b.withItemIngredients(Ingredient.of(crushed::get))
.output(1, nugget, 9)
.whenModLoaded(mod.getId()));