13
0
geforkt von Mirrors/Paper

missed a spot for pickupDelay fix

Dieser Commit ist enthalten in:
Aikar 2019-03-24 18:15:39 -04:00
Ursprung 644e1d4f8f
Commit eb39758848

Datei anzeigen

@ -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 e723bd339..cf00d0c88 100644
index e723bd339..5f6e81372 100644
--- a/src/main/java/net/minecraft/server/EntityItem.java
+++ b/src/main/java/net/minecraft/server/EntityItem.java
@@ -0,0 +0,0 @@ public class EntityItem extends Entity {
@ -17,4 +17,12 @@ index e723bd339..cf00d0c88 100644
if (this.age != -32768) this.age += elapsedTicks;
this.lastTick = MinecraftServer.currentTick;
// CraftBukkit end
@@ -0,0 +0,0 @@ public class EntityItem extends Entity {
// 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
--