9
0
mirror of https://github.com/LeavesMC/Leaves.git synced 2025-12-19 14:59:32 +00:00
Files
LeavesMC/patches/server/0123-Allow-grindstone-overstacking.patch
2024-10-28 19:55:43 +08:00

29 lines
1.6 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Lumine1909 <133463833+Lumine1909@users.noreply.github.com>
Date: Wed, 26 Jun 2024 17:59:56 +0800
Subject: [PATCH] Allow grindstone overstacking
diff --git a/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java b/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java
index 138f77d13dda574def523d74fa55bc71b5bfa01b..620fac433487caa4d22cb865e8b77c2e372462df 100644
--- a/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java
+++ b/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java
@@ -206,7 +206,7 @@ public class GrindstoneMenu extends AbstractContainerMenu {
byte b0 = 1;
if (!firstInput.isDamageableItem()) {
- if (firstInput.getMaxStackSize() < 2 || !ItemStack.matches(firstInput, secondInput)) {
+ if (!org.leavesmc.leaves.LeavesConfig.allowGrindstoneOverstacking && firstInput.getMaxStackSize() < 2 || !ItemStack.matches(firstInput, secondInput)) { // Leaves - allowGrindstoneOverstaking
return ItemStack.EMPTY;
}
@@ -290,7 +290,7 @@ public class GrindstoneMenu extends AbstractContainerMenu {
ItemStack itemstack3 = this.repairSlots.getItem(1);
if (slot == 2) {
- if (!this.moveItemStackTo(itemstack1, 3, 39, true)) {
+ if (!this.moveItemStackTo(itemstack1, 3, 39, true, org.leavesmc.leaves.LeavesConfig.allowGrindstoneOverstacking)) { // Leaves - allowGrindstoneOverstacking: Disable stack check
return ItemStack.EMPTY;
}