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