Alchemistry

Alchemistry

16M Downloads

[1.12.2] Chemical Combiner recipe removal with CraftTweaker doesn't remove all affected recipes

Atricos opened this issue ยท 7 comments

commented

I'm currently playing alchemistry-1.12.2-41 (the newest version for 1.12.2), and using CraftTweaker to change some of the Chemical Combiner recipes.

This line
mods.alchemistry.Combiner.removeRecipe(<bewitchment:salt>);
does not remove all affected recipes, it leaves 2 out of 6 untouched:
image

Originally, you could get Salt from Solidum Chloride by placing the compound in any of the first 6 slots. I was expecting that all of those recipes would get removed by the above code, however, only recipes from Slot 1, 4, 5, and 6 have been removed.

Note: The reason I'm doing this is to switch to Mekanism Salt by adding the line:
mods.alchemistry.Combiner.addRecipe(<mekanism:salt>, [<alchemistry:compound:6> * 8]);

commented

It looks like it's probably caused by something i'm doing a little weird in the oredict

https://github.com/al132mc/alchemistry/blob/1.12.2/src/main/java/al132/alchemistry/recipes/ModRecipes.kt#L228

Try removing recipes by these oredicts instead "lumpSalt", "materialSalt", "salt", "itemSalt", "dustSalt", "foodSalt"
i.e.

 mods.alchemistry.Combiner.removeRecipe(<ore:lumpSalt>);
 mods.alchemistry.Combiner.removeRecipe(<ore:materialSalt>);
 mods.alchemistry.Combiner.removeRecipe(<ore:salt>);
 mods.alchemistry.Combiner.removeRecipe(<ore:itemSalt>);
 mods.alchemistry.Combiner.removeRecipe(<ore:dustSalt>);
 mods.alchemistry.Combiner.removeRecipe(<ore:foodSalt>);

Apologies for that not being more transparent, i'll probably have to clean that code up.

commented

Thank you for the quick answer! I'll make sure to do that instead.

commented

Well it seems that
mods.alchemistry.Combiner.removeRecipe
doesn't support removal by OreDict.

For example the code
mods.alchemistry.Combiner.removeRecipe(<ore:itemSalt>);
resulted in the following error:
image

commented

Ah right - i'm thinking of the dissolver where you can remove inputs by oredict. I will have to release an update to fix the duplicate recipes.

commented

Unfortunately it's a bit difficult for me to test this on my own without the exact same configs/mods/scripts as you, so could you please test this dev version to make sure that it works before I release a public update?

alchemistry-1.12.2-42-dev-1.jar

commented

And I found even more OreDicionaries that Salt can be in. Bewitchment uses all of the ones you listed, plus these ones:
listAllSalt, ingredientSalt, pinchSalt, portionSalt

When removing Bewitchment Salt from all of the Salt OreDicts, Alchemistry will no longer recognize it as Salt (obviously):

val saltOreDicts = [<ore:itemSalt>,<ore:dustSalt>,<ore:foodSalt>,<ore:salt>,<ore:listAllSalt>,<ore:ingredientSalt>,<ore:pinchSalt>,<ore:portionSalt>,<ore:lumpSalt>,<ore:materialSalt>] as IOreDictEntry[];
for oredict in saltOreDicts {
	recipes.replaceAllOccurences(oredict, <mekanism:salt>, <*>);
	oredict.remove(<bewitchment:salt>);
}

And I think this workaround suits my needs.

commented

Sorry that I'm replying only now, but it's the next day and I was sleeping.

Alchemistry didn't load with this jar. I think you included the wrong jar in the download, the sources file.