geforkt von Mirrors/Paper
90141ff411
Also fix a loadChunk call in heightmap api
31 Zeilen
1.5 KiB
Diff
31 Zeilen
1.5 KiB
Diff
From 764b24edaabf014f8f78ddfe62373b08b7bcdbca Mon Sep 17 00:00:00 2001
|
|
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
|
|
index ddd1f63073..7e92563141 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityItem.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityItem.java
|
|
@@ -59,6 +59,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
|
|
@@ -145,6 +146,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
|
|
|