the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 48 lines 973 B view raw
1#pragma once 2 3#include "Monster.h" 4 5class Silverfish : public Monster 6{ 7public: 8 eINSTANCEOF GetType() { return eTYPE_SILVERFISH; } 9 static Entity *create(Level *level) { return new Silverfish(level); } 10private: 11 int lookForFriends; 12 13public: 14 Silverfish(Level *level); 15 16protected: 17 virtual void registerAttributes(); 18 virtual bool makeStepSound(); 19 virtual shared_ptr<Entity> findAttackTarget(); 20 21 virtual int getAmbientSound(); 22 virtual int getHurtSound(); 23 virtual int getDeathSound(); 24 25public: 26 virtual bool hurt(DamageSource *source, float dmg); 27 28protected: 29 virtual void checkHurtTarget(shared_ptr<Entity> target, float d); 30 virtual void playStepSound(int xt, int yt, int zt, int t); 31 virtual int getDeathLoot(); 32 33public: 34 virtual void tick(); 35 36protected: 37 virtual void serverAiStep(); 38 39public: 40 virtual float getWalkTargetValue(int x, int y, int z); 41 42protected: 43 virtual bool isDarkEnoughToSpawn(); 44 45public: 46 virtual bool canSpawn(); 47 virtual MobType getMobType(); 48};