summaryrefslogtreecommitdiffstats
path: root/src/World/Block.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/World/Block.cpp')
-rw-r--r--src/World/Block.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/World/Block.cpp b/src/World/Block.cpp
index ae6c9cd..6bd6a00 100644
--- a/src/World/Block.cpp
+++ b/src/World/Block.cpp
@@ -38,9 +38,11 @@ uint32_t Block::getColor() const {
if (!t.opaque)
return 0;
- unsigned r = uint8_t(t.color >> 16);
- unsigned g = uint8_t(t.color >> 8);
- unsigned b = uint8_t(t.color);
+ uint32_t color = t.colors[data];
+
+ unsigned r = uint8_t(color >> 16);
+ unsigned g = uint8_t(color >> 8);
+ unsigned b = uint8_t(color);
uint8_t light = (blockLight > skyLight) ? blockLight : skyLight;