chunk additions
This commit is contained in:
@@ -92,6 +92,15 @@ public class BlockState
|
||||
/// <returns>Z-coordinate.</returns>
|
||||
public int getZ() => _z;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the chunk which contains this block.
|
||||
/// </summary>
|
||||
/// <returns>Containing Chunk.</returns>
|
||||
public Chunk.Chunk getChunk()
|
||||
{
|
||||
return _world.getChunkAt(_x >> 4, _z >> 4);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the location of this block.
|
||||
/// </summary>
|
||||
@@ -194,4 +203,13 @@ public class BlockState
|
||||
NativeBridge.SetTile(_world.getDimensionId(), _x, _y, _z, _typeId, _data);
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the light level between 0-15.
|
||||
/// </summary>
|
||||
/// <returns>Light level.</returns>
|
||||
public byte getLightLevel()
|
||||
{
|
||||
return getBlock().getLightLevel();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user