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