the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at master 47 lines 1.3 kB view raw
1#pragma once 2 3#include "Tile_SPU.h" 4#include "EntityTile_SPU.h" 5 6 7class SkullTile_SPU : public EntityTile_SPU 8{ 9public: 10 static const int MAX_SKULL_TILES = 40; 11public: 12 static const int PLACEMENT_MASK = 0x7; 13 static const int NO_DROP_BIT = 0x8; 14 15 SkullTile_SPU(int id) : EntityTile_SPU(id) {} 16 17public: 18 int getRenderShape() { return SHAPE_INVISIBLE; } 19 bool isSolidRender(bool isServerLevel = false) { return false; } 20 bool isCubeShaped() { return false; } 21 void updateShape(ChunkRebuildData *level, int x, int y, int z) 22 { 23 int data = level->getData(x, y, z) & PLACEMENT_MASK; 24 25 switch (data) 26 { 27 default: 28 case Facing::UP: 29 setShape(4.0f / 16.0f, 0, 4.0f / 16.0f, 12.0f / 16.0f, .5f, 12.0f / 16.0f); 30 break; 31 case Facing::NORTH: 32 setShape(4.0f / 16.0f, 4.0f / 16.0f, .5f, 12.0f / 16.0f, 12.0f / 16.0f, 1); 33 break; 34 case Facing::SOUTH: 35 setShape(4.0f / 16.0f, 4.0f / 16.0f, 0, 12.0f / 16.0f, 12.0f / 16.0f, .5f); 36 break; 37 case Facing::WEST: 38 setShape(.5f, 4.0f / 16.0f, 4.0f / 16.0f, 1, 12.0f / 16.0f, 12.0f / 16.0f); 39 break; 40 case Facing::EAST: 41 setShape(0, 4.0f / 16.0f, 4.0f / 16.0f, .5f, 12.0f / 16.0f, 12.0f / 16.0f); 42 break; 43 } 44 } 45 46 Icon_SPU *getTexture(int face, int data) { return TileRef_SPU(hellSand_Id)->getTexture(face); } 47};