Rewritten block entity loading.
Block entities are now loaded based on the blocktype at the coords they specify; before loading, their type ("id" NBT tag) is checked.
The chunk now expects that all block entities given to it via cChunk::SetAllData() have their valid blocktype; asserts if they don't.
Fixes #1354.
This commit is contained in:
@@ -92,6 +92,9 @@ public:
|
||||
/** Calculates the heightmap based on the contained blocktypes and marks it valid. */
|
||||
void CalculateHeightMap(void);
|
||||
|
||||
/** Removes the block entities that don't have a proper blocktype at their corresponding coords. */
|
||||
void RemoveInvalidBlockEntities(void);
|
||||
|
||||
protected:
|
||||
int m_ChunkX;
|
||||
int m_ChunkZ;
|
||||
|
||||
Reference in New Issue
Block a user