mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
migrate blocks interaction (scripting) to global chunks storage (WIP)
This commit is contained in:
parent
53cc8d3c7b
commit
e0b3425eff
16 changed files with 228 additions and 145 deletions
|
|
@ -269,6 +269,7 @@ void Hud::updateHotbarControl() {
|
|||
|
||||
void Hud::updateWorldGenDebugVisualization() {
|
||||
auto& level = frontend.getLevel();
|
||||
auto& chunks = *level.chunks;
|
||||
auto generator =
|
||||
frontend.getController()->getChunksController()->getGenerator();
|
||||
auto debugInfo = generator->createDebugInfo();
|
||||
|
|
@ -293,7 +294,7 @@ void Hud::updateWorldGenDebugVisualization() {
|
|||
int az = z - (height - areaHeight) / 2;
|
||||
|
||||
data[(flippedZ * width + x) * 4 + 1] =
|
||||
level.chunks->getChunk(ax + ox, az + oz) ? 255 : 0;
|
||||
chunks.getChunk(ax + ox, az + oz) ? 255 : 0;
|
||||
data[(flippedZ * width + x) * 4 + 0] =
|
||||
level.chunksStorage->fetch(ax + ox, az + oz) ? 255 : 0;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue