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
@@ -1230,7 +1230,9 @@ bool Tile::mayPlace(Level *level, int x, int y, int z, int face)
bool Tile::mayPlace(Level *level, int x, int y, int z)
{
int t = level->getTile(x, y, z);
return t == 0 || Tile::tiles[t]->material->isReplaceable();
Tile *tile = Tile::tiles[t];
if (tile == nullptr && t != 0) return false;
return t == 0 || tile->material->isReplaceable();
}
// 4J-PB - Adding a TestUse for tooltip display