Fix issue with chunk caching patch

By: Ammar Askar <ammar@ammaraskar.com>
This commit is contained in:
Spigot 2013-08-03 20:34:40 +05:00
parent babe9dc513
commit f11258ccde

View File

@ -6,7 +6,7 @@ Subject: [PATCH] Entity ticking chunk caching
Cache known loaded chunks so we avoid making a potentially expensive contains call for every single entity in exchange for some simple arithmetic. Best case scenario, this cuts down contains call to once per chunk, worst case it adds on some simple arithmetic operations
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 8bd7876..ba1c1ca 100644
index 8bd7876..52694f1 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1221,6 +1221,7 @@ public abstract class World implements IBlockAccess {
@ -57,10 +57,17 @@ index 8bd7876..ba1c1ca 100644
+ }
}
// CraftBukkit end
+ lastChunk = Long.MIN_VALUE; // Spigot
+ lastChunk = chunk; // Spigot
if (entity.vehicle != null) {
if (!entity.vehicle.dead && entity.vehicle.passenger == entity) {
@@ -1326,6 +1338,7 @@ public abstract class World implements IBlockAccess {
this.methodProfiler.b();
}
+ lastChunk = Long.MIN_VALUE; // Spigot
timings.entityTick.stopTiming(); // Spigot
this.methodProfiler.c("tileEntities");
--
1.8.1.2
1.8.1.msysgit.1