summary refs log tree commit diff
path: root/src/World/BlockType.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/World/BlockType.hpp')
-rw-r--r--src/World/BlockType.hpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/World/BlockType.hpp b/src/World/BlockType.hpp
index edca3d7..a63d96a 100644
--- a/src/World/BlockType.hpp
+++ b/src/World/BlockType.hpp
@@ -26,14 +26,18 @@ public:
 
     operator Value() const { return m_block; }
 
-    Bool is_transparent() const {
+    Bool is_translucent() const { return opacity() != 1.0; }
+
+    Real opacity() const {
         switch (m_block) {
         case Air:
-        case Leaves:
+            return 0.0;
         case Water:
-            return true;
+            return 0.05;
+        case Leaves:
+            return 0.2;
         default:
-            return false;
+            return 1.0;
         }
     }