Croptopia

Croptopia

30M Downloads

Add load condition to the Guide recipe in Fabric

Nixill opened this issue ยท 1 comments

commented

Make sure you are not opening a duplicate.

Description of your suggestion.

The Guide recipe should only be loaded if Patchouli is actually installed, rather than having a recipe that creates a "Patchouli is not installed." when it's not.

Fabric has a way to only load crafting recipes if other mods exist, under fabric:load_conditions within the recipe JSON. TechReborn uses this if you'd like to see working examples.

The following should work, but I'm not opening a PR because it's untested (in particular, I don't know if I have the mod ID right):

{
  "type": "minecraft:crafting_shapeless",
  "ingredients": [
    {
      "tag": "c:crops"
    },
    {
      "tag": "c:crops"
    },
    {
      "tag": "c:crops"
    },
    {
      "item": "minecraft:book"
    }
  ],
  "result": {
    "item": "croptopia:guide",
    "count": 1
  },
  "fabric:load_conditions": [
    {
      "condition": "fabric:all_mods_loaded",
      "values": [
        "patchouli"
      ]
    }
  ]
}
commented

2.2.0 is being uploaded, both forge and fabric have this in place. Thank you for the suggestion!