mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-30 16:19:03 +01:00
21 lines
912 B
Diff
21 lines
912 B
Diff
|
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
|
||
|
|
||
|
diff --git a/src/main/java/net/minecraft/server/MerchantRecipe.java b/src/main/java/net/minecraft/server/MerchantRecipe.java
|
||
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||
|
--- a/src/main/java/net/minecraft/server/MerchantRecipe.java
|
||
|
+++ b/src/main/java/net/minecraft/server/MerchantRecipe.java
|
||
|
@@ -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() {
|