From e0c01154b030c527815e884b6b331c5534ab247f Mon Sep 17 00:00:00 2001 From: EvilSeph Date: Thu, 29 Mar 2012 08:25:59 -0400 Subject: [PATCH] Fixed potential issue when converting worlds. Fixes BUKKIT-1307 --- src/main/java/net/minecraft/server/OldChunkLoader.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/minecraft/server/OldChunkLoader.java b/src/main/java/net/minecraft/server/OldChunkLoader.java index d615aa4861..3abcc2fce8 100644 --- a/src/main/java/net/minecraft/server/OldChunkLoader.java +++ b/src/main/java/net/minecraft/server/OldChunkLoader.java @@ -18,7 +18,15 @@ public class OldChunkLoader { oldchunk.h = nbttagcompound.getList("Entities"); oldchunk.i = nbttagcompound.getList("TileEntities"); oldchunk.j = nbttagcompound.getList("TileTicks"); - oldchunk.a = nbttagcompound.getLong("LastUpdate"); + + // CraftBukkit start + try { + oldchunk.a = nbttagcompound.getLong("LastUpdate"); + } catch (ClassCastException ex) { + oldchunk.a = nbttagcompound.getInt("LastUpdate"); + } + // CraftBukkit end + return oldchunk; }