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 virtual void reloadHardcoded(::ActorInitializationMethod method, ::VariantParameterList const& params) /*override*/;
89
90 virtual void reloadHardcodedClient(::ActorInitializationMethod method) /*override*/;
91
92 virtual void aiStep() /*override*/;
93
94 virtual void newServerAiStep() /*override*/;
95
96 virtual bool canFreeze() const /*override*/;
97
98 virtual bool canBeAffected(uint id) const /*override*/;
99
100 virtual bool canBeAffectedByArrow(::MobEffectInstance const& effect) const /*override*/;
101
102 virtual void hurtEffects(::ActorDamageSource const& source, float damage, bool knock, bool ignite) /*override*/;
103
104 virtual void addAdditionalSaveData(::CompoundTag& tag) const /*override*/;
105
106 virtual void readAdditionalSaveData(::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper) /*override*/;
107
108 virtual float causeFallDamageToActor(float, float, ::ActorDamageSource) /*override*/;
109
110 virtual int getArmorValue() const /*override*/;
111
112 virtual void die(::ActorDamageSource const& source) /*override*/;
113
114 virtual void remove() /*override*/;
115
116 virtual bool startRiding(::Actor& vehicle, bool forceRiding) /*override*/;
117
118 virtual void handleEntityEvent(::ActorEvent eventId, int data) /*override*/;
119
120 virtual bool isInvulnerableTo(::ActorDamageSource const& source) const /*override*/;
121
122 virtual ::Vec3 getFiringPos() const /*override*/;
123
124 virtual bool _hurt(::ActorDamageSource const& source, float damage, bool knock, bool ignite) /*override*/;
125
126 virtual ~WitherBoss() /*override*/ = default;
127 // NOLINTEND
128
129public:
130 // member functions
131 // NOLINTBEGIN
132 MCAPI WitherBoss(
133 ::ActorDefinitionGroup* definitions,
134 ::ActorDefinitionIdentifier const& definitionName,
135 ::EntityContext& entityContext
136 );
137
138 MCAPI void _destroyBlocks(
139 ::Level& level,
140 ::AABB const& bb,
141 ::BlockSource& region,
142 int range,
143 ::WitherBoss::WitherAttackType attackType
144 );
145
146 MCAPI void _performRangedAttack(int headID, ::Actor& target);
147
148 MCAPI void _performRangedAttack(int headID, ::Vec3 const& targetPos, bool dangerous);
149
150 MCAPI ::ActorUniqueID getAlternativeTarget(int headIndex);
151
152 MCAPI ::Vec3 getHeadPos(int headID) const;
153
154 MCAPI_S int getInvulnerableTicks() const;
155
156 MCAPI bool hasAerialAttack() const;
157
158 MCAPI void postAiStep();
159
160 MCAPI ::WitherBossPreAIStepResult preAiStep();
161
162 MCAPI void setAerialAttack(bool aerialAttack);
163
164 MCAPI void setAlternativeTarget(int headIndex, ::ActorUniqueID entityId);
165
166 MCAPI void setInvulnerableTicks(int invulnerableTicks);
167 // NOLINTEND
168
169public:
170 // static variables
171 // NOLINTBEGIN
172 MCAPI static ::mce::UUID const& MAX_HEALTH_CAP_UUID();
173 // NOLINTEND
174
175public:
176 // constructor thunks
177 // NOLINTBEGIN
178 MCAPI void* $ctor(
179 ::ActorDefinitionGroup* definitions,
180 ::ActorDefinitionIdentifier const& definitionName,
181 ::EntityContext& entityContext
182 );
183 // NOLINTEND
184
185public:
186 // virtual function thunks
187 // NOLINTBEGIN
188 MCAPI void $reloadHardcoded(::ActorInitializationMethod method, ::VariantParameterList const& params);
189
190 MCAPI void $reloadHardcodedClient(::ActorInitializationMethod method);
191
192 MCAPI void $aiStep();
193
194 MCAPI void $newServerAiStep();
195
196 MCFOLD bool $canFreeze() const;
197
198 MCAPI bool $canBeAffected(uint id) const;
199
200 MCAPI bool $canBeAffectedByArrow(::MobEffectInstance const& effect) const;
201
202 MCAPI void $hurtEffects(::ActorDamageSource const& source, float damage, bool knock, bool ignite);
203
204 MCAPI void $addAdditionalSaveData(::CompoundTag& tag) const;
205
206 MCAPI void $readAdditionalSaveData(::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper);
207
208 MCFOLD float $causeFallDamageToActor(float, float, ::ActorDamageSource);
209
210 MCAPI int $getArmorValue() const;
211
212 MCAPI void $die(::ActorDamageSource const& source);
213
214 MCAPI void $remove();
215
216 MCFOLD bool $startRiding(::Actor& vehicle, bool forceRiding);
217
218 MCAPI void $handleEntityEvent(::ActorEvent eventId, int data);
219
220 MCAPI bool $isInvulnerableTo(::ActorDamageSource const& source) const;
221
222 MCAPI ::Vec3 $getFiringPos() const;
223
224 MCAPI bool $_hurt(::ActorDamageSource const& source, float damage, bool knock, bool ignite);
225
226
227 // NOLINTEND
228
229public:
230 // vftables
231 // NOLINTBEGIN
232 MCAPI static void** $vftable();
233 // NOLINTEND
234};
Definition AABB.h:18
Definition ActorDamageSource.h:18
Definition ActorDefinitionGroup.h:35
Definition Actor.h:105
Definition BlockSource.h:68
Definition CompoundTag.h:23
Definition DataLoadHelper.h:20
Definition EntityContext.h:16
Definition Level.h:249
Definition MobEffectInstance.h:15
Definition Vec3.h:10
Definition UUID.h:7
Definition ActorDefinitionIdentifier.h:15
Definition ActorUniqueID.h:5
Definition VariantParameterList.h:13