From 7c0a7d662daec45a44bdf598735d1600bf7c187d Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Fri, 8 Feb 2013 16:01:44 +0000 Subject: Prepared cChunkDesc for further API extension; used it as the sole container for generated chunk data, including entities / block entities. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1200 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/Generating/ChunkGenerator.cpp | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'source/Generating/ChunkGenerator.cpp') diff --git a/source/Generating/ChunkGenerator.cpp b/source/Generating/ChunkGenerator.cpp index 70b95f0d9..0285fa7af 100644 --- a/source/Generating/ChunkGenerator.cpp +++ b/source/Generating/ChunkGenerator.cpp @@ -266,24 +266,17 @@ void cChunkGenerator::Execute(void) void cChunkGenerator::DoGenerate(int a_ChunkX, int a_ChunkY, int a_ChunkZ) { - cChunkDef::BiomeMap BiomeMap; - cChunkDef::BlockTypes BlockTypes; - cChunkDef::BlockNibbles BlockMeta; - cChunkDef::HeightMap HeightMap; - cEntityList Entities; - cBlockEntityList BlockEntities; - - cChunkDesc ChunkDesc(BlockTypes, BlockMeta, HeightMap, BiomeMap); + cChunkDesc ChunkDesc; cRoot::Get()->GetPluginManager()->CallHookChunkGenerating(m_World, a_ChunkX, a_ChunkZ, &ChunkDesc); - m_Generator->DoGenerate(a_ChunkX, a_ChunkZ, ChunkDesc, Entities, BlockEntities); + m_Generator->DoGenerate(a_ChunkX, a_ChunkZ, ChunkDesc); cRoot::Get()->GetPluginManager()->CallHookChunkGenerated(m_World, a_ChunkX, a_ChunkZ, &ChunkDesc); m_World->SetChunkData( a_ChunkX, a_ChunkY, a_ChunkZ, - BlockTypes, BlockMeta, + ChunkDesc.GetBlockTypes(), ChunkDesc.GetBlockMetas(), NULL, NULL, // We don't have lighting, chunk will be lighted when needed - &HeightMap, &BiomeMap, - Entities, BlockEntities, + &ChunkDesc.GetHeightMap(), &ChunkDesc.GetBiomeMap(), + ChunkDesc.GetEntities(), ChunkDesc.GetBlockEntities(), true ); } -- cgit v1.2.3