2020-06-07 20:41:32 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: chickeneer <emcchickeneer@gmail.com>
|
|
|
|
Date: Fri, 5 Jun 2020 20:02:04 -0500
|
|
|
|
Subject: [PATCH] Fix villager trading demand - MC-163962
|
|
|
|
|
|
|
|
Prevent demand from going negative and tending to negative infinity
|
|
|
|
|
2021-03-16 08:19:45 +01:00
|
|
|
diff --git a/src/main/java/net/minecraft/world/item/trading/MerchantRecipe.java b/src/main/java/net/minecraft/world/item/trading/MerchantRecipe.java
|
2020-06-07 20:41:32 +02:00
|
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
2021-03-16 08:19:45 +01:00
|
|
|
--- a/src/main/java/net/minecraft/world/item/trading/MerchantRecipe.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/item/trading/MerchantRecipe.java
|
2020-06-07 20:41:32 +02:00
|
|
|
@@ -0,0 +0,0 @@ public class MerchantRecipe {
|
|
|
|
}
|
|
|
|
|
|
|
|
public void e() {
|
|
|
|
- this.demand = this.demand + this.uses - (this.maxUses - this.uses);
|
|
|
|
+ this.demand = Math.max(0, this.demand + this.uses - (this.maxUses - this.uses)); // Paper
|
|
|
|
}
|
|
|
|
|
|
|
|
public ItemStack f() {
|