using System;
using System.Collections.Generic;
using System.Text;
namespace Substrate.Core
{
///
/// A basic unconstrained container of blocks.
///
/// The scope of coordinates is undefined for unconstrained block containers.
public interface IBlockCollection
{
///
/// Gets a basic block from an unbounded block container.
///
/// The global X-coordinate of a block.
/// The global Y-coordinate of a block.
/// The global Z-coordinate of a block.
/// A basic from the collection at the given coordinates.
IBlock GetBlock (int x, int y, int z);
///
/// Gets a reference object to a basic block within an unbounded block container.
///
/// The global X-coordinate of a block.
/// The global Y-coordinate of a block.
/// The global Z-coordinate of a block.
/// A basic acting as a reference directly into the container at the given coordinates.
IBlock GetBlockRef (int x, int y, int z);
///
/// Updates a block in an unbounded block container with data from an existing object.
///
/// The global X-coordinate of a block.
/// The global Y-coordinate of a block.
/// The global Z-coordinate of a block.
/// The to copy basic data from.
void SetBlock (int x, int y, int z, IBlock block);
///
/// Gets a block's id (type) from an unbounded block container.
///
/// The global X-coordinate of a block.
/// The global Y-coordinate of a block.
/// The global Z-coordinate of a block.
/// The block id (type) from the block container at the given coordinates.
int GetID (int x, int y, int z);
///
/// Sets a block's id (type) within an unbounded block container.
///
/// The global X-coordinate of a block.
/// The global Y-coordinate of a block.
/// The global Z-coordinate of a block.
/// The id (type) to assign to a block at the given coordinates.
void SetID (int x, int y, int z, int id);
///
/// Gets info and attributes on a block's type within an unbounded block container.
///
/// The global X-coordinate of a block.
/// The global Y-coordinate of a block.
/// The global Z-coordinate of a block.
/// A instance for the block's type.
BlockInfo GetInfo (int x, int y, int z);
}
///
/// An unbounded container of blocks supporting data fields.
///
///
public interface IDataBlockCollection : IBlockCollection
{
///
/// Gets a block with data field from an unbounded block container.
///
/// The global X-coordinate of a block.
/// The global Y-coordinate of a block.
/// The global Z-coordinate of a block.
/// An from the collection at the given coordinates.
new IDataBlock GetBlock (int x, int y, int z);
///
/// Gets a reference object to a block with data field within an unbounded block container.
///
/// The global X-coordinate of a block.
/// The global Y-coordinate of a block.
/// The global Z-coordinate of a block.
/// An acting as a reference directly into the container at the given coordinates.
new IDataBlock GetBlockRef (int x, int y, int z);
///
/// Updates a block in an unbounded block container with data from an existing object.
///
/// The global X-coordinate of a block.
/// The global Y-coordinate of a block.
/// The global Z-coordinate of a block.
/// The to copy data from.
void SetBlock (int x, int y, int z, IDataBlock block);
///
/// Gets a block's data field from an unbounded block container.
///
/// The global X-coordinate of a block.
/// The global Y-coordinate of a block.
/// The global Z-coordinate of a block.
/// The data field of a block at the given coordinates.
int GetData (int x, int y, int z);
///
/// Sets a block's data field within an unbounded block container.
///
/// The global X-coordinate of a block.
/// The global Y-coordinate of a block.
/// The global Z-coordinate of a block.
/// The data field to assign to a block at the given coordinates.
void SetData (int x, int y, int z, int data);
}
///
/// An unbounded container of blocks supporting dual-source lighting.
///
///
public interface ILitBlockCollection : IBlockCollection
{
///
/// Gets a block with lighting information from an unbounded block container.
///
/// The global X-coordinate of a block.
/// The global Y-coordinate of a block.
/// The global Z-coordinate of a block.
/// An from the collection at the given coordinates.
new ILitBlock GetBlock (int x, int y, int z);
///
/// Gets a reference object to a block with lighting information within an unbounded block container.
///
/// The global X-coordinate of a block.
/// The global Y-coordinate of a block.
/// The global Z-coordinate of a block.
/// An acting as a reference directly into the container at the given coordinates.
new ILitBlock GetBlockRef (int x, int y, int z);
///
/// Updates a block in an unbounded block container with data from an existing object.
///
/// The global X-coordinate of a block.
/// The global Y-coordinate of a block.
/// The global Z-coordinate of a block.
/// The to copy data from.
void SetBlock (int x, int y, int z, ILitBlock block);
///
/// Gets a block's block-source light value from an unbounded block container.
///
/// The global X-coordinate of a block.
/// The global Y-coordinate of a block.
/// The global Z-coordinate of a block.
/// The block-source light value of a block at the given coordinates.
int GetBlockLight (int x, int y, int z);
///
/// Gets a block's sky-source light value from an unbounded block container.
///
/// The global X-coordinate of a block.
/// The global Y-coordinate of a block.
/// The global Z-coordinate of a block.
/// The sky-source light value of a block at the given coordinates.
int GetSkyLight (int x, int y, int z);
///
/// Sets a block's block-source light value within an unbounded block container.
///
/// The global X-coordinate of a block.
/// The global Y-coordinate of a block.
/// The global Z-coordinate of a block.
/// The block-source light value to assign to a block at the given coordinates.
void SetBlockLight (int x, int y, int z, int light);
///
/// Sets a block's sky-source light value within an unbounded block container.
///
/// The global X-coordinate of a block.
/// The global Y-coordinate of a block.
/// The global Z-coordinate of a block.
/// The sky-source light value to assign to a block at the given coordinates.
void SetSkyLight (int x, int y, int z, int light);
///
/// Gets the Y-coordinate of the lowest block with unobstructed view of the sky at the given coordinates within an unbounded block container.
///
/// The global X-coordinate of a block.
/// The global Z-coordinate of a block.
/// The height value of an X-Z coordinate pair in the block container.
/// The height value represents the lowest block with an unobstructed view of the sky. This is the lowest block with
/// a maximum-value sky-light value. Fully transparent blocks, like glass, do not count as an obstruction.
int GetHeight (int x, int z);
///
/// Sets the Y-coordinate of the lowest block with unobstructed view of the sky at the given coordinates within an unbounded block container.
///
/// The global X-coordinate of a block.
/// The global Z-coordinate of a block.
/// The height value of an X-Z coordinate pair in the block container.
/// Minecraft lighting algorithms rely heavily on this value being correct. Setting this value too low may result in
/// rooms that can never get dark, for example.
void SetHeight (int x, int z, int height);
///
/// Recalculates the block-source light value of a single block within an unbounded block container.
///
/// The global X-coordinate of a block.
/// The global Y-coordinate of a block.
/// The global Z-coordinate of a block.
/// The lighting of the block will be updated to be consistent with the lighting in neighboring blocks.
/// If the block is itself a light source, many nearby blocks may be updated to maintain consistent lighting. These
/// updates may also touch neighboring objects, if they can be resolved.
/// This function assumes that the entire and neighboring s
/// already have consistent lighting, with the exception of the block being updated. If this assumption is violated,
/// lighting may fail to converge correctly.
void UpdateBlockLight (int x, int y, int z);
///
/// Recalculates the sky-source light value of a single block within an unbounded block container.
///
/// The global X-coordinate of a block.
/// The global Y-coordinate of a block.
/// The global Z-coordinate of a block.
/// The lighting of the block will be updated to be consistent with the lighting in neighboring blocks.
/// If the block is itself a light source, many nearby blocks may be updated to maintain consistent lighting. These
/// updates may also touch neighboring objects, if they can be resolved.
/// This function assumes that the entire and neighboring s
/// already have consistent lighting, with the exception of the block being updated. If this assumption is violated,
/// lighting may fail to converge correctly.
void UpdateSkyLight (int x, int y, int z);
}
///
/// An unbounded container for blocks supporting additional properties.
///
///
public interface IPropertyBlockCollection : IBlockCollection
{
///
/// Gets a block supporting extra properties from an unbounded block container.
///
/// The global X-coordinate of a block.
/// The global Y-coordinate of a block.
/// The global Z-coordinate of a block.
/// An from the collection at the given coordinates.
new IPropertyBlock GetBlock (int x, int y, int z);
///
/// Gets a reference object to a block supporting extra properties within an unbounded block container.
///
/// The global X-coordinate of a block.
/// The global Y-coordinate of a block.
/// The global Z-coordinate of a block.
/// An acting as a reference directly into the container at the given coordinates.
new IPropertyBlock GetBlockRef (int x, int y, int z);
///
/// Updates a block in an unbounded block container with data from an existing object.
///
/// The global X-coordinate of a block.
/// The global Y-coordinate of a block.
/// The global Z-coordinate of a block.
/// The to copy data from.
void SetBlock (int x, int y, int z, IPropertyBlock block);
///
/// Gets the record of a block within an unbounded block container.
///
/// The global X-coordinate of a block.
/// The global Y-coordinate of a block.
/// The global Z-coordinate of a block.
/// A record attached to a block at the given coordinates, or null if no tile entity is set.
TileEntity GetTileEntity (int x, int y, int z);
///
/// Sets a record to a block within an unbounded block container.
///
/// The global X-coordinate of a block.
/// The global Y-coordinate of a block.
/// The global Z-coordinate of a block.
/// The record to assign to the given block.
/// Thrown when an incompatible is added to a block.
/// Thrown when a is added to a block that does not use tile entities.
void SetTileEntity (int x, int y, int z, TileEntity te);
///
/// Creates a new default record for a block within an unbounded block container.
///
/// The global X-coordinate of a block.
/// The global Y-coordinate of a block.
/// The global Z-coordinate of a block.
/// Thrown when a is created for a block that does not use tile entities.
/// Thrown when the tile entity type associated with the given block has not been registered with .
void CreateTileEntity (int x, int y, int z);
///
/// Deletes a record associated with a block within an unbounded block container, if it exists.
///
/// The global X-coordinate of a block.
/// The global Y-coordinate of a block.
/// The global Z-coordinate of a block.
void ClearTileEntity (int x, int y, int z);
}
///
/// An unbounded container of blocks supporting data, lighting, and properties.
///
///
public interface IAlphaBlockCollection : IDataBlockCollection, ILitBlockCollection, IPropertyBlockCollection
{
///
/// Gets a context-insensitive Alpha-compatible block from an unbounded block container.
///
/// The global X-coordinate of a block.
/// The global Y-coordinate of a block.
/// The global Z-coordinate of a block.
/// An from the collection at the given coordinates.
new AlphaBlock GetBlock (int x, int y, int z);
///
/// Gets a reference object to a context-insensitive Alpha-compatible block within an unbounded block container.
///
/// The global X-coordinate of a block.
/// The global Y-coordinate of a block.
/// The global Z-coordinate of a block.
/// An acting as a reference directly into the container at the given coordinates.
new AlphaBlockRef GetBlockRef (int x, int y, int z);
///
/// Updates a block in an unbounded block container with data from an existing object.
///
/// The global X-coordinate of a block.
/// The global Y-coordinate of a block.
/// The global Z-coordinate of a block.
/// The to copy data from.
void SetBlock (int x, int y, int z, AlphaBlock block);
}
}