public class WorldRegion extends java.lang.Object implements MinecraftWorld
| Modifier and Type | Field and Description | 
|---|---|
| static int | CHUNKS_PER_SIDE | 
| Constructor and Description | 
|---|
| WorldRegion(java.io.File worldDir,
           int dimension,
           int regionX,
           int regionZ,
           int minHeight,
           int maxHeight,
           Platform platform) | 
| WorldRegion(int regionX,
           int regionZ,
           int minHeight,
           int maxHeight,
           Platform platform) | 
| Modifier and Type | Method and Description | 
|---|---|
| void | addChunk(Chunk chunk)Add a chunk. | 
| void | addEntity(double x,
         double y,
         double height,
         Entity entity) | 
| void | addTileEntity(int x,
             int y,
             int height,
             TileEntity tileEntity) | 
| void | close()Close the chunk provider, flushing any changes and closing any system
 resources. | 
| int | getBlockLightLevel(int x,
                  int y,
                  int height)Returns  0ifheightis too large. | 
| int | getBlockTypeAt(int x,
              int y,
              int height)Returns  Constants.BLK_AIRifheightis too large. | 
| Chunk | getChunk(int x,
        int z)Retrieve a chunk. | 
| Chunk | getChunkForEditing(int x,
                  int z)Retrieve a chunk for editing. | 
| int | getDataAt(int x,
         int y,
         int height)Returns  0ifheightis too large. | 
| int | getHighestNonAirBlock(int x,
                     int y)Get the Z coordinate of the highest non-air block in a specific column. | 
| Material | getMaterialAt(int x,
             int y,
             int height)Returns  nullifheightis too large. | 
| int | getMaxHeight() | 
| int | getMinHeight() | 
| int | getSkyLightLevel(int x,
                int y,
                int height)Returns  15ifheightis too large. | 
| boolean | isChunkPresent(int x,
              int z)Determine whether the world contains any data in a particular chunk (a
 16 by 16 block area). | 
| void | save(java.io.File worldDir,
    int dimension) | 
| void | setBlockLightLevel(int x,
                  int y,
                  int height,
                  int blockLightLevel)Fails silently if  heightis too large. | 
| void | setBlockTypeAt(int x,
              int y,
              int height,
              int blockType)Fails silently if  heightis too large. | 
| void | setDataAt(int x,
         int y,
         int height,
         int data)Fails silently if  heightis too large. | 
| void | setMaterialAt(int x,
             int y,
             int height,
             Material material)Fails silently if  heightis too large. | 
| void | setSkyLightLevel(int x,
                int y,
                int height,
                int skyLightLevel)Fails silently if  heightis too large. | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitmarkForUpdateWorldpublic static final int CHUNKS_PER_SIDE
public WorldRegion(int regionX,
                   int regionZ,
                   int minHeight,
                   int maxHeight,
                   Platform platform)
public WorldRegion(java.io.File worldDir,
                   int dimension,
                   int regionX,
                   int regionZ,
                   int minHeight,
                   int maxHeight,
                   Platform platform)
public int getBlockTypeAt(int x,
                          int y,
                          int height)
MinecraftWorldConstants.BLK_AIR if height is too large.getBlockTypeAt in interface MinecraftWorldpublic int getDataAt(int x,
                     int y,
                     int height)
MinecraftWorld0 if height is too large.getDataAt in interface MinecraftWorldpublic Material getMaterialAt(int x, int y, int height)
MinecraftWorldnull if height is too large.getMaterialAt in interface MinecraftWorldpublic void setBlockTypeAt(int x,
                           int y,
                           int height,
                           int blockType)
MinecraftWorldheight is too large.setBlockTypeAt in interface MinecraftWorldpublic void setDataAt(int x,
                      int y,
                      int height,
                      int data)
MinecraftWorldheight is too large.setDataAt in interface MinecraftWorldpublic void setMaterialAt(int x,
                          int y,
                          int height,
                          Material material)
MinecraftWorldheight is too large.setMaterialAt in interface MinecraftWorldpublic int getMinHeight()
getMinHeight in interface MinecraftWorldpublic int getMaxHeight()
getMaxHeight in interface MinecraftWorldpublic void addEntity(double x,
                      double y,
                      double height,
                      Entity entity)
addEntity in interface MinecraftWorldpublic void addTileEntity(int x,
                          int y,
                          int height,
                          TileEntity tileEntity)
addTileEntity in interface MinecraftWorldpublic int getBlockLightLevel(int x,
                              int y,
                              int height)
MinecraftWorld0 if height is too large.getBlockLightLevel in interface MinecraftWorldpublic void setBlockLightLevel(int x,
                               int y,
                               int height,
                               int blockLightLevel)
MinecraftWorldheight is too large.setBlockLightLevel in interface MinecraftWorldpublic int getSkyLightLevel(int x,
                            int y,
                            int height)
MinecraftWorld15 if height is too large.getSkyLightLevel in interface MinecraftWorldpublic void setSkyLightLevel(int x,
                             int y,
                             int height,
                             int skyLightLevel)
MinecraftWorldheight is too large.setSkyLightLevel in interface MinecraftWorldpublic boolean isChunkPresent(int x,
                              int z)
MinecraftWorldisChunkPresent in interface ChunkProviderisChunkPresent in interface MinecraftWorldx - The X coordinate in chunk coordinates.z - The Y coordinate in chunk coordinates.true if data is present for the specified chunk.public Chunk getChunk(int x, int z)
ChunkProvidernull is
 returned. The returned chunk may be read-only.getChunk in interface ChunkProviderx - The X coordinate of the chunk to retrieve.z - The Z coordinate of the chunk to retrieve.null if there is no chunk at
 the specified coordinates.public Chunk getChunkForEditing(int x, int z)
ChunkProvidernull may be returned, or the provider may
 create a new, empty chunk. The returned chunk is guaranteed not to be
 read-only.getChunkForEditing in interface ChunkProviderx - The X coordinate of the chunk to retrieve.z - The Z coordinate of the chunk to retrieve.null if there is no chunk at
 the specified coordinates, and this chunk provider does not create new
 chunks.public void close()
ChunkProviderclose in interface java.lang.AutoCloseableclose in interface ChunkProviderpublic void addChunk(Chunk chunk)
MinecraftWorldPlatform.addChunk in interface MinecraftWorldchunk - The chunk to add.public int getHighestNonAirBlock(int x,
                                 int y)
MinecraftWorldgetHighestNonAirBlock in interface MinecraftWorldx - The X coordinate of the column.y - The Y coordinate of the column.Integer.MIN_VALUE if the
 column is empty or no data is present
 for the specified coordinates.public void save(java.io.File worldDir,
                 int dimension)