From 70205b2b3a5f616bcfe90d86b9b8855d71258ab3 Mon Sep 17 00:00:00 2001 From: Bestle Date: Fri, 13 Feb 2015 14:33:49 -0600 Subject: [PATCH] Despawn items outside EAR activation range --- ...n-items-outside-EAR-activation-range.patch | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 Spigot-Server-Patches/0044-Despawn-items-outside-EAR-activation-range.patch diff --git a/Spigot-Server-Patches/0044-Despawn-items-outside-EAR-activation-range.patch b/Spigot-Server-Patches/0044-Despawn-items-outside-EAR-activation-range.patch new file mode 100644 index 0000000000..99a9a0208f --- /dev/null +++ b/Spigot-Server-Patches/0044-Despawn-items-outside-EAR-activation-range.patch @@ -0,0 +1,32 @@ +From 6b0f89a3a7e237a292da033ae567a745f6bd3a3c Mon Sep 17 00:00:00 2001 +From: Bestle +Date: Fri, 13 Feb 2015 14:33:17 -0600 +Subject: [PATCH] Despawn items outside EAR activation range + + +diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java +index 659c45a..766874a 100644 +--- a/src/main/java/net/minecraft/server/EntityItem.java ++++ b/src/main/java/net/minecraft/server/EntityItem.java +@@ -442,4 +442,18 @@ public class EntityItem extends Entity { + this.r(); + this.age = 5999; + } ++ ++ // PaperSpigot start - Despawn items outside of the EAR activation range ++ @Override ++ public void inactiveTick() { ++ this.age++; ++ if (!this.world.isStatic && this.age >= world.spigotConfig.itemDespawnRate) { ++ if (org.bukkit.craftbukkit.event.CraftEventFactory.callItemDespawnEvent(this).isCancelled()) { ++ this.age = 0; ++ return; ++ } ++ this.die(); ++ } ++ } ++ // PaperSpigot end + } +-- +2.3.0 +