mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-30 12:11:47 +01:00
a0b8b886c8
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing
CraftBukkit Changes:
d5a72960
SPIGOT-6063: ConsoleSender sending extra lines in Java 13+
Spigot Changes:
2740d5ae Rebuild patches
20 lines
916 B
Diff
20 lines
916 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 2865fa7018c3631fbcaaaaa2892219d9cab713d3..e42382a5c385c27b6322b03e87870eb20b21cb22 100644
|
|
--- a/src/main/java/net/minecraft/server/MerchantRecipe.java
|
|
+++ b/src/main/java/net/minecraft/server/MerchantRecipe.java
|
|
@@ -104,7 +104,7 @@ 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() {
|