UnsaveableChunk

Undocumented in source.

Constructors

this
this(World world, ChunkPosition position, string location)
Undocumented in source.

Members

Functions

save
void save()
Undocumented in source. Be warned that the author may not have intended to support it.

Inherited Members

From Chunk

HEIGHT
enum uint HEIGHT;
Undocumented in source.
location
string location;
Undocumented in source.
lights
ubyte[16 * 16 * 2] lights;
Undocumented in source.
biomes
const(Biome)[16 * 16] biomes;
Undocumented in source.
saveChangedBlocks
bool saveChangedBlocks;
Undocumented in source.
changed_blocks
BlockPosition[] changed_blocks;
Undocumented in source.
changed_tiles
Tile[uint] changed_tiles;
Undocumented in source.
tiles
Tile[ushort] tiles;
Undocumented in source.
position
ChunkPosition position [@property getter]
x
int x [@property getter]
z
int z [@property getter]

Returns the position of the chunk in the world.

world
World world [@property getter]

Gets the chunk's world.

blocks
BlockStorage blocks [@property getter]

Gets the world's blocks

opIndex
Block* opIndex(BlockPosition position)
Block* opIndex(ubyte x, size_t y, ubyte z)

Gets a block in the chunk.

opIndexAssign
Block* opIndexAssign(Block* block, BlockPosition position)
Block* opIndexAssign(block_t block, BlockPosition position)
Block* opIndexAssign(Block* block, ubyte x, uint y, ubyte z)
Block* opIndexAssign(block_t block, ubyte x, uint y, ubyte z)

Sets a block in the chunk.

registerTile
void registerTile(T tile)

Registers a tile.

tileAt
T tileAt(BlockPosition position)

Gets a tile.

firstBlock
ptrdiff_t firstBlock(ubyte x, ubyte z)

Gets the y position of the first non-air block from top.

emptySection
bool emptySection(size_t y)

Checks whether or not a section is empty (has no blocks in it).

tickSection
bool tickSection(size_t y)

Checks if a section contains blocks with the random tick.

sectionAt
Section sectionAt(size_t y)
opIndex
Section opIndex(size_t y)

Gets a section.

opBinaryRight
Section* opBinaryRight(size_t y)
Undocumented in source. Be warned that the author may not have intended to support it.
createSection
Section* createSection(size_t y)
Undocumented in source. Be warned that the author may not have intended to support it.
removeSection
void removeSection(size_t y)
Undocumented in source. Be warned that the author may not have intended to support it.
sections
Section[size_t] sections [@property getter]

Gets the sections.

empty
bool empty [@property getter]

Checks whether or not the chunks is air.

nextSnow
Vector2!ubyte nextSnow [@property getter]

Gets or generate the position for the next block where the snow should fall.

resetSnow
void resetSnow()

Resets the snow

save
void save()
Undocumented in source. Be warned that the author may not have intended to support it.
unload
void unload()

Unloads a chunks and frees its memory

Meta