Added new 1.1 items, enchantments. Added WorldType, and a method to set/get the type of a world at creation.

This commit is contained in:
Nathan Adams
2012-01-12 22:16:31 +00:00
parent a0b6a0b4a0
commit c423a56624
5 changed files with 93 additions and 1 deletions

View File

@@ -13,6 +13,7 @@ public class WorldCreator {
private long seed;
private World.Environment environment = World.Environment.NORMAL;
private ChunkGenerator generator = null;
private WorldType type = WorldType.NORMAL;
/**
* Creates an empty WorldCreationOptions for the given world name
@@ -115,6 +116,27 @@ public class WorldCreator {
return this;
}
/**
* Gets the type of the world that will be created or loaded
*
* @return World type
*/
public WorldType type() {
return type;
}
/**
* Sets the type of the world that will be created or loaded
*
* @param type World type
* @return This object, for chaining
*/
public WorldCreator type(WorldType type) {
this.type = type;
return this;
}
/**
* Gets the generator that will be used to create or load the world.
* <p>