the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
1#pragma once
2#include "Tile_SPU.h"
3
4class MycelTile_SPU : public Tile_SPU
5{
6public:
7 MycelTile_SPU(int id) : Tile_SPU(id) {}
8
9 virtual Icon_SPU *getTexture(int face, int data)
10 {
11 if (face == Facing::UP) return &ms_pTileData->mycelTile_iconTop;
12 if (face == Facing::DOWN) return TileRef_SPU(dirt_Id)->getTexture(face);
13 return icon();
14 }
15 virtual Icon_SPU *getTexture(ChunkRebuildData *level, int x, int y, int z, int face)
16 {
17 if (face == Facing::UP) return &ms_pTileData->mycelTile_iconTop;
18 if (face == Facing::DOWN) return TileRef_SPU(dirt_Id)->getTexture(face);
19 Material_SPU *above = level->getMaterial(x, y + 1, z);
20 if (above->getID() == Material_SPU::topSnow_Id || above->getID() == Material_SPU::snow_Id)
21 return &ms_pTileData->mycelTile_iconSnowSide;
22 else return icon();
23
24 }
25};