4jcraft/targets/minecraft/world/entity/monster/Witch.h
2026-04-01 13:27:58 -05:00

56 lines
1.3 KiB
C++

#pragma once
#include <stdint.h>
#include "Monster.h"
#include "RangedAttackMob.h"
#include "java/Class.h"
class AttributeModifier;
class Entity;
class Level;
class Witch : public Monster, public RangedAttackMob {
public:
eINSTANCEOF GetType() { return eTYPE_WITCH; }
static Entity* create(Level* level) { return new Witch(level); }
private:
static AttributeModifier* SPEED_MODIFIER_DRINKING;
static const int DATA_USING_ITEM = 21;
static const int DEATH_LOOT_COUNT = 8;
static const int DEATH_LOOT[DEATH_LOOT_COUNT];
int usingTime;
public:
Witch(Level* level);
protected:
virtual void defineSynchedData();
virtual int getAmbientSound();
virtual int getHurtSound();
virtual int getDeathSound();
public:
virtual void setUsingItem(bool isUsing);
virtual bool isUsingItem();
protected:
virtual void registerAttributes();
public:
virtual bool useNewAi();
virtual void aiStep();
virtual void handleEntityEvent(uint8_t id);
protected:
virtual float getDamageAfterMagicAbsorb(DamageSource* damageSource,
float damage);
virtual void dropDeathLoot(bool wasKilledByPlayer, int playerBonusLevel);
public:
virtual void performRangedAttack(std::shared_ptr<LivingEntity> target,
float power);
};