Skip to content

Commit

Permalink
separate enchanted books are rerollable
Browse files Browse the repository at this point in the history
  • Loading branch information
yrsegal committed Oct 13, 2023
1 parent 6fca48a commit 186cee7
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ public static void attemptToReroll(Villager villager) {
boolean rerollingInPlace = false; // But it's okay to reroll a trade into a different variation of itself.
for (MerchantOffer otherOffer : offers) {

if (ItemStack.isSame(otherOffer.getBaseCostA(), rerolled.getBaseCostA()) &&
ItemStack.isSame(otherOffer.getCostB(), rerolled.getCostB()) &&
ItemStack.isSame(otherOffer.getResult(), rerolled.getResult())) {
if (ItemStack.isSameItemSameTags(otherOffer.getBaseCostA(), rerolled.getBaseCostA()) &&
ItemStack.isSameItemSameTags(otherOffer.getCostB(), rerolled.getCostB()) &&
ItemStack.isSameItemSameTags(otherOffer.getResult(), rerolled.getResult())) {
if (otherOffer == offer)
rerollingInPlace = true;
else
Expand Down

0 comments on commit 186cee7

Please sign in to comment.