2020-05-06 11:48:49 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2019-03-24 23:12:56 +01: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-11-03 03:22:15 +01:00
|
|
|
index fde34e4c0c95d23a006304f26339a60ea6cf51fa..765eb57ae017acf6cc800f86d0160ca5e3b7b230 100644
|
2019-03-24 23:12:56 +01:00
|
|
|
--- a/src/main/java/net/minecraft/server/EntityItem.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/EntityItem.java
|
2019-12-12 17:20:43 +01:00
|
|
|
@@ -60,6 +60,7 @@ public class EntityItem extends Entity {
|
2019-03-24 23:12:56 +01: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
|
2020-08-25 04:22:08 +02:00
|
|
|
@@ -152,6 +153,7 @@ public class EntityItem extends Entity {
|
2019-03-24 23:15:39 +01: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
|