The bug
JSON files in data/namespace/item_modifier can be simply JSON strings containing either an identifier of another item modifier, or a #-prefixed item modifier tag. If this identifier is the same as that of the file itself, it produces MC-310311.
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
Download and apply the attached data pack: [mediaInline]
It contains an item modifier,test:test2, whose definition is simply"test:test".Run
/item modify entity @s weapon 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:"sequence",functions:"test:test"}. So this may be intended. It could possibly be fixed by requiring sequence to accept a list, and not a single value.
Linked issues
Attachments
Comments 0
No comments.