add BlockModel struct

This commit is contained in:
MihailRis
2025-04-27 18:21:56 +03:00
parent 718f5d1089
commit 20e3a961f9
12 changed files with 46 additions and 39 deletions
+2 -2
View File
@@ -453,7 +453,7 @@ void BlocksRenderer::render(
int x = i % CHUNK_W;
int y = i / (CHUNK_D * CHUNK_W);
int z = (i / CHUNK_D) % CHUNK_W;
switch (def.model) {
switch (def.model.type) {
case BlockModelType::BLOCK:
blockCube({x, y, z}, texfaces, def, vox.state, !def.shadeless,
def.ambientOcclusion);
@@ -516,7 +516,7 @@ SortingMeshData BlocksRenderer::renderTranslucent(
int x = i % CHUNK_W;
int y = i / (CHUNK_D * CHUNK_W);
int z = (i / CHUNK_D) % CHUNK_W;
switch (def.model) {
switch (def.model.type) {
case BlockModelType::BLOCK:
blockCube({x, y, z}, texfaces, def, vox.state, !def.shadeless,
def.ambientOcclusion);