mirror of
https://github.com/LeavesMC/Leaves.git
synced 2025-12-19 14:59:32 +00:00
Modify merge ItemEntity logic, update paper & gradle (#754)
* update paper & gradle * 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. * add comments
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
group=org.leavesmc.leaves
|
||||
version=1.21.10-rc1-R0.1-SNAPSHOT
|
||||
mcVersion=1.21.10-rc1
|
||||
paperRef=cf24890a74f74ee2a83f71245fc92cf30e33d50a
|
||||
paperRef=dffe9ec16e647efc2fa63afdb0538c744b9eaa7a
|
||||
preVersion=true
|
||||
paper.runDisableWatchdog=true
|
||||
|
||||
|
||||
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.2-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
+val leavesMavenPublicUrl = "https://repo.leavesmc.com/snapshots/" // Leaves - build change
|
||||
|
||||
dependencies {
|
||||
mache("io.papermc:mache:1.21.10-rc1+build.4")
|
||||
mache("io.papermc:mache:1.21.10-rc1+build.5")
|
||||
- paperclip("io.papermc:paperclip:3.0.3")
|
||||
+ leavesclip("org.leavesmc:leavesclip:3.0.7") // Leaves - build change
|
||||
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Container open passthrough
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/decoration/ItemFrame.java b/net/minecraft/world/entity/decoration/ItemFrame.java
|
||||
index 2c759c211e7a0439e2a0f0b16019f86cba63abfb..0905005c610940df3f7960744b2b8a526248d588 100644
|
||||
index e6012d2cfe9b84782c8d5a0ba424eeda98086c09..e260ac6b3f4f1b4381f7557ebb3af2866de18da6 100644
|
||||
--- a/net/minecraft/world/entity/decoration/ItemFrame.java
|
||||
+++ b/net/minecraft/world/entity/decoration/ItemFrame.java
|
||||
@@ -422,6 +422,20 @@ public class ItemFrame extends HangingEntity {
|
||||
@@ -421,6 +421,20 @@ public class ItemFrame extends HangingEntity {
|
||||
return InteractionResult.PASS;
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
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);
|
||||
@@ -782,6 +782,9 @@ public final class LeavesConfig {
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@GlobalConfig("follow-tick-sequence-merge")
|
||||
public boolean followTickSequenceMerge = false;
|
||||
}
|
||||
|
||||
public static PerformanceConfig performance = new PerformanceConfig();
|
||||
|
||||
Reference in New Issue
Block a user