From 93d4dc070a9be8bbcf4102181cafe06d1d05c182 Mon Sep 17 00:00:00 2001 From: Ammar Askar Date: Sat, 3 Aug 2013 20:34:40 +0500 Subject: [PATCH] Fix issue with chunk caching patch --- .../0064-Entity-ticking-chunk-caching.patch | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/CraftBukkit-Patches/0064-Entity-ticking-chunk-caching.patch b/CraftBukkit-Patches/0064-Entity-ticking-chunk-caching.patch index 4832b4ec4..65575a79f 100644 --- a/CraftBukkit-Patches/0064-Entity-ticking-chunk-caching.patch +++ b/CraftBukkit-Patches/0064-Entity-ticking-chunk-caching.patch @@ -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 \ No newline at end of file