summaryrefslogtreecommitdiffstats
path: root/src/SetChunkData.h
blob: 763f478bef1aac161641be46c70bf8cfa815444e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#pragma once

#include "ChunkData.h"
#include "BlockEntities/BlockEntity.h"





/** Contains the data for a loaded / generated chunk, ready to be set into a cWorld. */
struct SetChunkData
{
	/** Initialise the structure with chunk coordinates.
	The caller is responsible for initialising the remaining members. */
	SetChunkData(const cChunkCoords a_Chunk) :
		Chunk(a_Chunk)
	{
	}

	cChunkCoords Chunk;

	ChunkBlockData BlockData;
	ChunkLightData LightData;

	cChunkDef::BiomeMap BiomeMap;
	cChunkDef::HeightMap HeightMap;

	cEntityList Entities;
	cBlockEntities BlockEntities;

	bool IsLightValid;


	/** Recalculates the HeightMap based on BlockData contents. */
	void UpdateHeightMap();
};