summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft/server/WorldData.java
diff options
context:
space:
mode:
authorNathan Adams <dinnerbone@dinnerbone.com>2012-03-01 10:49:23 +0000
committerNathan Adams <dinnerbone@dinnerbone.com>2012-03-01 14:38:31 +0000
commit543c4879fee3b7165764c5371d226c93fe3a657b (patch)
tree4fe9116464e1fe42a40dc3ba19b58234bd26f821 /src/main/java/net/minecraft/server/WorldData.java
parente9ca87000c1794715bc3fe0a7d1caaf809057635 (diff)
downloadcraftbukkit-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.java25
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;
+ }
}