summaryrefslogtreecommitdiffstats
path: root/src/World/Block.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/World/Block.hpp')
-rw-r--r--src/World/Block.hpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/World/Block.hpp b/src/World/Block.hpp
index 4975faa..e2dcfde 100644
--- a/src/World/Block.hpp
+++ b/src/World/Block.hpp
@@ -26,28 +26,25 @@
#pragma once
-#include <cstdint>
+#include "../NBT/CompoundTag.hpp"
+#include "../Resource/BlockType.hpp"
namespace MinedMap {
namespace World {
struct Block {
- uint8_t id;
- uint8_t data;
-
+ const Resource::BlockType *type;
unsigned height;
-
uint8_t blockLight;
- uint8_t skyLight;
-
uint8_t biome;
- Block() : id(0), data(0), height(0), blockLight(0), skyLight(0), biome(0) {}
- Block(uint8_t id0, uint8_t data0, unsigned height0, uint8_t blockLight0, uint8_t skyLight0, uint8_t biome0)
- : id(id0), data(data0), height(height0), blockLight(blockLight0), skyLight(skyLight0), biome(biome0) {}
uint32_t getColor() const;
+
+ operator bool() const {
+ return type;
+ }
};
}