From 4e178dbae2ee38340408a4b6bf386e724c3b1780 Mon Sep 17 00:00:00 2001 From: violetc <58360096+s-yh-china@users.noreply.github.com> Date: Mon, 30 Oct 2023 10:44:33 +0800 Subject: [PATCH] Make Item tick vanilla (#146 and #144) --- .../server/0127-Make-Item-tick-vanilla.patch | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 patches/server/0127-Make-Item-tick-vanilla.patch diff --git a/patches/server/0127-Make-Item-tick-vanilla.patch b/patches/server/0127-Make-Item-tick-vanilla.patch new file mode 100644 index 00000000..a009ea1f --- /dev/null +++ b/patches/server/0127-Make-Item-tick-vanilla.patch @@ -0,0 +1,29 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: violetc <58360096+s-yh-china@users.noreply.github.com> +Date: Mon, 30 Oct 2023 10:43:44 +0800 +Subject: [PATCH] Make Item tick vanilla + + +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 5eb9d599e2f6e61adb34c991fe9008859633fdfc..862e99ddfcc1216ea4b5a7f12efc1a67ac839674 100644 +--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java ++++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java +@@ -233,6 +233,9 @@ public class ItemEntity extends Entity implements TraceableEntity { + // Spigot start - copied from above + @Override + public void inactiveTick() { ++ // Leaves start - vanilla ++ this.tick(); ++ /* + // CraftBukkit start - Use wall time for pickup and despawn timers + int elapsedTicks = MinecraftServer.currentTick - this.lastTick; + if (this.pickupDelay != 32767) this.pickupDelay -= elapsedTicks; +@@ -250,6 +253,8 @@ public class ItemEntity extends Entity implements TraceableEntity { + // CraftBukkit end + this.discard(); + } ++ */ ++ // Leaves end - vanilla + } + // Spigot end +