Skip to content

Commit

Permalink
fix: reduce correct xp level count when using enchant table
Browse files Browse the repository at this point in the history
  • Loading branch information
smartcmd committed Oct 2, 2024
1 parent 1c593b8 commit 91e9ad8
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ protected ActionResponse handleEnchantTableRecipe(EntityPlayer player, int recip
log.warn("Not enough experience level! Need: {}, Current: {}", data.requiredXpLevel(), player.getExperienceLevel());
return error();
}
player.setExperienceLevel(player.getExperienceLevel() - data.requiredXpLevel());
// Required lapis lazuli count is also the cost of xp level
player.setExperienceLevel(player.getExperienceLevel() - data.requiredLapisLazuliCount());
}

var enchantedItem = inputItem.copy(true);
Expand Down

0 comments on commit 91e9ad8

Please sign in to comment.