Skip to content

Commit

Permalink
Fix crash when adding bad enchant in Blood Chest, Closes #1054
Browse files Browse the repository at this point in the history
  • Loading branch information
rubensworks committed Sep 1, 2024
1 parent c21a007 commit 6b5a679
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public Pair<Float, ItemStack> repair(ItemStack itemStack, RandomSource random, b
itemStack.enchant(
enchantment,
enchantment.value().getMinLevel() + random.nextInt(
enchantment.value().getMaxLevel() - enchantment.value().getMinLevel())
enchantment.value().getMaxLevel() - enchantment.value().getMinLevel() + 1) - 1
);
}
}
Expand Down

0 comments on commit 6b5a679

Please sign in to comment.