From b691c43c44ff180d10e7d4a9afc83b98551ff586 Mon Sep 17 00:00:00 2001 From: daoge_cmd <3523206925@qq.com> Date: Sun, 1 Mar 2026 12:16:08 +0800 Subject: Initial commit --- Minecraft.World/Silverfish.h | 49 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 Minecraft.World/Silverfish.h (limited to 'Minecraft.World/Silverfish.h') diff --git a/Minecraft.World/Silverfish.h b/Minecraft.World/Silverfish.h new file mode 100644 index 00000000..0fd0cc06 --- /dev/null +++ b/Minecraft.World/Silverfish.h @@ -0,0 +1,49 @@ +#pragma once + +#include "Monster.h" + +class Silverfish : public Monster +{ +public: + eINSTANCEOF GetType() { return eTYPE_SILVERFISH; } + static Entity *create(Level *level) { return new Silverfish(level); } +private: + int lookForFriends; + +public: + Silverfish(Level *level); + + virtual int getMaxHealth(); + +protected: + virtual bool makeStepSound(); + virtual shared_ptr findAttackTarget(); + + virtual int getAmbientSound(); + virtual int getHurtSound(); + virtual int getDeathSound(); + +public: + virtual bool hurt(DamageSource *source, int dmg); + +protected: + virtual void checkHurtTarget(shared_ptr target, float d); + virtual void playStepSound(int xt, int yt, int zt, int t); + virtual int getDeathLoot(); + +public: + virtual void tick(); + +protected: + virtual void serverAiStep(); + +public: + virtual float getWalkTargetValue(int x, int y, int z); + +protected: + virtual bool isDarkEnoughToSpawn(); + +public: + virtual bool canSpawn(); + virtual MobType getMobType(); +}; \ No newline at end of file -- cgit v1.2.3