Skip to content

Minecraft 1.20: type_specific.type must not be namespaced (minecraft:) to load correctly #846

@nemonowa

Description

@nemonowa

Hey @misode! Thanks for the very handy website :)

While using the advancement generator at
https://misode.github.io/advancement/
I noticed an issue specific to Minecraft 1.20.

Problem

In Minecraft 1.20, if type_specific.type includes the minecraft: namespace, the advancement fails to load.
However, removing the namespace fixes the issue.

Does NOT work (Minecraft 1.20)

{
  "criteria": {
    "1": {
      "trigger": "minecraft:tick",
      "conditions": {
        "player": [
          {
            "condition": "minecraft:entity_properties",
            "entity": "this",
            "predicate": {
              "type_specific": {
                "type": "minecraft:player"
              }
            }
          }
        ]
      }
    }
  }
}

Works correctly

{
  "criteria": {
    "1": {
      "trigger": "minecraft:tick",
      "conditions": {
        "player": [
          {
            "condition": "minecraft:entity_properties",
            "entity": "this",
            "predicate": {
              "type_specific": {
                "type": "player"
              }
            }
          }
        ]
      }
    }
  }
}

Error message

- Parsing error loading custom advancement ponpon:grant_test:
  Not a JSON object:
  [{"condition":"minecraft:entity_properties","entity":"this","predicate":{"type_specific":{"type":"minecraft:player","advancements":{"ponpon:granted":true}}}}]
  missed input: {"1":{"trigger":"minecraft:tick","conditions":{"player":[{"condition":"minecraft:entity_properties","entity":"this","predicate":{"type_specific":{"type":"minecraft:player","advancements":{"ponpon:granted":true}}}}]}}};
  Advancement criteria cannot be empty

Request

Could the generator avoid adding the minecraft: namespace for type_specific.type (at least for 1.20), or warn about this behavior?

Thanks again!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions