mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 19:41:51 +00:00
move block set logic to the blocks_agent
This commit is contained in:
parent
6157f8193d
commit
87c19d69dc
7 changed files with 210 additions and 133 deletions
|
|
@ -189,10 +189,10 @@ void WorldGenerator::placeLine(const LinePlacement& line, int priority) {
|
|||
aabb.fix();
|
||||
aabb.a -= line.radius;
|
||||
aabb.b += line.radius;
|
||||
int cxa = floordiv(aabb.a.x, CHUNK_W);
|
||||
int cza = floordiv(aabb.a.z, CHUNK_D);
|
||||
int cxb = floordiv(aabb.b.x, CHUNK_W);
|
||||
int czb = floordiv(aabb.b.z, CHUNK_D);
|
||||
int cxa = floordiv<CHUNK_W>(aabb.a.x);
|
||||
int cza = floordiv<CHUNK_D>(aabb.a.z);
|
||||
int cxb = floordiv<CHUNK_W>(aabb.b.x);
|
||||
int czb = floordiv<CHUNK_D>(aabb.b.z);
|
||||
for (int cz = cza; cz <= czb; cz++) {
|
||||
for (int cx = cxa; cx <= cxb; cx++) {
|
||||
const auto& found = prototypes.find({cx, cz});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue