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 mendingRun /loot give @s loot weighted_enchantments:using_tag
→ Observe that the chance of getting mending is much higher
Thank you for your report!
After consideration, the issue is being closed as Invalid.
You have posted a feature request or a suggestion. This site is for bug reports only.
For suggestions, please visit The official Minecraft feedback site or visit the Minecraft Feedback Discord server.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki