diff options
author | Nathan Adams <dinnerbone@dinnerbone.com> | 2012-03-01 10:49:23 +0000 |
---|---|---|
committer | Nathan Adams <dinnerbone@dinnerbone.com> | 2012-03-01 14:38:31 +0000 |
commit | 543c4879fee3b7165764c5371d226c93fe3a657b (patch) | |
tree | 4fe9116464e1fe42a40dc3ba19b58234bd26f821 /src/main/java/net/minecraft/server/WorldData.java | |
parent | e9ca87000c1794715bc3fe0a7d1caaf809057635 (diff) | |
download | craftbukkit-543c4879fee3b7165764c5371d226c93fe3a657b.tar craftbukkit-543c4879fee3b7165764c5371d226c93fe3a657b.tar.gz craftbukkit-543c4879fee3b7165764c5371d226c93fe3a657b.tar.lz craftbukkit-543c4879fee3b7165764c5371d226c93fe3a657b.tar.xz craftbukkit-543c4879fee3b7165764c5371d226c93fe3a657b.zip |
Updated CraftBukkit to 1.2
Diffstat (limited to 'src/main/java/net/minecraft/server/WorldData.java')
-rw-r--r-- | src/main/java/net/minecraft/server/WorldData.java | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/src/main/java/net/minecraft/server/WorldData.java b/src/main/java/net/minecraft/server/WorldData.java index 196fac1b..6cdb5722 100644 --- a/src/main/java/net/minecraft/server/WorldData.java +++ b/src/main/java/net/minecraft/server/WorldData.java @@ -34,6 +34,14 @@ public class WorldData { this.type = WorldType.getType(s); if (this.type == null) { this.type = WorldType.NORMAL; + } else if (this.type.c()) { + int i = 0; + + if (nbttagcompound.hasKey("generatorVersion")) { + i = nbttagcompound.getInt("generatorVersion"); + } + + this.type = this.type.a(i); } } @@ -126,6 +134,7 @@ public class WorldData { private void a(NBTTagCompound nbttagcompound, NBTTagCompound nbttagcompound1) { nbttagcompound.setLong("RandomSeed", this.seed); nbttagcompound.setString("generatorName", this.type.name()); + nbttagcompound.setInt("generatorVersion", this.type.getVersion()); nbttagcompound.setInt("GameType", this.gameType); nbttagcompound.setBoolean("MapFeatures", this.useMapFeatures); nbttagcompound.setInt("SpawnX", this.spawnX); @@ -166,11 +175,7 @@ public class WorldData { return this.time; } - public long g() { - return this.sizeOnDisk; - } - - public int h() { + public int g() { return this.dimension; } @@ -178,10 +183,6 @@ public class WorldData { this.time = i; } - public void b(long i) { - this.sizeOnDisk = i; - } - public void setSpawn(int i, int j, int k) { this.spawnX = i; this.spawnY = j; @@ -192,7 +193,7 @@ public class WorldData { this.name = s; } - public int i() { + public int h() { return this.version; } @@ -251,4 +252,8 @@ public class WorldData { public WorldType getType() { return this.type; } + + public void setType(WorldType worldtype) { + this.type = worldtype; + } } |