MattCzyr / NaturesCompass

A Minecraft mod that allows you to locate biomes anywhere in the world.
https://www.curseforge.com/minecraft/mc-mods/natures-compass
Other
62 stars 47 forks source link

[Fabric 1.20.4] A parsing error loading custom advancement shows up in the logs #172

Closed kingkuys2123 closed 4 months ago

kingkuys2123 commented 8 months ago

Minecraft 1.20.4 Fabric 0.15.3 Fabric API 0.91.3 Java 20.0.2 NaturesCompass 2.2.3

ISSUE

A parsing error loading custom advancement shows up in the logs

LOG

[13:50:35] [Render thread/ERROR]: Parsing error loading custom advancement naturescompass:natures_compass: Not a json array: "minecraft:compass" missed input: {"has_compass":{"trigger":"minecraft:inventory_changed","conditions":{"items":[{"items":"minecraft:compass"}]}}}

kingkuys2123 commented 8 months ago

Here's a fix for this

{
  "parent": "minecraft:recipes/root",
  "rewards": {
    "recipes": [
      "naturescompass:natures_compass"
    ]
  },
  "criteria": {
    "has_compass": {
      "trigger": "minecraft:inventory_changed",
      "conditions": {
        "items": [
          {
            "item": "minecraft:compass"
          }
        ]
      }
    },
    "has_recipe": {
      "trigger": "minecraft:recipe_unlocked",
      "conditions": {
        "recipe": "naturescompass:natures_compass"
      }
    }
  },
  "requirements": [
    [
      "has_compass",
      "has_recipe"
    ]
  ]
}
IguanaParty commented 8 months ago

@kingkuys2123 Where is this bit of code going? Should it be placed naturescompass.json file or somewhere else?

kingkuys2123 commented 8 months ago

naturescompass.json