From b3feddfef372618c8a9d7a0abcaf18cfad866c18 Mon Sep 17 00:00:00 2001 From: daoge <3523206925@qq.com> Date: Tue, 3 Mar 2026 03:04:10 +0800 Subject: 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 --- Minecraft.World/EnderDragon.h | 48 +++++++++++++++++++++++++++---------------- 1 file changed, 30 insertions(+), 18 deletions(-) (limited to 'Minecraft.World/EnderDragon.h') diff --git a/Minecraft.World/EnderDragon.h b/Minecraft.World/EnderDragon.h index 8a12c08c..a13ecaa2 100644 --- a/Minecraft.World/EnderDragon.h +++ b/Minecraft.World/EnderDragon.h @@ -1,22 +1,22 @@ #pragma once using namespace std; #include "BossMob.h" +#include "MultiEntityMob.h" +#include "Enemy.h" -class BossMobPart; +class MultiEntityMobPart; class EnderCrystal; class Node; class BinaryHeap; class Path; -class EnderDragon : public BossMob +class EnderDragon : public Mob, public BossMob, public MultiEntityMob, public Enemy { public: eINSTANCEOF GetType() { return eTYPE_ENDERDRAGON; }; static Entity *create(Level *level) { return new EnderDragon(level); } -private: - static const int DATA_ID_SYNCHED_HEALTH = 16; - +private: // 4J Added for new behaviours static const int DATA_ID_SYNCHED_ACTION = 17; @@ -27,16 +27,16 @@ public: double positions[positionsLength][3]; int posPointer; - //BossMobPart[] subEntities; + //MultiEntityMobPart[] subEntities; vector > subEntities; - shared_ptr head; - shared_ptr neck; // 4J Added - shared_ptr body; - shared_ptr tail1; - shared_ptr tail2; - shared_ptr tail3; - shared_ptr wing1; - shared_ptr wing2; + shared_ptr head; + shared_ptr neck; // 4J Added + shared_ptr body; + shared_ptr tail1; + shared_ptr tail2; + shared_ptr tail3; + shared_ptr wing1; + shared_ptr wing2; float oFlapTime; float flapTime; @@ -112,9 +112,11 @@ private: public: EnderDragon(Level *level); + void AddParts(); virtual ~EnderDragon(); protected: + virtual void registerAttributes(); virtual void defineSynchedData(); public: @@ -122,7 +124,7 @@ public: virtual void aiStep(); private: - using BossMob::hurt; + using MultiEntityMob::hurt; void checkCrystals(); void checkAttack(); @@ -133,9 +135,11 @@ private: bool checkWalls(AABB *bb); public: - virtual bool hurt(shared_ptr bossMobPart, DamageSource *source, int damage); + virtual bool hurt(shared_ptr MultiEntityMobPart, DamageSource *source, float damage); + virtual bool hurt(DamageSource *source, float damage); protected: + virtual bool reallyHurt(DamageSource *source, float damage); virtual void tickDeath(); private: @@ -143,11 +147,15 @@ private: protected: virtual void checkDespawn(); - virtual int getHurtSound(); public: virtual vector > *getSubEntities(); virtual bool isPickable(); - virtual int getSynchedHealth(); + Level *getLevel(); + +protected: + int getAmbientSound(); + int getHurtSound(); + float getSoundVolume(); private: // 4J added for new dragon behaviour @@ -174,4 +182,8 @@ public: double getHeadPartYOffset(int partIndex, doubleArray bodyPos, doubleArray partPos); double getHeadPartYRotDiff(int partIndex, doubleArray bodyPos, doubleArray partPos); Vec3 *getHeadLookVector(float a); + + virtual wstring getAName() { return app.GetString(IDS_ENDERDRAGON); }; + virtual float getHealth() { return LivingEntity::getHealth(); }; + virtual float getMaxHealth() { return LivingEntity::getMaxHealth(); }; }; -- cgit v1.2.3