diff options
| author | daoge <3523206925@qq.com> | 2026-03-03 03:04:10 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-03 03:04:10 +0800 |
| commit | b3feddfef372618c8a9d7a0abcaf18cfad866c18 (patch) | |
| tree | 267761c3bb39241ba5c347bfbe2254d06686e287 /Minecraft.World/MycelTile.cpp | |
| parent | 84c31a2331f7a0ec85b9d438992e244f60e5020f (diff) | |
feat: TU19 (Dec 2014) Features & Content (#155)
* try to resolve merge conflict
* feat: TU19 (Dec 2014) Features & Content (#32)
* December 2014 files
* Working release build
* Fix compilation issues
* Add sound to Windows64Media
* Add DLC content and force Tutorial DLC
* Revert "Add DLC content and force Tutorial DLC"
This reverts commit 97a43994725008e35fceb984d5549df9c8cea470.
* Disable broken light packing
* Disable breakpoint during DLC texture map load
Allows DLC loading but the DLC textures are still broken
* Fix post build not working
* ...
* fix vs2022 build
* fix cmake build
---------
Co-authored-by: Loki <lokirautio@gmail.com>
Diffstat (limited to 'Minecraft.World/MycelTile.cpp')
| -rw-r--r-- | Minecraft.World/MycelTile.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/Minecraft.World/MycelTile.cpp b/Minecraft.World/MycelTile.cpp index 7b8a90e1..875a598d 100644 --- a/Minecraft.World/MycelTile.cpp +++ b/Minecraft.World/MycelTile.cpp @@ -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); } |
