missed a spot for pickupDelay fix
This commit is contained in:
parent
76fab035d3
commit
95941afd59
1 changed files with 10 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
||||||
From 7b2b7b222801b793995cbc5b917933a50a47c772 Mon Sep 17 00:00:00 2001
|
From be2655721b882338f58cc53bbeeec14af6589769 Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Sun, 24 Mar 2019 18:09:20 -0400
|
Date: Sun, 24 Mar 2019 18:09:20 -0400
|
||||||
Subject: [PATCH] don't go below 0 for pickupDelay, breaks picking up items
|
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
|
vanilla checks for == 0
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java
|
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
|
--- a/src/main/java/net/minecraft/server/EntityItem.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityItem.java
|
+++ b/src/main/java/net/minecraft/server/EntityItem.java
|
||||||
@@ -58,6 +58,7 @@ public class EntityItem extends Entity {
|
@@ -58,6 +58,7 @@ public class EntityItem extends Entity {
|
||||||
|
@ -17,6 +17,14 @@ index e723bd339..cf00d0c88 100644
|
||||||
if (this.age != -32768) this.age += elapsedTicks;
|
if (this.age != -32768) this.age += elapsedTicks;
|
||||||
this.lastTick = MinecraftServer.currentTick;
|
this.lastTick = MinecraftServer.currentTick;
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
@@ -147,6 +148,7 @@ 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
|
||||||
--
|
--
|
||||||
2.21.0
|
2.21.0
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue