diff options
| author | daoge <3523206925@qq.com> | 2026-03-03 03:04:10 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-03 03:04:10 +0800 |
| commit | b3feddfef372618c8a9d7a0abcaf18cfad866c18 (patch) | |
| tree | 267761c3bb39241ba5c347bfbe2254d06686e287 /Minecraft.World/Skeleton.h | |
| parent | 84c31a2331f7a0ec85b9d438992e244f60e5020f (diff) | |
feat: TU19 (Dec 2014) Features & Content (#155)
* try to resolve merge conflict
* feat: TU19 (Dec 2014) Features & Content (#32)
* December 2014 files
* Working release build
* Fix compilation issues
* Add sound to Windows64Media
* Add DLC content and force Tutorial DLC
* Revert "Add DLC content and force Tutorial DLC"
This reverts commit 97a43994725008e35fceb984d5549df9c8cea470.
* Disable broken light packing
* Disable breakpoint during DLC texture map load
Allows DLC loading but the DLC textures are still broken
* Fix post build not working
* ...
* fix vs2022 build
* fix cmake build
---------
Co-authored-by: Loki <lokirautio@gmail.com>
Diffstat (limited to 'Minecraft.World/Skeleton.h')
| -rw-r--r-- | Minecraft.World/Skeleton.h | 48 |
1 files changed, 39 insertions, 9 deletions
diff --git a/Minecraft.World/Skeleton.h b/Minecraft.World/Skeleton.h index b85d9afe..e2f6594c 100644 --- a/Minecraft.World/Skeleton.h +++ b/Minecraft.World/Skeleton.h @@ -2,38 +2,68 @@ using namespace std; #include "Monster.h" +#include "RangedAttackMob.h" -class Skeleton : public Monster +class RangedAttackGoal; +class MeleeAttackGoal; + +class Skeleton : public Monster, public RangedAttackMob { public: eINSTANCEOF GetType() { return eTYPE_SKELETON; } static Entity *create(Level *level) { return new Skeleton(level); } +private: + static const int DATA_TYPE_ID = 13; + +public: + static const int TYPE_DEFAULT = 0; + static const int TYPE_WITHER = 1; + +private: + RangedAttackGoal *bowGoal; + MeleeAttackGoal *meleeGoal; + +public: Skeleton(Level *level); + virtual ~Skeleton(); +protected: + virtual void registerAttributes(); + virtual void defineSynchedData(); + +public: virtual bool useNewAi(); - virtual int getMaxHealth(); protected: virtual int getAmbientSound(); virtual int getHurtSound(); virtual int getDeathSound(); + virtual void playStepSound(int xt, int yt, int zt, int t); + +public: + virtual bool doHurtTarget(shared_ptr<Entity> target); public: - virtual shared_ptr<ItemInstance> getCarriedItem(); virtual MobType getMobType(); virtual void aiStep(); + virtual void rideTick(); virtual void die(DamageSource *source); protected: virtual int getDeathLoot(); - virtual void dropDeathLoot(bool wasKilledByPlayer, int playerBonusLevel); + virtual void dropDeathLoot(bool wasKilledByPlayer, int playerBonusLevel); virtual void dropRareDeathLoot(int rareLootLevel); - -private: - static shared_ptr<ItemInstance> bow; + virtual void populateDefaultEquipmentSlots(); public: - - static void staticCtor(); + virtual MobGroupData *finalizeMobSpawn(MobGroupData *groupData, int extraData = 0); // 4J Added extraData param + virtual void reassessWeaponGoal(); + virtual void performRangedAttack(shared_ptr<LivingEntity> target, float power); + virtual int getSkeletonType(); + virtual void setSkeletonType(int type); + virtual void readAdditionalSaveData(CompoundTag *tag); + virtual void addAdditonalSaveData(CompoundTag *entityTag); + virtual void setEquippedSlot(int slot, shared_ptr<ItemInstance> item); + virtual double getRidingHeight(); }; |
