mojira.dev
MC-258998

Predicates don't allow dimension nor biome tag in location check

The location check in an entity_properties predicate has a dimension field and a biome field, but these fields does not accept tags, only a single ID.
This is inconsistent with block, item and fluid checks which have separate "tag" options to check for a tag, and use lists of IDs, rather than only 1 string.

The following predicate with return the error: [ServerMain/ERROR]: Not a valid resource location: #custom:test Non [a-z0-9_.-] character in namespace of location: #custom:test

{
    "condition": "minecraft:entity_properties",
    "entity": "this",
    "predicate": {
        "location": {
            "dimension": "#custom:test"
        }
    }
}
{
    "condition": "minecraft:entity_properties",
    "entity": "this",
    "predicate": {
        "location": {
            "dimension": "#custom:test"
        }
    }
}

The following predicate with return the error: [Server thread/ERROR]: Couldn't parse loot table <namespace>:<id>
x: Non [a-z0-9_.-] character in namespace of location: #custom:test
This is followed by a stack-trace.

{
    "condition": "minecraft:entity_properties",
    "entity": "this",
    "predicate": {
        "location": {
            "biome": "#custom:test"
        }
    }
}
{
    "condition": "minecraft:entity_properties",
    "entity": "this",
    "predicate": {
        "location": {
            "biome": "#custom:test"
        }
    }
}

Expected format:
The biome and dimension field are expected to have the same syntax as the item, block and fluid fields

{
    "condition": "minecraft:entity_properties",
    "entity": "this",
    "predicate": {
        "location": {
            "biome": {
                "biomes": [ "ID", "ID" ],
                "tag": "TAG"
            },
            "dimension": {
                "dimensions": [ "ID", "ID" ],
                "tag": "TAG"
            }
        }
    }
}
{
    "condition": "minecraft:entity_properties",
    "entity": "this",
    "predicate": {
        "location": {
            "biome": {
                "biomes": [ "ID", "ID" ],
                "tag": "TAG"
            },
            "dimension": {
                "dimensions": [ "ID", "ID" ],
                "tag": "TAG"
            }
        }
    }
}

Do note, that dimension tags are indeed parsed and stored in memory.

Comments 2

These fields do not support tags.

Yeah, that's the inconsistency I'm reporting. :/

user-f2760

(Unassigned)

Plausible

Data Packs

1.19.3

Retrieved