aboutsummaryrefslogtreecommitdiffhomepage
path: root/Spigot-Server-Patches-Unmapped/0687-Prevent-grindstones-from-overstacking-items.patch
diff options
context:
space:
mode:
Diffstat (limited to 'Spigot-Server-Patches-Unmapped/0687-Prevent-grindstones-from-overstacking-items.patch')
-rw-r--r--Spigot-Server-Patches-Unmapped/0687-Prevent-grindstones-from-overstacking-items.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/Spigot-Server-Patches-Unmapped/0687-Prevent-grindstones-from-overstacking-items.patch b/Spigot-Server-Patches-Unmapped/0687-Prevent-grindstones-from-overstacking-items.patch
new file mode 100644
index 0000000000..7eba41fbef
--- /dev/null
+++ b/Spigot-Server-Patches-Unmapped/0687-Prevent-grindstones-from-overstacking-items.patch
@@ -0,0 +1,26 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: chickeneer <[email protected]>
+Date: Tue, 16 Feb 2021 21:37:51 -0600
+Subject: [PATCH] Prevent grindstones from overstacking items
+
+
+diff --git a/src/main/java/net/minecraft/world/inventory/ContainerGrindstone.java b/src/main/java/net/minecraft/world/inventory/ContainerGrindstone.java
+index 1d5dcbbd3870eb8e1013a97f6ce882bfc096bf95..a841c47c25287080738b04352ea4e8eaa77dacdd 100644
+--- a/src/main/java/net/minecraft/world/inventory/ContainerGrindstone.java
++++ b/src/main/java/net/minecraft/world/inventory/ContainerGrindstone.java
+@@ -196,13 +196,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();