c8b50d84a9
Co-authored-by: MrHua269 <mrhua269@gmail.com>
24 lines
1.6 KiB
Diff
24 lines
1.6 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Helvetica Volubi <suisuroru@blue-millennium.fun>
|
|
Date: Fri, 3 Oct 2025 19:43:36 +0800
|
|
Subject: [PATCH] Modify merge ItemEntity logic
|
|
|
|
Add followTickSequenceMerge to modify merge items, due to Paper's modification of the merge radius,
|
|
when the merge radius is large and stacks containing many items get stuck in an unexpected position,
|
|
individual items may never reach their destination.
|
|
This configuration option is added to fix this behavior.
|
|
|
|
diff --git a/net/minecraft/world/entity/item/ItemEntity.java b/net/minecraft/world/entity/item/ItemEntity.java
|
|
index 6f5d3ebb7adc567e5106a3c76fccdbee93f51c27..b1d5d59718e5748b164f0885d4152e795c5d572d 100644
|
|
--- a/net/minecraft/world/entity/item/ItemEntity.java
|
|
+++ b/net/minecraft/world/entity/item/ItemEntity.java
|
|
@@ -289,7 +289,7 @@ public class ItemEntity extends Entity implements TraceableEntity, ChangePublish
|
|
ItemStack thisItemStack = this.getItem();
|
|
ItemStack otherItemStack = other.getItem();
|
|
if (Objects.equals(this.target, other.target) && areMergable(thisItemStack, otherItemStack)) {
|
|
- if (otherItemStack.getCount() < thisItemStack.getCount()) {
|
|
+ if (fun.bm.lophine.config.modules.misc.ItemEntityConfig.followTickSequenceMerge || otherItemStack.getCount() < thisItemStack.getCount()) { // Lophine - add follow Tick Sequence Merge, see Paper#13073
|
|
merge(this, thisItemStack, other, otherItemStack);
|
|
} else {
|
|
merge(other, otherItemStack, this, thisItemStack);
|