|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.morbz.minecraft.world.World
public class World
The main class for generating a Minecraft map.
Field Summary | |
---|---|
static byte |
DEFAULT_SKY_LIGHT
The default sky light level (maximal light) |
static byte |
DEFAULT_TRANSPARENCY
The default transparency level (fully transparent) |
static int |
MAX_HEIGHT
Maximal world height |
Constructor Summary | |
---|---|
World(Level level)
Creates a new instance. |
|
World(Level level,
DefaultLayers layers)
Creates a new instance. |
Method Summary | |
---|---|
byte |
getSkyLight(int x,
int y,
int z)
Returns the sky light level of the block at given position. |
byte |
getSkyLightFromParent(IBlockContainer child,
int childX,
int childY,
int childZ)
Returns the sky light level of a block that is out of bounds of the child block container. |
java.io.File |
save()
Saves the world in a new directory within the /worlds/ directory. |
void |
setBlock(int x,
int y,
int z,
IBlock block)
Sets a block at the given world position. |
void |
spreadSkyLight(byte light)
Spreads the skylight. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int MAX_HEIGHT
public static final byte DEFAULT_TRANSPARENCY
public static final byte DEFAULT_SKY_LIGHT
Constructor Detail |
---|
public World(Level level)
level
- The level that is used to define the world settingspublic World(Level level, DefaultLayers layers)
level
- The level that is used to define the world settingslayers
- The default layers. Can be 'null'Method Detail |
---|
public void setBlock(int x, int y, int z, IBlock block)
x
- The X-coordinatey
- The Y-coordinate (Height, Must be between 0 and 255)z
- The Z-coordinateblock
- The blockpublic byte getSkyLight(int x, int y, int z)
getSkyLight
in interface IBlockContainer
x
- The local X-coordinatey
- The local Y-coordinatez
- The local Z-coordinate
public byte getSkyLightFromParent(IBlockContainer child, int childX, int childY, int childZ)
getSkyLightFromParent
in interface IBlockContainer
child
- The child block containerchildX
- The local X-coordinatechildY
- The local Y-coordinatechildZ
- The local Z-coordinate
public void spreadSkyLight(byte light)
spreadSkyLight
in interface IBlockContainer
light
- The light levelpublic java.io.File save() throws java.io.IOException
java.io.IOException
- When file writing fails
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |