mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 23:38:25 +01:00
062733b903
Doesn't compile yet. CraftBukkit Changes: 90d6905b Repackage NMS 69cf961d Repackage patches Spigot Changes: 79d53c28 Repackage NMS
20 lines
960 B
Diff
20 lines
960 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/world/item/trading/MerchantRecipe.java b/src/main/java/net/minecraft/world/item/trading/MerchantRecipe.java
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- a/src/main/java/net/minecraft/world/item/trading/MerchantRecipe.java
|
|
+++ b/src/main/java/net/minecraft/world/item/trading/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() {
|