Create: Steam 'n' Rails

Create: Steam 'n' Rails

20M Downloads

[Request] Add Forge and fabric conditionals to recipes

Mitchell5200 opened this issue ยท 2 comments

commented

As per the title, please add the forge and fabric conditionals to your Data generated track recipes, as that'll then clear up any recipe errors that occur when a mod is not loaded, it also means you can then remove the error suppression mixin added in 1.4.0. Each loader should ignore the other loader's conditional code block as well, meaning no errors should occur due to this conditional addition.
(Tested by datapack overwriting one of the erroring BOP recipes)
Doing this will then correctly fix crashes like #171
We'd be happy to provide a PR implementing this datagen change.

Forge docs, https://docs.minecraftforge.net/en/latest/resources/server/conditional/
Fabric PR (could not find the doc), FabricMC/fabric#1656

Example of what will be added to each recipe once they are regenerated, copied from another multiloader mod, Ad Astra
Source
snippet

  "fabric:load_conditions": [
    {
      "condition": "fabric:all_mods_loaded",
      "values": [
        "biomesoplenty"
      ]
    }
  ],
  "conditions": [
    {
      "type": "forge:mod_loaded",
      "modid": "biomesoplenty"
    }
  ],
commented

Make a pr and I'll make sure it gets merged in (assuming it works of course)

commented