Skip to content

Enchantment cost #11

@Erabior

Description

@Erabior

the enchanter costs levels to enchant, however when you remove the levels from the player, you are doing exactly that. the problem is each level increases the XP required to reach the next level. this is a problem because if hypothetically someone at level 10 spends 4 levels to add an enchantment, then it would cost them 40 experience. however, if someone at level 68 did the same enchant that costs 4 levels, they would lose 1726 experience. from what I understand Minecraft stores a player's xp in a 32-bit integer and the cost of an enchant can be calculated with the equation: (2*L)+7 Where "L" is the level cost of the enchantment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions