mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 19:41:51 +00:00
move Chunks from Level to Player
This commit is contained in:
parent
b7664b4188
commit
1c18c02092
40 changed files with 450 additions and 220 deletions
|
|
@ -38,6 +38,14 @@ Chunks::Chunks(
|
|||
});
|
||||
}
|
||||
|
||||
void Chunks::configure(int32_t x, int32_t z, uint32_t radius) {
|
||||
setCenter(x, z);
|
||||
uint32_t diameter = radius * 2LL;
|
||||
if (getWidth() != diameter) {
|
||||
resize(diameter, diameter);
|
||||
}
|
||||
}
|
||||
|
||||
voxel* Chunks::get(int32_t x, int32_t y, int32_t z) const {
|
||||
return blocks_agent::get(*this, x, y, z);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue