the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at master 50 lines 1.4 kB view raw
1#pragma once 2 3#include "HeavyTile.h" 4 5class FallingTile; 6 7class AnvilTile : public HeavyTile 8{ 9 friend class ChunkRebuildData; 10 friend class Tile; 11public: 12 static const int PART_BASE = 0; 13 static const int PART_JOINT = 1; 14 static const int PART_COLUMN = 2; 15 static const int PART_TOP = 3; 16 17 static const int ANVIL_NAMES_LENGTH = 3; 18 19 static const unsigned int ANVIL_NAMES[ANVIL_NAMES_LENGTH]; 20 21private: 22 static wstring TEXTURE_DAMAGE_NAMES[ANVIL_NAMES_LENGTH]; 23 24public: 25 int part; 26 27private: 28 Icon **icons; 29 30protected: 31 AnvilTile(int id); 32 33public: 34 bool isCubeShaped(); 35 bool isSolidRender(bool isServerLevel = false); 36 Icon *getTexture(int face, int data); 37 void registerIcons(IconRegister *iconRegister); 38 void setPlacedBy(Level *level, int x, int y, int z, shared_ptr<LivingEntity> by, shared_ptr<ItemInstance> itemInstance); 39 bool use(Level *level, int x, int y, int z, shared_ptr<Player> player, int clickedFace, float clickX, float clickY, float clickZ, bool soundOnly = false); 40 int getRenderShape(); 41 int getSpawnResourcesAuxValue(int data); 42 void updateShape(LevelSource *level, int x, int y, int z, int forceData = -1, shared_ptr<TileEntity> forceEntity = shared_ptr<TileEntity>()); 43 44protected: 45 void falling(shared_ptr<FallingTile> entity); 46 47public: 48 void onLand(Level *level, int xt, int yt, int zt, int data); 49 bool shouldRenderFace(LevelSource *level, int x, int y, int z, int face); 50};