IC2 Integration messes macerator recipes
Onigeshi opened this issue ยท 6 comments
Description of the Bug
Your integration with IC2 messes up the macerator recipes..
if (!RailcraftConfig.getRecipeConfig("ic2.macerator.bones"))
IC2Plugin.removeMaceratorRecipes(new ItemStack(Items.DYE, 1, 15));
if (!RailcraftConfig.getRecipeConfig("ic2.macerator.blaze"))
IC2Plugin.removeMaceratorRecipes(new ItemStack(Items.BLAZE_POWDER));
if (!RailcraftConfig.getRecipeConfig("ic2.macerator.cobble"))
IC2Plugin.removeMaceratorRecipes(new ItemStack(Blocks.COBBLESTONE));
if (!RailcraftConfig.getRecipeConfig("ic2.macerator.dirt"))
IC2Plugin.removeMaceratorRecipes(new ItemStack(Blocks.DIRT));
^^ this results in removing permanently these recipes from the macerator even though I have them added manually in the macerator.ini recipe file in IC2..
so is there a solution to this so modpack makers won't have such issues? Im using a mod which re-orders the OreDict priority by mods.. I have the railcraft at the bottom so every item ( dusts, ingots, plates ) that exists already wont get overlapped.. but it seems like how the RailCraft - IC2 integration is made its either RailCraft output or none.. I though this could be considered worth reporting..
EDIT: seems like even if I use item ids instead of oredict ( minecraft:obsidian = thermalfoundation:material@770 ) the recipe still gets removed from the macerator if I have the crushed obsidian disabled in railcraft config.. so.. can't this be done like instead of removing the recipe that are added by the integration, to not register them if they are disabled in the config ? avoiding issues like this..
If you don't want it to be removed.... why don't you disable it in the railcraft config?
if (!RailcraftConfig.getRecipeConfig("ic2.macerator.bones"))
These settings are off by default, so if its affecting your IC2, why did you turn them on?
Also if you are refering to UniDict, I don't believe it supports Railcraft.
I'm honestly a big confused as to what the problem is here.
So, I'll try to be more clear and describing this issue by example because I know my english is not that good and maybe you can't understand what Im trying to say..
So.. Everything has been tested in a new minecraft instance, with only the following mods installed: JEI, IC2, Railcraft, IndustrialCraft and Thermal Expansion mods so no oredict unifying mods or priority reordering mods.
First, minecraft:obsidian = thermalfoundation:material@770*4
I added this to the macerator.ini
recipe file in IC2 to output thermal expansion variant of obsidian dust instead of IC2 or Railcraft.
At this point the recipe didn't get added because there already is a recipe added by Railcraft which is crushed obsidian to obsidian dust ( railcraft variant )
Now, as you suggested I go to the Railcraft config and change this from true to false
# change to 'obsidian=false' to disable the IC2 Macerator recipes for Crushed Obsidian and Obsidian Dust
#
B:obsidian=false
Now neither one of the recipes gets added, neither railcraft one nor the recipe I added manually to the macerator.ini file in IC2, ( at least from what I understand reading the source code, im not a coder so maybe I am wrong ),
if (Mod.anyLoaded(Mod.IC2, Mod.IC2_CLASSIC) && RailcraftItems.DUST.isEnabled()) {
ItemStack obsidian = new ItemStack(Blocks.OBSIDIAN);
IC2Plugin.removeMaceratorRecipes(recipe -> recipe.getInput().matches(obsidian));
IC2Plugin.removeMaceratorRecipes(recipe -> recipe.getInput().matches(obsidian) && OreDictPlugin.hasOreType("dustObsidian", recipe.getOutput()));
if (RailcraftConfig.getRecipeConfig("ic2.macerator.obsidian")) {
IC2Plugin.addMaceratorRecipe(new ItemStack(Blocks.OBSIDIAN), stack);
IC2Plugin.addMaceratorRecipe(stack, RailcraftItems.DUST.getStack(ItemDust.EnumDust.OBSIDIAN));
if I am right, disabling this doesnt actually remove the output by its OreDict from the macerator instead of disabling it from registering the Railcraft variant?
So because both the thermal expansion variant and railcraft variant obsidian dust are oredict dustObsidian both your variant and the one I added manually gets removed.. this (if im not wrong) applying for all the macerator recipes Railcraft adds and gets disabled in the config..
If you don't want it to be removed.... why don't you disable it in the railcraft config?
if (!RailcraftConfig.getRecipeConfig("ic2.macerator.bones"))
These settings are off by default, so if its affecting your IC2, why did you turn them on?
Also if you are refering to UniDict, I don't believe it supports Railcraft.
I'm honestly a big confused as to what the problem is here.
freshly installed railcraft, config freshly generated:
ic2 {
macerator {
#
# change to 'blaze=false' to disable the IC2 Macerator recipe for Blaze Powder
#
B:blaze=true
#
# change to 'bones=false' to disable the IC2 Macerator recipe for Bonemeal
#
B:bones=true
#
# change to 'charcoal=false' to disable the IC2 Macerator recipe for Charcoal Dust
#
B:charcoal=true
#
# change to 'cobble=false' to disable the IC2 Macerator recipes for Cobblestone
#
B:cobble=true
#
# change to 'dirt=false' to disable the IC2 Macerator recipe for Dirt
#
B:dirt=true
#
# change to 'ender=false' to disable the IC2 Macerator recipe for Ender Powder
#
B:ender=true
#
# change to 'obsidian=false' to disable the IC2 Macerator recipes for Crushed Obsidian and Obsidian Dust
#
B:obsidian=true
#
# change to 'ores=false' to disable the IC2 Macerator recipes for Ore Dusts
#
B:ores=true
#
# change to 'slag=false' to disable the IC2 Macerator recipe for Slag Dust
#
B:slag=true
}
}
all of these were enabled by default, i dont quite understand what you mean disabled by default..
ic2 {
macerator {
#
# change to 'blaze=false' to disable the IC2 Macerator recipe for Blaze Powder
#
B:blaze=true
#
# change to 'bones=false' to disable the IC2 Macerator recipe for Bonemeal
#
B:bones=true
if (!RailcraftConfig.getRecipeConfig("ic2.macerator.bones"))
IC2Plugin.removeMaceratorRecipes(new ItemStack(Items.DYE, 1, 15));
Shows if you leave the default config, no recipe for bones is going to be removed.
removing permanently these recipes
Railcraft won't do anything if you leave the default configs to true
. Remember that.
As a result, the solution you desire here is to leave railcraft config and modify ic2 config for machine recipes instead.
By the way, what is your native language? Some member in the community might be able to help.
@liach look at the code snippet he posted for obsidian. It appears to actually be doing as he says, removing obsidian recipes. Its handled differently from the rest. The original code posted for bones etc is irrelevant, which lead to the confusion.
Railcraft/src/main/java/mods/railcraft/common/modules/ModuleResources.java
Lines 139 to 155 in f1e2358
IC2Plugin.removeMaceratorRecipes(recipe -> recipe.getInput().matches(obsidian));
You're PR would limit the scope of this by the way.