summaryrefslogtreecommitdiffstats
path: root/src/RendererSectionData.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/RendererSectionData.cpp')
-rw-r--r--src/RendererSectionData.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/RendererSectionData.cpp b/src/RendererSectionData.cpp
index 1ed1099..067728f 100644
--- a/src/RendererSectionData.cpp
+++ b/src/RendererSectionData.cpp
@@ -289,7 +289,7 @@ RendererSectionData ParseSection(World * world, Vector sectionPosition)
const BlockModel* model = GetInternalBlockModel(block, idModels);
if (model) {
- AddFacesByBlockModel(sectionsList, world, Vector(x, y, z), *model, transform, section.GetBlockLight(Vector(x, y, z)), section.GetBlockSkyLight(Vector(x, y, z)), blockVisibility, textureName, data);
+ AddFacesByBlockModel(sectionsList, world, Vector(x, y, z), *model, transform, world->GetBlockLight(Vector(x, y, z) + sectionPosition * 16), world->GetBlockSkyLight(Vector(x, y, z) + sectionPosition * 16), blockVisibility, textureName, data);
}
else {
transform = glm::translate(transform, glm::vec3(0, 1, 0));
@@ -304,7 +304,7 @@ RendererSectionData ParseSection(World * world, Vector sectionPosition)
data.models.push_back(transform);
data.colors.push_back(glm::vec3(0, 0, 0));
- data.lights.push_back(glm::vec2(16, 16));
+ data.lights.push_back(glm::vec2(world->GetBlockLight(Vector(x, y, z) + sectionPosition * 16), world->GetBlockSkyLight(Vector(x, y, z) + sectionPosition * 16)));
}
}