Skip to content

Commit

Permalink
Hello Github? Please push all of my commits
Browse files Browse the repository at this point in the history
  • Loading branch information
QPCrummer committed Jan 15, 2025
1 parent e129269 commit 7ca5bdf
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,10 @@ public static void convertHealthToHeartItems(ServerPlayerEntity player, int hear
private static void givePlayerHeart(ServerPlayerEntity player, int hearts) {
final ItemStack heartStack = new ItemStack(ModItems.HEART, 1);
for (int i = 0; i < hearts; i++) {
if (!player.giveItemStack(heartStack)) {
if (!player.giveItemStack(heartStack.copy())) {
// Quick path for dropping the rest of the hearts to avoid unnecessary checks
for (int j = i; j < hearts; j++) {
player.dropItem(heartStack, false, true);
player.dropItem(heartStack.copy(), false, true);
}
break;
}
Expand Down

0 comments on commit 7ca5bdf

Please sign in to comment.