-
Bug
-
Resolution: Works As Intended
-
None
-
1.15.2, 20w18a, 20w20b, 20w22a, 1.16.3
-
None
-
Confirmed
-
Loot tables
In this bug report I will only use "alternatives", but know that it applies to all three.
The bug
A loot table entry of type "alternatives", "group", or "sequence" ignores the weight. It acts as if it has the default weight of 1.
Stranger, if you give the children of the alternatives entry a weight, it acts as if the weight was given to the alternatives entry. So it appears as if the children of alternatives are processed before a random entry is chosen in the parent entry.
How to reproduce
- Download and install the attached data pack
- Run "/loot give @s loot mc-177500:a" a few times
- Notice that you get about as many diamonds as emeralds
- Run "/loot give @s loot mc-177500:b" a few times
- Notice that you get about 9 diamonds for each emerald
Examples (simplified)
mc-177500:a | mc-177500:b |
"entries": [ { "type": "alternatives", "weight": 9, "children": [ { "type": "item", "name": "diamond" } ] }, { "type": "item", "name": "emerald" } ] |
"entries": [ { "type": "alternatives", "children": [ { "type": "item", "name": "diamond", "weight": 9 } ] }, { "type": "item", "name": "emerald" } ] |