Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
50687db
commit 8e04c6f
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
patches/server/0311-Allow-grindstone-overstacking-items.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: BillyGalbreath <blake.galbreath@gmail.com> | ||
Date: Sat, 15 Oct 2022 13:19:07 -0500 | ||
Subject: [PATCH] Allow grindstone overstacking items | ||
|
||
|
||
diff --git a/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java b/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java | ||
index 43d7ca6ceb89d65149314e56a846081d6c3a048a..1344c2bc08743088c56862469949dcb148a99a8b 100644 | ||
--- a/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java | ||
+++ b/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java | ||
@@ -200,7 +200,7 @@ public class GrindstoneMenu extends AbstractContainerMenu { | ||
i = Math.max(item.getMaxDamage() - l, 0); | ||
itemstack2 = this.mergeEnchants(itemstack, itemstack1); | ||
if (!itemstack2.isDamageableItem()) { | ||
- if (!ItemStack.matches(itemstack, itemstack1) || itemstack2.getMaxStackSize() == 1) { // Paper - add max stack size check | ||
+ if (!ItemStack.matches(itemstack, itemstack1) || ((org.bukkit.craftbukkit.entity.CraftPlayer)this.player).getHandle().getLevel().purpurConfig.grindstoneAllowOversizedStacking || itemstack2.getMaxStackSize() == 1) { // Paper - add max stack size check // Purpur | ||
this.resultSlots.setItem(0, ItemStack.EMPTY); | ||
this.broadcastChanges(); | ||
return; | ||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java | ||
index 33d7c132b19095598eb681da8487a072f1dccab6..daa437f3aaebed4d917fde65d75a8a941755a764 100644 | ||
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java | ||
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java | ||
@@ -905,6 +905,11 @@ public class PurpurWorldConfig { | ||
endPortalSafeTeleporting = getBoolean("blocks.end_portal.safe-teleporting", endPortalSafeTeleporting); | ||
} | ||
|
||
+ public boolean grindstoneAllowOversizedStacking = false; | ||
+ private void grindstoneSettings() { | ||
+ grindstoneAllowOversizedStacking = getBoolean("blocks.grindstone.allow-oversized-stacking", grindstoneAllowOversizedStacking); | ||
+ } | ||
+ | ||
public boolean mobsSpawnOnPackedIce = true; | ||
public boolean mobsSpawnOnBlueIce = true; | ||
public boolean snowOnBlueIce = true; |