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, 12 insertions, 0 deletions
diff --git a/src/World/BlockType.hpp b/src/World/BlockType.hpp
index 472523f..82c63d3 100644
--- a/src/World/BlockType.hpp
+++ b/src/World/BlockType.hpp
@@ -26,6 +26,16 @@ public:
 
     operator Value() const { return m_block; }
 
+    bool is_transparent() const {
+        switch (m_block) {
+        case Air:
+        case Leaves:
+            return true;
+        default:
+            return false;
+        }
+    }
+
     static std::vector<BlockType> all() {
         return {
             Air,
@@ -34,6 +44,8 @@ public:
             Stone,
             Sand,
             Snow,
+            Wood,
+            Leaves,
             Water,
         };
     }