| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.morbz.minecraft.world.Section
public class Section
Defines a section. It consist of 16 blocks in each dimension.
| Field Summary | |
|---|---|
| static int | BLOCKS_PER_SECTIONThe total number of blocks in a section | 
| static int | SECTION_HEIGHTThe height in blocks of a section | 
| Constructor Summary | |
|---|---|
| Section(IBlockContainer parent,
        int y)Creates a new instance. | |
| Method Summary | |
|---|---|
|  int | getBlockCount()Returns the number of blocks that are not air. | 
|  int | getHighestBlock(int x,
                int z)Returns the Y-coordinate of the highest block that is not air or -1 is there are no blocks in this column. | 
|  byte | getSkyLight(int x,
            int y,
            int z)Returns the sky light level of the block at given position. | 
|  byte | getSkyLightFromParent(IBlockContainer child,
                      int x,
                      int y,
                      int z)Returns the sky light level of a block that is out of bounds of the child block container. | 
|  org.jnbt.Tag | getTag()Returns an instance of a subclass of the NBT-Tag class. | 
|  int | getY() | 
|  void | setBlock(int x,
         int y,
         int z,
         IBlock block)Sets a block at the given position. | 
|  void | setSkyLight(int x,
            int y,
            int z,
            byte light)Sets the sky light level of the block at given 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 SECTION_HEIGHT
public static final int BLOCKS_PER_SECTION
| Constructor Detail | 
|---|
public Section(IBlockContainer parent,
               int y)
parent - The parent block containery - The Y-position within the chunk| Method Detail | 
|---|
public int getY()
public void setBlock(int x,
                     int y,
                     int z,
                     IBlock block)
x - The X-coordinate within the sectiony - The Y-coordinate within the sectionz - The Z-coordinate within the sectionblock - The block
public byte getSkyLight(int x,
                        int y,
                        int z)
getSkyLight in interface IBlockContainerx - The local X-coordinatey - The local Y-coordinatez - The local Z-coordinate
public void setSkyLight(int x,
                        int y,
                        int z,
                        byte light)
x - The X-coordinatey - The Y-coordinatez - The Z-coordinatelight - The sky light level
public byte getSkyLightFromParent(IBlockContainer child,
                                  int x,
                                  int y,
                                  int z)
getSkyLightFromParent in interface IBlockContainerchild - The child block containerx - The local X-coordinatey - The local Y-coordinatez - The local Z-coordinate
public void spreadSkyLight(byte light)
spreadSkyLight in interface IBlockContainerlight - The light levelpublic int getBlockCount()
public int getHighestBlock(int x,
                           int z)
x - The X-coordinatez - The Z-coordinate
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 | |||||||||