net.morbz.minecraft.world
Interface IBlockContainer

All Known Implementing Classes:
Chunk, Region, Section, World

public interface IBlockContainer

The interface for all classes that contain blocks.

Author:
MorbZ

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.
 void spreadSkyLight(byte light)
          Spreads the skylight.
 

Method Detail

getSkyLight

byte getSkyLight(int x,
                 int y,
                 int z)
Returns the sky light level of the block at given position. If there is no block World.DEFAULT_SKY_LIGHT will be returned.

Parameters:
x - The local X-coordinate
y - The local Y-coordinate
z - The local Z-coordinate
Returns:
The sky light level

getSkyLightFromParent

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.

Parameters:
child - The child block container
childX - The local X-coordinate
childY - The local Y-coordinate
childZ - The local Z-coordinate
Returns:
The sky light level

spreadSkyLight

void spreadSkyLight(byte light)
Spreads the skylight. For each block that has the given light level it's adjacent blocks will be lit if their current light level is lower.

Parameters:
light - The light level