Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 12:30:06 +01:00
ce270e1412
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 Bukkit Changes: b2f1908c SPIGOT-5783: Add helpful info to UnknownDependencyException e4f46260 SPIGOT-2623: Add EntityEquipment methods to get/set ItemStacks by slot. 529a9a69 SPIGOT-5751: Clarify behaviour of block drop-related API methods CraftBukkit Changes:8ea9b138
Remove outdated build delay.ffc2b251
Revert "#675: Fix redirected CommandNodes sometimes not being properly redirected"cb701f6b
#675: Fix redirected CommandNodes sometimes not being properly redirectedc9d7c16b
SPIGOT-2623: Add EntityEquipment methods to get/set ItemStacks by slot.fad2494a
#673: Fix Craftworld#isChunkLoaded8637ec00
SPIGOT-5751: Made breakNaturally and getDrops returns the correct item if no argument is given Spigot Changes: a99063f7 Rebuild patches Fixes #3602
21 Zeilen
916 B
Diff
21 Zeilen
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 f1f49c2ebff93ce3537bd4a58916d4c624a3fe82..7c4dc1143696320c8b8dc21ea4ae0600d5686d62 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() {
|