|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.morbz.minecraft.level.Level
public class Level
The level defines the settings for the world. Like game mode, spawn point, etc.
Constructor Summary | |
---|---|
Level(java.lang.String levelName)
Creates a new instance. |
|
Level(java.lang.String levelName,
IGenerator generator)
Creates a new instance. |
Method Summary | |
---|---|
boolean |
getAllowCommands()
|
GameType |
getGameType()
|
java.lang.String |
getLevelName()
|
boolean |
getMapFeatures()
|
long |
getRandomSeed()
|
org.jnbt.Tag |
getTag()
Returns an instance of a subclass of the NBT-Tag class. |
void |
setAllowCommands(boolean allowCommands)
|
void |
setGameType(GameType gameType)
|
void |
setMapFeatures(boolean mapFeatures)
|
void |
setRandomSeed(long randomSeed)
|
void |
setSpawnPoint(int x,
int y,
int z)
Sets the default world spawn position. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Level(java.lang.String levelName)
levelName
- The name of the world. This value is also used as directory name for the
generated world.public Level(java.lang.String levelName, IGenerator generator)
levelName
- The name of the world. This value is also used as directory name for the
generated world.generator
- The generator that is used for the world.Method Detail |
---|
public java.lang.String getLevelName()
public boolean getAllowCommands()
public void setAllowCommands(boolean allowCommands)
allowCommands
- If cheats are allowed. The default value is 'false'.public boolean getMapFeatures()
public void setMapFeatures(boolean mapFeatures)
mapFeatures
- If structures like villages, mineshafts, etc. should be generated. The
default value is 'true'.public GameType getGameType()
public void setGameType(GameType gameType)
gameType
- The game mode. The default value is 'GameType.CREATIVE'.public void setSpawnPoint(int x, int y, int z)
x
- The X-coordinatey
- The Y-coordinatez
- The Z-coordinatepublic long getRandomSeed()
public void setRandomSeed(long randomSeed)
randomSeed
- The random seed that is used for world generation. The default value is a
random positive long.public org.jnbt.Tag getTag()
getTag
in interface ITagProvider
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |