December 2014 files

This commit is contained in:
Loki Rautio
2026-03-01 11:00:23 -06:00
parent b691c43c44
commit 8fd3ac6e37
2049 changed files with 260190 additions and 134787 deletions

View File

@@ -7,24 +7,24 @@
MycelTile::MycelTile(int id) : Tile(id, Material::grass)
{
iconTop = NULL;
iconSnowSide = NULL;
setTicking(true);
iconSnowSide = NULL;
setTicking(true);
}
Icon *MycelTile::getTexture(int face, int data)
{
if (face == Facing::UP) return iconTop;
if (face == Facing::DOWN) return Tile::dirt->getTexture(face);
return icon;
if (face == Facing::UP) return iconTop;
if (face == Facing::DOWN) return Tile::dirt->getTexture(face);
return icon;
}
Icon *MycelTile::getTexture(LevelSource *level, int x, int y, int z, int face)
{
if (face == Facing::UP) return iconTop;
if (face == Facing::DOWN) return Tile::dirt->getTexture(face);
Material *above = level->getMaterial(x, y + 1, z);
if (above == Material::topSnow || above == Material::snow) return iconSnowSide;
else return icon;
if (face == Facing::UP) return iconTop;
if (face == Facing::DOWN) return Tile::dirt->getTexture(face);
Material *above = level->getMaterial(x, y + 1, z);
if (above == Material::topSnow || above == Material::snow) return iconSnowSide;
else return icon;
}
void MycelTile::registerIcons(IconRegister *iconRegister)
@@ -40,7 +40,7 @@ void MycelTile::tick(Level *level, int x, int y, int z, Random *random)
if (level->getRawBrightness(x, y + 1, z) < MIN_BRIGHTNESS && Tile::lightBlock[level->getTile(x, y + 1, z)] > 2)
{
level->setTile(x, y, z, Tile::dirt_Id);
level->setTileAndUpdate(x, y, z, Tile::dirt_Id);
}
else
{
@@ -54,7 +54,7 @@ void MycelTile::tick(Level *level, int x, int y, int z, Random *random)
int above = level->getTile(xt, yt + 1, zt);
if (level->getTile(xt, yt, zt) == Tile::dirt_Id && level->getRawBrightness(xt, yt + 1, zt) >= MIN_BRIGHTNESS && Tile::lightBlock[above] <= 2)
{
level->setTile(xt, yt, zt, id);
level->setTileAndUpdate(xt, yt, zt, id);
}
}
}
@@ -63,8 +63,8 @@ void MycelTile::tick(Level *level, int x, int y, int z, Random *random)
void MycelTile::animateTick(Level *level, int x, int y, int z, Random *random)
{
Tile::animateTick(level, x, y, z, random);
if (random->nextInt(10) == 0) level->addParticle(eParticleType_townaura, x + random->nextFloat(), y + 1.1f, z + random->nextFloat(), 0, 0, 0);
Tile::animateTick(level, x, y, z, random);
if (random->nextInt(10) == 0) level->addParticle(eParticleType_townaura, x + random->nextFloat(), y + 1.1f, z + random->nextFloat(), 0, 0, 0);
}