-
Bug
-
Resolution: Invalid
-
None
-
1.21.1, 24w37a
-
None
-
Confirmed
-
Data Packs
Having duplicate entries in a tag does not impact the chance of that entry getting randomly picked.
In the attached datapack. There is an enchantment tag with 4 entries for protection and 1 for mending. Using this tag with the enchant_randomly modifier. The chance of getting mending is expected to be lower than 50%. This is not the case.
{ "function": "minecraft:enchant_randomly", "options": "#weighted_enchantments:weighted_list" }
When using the same modifier but using multiple options, the chance of getting mending is much lower.
{ "function": "minecraft:enchant_randomly", "options": [ "minecraft:protection", "minecraft:protection", "minecraft:protection", "minecraft:protection", "minecraft:mending" ] }
How to recreate
- Install the datapack
- Run /loot give @s loot weighted_enchantments:using_options
→ Observe the rarity of getting mending - Run /loot give @s loot weighted_enchantments:using_tag
→ Observe that the chance of getting mending is much higher