mojira.dev
MC-310318

Slot source definition files can entirely be a string reference

The bug

JSON files in data/namespace/slot_source can be simply JSON strings containing either an identifier of another slot source, or a #-prefixed slot source tag. If this identifier is the same as that of the file itself, it produces MC-310315.

It’s expected that the top-level of a datapack file only contains definitions, not references. Other resources do not allow this kind of “aliasing.”

How to reproduce

  1. Download and apply the attached data pack: [mediaInline]
    It contains a slot source, test:test2, whose definition is simply "test:test".

  2. Run /execute if slots entity @s test:test2

Expected results

The file should not load

Observed results

The file loads and is effectively an alias for test:test

Notes

After reporting, boq pointed out to me that this syntax is accepted because it’s a shorthand for {type:"group",terms:"test:test"}. So this may be intended. It could possibly be fixed by requiring group to accept a list, and not a single value.

Linked issues

Attachments

Comments 0

No comments.

tryashtar

Nathan Wolf

Confirmed

Platform HC

Normal

Data Packs

26.3 Snapshot 5

26.3 Snapshot 9

Retrieved