Botcraft 1.21.4
Loading...
Searching...
No Matches
Botcraft::Section Struct Reference

#include <Section.hpp>

Public Member Functions

 Section (const bool has_sky_light)
 

Static Public Member Functions

static size_t CoordsToBlockIndex (const int x, const int y, const int z)
 
static size_t CoordsToLightIndex (const int x, const int y, const int z)
 

Public Attributes

std::vector< unsigned short > data_blocks
 
std::vector< unsigned char > block_light
 
std::vector< unsigned char > sky_light
 

Detailed Description

Definition at line 9 of file Section.hpp.

Constructor & Destructor Documentation

◆ Section()

Botcraft::Section::Section ( const bool  has_sky_light)

Member Function Documentation

◆ CoordsToBlockIndex()

size_t Botcraft::Section::CoordsToBlockIndex ( const int  x,
const int  y,
const int  z 
)
static

Definition at line 23 of file Section.cpp.

References Botcraft::CHUNK_WIDTH.

Referenced by Botcraft::Chunk::GetBlock(), and Botcraft::Chunk::SetBlock().

◆ CoordsToLightIndex()

size_t Botcraft::Section::CoordsToLightIndex ( const int  x,
const int  y,
const int  z 
)
static

Member Data Documentation

◆ block_light

std::vector<unsigned char> Botcraft::Section::block_light

Definition at line 17 of file Section.hpp.

Referenced by Section().

◆ data_blocks

std::vector<unsigned short> Botcraft::Section::data_blocks

Definition at line 16 of file Section.hpp.

Referenced by Section().

◆ sky_light

std::vector<unsigned char> Botcraft::Section::sky_light

Definition at line 18 of file Section.hpp.

Referenced by Section().


The documentation for this struct was generated from the following files: