Ensure that inactiveTick on EntityItem obeys magic values for age and pickupDelay.
This commit is contained in:
parent
f6fba00cbc
commit
f08d887fbf
@ -1,4 +1,4 @@
|
||||
From b72486af9b48b56778166d1899644ddee8d9f94b Mon Sep 17 00:00:00 2001
|
||||
From b1be2851e85a70cddcbe318260b04705bedc5b04 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Sun, 3 Feb 2013 05:10:21 -0500
|
||||
Subject: [PATCH] Entity Activation Range
|
||||
@ -9,7 +9,7 @@ This will drastically cut down on tick timings for entities that are not in rang
|
||||
This change can have dramatic impact on gameplay if configured too low. Balance according to your servers desired gameplay.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 0e6a905..687fb4b 100644
|
||||
index db6c73b..a5707c3 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -89,14 +89,14 @@ public abstract class Entity implements ICommandListener {
|
||||
@ -145,7 +145,7 @@ index aa36bf2..3c7814d 100644
|
||||
super(world);
|
||||
this.setSize(0.25F, 0.25F);
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java
|
||||
index 8b7cd86..b80801a 100644
|
||||
index 8b7cd86..fe9a000 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityItem.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityItem.java
|
||||
@@ -121,6 +121,28 @@ public class EntityItem extends Entity {
|
||||
@ -157,8 +157,8 @@ index 8b7cd86..b80801a 100644
|
||||
+ 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
|
||||
+
|
||||
@ -547,5 +547,5 @@ index a85800d..da8563b 100644
|
||||
+ }
|
||||
}
|
||||
--
|
||||
2.1.4
|
||||
1.9.1
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user