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: 146
95 virtual void aiStep() /*override*/;
96
97 // vIndex: 176
98 virtual void newServerAiStep() /*override*/;
99
100 // vIndex: 85
101 virtual bool canFreeze() const /*override*/;
102
103 // vIndex: 105
104 virtual bool canBeAffected(uint effectId) 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: 156
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 id, 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: 174
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 ::ActorUniqueID getAlternativeTarget(int headIndex);
174
175 MCAPI ::Vec3 getHeadPos(int headID) const;
176
177 MCAPI bool hasAerialAttack() const;
178
179 MCAPI void postAiStep();
180
181 MCAPI ::WitherBossPreAIStepResult preAiStep();
182
183 MCAPI void setAerialAttack(bool aerialAttack);
184
185 MCAPI void setAlternativeTarget(int headIndex, ::ActorUniqueID entityId);
186
187 MCAPI void setInvulnerableTicks(int invulnerableTicks);
188 // NOLINTEND
189
190public:
191 // static variables
192 // NOLINTBEGIN
193 MCAPI static ::mce::UUID const& MAX_HEALTH_CAP_UUID();
194 // NOLINTEND
195
196public:
197 // constructor thunks
198 // NOLINTBEGIN
199 MCAPI void* $ctor(
200 ::ActorDefinitionGroup* definitions,
201 ::ActorDefinitionIdentifier const& definitionName,
202 ::EntityContext& entityContext
203 );
204 // NOLINTEND
205
206public:
207 // virtual function thunks
208 // NOLINTBEGIN
209 MCAPI void $reloadHardcoded(::ActorInitializationMethod method, ::VariantParameterList const& params);
210
211 MCAPI void $reloadHardcodedClient(::ActorInitializationMethod method);
212
213 MCAPI void $aiStep();
214
215 MCAPI void $newServerAiStep();
216
217 MCFOLD bool $canFreeze() const;
218
219 MCAPI bool $canBeAffected(uint effectId) const;
220
221 MCAPI bool $canBeAffectedByArrow(::MobEffectInstance const& effect) const;
222
223 MCAPI void $hurtEffects(::ActorDamageSource const& source, float damage, bool knock, bool ignite);
224
225 MCAPI void $addAdditionalSaveData(::CompoundTag& tag) const;
226
227 MCAPI void $readAdditionalSaveData(::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper);
228
229 MCFOLD float $causeFallDamageToActor(float, float, ::ActorDamageSource);
230
231 MCAPI int $getArmorValue() const;
232
233 MCAPI void $die(::ActorDamageSource const& source);
234
235 MCAPI void $remove();
236
237 MCFOLD bool $startRiding(::Actor& vehicle, bool forceRiding);
238
239 MCAPI void $handleEntityEvent(::ActorEvent id, int data);
240
241 MCAPI bool $isInvulnerableTo(::ActorDamageSource const& source) const;
242
243 MCAPI ::Vec3 $getFiringPos() const;
244
245 MCAPI void $tickDeath();
246
247 MCAPI bool $_hurt(::ActorDamageSource const& source, float damage, bool knock, bool ignite);
248 // NOLINTEND
249
250public:
251 // vftables
252 // NOLINTBEGIN
253 MCNAPI static void** $vftable();
254 // NOLINTEND
255};
Definition AABB.h:18
Definition ActorDamageSource.h:18
Definition ActorDefinitionGroup.h:32
Definition Actor.h:102
Definition BlockSource.h:66
Definition CompoundTag.h:13
Definition DataLoadHelper.h:20
Definition EntityContext.h:16
Definition Level.h:243
Definition MobEffectInstance.h:15
Definition Monster.h:20
Definition Vec3.h:10
Definition WitherBoss.h:31
static MCAPI void ** $vftable()
Definition ActorDefinitionIdentifier.h:15
Definition ActorUniqueID.h:5
Definition VariantParameterList.h:13