|
@@ -240,9 +240,7 @@ void Dimension::thread()
|
|
{
|
|
{
|
|
if (newLight[i] != light[i])
|
|
if (newLight[i] != light[i])
|
|
{
|
|
{
|
|
- chunk->setLightData(chunkPos,
|
|
|
|
- newLight,
|
|
|
|
- isForeground);
|
|
|
|
|
|
+ chunk->setLightData(chunkPos, newLight, isForeground);
|
|
for (int j = 0; j < 6; j++)
|
|
for (int j = 0; j < 6; j++)
|
|
internalLightUpdateQueue.add(
|
|
internalLightUpdateQueue.add(
|
|
position
|
|
position
|
|
@@ -350,7 +348,8 @@ const Block* Dimension::zBlockOrDefault(Framework::Vec3<int> location)
|
|
return &NoBlock::INSTANCE;
|
|
return &NoBlock::INSTANCE;
|
|
}
|
|
}
|
|
|
|
|
|
-int Dimension::getBlockType(Framework::Vec3<int> location) {
|
|
|
|
|
|
+int Dimension::getBlockType(Framework::Vec3<int> location)
|
|
|
|
+{
|
|
Chunk* c = zChunk(Game::INSTANCE->getChunkCenter(location.x, location.y));
|
|
Chunk* c = zChunk(Game::INSTANCE->getChunkCenter(location.x, location.y));
|
|
if (c)
|
|
if (c)
|
|
{
|
|
{
|
|
@@ -492,7 +491,7 @@ void Dimension::setChunk(Chunk* chunk, Punkt center)
|
|
}
|
|
}
|
|
if (chunk) chunk->onLoaded();
|
|
if (chunk) chunk->onLoaded();
|
|
laterHandler.execute();
|
|
laterHandler.execute();
|
|
- updateLightAtChunkBorders(center);
|
|
|
|
|
|
+ if (chunk) updateLightAtChunkBorders(center);
|
|
}
|
|
}
|
|
|
|
|
|
void Dimension::save(Text worldDir) const
|
|
void Dimension::save(Text worldDir) const
|