The bug
Slot sources can reference each other, and when this forms a cycle, the game stack-overflows and crashes.
How to reproduce
Download and apply the attached data pack: [mediaInline]
It defines a slot source,test:test3, with the following definition:{ "type": "group", "terms": [ { "type": "minecraft:empty" }, "test:test3" ] }Run
/execute if slots entity @s test:test3
Expected result
Either the definition should fail to load, the command should fail at runtime, or the command should succeed.
Observed result
The game freezes and crashes
Notes
At load time, the game does detect this:
[10:13:01] [Worker-Main-1/WARN]: Found loot table element validation problem in {test:test3@minecraft:slot_source}.terms[1]: test:test3 of type minecraft:slot_source is recursively calledHowever, only recursive loot tables are prevented from crashing:
[10:00:06] [Server thread/WARN]: Detected infinite loop in loot tablesLinked issues
relates to 3
Attachments
Comments 0
No comments.