From 2ee0f834487cfe4b6bd9424ca2715685a8db16e4 Mon Sep 17 00:00:00 2001 From: LaG1924 <12997935+LaG1924@users.noreply.github.com> Date: Sat, 15 Apr 2017 15:17:53 +0500 Subject: 2017-04-15 --- World.hpp | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 World.hpp (limited to 'World.hpp') diff --git a/World.hpp b/World.hpp new file mode 100644 index 0000000..288dc4f --- /dev/null +++ b/World.hpp @@ -0,0 +1,28 @@ +#pragma once + +#include +#include "Block.hpp" +#include "Packet.hpp" + +const int SECTION_WIDTH=16; +const int SECTION_LENGTH=16; +const int SECTION_HEIGHT=16; + +class World { +public: + Block &GetBlock(PositionI pos); + void SetBlock(PositionI pos, Block block); + void ParseChunkData(Packet packet); + + + std::map m_blocks; +private: + + + size_t ParseSectionData(int chunkX, int chunkZ, bool isGroundContinous, int section, byte *data); + + std::vector + ParseBlocks(byte *bytes, int dataLength, std::vector palette, byte bitsPerBlock); + + int m_dimension=0; +}; \ No newline at end of file -- cgit v1.2.3