mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
the big refactor + extracted data classes from coders/json to data/dynamic
This commit is contained in:
parent
34d4500e24
commit
377c8e5029
36 changed files with 908 additions and 875 deletions
|
|
@ -69,7 +69,7 @@ void BlocksController::updateBlock(int x, int y, int z) {
|
|||
voxel* vox = chunks->get(x, y, z);
|
||||
if (vox == nullptr)
|
||||
return;
|
||||
const Block* def = level->content->indices->getBlockDef(vox->id);
|
||||
const Block* def = level->content->getIndices()->getBlockDef(vox->id);
|
||||
if (def->grounded && !chunks->isSolidBlock(x, y-1, z)) {
|
||||
breakBlock(nullptr, def, x, y, z);
|
||||
return;
|
||||
|
|
@ -89,7 +89,7 @@ void BlocksController::randomTick(int tickid, int parts) {
|
|||
// timeutil::ScopeLogTimer timer(5000+tickid);
|
||||
const int w = chunks->w;
|
||||
const int d = chunks->d;
|
||||
auto indices = level->content->indices;
|
||||
auto indices = level->content->getIndices();
|
||||
for (uint z = padding; z < d-padding; z++){
|
||||
for (uint x = padding; x < w-padding; x++){
|
||||
int index = z * w + x;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue