2020-01-22 02:02:07 +00:00
|
|
|
From b77e7a559145c350925a375f86f5c491572da9ae Mon Sep 17 00:00:00 2001
|
2019-03-24 22:12:56 +00:00
|
|
|
From: Aikar <aikar@aikar.co>
|
|
|
|
Date: Sun, 24 Mar 2019 18:09:20 -0400
|
|
|
|
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
|
2020-01-22 02:02:07 +00:00
|
|
|
index 5f46c7f86..a0d1e7fd2 100644
|
2019-03-24 22:12:56 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/EntityItem.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/EntityItem.java
|
2019-12-12 16:20:43 +00:00
|
|
|
@@ -60,6 +60,7 @@ public class EntityItem extends Entity {
|
2019-03-24 22:12:56 +00:00
|
|
|
// 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
|
2019-12-12 16:20:43 +00:00
|
|
|
@@ -146,6 +147,7 @@ public class EntityItem extends Entity {
|
2019-03-24 22:15:39 +00:00
|
|
|
// 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
|
2019-03-24 22:12:56 +00:00
|
|
|
--
|
2020-01-22 02:02:07 +00:00
|
|
|
2.25.0.windows.1
|
2019-03-24 22:12:56 +00:00
|
|
|
|