mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-08-20 09:57:09 +00:00
Floating Islands and Shit
This commit is contained in:
parent
e7a1302ef5
commit
5cb23d8c4d
|
|
@ -475,7 +475,14 @@ bool BasicTree::checkLocation()
|
|||
int baseMaterial = thisLevel->getTile(origin[0], origin[1] - 1, origin[2]);
|
||||
if (!((baseMaterial == 2) || (baseMaterial == 3)))
|
||||
{
|
||||
return false;
|
||||
if (baseMaterial == Tile::alphaGrass_Id)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
int allowedHeight = checkLine(startPosition, endPosition);
|
||||
// If the set height is good, go with that
|
||||
|
|
|
|||
|
|
@ -104,11 +104,11 @@ bool IslandFeature::place(Level *level, Random *random, int x, int y, int z)
|
|||
{
|
||||
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+98+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+99+height, z + zz, Tile::dirt_Id, 0, Tile::UPDATE_CLIENTS);
|
||||
level->setTileAndData(x + xx, y + yy+98+height, z + zz, Tile::stone_Id, 0, Tile::UPDATE_CLIENTS);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue