From b7354779d481d38e3450b1da67836d9f29a6d5a0 Mon Sep 17 00:00:00 2001 From: GJ Date: Sun, 20 Jan 2013 16:07:27 -0500 Subject: [PATCH] Minor changes to try & reduce method calls. --- .../util/blockmeta/chunkmeta/HashChunkManager.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 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 9f1c837be..5e255bd91 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 @@ -160,11 +160,14 @@ public class HashChunkManager implements ChunkManager { ChunkStore in = null; UUID key = world.getUID(); - if (!this.oldData.containsKey(key)) - this.oldData.put(key, (new File(world.getWorldFolder(), "mcmmo_data")).exists()); + boolean oldDataHasKey = oldData.containsKey(key); - if (this.oldData.containsKey(key) && oldData.get(key)) + if (!oldDataHasKey) { + oldData.put(key, (new File(world.getWorldFolder(), "mcmmo_data")).exists()); + } + else if (oldData.get(key)) { convertChunk(new File(world.getWorldFolder(), "mcmmo_data"), cx, cz, world, true); + } try { in = readChunkStore(world, cx, cz);