20 lines
1.2 KiB
Diff
20 lines
1.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: MrHua269 <wangxyper@163.com>
|
|
Date: Sun, 12 Jan 2025 11:03:09 +0800
|
|
Subject: [PATCH] Merge Paper #11945 for temporary hopper behavior fix
|
|
|
|
A hopper optimization fix on Paper's pr : https://github.com/PaperMC/Paper/pull/11945
|
|
|
|
diff --git a/net/minecraft/world/level/block/entity/HopperBlockEntity.java b/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
|
index ae988c4910421fb720177178ef6136e595ae6946..72a81e29be6570fb119b159210453a86f003f893 100644
|
|
--- a/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
|
+++ b/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
|
@@ -698,6 +698,7 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
|
} else if (canMergeItems(item, stack)) {
|
|
int i = Math.min(stack.getMaxStackSize(), destination.getMaxStackSize()) - item.getCount(); // Paper - Make hoppers respect inventory max stack size
|
|
int min = Math.min(stack.getCount(), i);
|
|
+ stack = stack.copy(true); // Luminol
|
|
stack.shrink(min);
|
|
item.grow(min);
|
|
flag = min > 0;
|