the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 56 lines 2.2 kB view raw
1#pragma once 2 3#include "BaseEntityTile.h" 4 5class HopperTileEntity; 6 7class HopperTile : public BaseEntityTile 8{ 9 friend class ChunkRebuildData; 10private: 11 static const int MASK_TOGGLE = 0x8; 12 static const int MASK_ATTACHED = 0x7; 13 14public : 15 static const wstring TEXTURE_OUTSIDE; 16 static const wstring TEXTURE_INSIDE; 17 18private: 19 Random random; 20 21private: 22 Icon *hopperIcon; 23 Icon *hopperTopIcon; 24 Icon *hopperInnerIcon; 25 26public: 27 HopperTile(int id); 28 29 virtual void updateShape(LevelSource *level, int x, int y, int z, int forceData = -1, shared_ptr<TileEntity> forceEntity = shared_ptr<TileEntity>()); 30 virtual void addAABBs(Level *level, int x, int y, int z, AABB *box, AABBList *boxes, shared_ptr<Entity> source); 31 virtual int getPlacedOnFaceDataValue(Level *level, int x, int y, int z, int face, float clickX, float clickY, float clickZ, int itemValue); 32 virtual shared_ptr<TileEntity> newTileEntity(Level *level); 33 virtual void setPlacedBy(Level *level, int x, int y, int z, shared_ptr<LivingEntity> by, shared_ptr<ItemInstance> itemInstance); 34 virtual void onPlace(Level *level, int x, int y, int z); 35 virtual 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); 36 virtual void neighborChanged(Level *level, int x, int y, int z, int type); 37 38private: 39 virtual void checkPoweredState(Level *level, int x, int y, int z); 40 41public: 42 virtual void onRemove(Level *level, int x, int y, int z, int id, int data); 43 virtual int getRenderShape(); 44 virtual bool isCubeShaped(); 45 virtual bool isSolidRender(bool isServerLevel = false); 46 virtual bool shouldRenderFace(LevelSource *level, int x, int y, int z, int face); 47 virtual Icon *getTexture(int face, int data); 48 static int getAttachedFace(int data); 49 static bool isTurnedOn(int data); 50 virtual bool hasAnalogOutputSignal(); 51 virtual int getAnalogOutputSignal(Level *level, int x, int y, int z, int dir); 52 virtual void registerIcons(IconRegister *iconRegister); 53 static Icon *getTexture(const wstring &name); 54 virtual wstring getTileItemIconName(); 55 static shared_ptr<HopperTileEntity> getHopper(LevelSource *level, int x, int y, int z); 56};