aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--Spigot-Server-Patches/0380-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch12
1 files changed, 10 insertions, 2 deletions
diff --git a/Spigot-Server-Patches/0380-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch b/Spigot-Server-Patches/0380-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch
index a0b37e16e1..63671ab19c 100644
--- a/Spigot-Server-Patches/0380-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch
+++ b/Spigot-Server-Patches/0380-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch
@@ -1,4 +1,4 @@
-From e6a5d8a54a604baab979eb2219656538a43aa72c Mon Sep 17 00:00:00 2001
+From d63702b300dcb1f907edaee82655c70bac81910e Mon Sep 17 00:00:00 2001
From: Aikar <[email protected]>
Date: Sun, 24 Mar 2019 18:08:36 -0400
Subject: [PATCH] don't go below 0 for pickupDelay, breaks picking up items
@@ -6,7 +6,7 @@ Subject: [PATCH] don't go below 0 for pickupDelay, breaks picking up items
vanilla checks for == 0
diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java
-index 099bc7551..2c99cc2f1 100644
+index 099bc7551..4fafb4977 100644
--- a/src/main/java/net/minecraft/server/EntityItem.java
+++ b/src/main/java/net/minecraft/server/EntityItem.java
@@ -72,6 +72,7 @@ public class EntityItem extends Entity implements HopperPusher {
@@ -17,6 +17,14 @@ index 099bc7551..2c99cc2f1 100644
if (this.age != -32768) this.age += elapsedTicks;
this.lastTick = MinecraftServer.currentTick;
// CraftBukkit end
+@@ -160,6 +161,7 @@ public class EntityItem extends Entity implements HopperPusher {
+ // CraftBukkit start - Use wall time for pickup and despawn timers
+ int elapsedTicks = MinecraftServer.currentTick - this.lastTick;
+ if (this.pickupDelay != 32767) this.pickupDelay -= elapsedTicks;
++ this.pickupDelay = Math.max(0, this.pickupDelay); // Paper - don't go below 0
+ if (this.age != -32768) this.age += elapsedTicks;
+ this.lastTick = MinecraftServer.currentTick;
+ // CraftBukkit end
--
2.21.0