the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 66 lines 1.3 kB view raw
1#pragma once 2using namespace std; 3 4#include "FlyingMob.h" 5#include "Enemy.h" 6 7class GhastClass; 8class Level; 9 10class Ghast : public FlyingMob, public Enemy 11{ 12public: 13 eINSTANCEOF GetType() { return eTYPE_GHAST; } 14 static Entity *create(Level *level) { return new Ghast(level); } 15 16private: 17 static const int DATA_IS_CHARGING = 16; 18 19public: 20 int floatDuration; 21 double xTarget, yTarget, zTarget; 22 23private: 24 shared_ptr<Entity> target; 25 int retargetTime; 26 27public: 28 int oCharge; 29 int charge; 30 31private: 32 int explosionPower; 33 34 35 void _init(); 36 37public: 38 Ghast(Level *level); 39 40 virtual bool isCharging(); 41 virtual bool hurt(DamageSource *source, float dmg); 42 43protected: 44 virtual void defineSynchedData(); 45 virtual void registerAttributes(); 46 47protected: 48 virtual void serverAiStep(); 49 50private: 51 virtual bool canReach(double xt, double yt, double zt, double dist); 52 53protected: 54 virtual int getAmbientSound(); 55 virtual int getHurtSound(); 56 virtual int getDeathSound(); 57 virtual int getDeathLoot(); 58 virtual void dropDeathLoot(bool wasKilledByPlayer, int playerBonusLevel); 59 virtual float getSoundVolume(); 60 61public: 62 virtual bool canSpawn(); 63 virtual int getMaxSpawnClusterSize(); 64 virtual void addAdditonalSaveData(CompoundTag *tag); 65 virtual void readAdditionalSaveData(CompoundTag *tag); 66};