mirror of
https://github.com/LeavesMC/Leaves.git
synced 2025-12-22 00:19:33 +00:00
--------- Co-authored-by: Lumine1909 <133463833+Lumine1909@users.noreply.github.com> Co-authored-by: violetc <58360096+s-yh-china@users.noreply.github.com> Co-authored-by: Helvetica Volubi <88063803+Suisuroru@users.noreply.github.com>
21 lines
1.5 KiB
Diff
21 lines
1.5 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 f9a1ccee0c1e608fd5f48de466046fc4e6a7dfc7..3c29483f0d915fedbbfb0e001ee92a3cb34c05ca 100644
|
|
--- a/net/minecraft/world/entity/item/ItemEntity.java
|
|
+++ b/net/minecraft/world/entity/item/ItemEntity.java
|
|
@@ -297,7 +297,7 @@ public class ItemEntity extends Entity implements TraceableEntity, ChangePublish
|
|
ItemStack item = this.getItem();
|
|
ItemStack item1 = itemEntity.getItem();
|
|
if (Objects.equals(this.target, itemEntity.target) && areMergable(item, item1)) {
|
|
- if (item1.getCount() < item.getCount()) {
|
|
+ if (org.leavesmc.leaves.LeavesConfig.modify.followTickSequenceMerge || item1.getCount() < item.getCount()) { // Leaves - add follow Tick Sequence Merge, see Paper#13073
|
|
merge(this, item, itemEntity, item1);
|
|
} else {
|
|
merge(itemEntity, item1, this, item);
|