2019-06-25 19:18:50 +00:00
|
|
|
From 472b1ae524fad0d6ddf1c211e481dcf6d7ce9b68 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
|
2019-06-25 19:18:50 +00:00
|
|
|
index 6e026d34f0..2091698953 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-05-05 17:19:34 +00:00
|
|
|
@@ -59,6 +59,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-05-14 02:20:58 +00:00
|
|
|
@@ -145,6 +146,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
|
|
|
--
|
2019-06-25 19:18:50 +00:00
|
|
|
2.22.0
|
2019-03-24 22:12:56 +00:00
|
|
|
|