LeviLamina
Loading...
Searching...
No Matches
WitherBoss.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/math/Vec2.h"
7#include "mc/deps/core/math/Vec3.h"
8#include "mc/entity/components/WitherBossPreAIStepResult.h"
9#include "mc/world/actor/ActorEvent.h"
10#include "mc/world/actor/ActorInitializationMethod.h"
11#include "mc/world/actor/monster/Monster.h"
12
13// auto generated forward declare list
14// clang-format off
15class AABB;
16class Actor;
19class BlockSource;
20class CompoundTag;
21class DataLoadHelper;
22class EntityContext;
23class Level;
26struct ActorUniqueID;
28namespace mce { class UUID; }
29// clang-format on
30
31class WitherBoss : public ::Monster {
32public:
33 // WitherBoss inner types define
34 enum class WitherAttackType : int {
35 Charge = 0,
36 HurtExplosion = 1,
37 Projectile = 2,
38 };
39
40public:
41 // member variables
42 // NOLINTBEGIN
43 ::ll::TypedStorage<4, 4, int> MAX_SHIELD_HEALTH;
44 ::ll::TypedStorage<4, 4, int> mShieldHealth;
45 ::ll::TypedStorage<4, 24, ::Vec2[3]> mHeadRots;
46 ::ll::TypedStorage<4, 24, ::Vec2[3]> mOldHeadRots;
47 ::ll::TypedStorage<4, 12, int[3]> mNextHeadUpdate;
48 ::ll::TypedStorage<4, 12, int[3]> mIdleHeadUpdates;
49 ::ll::TypedStorage<4, 4, int> mDestroyBlocksTick;
50 ::ll::TypedStorage<4, 4, int> mHealthThreshold;
51 ::ll::TypedStorage<4, 4, int> mPhase;
52 ::ll::TypedStorage<1, 1, bool> mWantsToExplode;
53 ::ll::TypedStorage<1, 1, bool> mCharging;
54 ::ll::TypedStorage<4, 12, ::Vec3> mChargeDirection;
55 ::ll::TypedStorage<4, 4, int> mChargeFrames;
56 ::ll::TypedStorage<4, 4, int> mPreparingCharge;
57 ::ll::TypedStorage<4, 4, int> mProjectileCounter;
58 ::ll::TypedStorage<4, 4, int> mSpawningFrames;
59 ::ll::TypedStorage<4, 4, int> mTimeTillNextShot;
60 ::ll::TypedStorage<4, 4, int> mFireRate;
61 ::ll::TypedStorage<4, 4, float> mSpinSpeed;
62 ::ll::TypedStorage<4, 4, int> mStunTimer;
63 ::ll::TypedStorage<4, 4, int> mFramesTillMove;
64 ::ll::TypedStorage<1, 1, bool> mWantsMove;
65 ::ll::TypedStorage<1, 1, bool> mIsPathing;
66 ::ll::TypedStorage<4, 4, int> mMaxHealth;
67 ::ll::TypedStorage<4, 4, int> mNumSkeletons;
68 ::ll::TypedStorage<4, 4, int> mMaxSkeletons;
69 ::ll::TypedStorage<4, 4, int> mMovementTime;
70 ::ll::TypedStorage<4, 4, int> mHealthIntervals;
71 ::ll::TypedStorage<4, 4, int> mLastHealthValue;
72 ::ll::TypedStorage<4, 4, int> mDelayShot;
73 ::ll::TypedStorage<4, 4, int> mTimeSinceLastShot;
74 ::ll::TypedStorage<4, 4, float> mAttackRange;
75 ::ll::TypedStorage<1, 1, bool> mSecondVolley;
76 ::ll::TypedStorage<4, 4, int> mMainHeadAttackCountdown;
77 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ActorDamageSource>> mDeathSource;
78 ::ll::TypedStorage<4, 4, int> mlastFiredHead;
79 // NOLINTEND
80
81public:
82 // prevent constructor by default
83 WitherBoss();
84
85public:
86 // virtual functions
87 // NOLINTBEGIN
88 // vIndex: 2
89 virtual void reloadHardcoded(::ActorInitializationMethod method, ::VariantParameterList const& params) /*override*/;
90
91 // vIndex: 3
92 virtual void reloadHardcodedClient(::ActorInitializationMethod method) /*override*/;
93
94 // vIndex: 145
95 virtual void aiStep() /*override*/;
96
97 // vIndex: 175
98 virtual void newServerAiStep() /*override*/;
99
100 // vIndex: 85
101 virtual bool canFreeze() const /*override*/;
102
103 // vIndex: 105
104 virtual bool canBeAffected(uint id) const /*override*/;
105
106 // vIndex: 106
107 virtual bool canBeAffectedByArrow(::MobEffectInstance const& effect) const /*override*/;
108
109 // vIndex: 144
110 virtual void hurtEffects(::ActorDamageSource const& source, float damage, bool knock, bool ignite) /*override*/;
111
112 // vIndex: 137
113 virtual void addAdditionalSaveData(::CompoundTag& tag) const /*override*/;
114
115 // vIndex: 136
116 virtual void readAdditionalSaveData(::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper) /*override*/;
117
118 // vIndex: 92
119 virtual float causeFallDamageToActor(float, float, ::ActorDamageSource) /*override*/;
120
121 // vIndex: 155
122 virtual int getArmorValue() const /*override*/;
123
124 // vIndex: 123
125 virtual void die(::ActorDamageSource const& source) /*override*/;
126
127 // vIndex: 11
128 virtual void remove() /*override*/;
129
130 // vIndex: 27
131 virtual bool startRiding(::Actor& vehicle, bool forceRiding) /*override*/;
132
133 // vIndex: 69
134 virtual void handleEntityEvent(::ActorEvent eventId, int data) /*override*/;
135
136 // vIndex: 64
137 virtual bool isInvulnerableTo(::ActorDamageSource const& source) const /*override*/;
138
139 // vIndex: 12
140 virtual ::Vec3 getFiringPos() const /*override*/;
141
142 // vIndex: 173
143 virtual void tickDeath() /*override*/;
144
145 // vIndex: 135
146 virtual bool _hurt(::ActorDamageSource const& source, float damage, bool knock, bool ignite) /*override*/;
147
148 // vIndex: 8
149 virtual ~WitherBoss() /*override*/ = default;
150 // NOLINTEND
151
152public:
153 // member functions
154 // NOLINTBEGIN
155 MCAPI WitherBoss(
156 ::ActorDefinitionGroup* definitions,
157 ::ActorDefinitionIdentifier const& definitionName,
158 ::EntityContext& entityContext
159 );
160
161 MCAPI void _destroyBlocks(
162 ::Level& level,
163 ::AABB const& bb,
164 ::BlockSource& region,
165 int range,
166 ::WitherBoss::WitherAttackType attackType
167 );
168
169 MCAPI void _performRangedAttack(int headID, ::Actor& target);
170
171 MCAPI void _performRangedAttack(int headID, ::Vec3 const& targetPos, bool dangerous);
172
173 MCAPI bool canShoot();
174
175 MCAPI bool getAerialAttack() const;
176
177 MCAPI ::ActorUniqueID getAlternativeTarget(int headIndex);
178
179 MCAPI ::Vec3 getHeadPos(int headID) const;
180
181 MCAPI bool hasAerialAttack() const;
182
183 MCAPI void postAiStep();
184
185 MCAPI ::WitherBossPreAIStepResult preAiStep();
186
187 MCAPI void setAerialAttack(bool aerialAttack);
188
189 MCAPI void setAlternativeTarget(int headIndex, ::ActorUniqueID entityId);
190
191 MCAPI void setInvulnerableTicks(int invulnerableTicks);
192 // NOLINTEND
193
194public:
195 // static variables
196 // NOLINTBEGIN
197 MCAPI static ::mce::UUID const& MAX_HEALTH_CAP_UUID();
198 // NOLINTEND
199
200public:
201 // constructor thunks
202 // NOLINTBEGIN
203 MCAPI void* $ctor(
204 ::ActorDefinitionGroup* definitions,
205 ::ActorDefinitionIdentifier const& definitionName,
206 ::EntityContext& entityContext
207 );
208 // NOLINTEND
209
210public:
211 // virtual function thunks
212 // NOLINTBEGIN
213 MCAPI void $reloadHardcoded(::ActorInitializationMethod method, ::VariantParameterList const& params);
214
215 MCAPI void $reloadHardcodedClient(::ActorInitializationMethod method);
216
217 MCAPI void $aiStep();
218
219 MCAPI void $newServerAiStep();
220
221 MCFOLD bool $canFreeze() const;
222
223 MCAPI bool $canBeAffected(uint id) const;
224
225 MCAPI bool $canBeAffectedByArrow(::MobEffectInstance const& effect) const;
226
227 MCAPI void $hurtEffects(::ActorDamageSource const& source, float damage, bool knock, bool ignite);
228
229 MCAPI void $addAdditionalSaveData(::CompoundTag& tag) const;
230
231 MCAPI void $readAdditionalSaveData(::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper);
232
233 MCFOLD float $causeFallDamageToActor(float, float, ::ActorDamageSource);
234
235 MCAPI int $getArmorValue() const;
236
237 MCAPI void $die(::ActorDamageSource const& source);
238
239 MCAPI void $remove();
240
241 MCFOLD bool $startRiding(::Actor& vehicle, bool forceRiding);
242
243 MCAPI void $handleEntityEvent(::ActorEvent eventId, int data);
244
245 MCAPI bool $isInvulnerableTo(::ActorDamageSource const& source) const;
246
247 MCAPI ::Vec3 $getFiringPos() const;
248
249 MCFOLD void $tickDeath();
250
251 MCAPI bool $_hurt(::ActorDamageSource const& source, float damage, bool knock, bool ignite);
252 // NOLINTEND
253
254public:
255 // vftables
256 // NOLINTBEGIN
257 MCNAPI static void** $vftable();
258 // NOLINTEND
259};
Definition AABB.h:18
Definition ActorDamageSource.h:18
Definition ActorDefinitionGroup.h:36
Definition Actor.h:103
Definition BlockSource.h:67
Definition CompoundTag.h:13
Definition DataLoadHelper.h:20
Definition EntityContext.h:16
Definition Level.h:239
Definition MobEffectInstance.h:15
Definition Monster.h:19
Definition Vec3.h:10
Definition WitherBoss.h:31
static MCAPI void ** $vftable()
Definition ActorDefinitionIdentifier.h:15
Definition ActorUniqueID.h:5
Definition VariantParameterList.h:5