mirror of
https://github.com/neocturne/MinedMap.git
synced 2025-07-04 22:59:07 +02:00
World: factor out Section handling to a generic interface
This commit is contained in:
parent
dd432af298
commit
210f651807
7 changed files with 248 additions and 143 deletions
|
@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue