From 9a6ebb0b9a94a04234a5665bc388a9c1787cd456 Mon Sep 17 00:00:00 2001 From: Glitchfinder Date: Sun, 20 Jan 2013 15:52:00 -0800 Subject: [PATCH] Slightly reducing the processing required to unload chunks. --- .../nossr50/util/blockmeta/chunkmeta/HashChunkManager.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/util/blockmeta/chunkmeta/HashChunkManager.java b/src/main/java/com/gmail/nossr50/util/blockmeta/chunkmeta/HashChunkManager.java index 494853e18..95e85cb2f 100755 --- a/src/main/java/com/gmail/nossr50/util/blockmeta/chunkmeta/HashChunkManager.java +++ b/src/main/java/com/gmail/nossr50/util/blockmeta/chunkmeta/HashChunkManager.java @@ -15,6 +15,7 @@ import java.util.List; import java.util.UUID; import org.bukkit.Bukkit; +import org.bukkit.Chunk; import org.bukkit.World; import org.bukkit.block.Block; import org.bukkit.entity.Entity; @@ -289,10 +290,12 @@ public class HashChunkManager implements ChunkManager { if (entity == null || world == null) return false; - if (entity.getLocation().getChunk().getX() != cx) + Chunk chunk = entity.getLocation().getChunk(); + + if (chunk.getX() != cx) return false; - if (entity.getLocation().getChunk().getZ() != cz) + if (chunk.getZ() != cz) return false; if (entity.getWorld() != world)