2021-07-19 09:16:53 +00:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: thamid-gamer <60953955+thamid-gamer@users.noreply.github.com>
|
|
|
|
Date: Fri, 16 Jul 2021 16:00:17 -0400
|
|
|
|
Subject: [PATCH] Fix MerchantOffer BuyB-Only AssertionError
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/item/trading/MerchantOffer.java b/src/main/java/net/minecraft/world/item/trading/MerchantOffer.java
|
2021-11-24 23:46:26 +00:00
|
|
|
index e0f1857dc100bc4d68e5e308b984e5eeaef976b5..12354b2fd411c57fd14dfca92cd2f1522fa6f050 100644
|
2021-07-19 09:16:53 +00:00
|
|
|
--- a/src/main/java/net/minecraft/world/item/trading/MerchantOffer.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/item/trading/MerchantOffer.java
|
|
|
|
@@ -231,6 +231,7 @@ public class MerchantOffer {
|
|
|
|
if (!this.satisfiedBy(firstBuyStack, secondBuyStack)) {
|
|
|
|
return false;
|
|
|
|
} else {
|
|
|
|
+ if (!this.getCostA().isEmpty()) // Paper
|
|
|
|
firstBuyStack.shrink(this.getCostA().getCount());
|
|
|
|
if (!this.getCostB().isEmpty()) {
|
|
|
|
secondBuyStack.shrink(this.getCostB().getCount());
|