voxelman.block.utils

Members

Aliases

BlockUpdateHandler
alias BlockUpdateHandler = void delegate(BlockWorldPos bwp)
Undocumented in source.
Meshhandler
alias Meshhandler = void function(ref Buffer!MeshVertex output, ubyte[3] color, ubyte bx, ubyte by, ubyte bz, ubyte sides)
Undocumented in source.

Enums

MetadataSideMask
enum MetadataSideMask
Undocumented in source.
SideMask
enum SideMask
Undocumented in source.
Solidity
enum Solidity
Undocumented in source.

Functions

calcChunkFullMetadata
ushort calcChunkFullMetadata(Layer blockLayer, BlockInfoTable blockInfos)
Undocumented in source. Be warned that the author may not have intended to support it.
calcChunkFullMetadata
ushort calcChunkFullMetadata(BlockId[] blocks, BlockInfoTable blockInfos)
Undocumented in source. Be warned that the author may not have intended to support it.
calcChunkFullMetadata
ushort calcChunkFullMetadata(BlockId uniformBlock, BlockInfoTable blockInfos)
Undocumented in source. Be warned that the author may not have intended to support it.
calcChunkSideMetadata
ushort calcChunkSideMetadata(Layer blockLayer, BlockInfoTable blockInfos)
Undocumented in source. Be warned that the author may not have intended to support it.
calcChunkSideMetadata
ushort calcChunkSideMetadata(Layer blockLayer, BlockInfoTable blockInfos)
Undocumented in source. Be warned that the author may not have intended to support it.
calcChunkSideMetadata
ushort calcChunkSideMetadata(BlockId[] blocks, BlockInfoTable blockInfos)
Undocumented in source. Be warned that the author may not have intended to support it.
calcChunkSideMetadata
ushort calcChunkSideMetadata(BlockId uniformBlock, BlockInfoTable blockInfos)
Undocumented in source. Be warned that the author may not have intended to support it.
calcSolidityBits
ubyte calcSolidityBits(Layer blockLayer, BlockInfoTable blockInfos)
Undocumented in source. Be warned that the author may not have intended to support it.
calcSolidityBits
ubyte calcSolidityBits(BlockId uniformBlock, BlockInfoTable blockInfos)
Undocumented in source. Be warned that the author may not have intended to support it.
calcSolidityBits
ubyte calcSolidityBits(BlockId[] blocks, BlockInfoTable blockInfos)
Undocumented in source. Be warned that the author may not have intended to support it.
chunkAndBlockAt
ChunkAndBlockAt chunkAndBlockAt(int x, int y, int z)
Undocumented in source. Be warned that the author may not have intended to support it.
chunkSideSolidity
Solidity chunkSideSolidity(ushort metadata, CubeSide side)
Undocumented in source. Be warned that the author may not have intended to support it.
hasOnlySolidity
bool hasOnlySolidity(ushort metadata, Solidity solidity)

Returns true if chunk has blocks only of specified solidity. If metadata is invalid then chunk is assumed to have blocks of every solidity, and returns false.

hasSingleSolidity
bool hasSingleSolidity(ushort metadata, Solidity solidity)

Returns true if chunk has blocks of only single solidity. If returns true then solidity has solidity of all blocks.

hasSolidity
bool hasSolidity(ushort metadata, Solidity solidity)

Returns true if chunk has blocks of specified solidity. If metadata is invalid then chunk is assumed to have blocks of every solidity.

isChunkSideSolid
bool isChunkSideSolid(ushort metadata, CubeSide side)
Undocumented in source. Be warned that the author may not have intended to support it.
isMoreSolidThan
bool isMoreSolidThan(Solidity first, Solidity second)
Undocumented in source. Be warned that the author may not have intended to support it.
makeColoredBlockMesh
void makeColoredBlockMesh(Buffer!MeshVertex output, ubyte[3] color, ubyte bx, ubyte by, ubyte bz, ubyte sides)
Undocumented in source. Be warned that the author may not have intended to support it.
makeNullMesh
void makeNullMesh(Buffer!MeshVertex , ubyte[3] , ubyte , ubyte , ubyte , ubyte )
Undocumented in source. Be warned that the author may not have intended to support it.
packColor
ushort packColor(ubyte[3] c)
Undocumented in source. Be warned that the author may not have intended to support it.
packColor
ushort packColor(ubyte r, ubyte g, ubyte b)
Undocumented in source. Be warned that the author may not have intended to support it.
printChunkMetadata
void printChunkMetadata(ushort metadata)
Undocumented in source. Be warned that the author may not have intended to support it.
regBaseBlocks
void regBaseBlocks(BlockInfoSetter delegate(string name) regBlock)
Undocumented in source. Be warned that the author may not have intended to support it.
sideFromNormal
CubeSide sideFromNormal(ivec3 normal)
Undocumented in source. Be warned that the author may not have intended to support it.

Manifest constants

CHUNK_SIDE_METADATA_BITS
enum CHUNK_SIDE_METADATA_BITS;
Undocumented in source.

Structs

BlockInfo
struct BlockInfo
Undocumented in source.
BlockInfoSetter
struct BlockInfoSetter

Returned when registering block. Use this to set block properties.

BlockInfoTable
struct BlockInfoTable
Undocumented in source.
ChunkAndBlockAt
struct ChunkAndBlockAt
Undocumented in source.

Variables

bitsToSolidityTable
Solidity[8] bitsToSolidityTable;
Undocumented in source.
entityBlock
BlockInfo entityBlock;
Undocumented in source.
singleSolidityTable
bool[8] singleSolidityTable;
Undocumented in source.

Meta

Authors

Andrey Penechko.