fix: tu31 tutorial world crashes

This commit is contained in:
Fireblade
2026-05-02 21:30:34 -04:00
parent 02f1be3bb7
commit 229d22ab7b
10 changed files with 58 additions and 24 deletions
+3 -1
View File
@@ -721,13 +721,15 @@ void MultiPlayerLevel::animateTickDoWork()
int y = cy + random->nextInt(8);
int z = cz + random->nextInt(8);
int t = getTile(x, y, z);
Tile *tile = Tile::tiles[t];
if (tile == nullptr) return; // tu31 tutorial world fix
if (random->nextInt(8) > y && t == 0 && dimension->hasBedrockFog()) // 4J - test for bedrock fog brought forward from 1.2.3
{
addParticle(eParticleType_depthsuspend, x + random->nextFloat(), y + random->nextFloat(), z + random->nextFloat(), 0, 0, 0);
}
else if (t > 0)
{
Tile::tiles[t]->animateTick(this, x, y, z, animateRandom);
tile->animateTick(this, x, y, z, animateRandom);
}
}
}