Ensure that inactiveTick on EntityItem obeys magic values for age and pickupDelay.

This commit is contained in:
Melair 2015-07-29 10:40:32 +01:00
parent f4d9e4a686
commit af58d5536e

View file

@ -157,8 +157,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ public void inactiveTick() {
+ // CraftBukkit start - Use wall time for pickup and despawn timers
+ int elapsedTicks = MinecraftServer.currentTick - this.lastTick;
+ this.pickupDelay -= elapsedTicks;
+ this.age += elapsedTicks;
+ if (this.pickupDelay != 32767) this.pickupDelay -= elapsedTicks;
+ if (this.age != -32768) this.age += elapsedTicks;
+ this.lastTick = MinecraftServer.currentTick;
+ // CraftBukkit end
+