aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/Silverfish.h
diff options
context:
space:
mode:
authordaoge_cmd <3523206925@qq.com>2026-03-01 12:16:08 +0800
committerdaoge_cmd <3523206925@qq.com>2026-03-01 12:16:08 +0800
commitb691c43c44ff180d10e7d4a9afc83b98551ff586 (patch)
tree3e9849222cbc6ba49f2f1fc6e5fe7179632c7390 /Minecraft.World/Silverfish.h
parentdef8cb415354ac390b7e89052a50605285f1aca9 (diff)
Initial commit
Diffstat (limited to 'Minecraft.World/Silverfish.h')
-rw-r--r--Minecraft.World/Silverfish.h49
1 files changed, 49 insertions, 0 deletions
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<Entity> findAttackTarget();
+
+ virtual int getAmbientSound();
+ virtual int getHurtSound();
+ virtual int getDeathSound();
+
+public:
+ virtual bool hurt(DamageSource *source, int dmg);
+
+protected:
+ virtual void checkHurtTarget(shared_ptr<Entity> 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