Strange Question

Is there any way to perform an if/else type of function with the code?

For example,
if archipelago_biome is installed, use its food:fish for recipe
else add food:fish and use it for recipe

Effectively, a way to check if something is already being added by another mod, before adding it again with your mod type of thing


One way for a recipe to accept multiple similar items is using the material tags. For example, the weaver does not ask for silkweed in his recipes, it asks for fiber, which can be silkweed, wool, tumbleweed, or even modded items like seaweed and cattail. So you could add your fish item and the recipe could ask for the material “fish”, accepting both items.

There is another way to actually replace things around, which is a little strange but works. You basically mod the manifest of the other mod to make it change your mod.
In this fish scenario, it would work more or less like this:

Create your recipe that uses your item as usual.
Then you create a second version that you want to run only when the archipelago is installed.
But only add the normal recipe to your crafter.
Then in your “mixintos” you add this:

	"mixintos": {

This crazy.json file contains something like:

	"overrides": {

This mean that after you inserted this code into the archipelago manifest, when the game runs, the archipelago will override your recipe with that second version. If there is no archipelago, your mixinto will fail (no errors) and there will be nothing overriding your recipe, so it will be the default one.

1 Like

Aha, this is the part I wasn’t sure about. thank you, @BrunoSupremo :heart: