Restore old minecraft anvile mechanic #71

Open
opened 2025-11-28 14:08:47 +01:00 by Steev · 1 comment
Owner

after the current system go its cap removed the old way to do anvil enchantments should be restored and applicable for a server if they choose to use it

the formula to implement for repairments looks like this:

newRepairCost = leftRepairCost + rightRepairCost + 1

when calculating price for enchantments the costs are calculated like this:

cost += level * weight

the weights are loaded from a yaml file

Enchantment Weight
Protection 1
Fire Prot 1
Feather Falling 1
Blast Prot 2
Projectile Prot 1
Thorns 8 (!)
Sharpness 1
Smite 1
Bane of Arthropods 1
Knockback 2
Fire Aspect 2
Looting 4
Efficiency 1
Silk Touch 8
Unbreaking 1
Power 1
Punch 4
Flame 4
Infinity 8
Luck/Lure ( kamen später )  

calculating costs for merging enchantments

if leftLevel == rightLevel:
    newLevel = leftLevel + 1
else:
    newLevel = max(leftLevel, rightLevel)
after the current system go its cap removed the old way to do anvil enchantments should be restored and applicable for a server if they choose to use it ## the formula to implement for repairments looks like this: ```java newRepairCost = leftRepairCost + rightRepairCost + 1 ``` ## when calculating price for enchantments the costs are calculated like this: ```java cost += level * weight ``` the weights are loaded from a yaml file Enchantment | Weight -- | -- Protection | 1 Fire Prot | 1 Feather Falling | 1 Blast Prot | 2 Projectile Prot | 1 Thorns | 8 (!) Sharpness | 1 Smite | 1 Bane of Arthropods | 1 Knockback | 2 Fire Aspect | 2 Looting | 4 Efficiency | 1 Silk Touch | 8 Unbreaking | 1 Power | 1 Punch | 4 Flame | 4 Infinity | 8 Luck/Lure ( kamen später ) |   ## calculating costs for merging enchantments ```python if leftLevel == rightLevel: newLevel = leftLevel + 1 else: newLevel = max(leftLevel, rightLevel) ```
Steev added the enhancementFeaturenot final labels 2025-11-28 14:08:47 +01:00
Author
Owner

more infos about this are found here: https://chatgpt.com/c/69299c94-c184-8325-8a11-825a0335343e

more infos about this are found here: https://chatgpt.com/c/69299c94-c184-8325-8a11-825a0335343e
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SteevsModdingOrg/betterminecraft#71