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#include "ChunkRebuildData.h"
4class CakeTile_SPU : public Tile_SPU
5{
6public:
7 CakeTile_SPU(int id) : Tile_SPU(id) {}
8 virtual void updateShape(ChunkRebuildData *level, int x, int y, int z, int forceData = -1, TileEntity* forceEntity = NULL) // 4J added forceData, forceEntity param
9 {
10 int d = level->getData(x, y, z);
11 float r = 1 / 16.0f;
12 float r2 = (1 + d * 2) / 16.0f;
13 float h = 8 / 16.0f;
14 this->setShape(r2, 0, r, 1 - r, h, 1 - r);
15 }
16 virtual void updateDefaultShape()
17 {
18 float r = 1 / 16.0f;
19 float h = 8 / 16.0f;
20 this->setShape(r, 0, r, 1 - r, h, 1 - r);
21 }
22 virtual Icon_SPU *getTexture(int face, int data)
23 {
24 if (face == Facing::UP) return &ms_pTileData->cakeTile_iconTop;
25 if (face == Facing::DOWN) return &ms_pTileData->cakeTile_iconBottom;
26 if (data > 0 && face == Facing::WEST) return &ms_pTileData->cakeTile_iconInner;
27 return icon();
28 }
29 virtual bool isCubeShaped() { return false; }
30 virtual bool isSolidRender(bool isServerLevel = false) { return false; }
31};