i use gentoo btw

This commit is contained in:
neoapps-dev 2026-04-21 20:04:56 +03:00
parent ac2dcee32a
commit 1beb168ec9
4 changed files with 9 additions and 3 deletions

View file

@ -120,6 +120,9 @@ void GrassTile::tick(Level *level, int x, int y, int z, Random *random)
} }
} }
} }
Material* above = level->getMaterial(x, y + 1, z);
if (above->isSolid() || above->isLiquid()) level->setTileAndUpdate(x, y, z, Tile::dirt_Id);
} }
int GrassTile::getResource(int data, Random *random, int playerBonusLevel) int GrassTile::getResource(int data, Random *random, int playerBonusLevel)

View file

@ -21,7 +21,7 @@ bool HoeItem::useOn(shared_ptr<ItemInstance> instance, shared_ptr<Player> player
int targetType = level->getTile(x, y, z); int targetType = level->getTile(x, y, z);
int above = level->getTile(x, y + 1, z); int above = level->getTile(x, y + 1, z);
if (face != 0 && above == 0 && (targetType == Tile::grass_Id || targetType == Tile::dirt_Id)) if (face != 0 && above == 0 && (targetType == Tile::grass_Id || targetType == Tile::dirt_Id || targetType == Tile::mycel_Id))
{ {
if(!bTestUseOnOnly) if(!bTestUseOnOnly)
{ {

View file

@ -59,6 +59,9 @@ void MycelTile::tick(Level *level, int x, int y, int z, Random *random)
} }
} }
} }
Material* above = level->getMaterial(x, y + 1, z);
if (above->isSolid() || above->isLiquid()) level->setTileAndUpdate(x, y, z, Tile::dirt_Id);
} }
void MycelTile::animateTick(Level *level, int x, int y, int z, Random *random) void MycelTile::animateTick(Level *level, int x, int y, int z, Random *random)
@ -71,4 +74,4 @@ void MycelTile::animateTick(Level *level, int x, int y, int z, Random *random)
int MycelTile::getResource(int data, Random *random, int playerBonusLevel) int MycelTile::getResource(int data, Random *random, int playerBonusLevel)
{ {
return Tile::dirt->getResource(0, random, playerBonusLevel); return Tile::dirt->getResource(0, random, playerBonusLevel);
} }

View file

@ -56,7 +56,7 @@ bool ReedTile::mayPlace(Level *level, int x, int y, int z)
{ {
int below = level->getTile(x, y - 1, z); int below = level->getTile(x, y - 1, z);
if (below == id) return true; if (below == id) return true;
if (below != Tile::grass_Id && below != Tile::dirt_Id && below != Tile::sand_Id) return false; if (below != Tile::grass_Id && below != Tile::dirt_Id && below != Tile::sand_Id&& below != Tile::podzol_Id) return false;
if (level->getMaterial(x - 1, y - 1, z) == Material::water) return true; if (level->getMaterial(x - 1, y - 1, z) == Material::water) return true;
if (level->getMaterial(x + 1, y - 1, z) == Material::water) return true; if (level->getMaterial(x + 1, y - 1, z) == Material::water) return true;
if (level->getMaterial(x, y - 1, z - 1) == Material::water) return true; if (level->getMaterial(x, y - 1, z - 1) == Material::water) return true;