Item and category
The base item ID and its category decide which enchantments are possible and which slot attribute modifiers use: main hand for weapons and tools, the matching slot for each armor piece.
Pick an item, roll a random spread of vanilla enchantments and attribute modifiers, and get either a ready /give command or a loot table entry — with the ranges baked in as number providers, so the game rolls the exact value on drop instead of you rolling it once here.
Vanilla enforces incompatibility groups (protection tree, sharpness/smite/bane, fortune/silk touch, and more). This tool respects them by default — see the guide for a full list.
Format
Item format
These ranges apply in both modes: they cap how many slots get filled and what level an unlocked enchantment can land on.
Used when Randomization mode is Basic. Advanced mode uses each attribute's own typical range instead.
Set a rarity weight, or tick Lock and set an exact level to keep that enchantment on every reroll.
| Enchantment | Weight | Lock | Level |
|---|
| Attribute | Weight | Lock | Amount |
|---|
Choose an item and the output, set how much may roll, and press Randomize as often as you like; every press is a new roll inside your limits.
The base item ID and its category decide which enchantments are possible and which slot attribute modifiers use: main hand for weapons and tools, the matching slot for each armor piece.
A /give command for one item, or a loot table entry where every unlocked range stays a minecraft:uniform number provider, so each drop rolls fresh.
Four branches: 1.21.5 – 26.x, 1.21.2 – 1.21.4, 1.21 – 1.21.1 and before 1.20.5. Pick the one your server runs; the command shape differs between them.
Basic rolls inside the ranges you set. Advanced adds a weight per enchantment and attribute, and Lock keeps an enchantment at a fixed level on every reroll.
Setting attribute modifiers replaces the item's built-in ones. A sword that only gets +2 luck hits like an empty hand, so add the attack damage and speed you want to keep.
Respect vanilla conflicts keeps pairs like sharpness and smite apart. Commands accept levels up to 255, but how much an extra level does depends on the enchantment.
add_value adds a flat amount, add_multiplied_base adds a share of the base value (0.1 is +10%), add_multiplied_total multiplies the result after the others.
1.21.5 removed the {levels:…} and {modifiers:…} wrappers, 1.21.2 dropped the generic. prefix from attribute IDs, and 1.21 gave modifiers a namespaced id. 1.20.5–1.20.6 have no branch of their own: attribute modifiers there need a UUID and a name instead of an id.