Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 04:20:04 +01:00
b31089a929
Upstream has released updates that appear 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: d264e972 #591: Add option for a consumer before spawning an item 1c537fce #590: Add spawn and transform reasons for piglin zombification. CraftBukkit Changes: ee5006d1 #810: Add option for a consumer before spawning an item f6a39d3c #809: Add spawn and transform reasons for piglin zombification. 0c24068a Organise imports Spigot Changes: bff52619 Organise imports
27 Zeilen
1.4 KiB
Diff
27 Zeilen
1.4 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: chickeneer <emcchickeneer@gmail.com>
|
|
Date: Tue, 16 Feb 2021 21:37:51 -0600
|
|
Subject: [PATCH] Prevent grindstones from overstacking items
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/ContainerGrindstone.java b/src/main/java/net/minecraft/server/ContainerGrindstone.java
|
|
index 57b3c42b6b3fcf791591897fa12d12c2c396191c..99e342038172d7e74a45789bd4b58d4660c775d3 100644
|
|
--- a/src/main/java/net/minecraft/server/ContainerGrindstone.java
|
|
+++ b/src/main/java/net/minecraft/server/ContainerGrindstone.java
|
|
@@ -184,13 +184,13 @@ public class ContainerGrindstone extends Container {
|
|
i = Math.max(item.getMaxDurability() - l, 0);
|
|
itemstack2 = this.b(itemstack, itemstack1);
|
|
if (!itemstack2.e()) {
|
|
- if (!ItemStack.matches(itemstack, itemstack1)) {
|
|
+ if (!ItemStack.matches(itemstack, itemstack1) || itemstack2.getMaxStackSize() == 1) { // Paper - add max stack size check
|
|
this.resultInventory.setItem(0, ItemStack.b);
|
|
this.c();
|
|
return;
|
|
}
|
|
|
|
- b0 = 2;
|
|
+ b0 = 2; // Paper - the problem line for above change, causing over-stacking
|
|
}
|
|
} else {
|
|
boolean flag3 = !itemstack.isEmpty();
|