Files
MinecraftConsoles/Minecraft.World/VillagerGolem.h
daoge b3feddfef3 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 97a4399472.

* 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>
2026-03-03 03:04:10 +08:00

62 lines
1.5 KiB
C++

#pragma once
#include "Golem.h"
class Village;
class Level;
class VillagerGolem : public Golem
{
public:
eINSTANCEOF GetType() { return eTYPE_VILLAGERGOLEM; }
static Entity *create(Level *level) { return new VillagerGolem(level); }
protected:
static const int DATA_FLAGS_ID = 16;
private:
int villageUpdateInterval;
weak_ptr<Village> village;
int attackAnimationTick;
int offerFlowerTick;
public:
VillagerGolem(Level *level);
protected:
virtual void defineSynchedData();
public:
virtual bool useNewAi();
protected:
virtual void serverAiMobStep();
virtual void registerAttributes();
virtual int decreaseAirSupply(int currentSupply);
virtual void doPush(shared_ptr<Entity> e);
public:
virtual void aiStep();
virtual bool canAttackType(eINSTANCEOF targetType);
virtual void addAdditonalSaveData(CompoundTag *tag);
virtual void readAdditionalSaveData(CompoundTag *tag);
virtual bool doHurtTarget(shared_ptr<Entity> target);
virtual void handleEntityEvent(byte id);
virtual shared_ptr<Village> getVillage();
virtual int getAttackAnimationTick();
virtual void offerFlower(bool offer);
protected:
virtual int getAmbientSound();
virtual int getHurtSound();
virtual int getDeathSound();
virtual void playStepSound(int xt, int yt, int zt, int t);
virtual void dropDeathLoot(bool wasKilledByPlayer, int playerBonusLevel);
public:
virtual int getOfferFlowerTick();
virtual bool isPlayerCreated();
virtual void setPlayerCreated(bool value);
virtual void die(DamageSource *source);
virtual bool hurt(DamageSource *source, float dmg);
};