Floating Islands and Shit

This commit is contained in:
Donothan73 2026-03-16 22:40:30 -04:00
parent e7a1302ef5
commit 5cb23d8c4d
2 changed files with 11 additions and 4 deletions

View file

@ -475,7 +475,14 @@ bool BasicTree::checkLocation()
int baseMaterial = thisLevel->getTile(origin[0], origin[1] - 1, origin[2]); int baseMaterial = thisLevel->getTile(origin[0], origin[1] - 1, origin[2]);
if (!((baseMaterial == 2) || (baseMaterial == 3))) if (!((baseMaterial == 2) || (baseMaterial == 3)))
{ {
return false; if (baseMaterial == Tile::alphaGrass_Id)
{
return true;
}
else
{
return false;
}
} }
int allowedHeight = checkLine(startPosition, endPosition); int allowedHeight = checkLine(startPosition, endPosition);
// If the set height is good, go with that // If the set height is good, go with that

View file

@ -104,11 +104,11 @@ bool IslandFeature::place(Level *level, Random *random, int x, int y, int z)
{ {
for (int yy = 0; yy < 8; yy++) for (int yy = 0; yy < 8; yy++)
{ {
if (grid[((xx) * 8 + (zz)) * 8 + (yy)]) if (grid[((xx) * 16 + (zz)) * 8 + (yy)])
{ {
level->setTileAndData(x + xx, y + yy+100+height, z + zz, tile, 0, Tile::UPDATE_CLIENTS); level->setTileAndData(x + xx, y + yy+100+height, z + zz, tile, 0, Tile::UPDATE_CLIENTS);
level->setTileAndData(x + xx, y + yy+98+height, z + zz, Tile::dirt_Id, 0, Tile::UPDATE_CLIENTS); level->setTileAndData(x + xx, y + yy+99+height, z + zz, Tile::dirt_Id, 0, Tile::UPDATE_CLIENTS);
level->setTileAndData(x + xx, y + yy+96+height, z + zz, Tile::stone_Id, 0, Tile::UPDATE_CLIENTS); level->setTileAndData(x + xx, y + yy+98+height, z + zz, Tile::stone_Id, 0, Tile::UPDATE_CLIENTS);
} }
} }
} }