From 7e5a053742db2a6b5cc9fef6f27e3e3c4750e509 Mon Sep 17 00:00:00 2001 From: Noah van der Aa Date: Sat, 21 Aug 2021 16:32:07 +0200 Subject: [PATCH] Respect despawn rate in merge check (#6428) --- ...ect-despawn-rate-in-item-merge-check.patch | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 patches/server/Respect-despawn-rate-in-item-merge-check.patch diff --git a/patches/server/Respect-despawn-rate-in-item-merge-check.patch b/patches/server/Respect-despawn-rate-in-item-merge-check.patch new file mode 100644 index 0000000000..0f92586ada --- /dev/null +++ b/patches/server/Respect-despawn-rate-in-item-merge-check.patch @@ -0,0 +1,19 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Noah van der Aa +Date: Wed, 18 Aug 2021 23:01:55 +0200 +Subject: [PATCH] Respect despawn rate in item merge check + + +diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java ++++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java +@@ -0,0 +0,0 @@ public class ItemEntity extends Entity { + private boolean isMergable() { + ItemStack itemstack = this.getItem(); + +- return this.isAlive() && this.pickupDelay != 32767 && this.age != -32768 && this.age < 6000 && itemstack.getCount() < itemstack.getMaxStackSize(); ++ return this.isAlive() && this.pickupDelay != 32767 && this.age != -32768 && this.age < this.getDespawnRate() && itemstack.getCount() < itemstack.getMaxStackSize(); // Paper - respect despawn rate in pickup check. + } + + private void tryToMerge(ItemEntity other) {