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