2026-03-01 12:16:08 +08:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "Monster.h"
|
|
|
|
|
|
|
|
|
|
class Blaze : public Monster
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
eINSTANCEOF GetType() { return eTYPE_BLAZE; }
|
|
|
|
|
static Entity *create(Level *level) { return new Blaze(level); }
|
|
|
|
|
|
|
|
|
|
// private int nextBurnNeighborsTick;
|
|
|
|
|
private:
|
|
|
|
|
float allowedHeightOffset;
|
|
|
|
|
int nextHeightOffsetChangeTick;
|
|
|
|
|
int attackCounter;
|
|
|
|
|
|
|
|
|
|
static const int DATA_FLAGS_ID = 16;
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
Blaze(Level *level);
|
|
|
|
|
|
|
|
|
|
protected:
|
2026-03-03 03:04:10 +08:00
|
|
|
virtual void registerAttributes();
|
2026-03-01 12:16:08 +08:00
|
|
|
virtual void defineSynchedData();
|
|
|
|
|
virtual int getAmbientSound();
|
|
|
|
|
virtual int getHurtSound();
|
|
|
|
|
virtual int getDeathSound();
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
virtual int getLightColor(float a);
|
|
|
|
|
virtual float getBrightness(float a);
|
|
|
|
|
virtual void aiStep();
|
|
|
|
|
|
|
|
|
|
protected:
|
2026-03-02 17:37:16 +07:00
|
|
|
virtual void checkHurtTarget(shared_ptr<Entity> target, float d);
|
2026-03-01 12:16:08 +08:00
|
|
|
virtual void causeFallDamage(float distance);
|
|
|
|
|
virtual int getDeathLoot();
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
virtual bool isOnFire();
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
virtual void dropDeathLoot(bool wasKilledByPlayer, int playerBonusLevel);
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
bool isCharged();
|
|
|
|
|
void setCharged(bool value);
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
bool isDarkEnoughToSpawn();
|
|
|
|
|
};
|