|
@@ -315,11 +315,14 @@ Chunk* BiomedCavedDimensionGenerator::generateChunk(int centerX, int centerY)
|
|
|
Framework::Either<Block*, int> BiomedCavedDimensionGenerator::generateBlock(
|
|
|
Framework::Vec3<int> location)
|
|
|
{
|
|
|
- zMemory()->lock();
|
|
|
-
|
|
|
Chunk* zChunk
|
|
|
= Game::INSTANCE->zDimension(getDimensionId())
|
|
|
->zChunk(Game::INSTANCE->getChunkCenter(location.x, location.y));
|
|
|
+ if (!zChunk)
|
|
|
+ {
|
|
|
+ return BlockTypeEnum::NO_BLOCK;
|
|
|
+ }
|
|
|
+ zMemory()->lock();
|
|
|
zMemory()->setCurrentChunk(dynamic_cast<Chunk*>(zChunk->getThis()));
|
|
|
|
|
|
Framework::RCArray<GeneratedStructure>* structures
|