Universal Enchants

Universal Enchants

2M Downloads

[Suggestion]: precise enchantment level configuration

peow opened this issue ยท 1 comments

commented

Mod Loader (Optional)

Fabric

Minecraft Version(s) (Optional)

1.20.1

Mod Version(s) (Optional)

No response

Suggestion (Required)

In Vanilla Minecraft, using an enchanting table you can only get Efficiency 4, but not level 5
image

It would be interesting if Universal Enchants could do something similar, where I could configure an item to only have the enchantment up to a certain level.

example:

  • Sharpness
{
  "schemaVersion": 2,
  "items": [
    "$minecraft:weapon",
    "$minecraft:universal_enchants_axe",
    "$minecraft:trident"{max_lvl=3}
  ],
  "anvil_items": [
    "$minecraft:weapon",
    "$minecraft:universal_enchants_axe",
    "$minecraft:trident"{max_lvl=4}
  ],
  "incompatible": [
    "minecraft:power"
  ]
}

note that I highlighted that the Trident can only get Sharpness 3 on the Enchanting Table, and on the anvil you can put a Sharpness book up to level 4 on it; If I tried to put a Sharpness 5 book on the trident, an error would appear in the Tooltip warning me about the limit

be possible to make this precise configuration would be awesome, if you think this too, I ask you to make a update to fabric 1.20.1

commented

That's not how it works.
Enchantment levels from the enchanting table involve a lot of randomness and are outlined by some formulas defined for every enchantment. This means you can actually get efficiency 5, it's just extremely rare.
For introducing an additional limitation for anvils or other enchanting mechanics I don't see a reason.

Universal Enchants is supposed to make the vanilla system configurable, but it shouldn't be invasive by changing any vanilla mechanics, which this suggestion would require. I will make the mentioned formulas configurable in a future version (already implemented for 1.20.4), but defining absolute level values is not a feature I want to support.