ntx4core/src/main/java/net/anvilcraft/ntx4core/recipes/InputReplacements.java

129 lines
4.7 KiB
Java
Raw Normal View History

2023-10-18 19:43:45 +02:00
package net.anvilcraft.ntx4core.recipes;
2023-10-30 18:20:54 +01:00
import net.anvilcraft.anvillib.Util;
2023-11-01 18:12:39 +01:00
import net.anvilcraft.anvillib.event.Bus;
import net.anvilcraft.anvillib.event.IEventBusRegisterable;
2023-10-30 18:20:54 +01:00
import net.anvilcraft.anvillib.recipe.InputReplaceRecipeMapper;
import net.anvilcraft.anvillib.recipe.RecipesEvent;
2023-10-18 19:43:45 +02:00
import net.minecraft.util.Identifier;
2023-10-30 18:20:54 +01:00
import net.minecraftforge.fml.loading.FMLEnvironment;
2023-10-18 19:43:45 +02:00
2023-11-01 18:12:39 +01:00
public class InputReplacements implements IEventBusRegisterable {
public void replaceInputs(RecipesEvent ev) {
2023-10-18 19:43:45 +02:00
var darkMatter = Util.ingredientFromString("projecte:dark_matter");
ev.mapRecipeID(
new Identifier("draconicevolution", "components/draconium_core"),
2023-12-22 11:39:16 +01:00
new InputReplaceRecipeMapper().replace("#forge:ingots/gold", "#forge:pellets/polonium")
2023-10-18 19:43:45 +02:00
);
ev.mapRecipeID(
new Identifier("draconicevolution", "components/wyvern_core"),
new InputReplaceRecipeMapper().replace("#forge:ingots/draconium", darkMatter)
);
2023-12-22 11:39:16 +01:00
ev.mapRecipeID(
new Identifier("draconicevolution", "wyvern_relay_crystal"),
new InputReplaceRecipeMapper().replace("draconicevolution:draconium_core", "draconicevolution:wyvern_core")
);
2023-10-18 19:43:45 +02:00
ev.mapRecipeID(
new Identifier("projecte", "relay_mk1"),
new InputReplaceRecipeMapper().replace(
2023-12-06 22:36:17 +01:00
"#forge:storage_blocks/diamond", "ftbic:antimatter"
2023-10-18 19:43:45 +02:00
)
);
2023-11-30 16:45:33 +01:00
ev.mapRecipeID(
new Identifier("projecte", "collector_mk1"),
new InputReplaceRecipeMapper().replace(
2023-12-06 22:36:17 +01:00
"#forge:storage_blocks/diamond", "ftbic:antimatter"
2023-11-30 16:45:33 +01:00
)
);
2023-11-29 13:04:33 +01:00
ev.mapRecipeID(
new Identifier("rftoolsbase", "machine_frame"),
new InputReplaceRecipeMapper().replace(
"minecraft:iron_ingot", "#forge:ingots/steel"
)
);
2023-11-30 18:55:41 +01:00
ev.mapRecipeID(
new Identifier("advgenerators", "crafting/iron_frame"),
new InputReplaceRecipeMapper().replace(
"#forge:ingots/iron", "#forge:ingots/steel"
)
);
ev.mapRecipeID(
new Identifier("advgenerators", "crafting/controller"),
new InputReplaceRecipeMapper().replace(
"#forge:ingots/iron", "#forge:ingots/steel"
)
);
2023-12-06 22:36:17 +01:00
ev.mapRecipeID(
new Identifier("ftbic", "shaped/antimatter_fabricator"),
new InputReplaceRecipeMapper().replace(
"minecraft:nether_star", "draconicevolution:awakened_core"
)
);
2023-12-22 11:39:16 +01:00
ev.mapRecipeID(
new Identifier("mekanism", "antiprotonic_nucleosynthesizer"),
new InputReplaceRecipeMapper().replace(
"#forge:pellets/antimatter",
"draconicevolution:wyvern_core"
)
);
ev.mapRecipes(new InputReplaceRecipeMapper().replace(
"mekanism:pellet_polonium", "#forge:pellets/polonium"
));
2023-12-05 22:21:40 +01:00
var philosopherStoneMapper
= new InputReplaceRecipeMapper()
.replace("#forge:gems/diamond", "ae2:singularity")
.replace("#forge:dusts/redstone", "chemlib:erbium_dust")
.replace("#forge:dusts/glowstone", "psi:ivory_substance");
2023-10-18 19:43:45 +02:00
ev.mapRecipeID(
new Identifier("projecte", "philosophers_stone"), philosopherStoneMapper
);
ev.mapRecipeID(
new Identifier("projecte", "philosophers_stone_alt"), philosopherStoneMapper
);
// Unify DeepResonance machine frames
ev.mapRecipes(new InputReplaceRecipeMapper().replace(
"deepresonance:machine_frame", "rftoolsbase:machine_frame"
));
2023-11-29 13:04:33 +01:00
ev.mapRecipes(new InputReplaceRecipeMapper().replace(
"thermal:machine_frame", "industrialforegoing:machine_frame_simple"
));
2023-12-16 11:38:26 +01:00
// Creative Flight tweaks
ev.mapRecipeID(
new Identifier("mekanism", "module_gravitational_modulating_unit"),
new InputReplaceRecipeMapper()
.replace("#forge:nether_stars", "projecte:swiftwolf_rending_gale")
.replace("mekanism:ultimate_induction_provider", "projecte:klein_star_omega")
);
ev.mapRecipeID(
new Identifier("assemblylinemachines", "crafting/mystium_flight_harness"),
new InputReplaceRecipeMapper()
.replace("minecraft:elytra", "projecte:swiftwolf_rending_gale")
.replace("minecraft:phantom_membrane", "projecte:klein_star_omega")
);
2023-10-18 19:43:45 +02:00
}
2023-11-01 18:12:39 +01:00
@Override
public void registerEventHandlers(Bus bus) {
if (!FMLEnvironment.production)
return;
bus.register(RecipesEvent.class, this::replaceInputs);
}
2023-10-18 19:43:45 +02:00
}