[Suggestion] QoL feature - static enchantment XP cost.
LuciusV opened this issue ยท 2 comments
I propose to make enchanting at enchantment table cost for level X fixed at value XP(level X) - XP(level X-3)
Example:
if I enchant item at lvl200 and have xp exactly for level 200, enchanting would substract that much xp so I'll left with 197 level.
But if I do same enchant at level 1000, I will end up at level 997 (and lose a lot of xp - difference between 1000 and 997 level).
Because it's very easy to place some king of experience obelisk and dump extra levels before enchanting, I'm suggesting this quality of life feature to only substract experience equal to level of enchanting, regardless of player's current level.
Same can be done with reforging table
Shouldn't this already be the case?
(When you enchant sth. you get displayed the actual (raw) experience cost)
This also applies to the reforging table
(It doesn't show the actual (raw) cost but you don't lose x
levels)
Cost is independent from player level:
The calculated cost is then passed as level for this part:
public static boolean chargeExperience(Player player, int cost) {
final int playerExperience = getExperience(player);
if (playerExperience >= cost) {
player.giveExperiencePoints(-cost);
// Due to rounding errors, the bar can get stuck displaying nothing when it should be empty.
if (getExperience(player) <= 0) player.experienceProgress = 0F;
return true;
}
return false;
}