LeviLamina
Loading...
Searching...
No Matches
EnderDragon.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/math/Vec3.h"
7#include "mc/legacy/ActorUniqueID.h"
8#include "mc/world/actor/ActorEvent.h"
9#include "mc/world/actor/ActorInitializationMethod.h"
10#include "mc/world/actor/monster/Monster.h"
11#include "mc/world/level/pathfinder/BinaryHeap.h"
12#include "mc/world/level/pathfinder/PathCompletionType.h"
13
14// auto generated forward declare list
15// clang-format off
16class AABB;
17class Actor;
20class ActorHurtResult;
21class BlockPos;
22class BlockType;
23class EnderCrystal;
24class EntityContext;
25class Path;
26class PathfinderNode;
29// clang-format on
30
31class EnderDragon : public ::Monster {
32public:
33 // member variables
34 // NOLINTBEGIN
35 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::Path>> mPath;
36 ::ll::TypedStorage<4, 768, ::std::array<::std::array<float, 3>, 64>> mPositions;
37 ::ll::TypedStorage<4, 4, int> mPosPointer;
38 ::ll::TypedStorage<8, 8, ::AABB*> mHead;
39 ::ll::TypedStorage<8, 8, ::AABB*> mNeck;
40 ::ll::TypedStorage<8, 8, ::AABB*> mBody;
41 ::ll::TypedStorage<8, 8, ::AABB*> mTail1;
42 ::ll::TypedStorage<8, 8, ::AABB*> mTail2;
43 ::ll::TypedStorage<8, 8, ::AABB*> mTail3;
44 ::ll::TypedStorage<8, 8, ::AABB*> mWing1;
45 ::ll::TypedStorage<8, 8, ::AABB*> mWing2;
46 ::ll::TypedStorage<1, 1, bool> mInWall;
47 ::ll::TypedStorage<4, 4, int> mGrowlTime;
48 ::ll::TypedStorage<4, 4, int> mSittingDamageReceived;
49 ::ll::TypedStorage<4, 4, float> mTurnSpeed;
50 ::ll::TypedStorage<4, 12, ::Vec3> mTargetPos;
51 ::ll::TypedStorage<4, 4, int> mFlameAttackCount;
52 ::ll::TypedStorage<1, 1, bool> mNodesFinalized;
53 ::ll::TypedStorage<8, 24, ::std::vector<::PathfinderNode>> mNodes;
54 ::ll::TypedStorage<8, 24, ::std::vector<int>> mNodeAdjacency;
55 ::ll::TypedStorage<8, 32, ::BinaryHeap> mOpenSet;
56 ::ll::TypedStorage<8, 8, ::ActorUniqueID> mNearestCrystal;
57 ::ll::TypedStorage<4, 4, int> mEnderCrystalsAlive;
58 ::ll::TypedStorage<1, 1, bool> mDragonKilledPreviously;
59 ::ll::TypedStorage<8, 64, ::std::function<void(::EnderDragon&)>> mDragonKilledCallback;
60 // NOLINTEND
61
62public:
63 // prevent constructor by default
64 EnderDragon();
65
66public:
67 // virtual functions
68 // NOLINTBEGIN
69 virtual ~EnderDragon() /*override*/;
70
71 virtual void reloadHardcoded(::ActorInitializationMethod method, ::VariantParameterList const& params) /*override*/;
72
73 virtual void remove() /*override*/;
74
75 virtual void setSitting(bool value) /*override*/;
76
77 virtual bool canBeAffected(uint id) const /*override*/;
78
79 virtual bool isImmobile() const /*override*/;
80
81 virtual void handleEntityEvent(::ActorEvent id, int data) /*override*/;
82
83 virtual ::Vec3 getHeadLookVector(float a) const /*override*/;
84
85 virtual void die(::ActorDamageSource const& source) /*override*/;
86
87 virtual float getShadowRadius() const /*override*/;
88
89 virtual bool isInvulnerableTo(::ActorDamageSource const& source) const /*override*/;
90
91 virtual bool canBePulledIntoVehicle() const /*override*/;
92
93 virtual ::ActorHurtResult
94 _hurt(::ActorDamageSource const& source, float damage, bool knock, bool ignite) /*override*/;
95 // NOLINTEND
96
97public:
98 // member functions
99 // NOLINTBEGIN
100 MCAPI EnderDragon(
101 ::ActorDefinitionGroup* definitions,
102 ::ActorDefinitionIdentifier const& definitionName,
103 ::EntityContext& entityContext
104 );
105
106 MCAPI void _checkCrystals();
107
108 MCAPI bool _checkWalls(::AABB bb);
109
110 MCAPI float _getHeadYOffset(float) const;
111
112 MCAPI ::ActorHurtResult _hurt(::AABB* part, ::ActorDamageSource const& source, float damage);
113
114 MCAPI void _hurtEntities(::gsl::span<::gsl::not_null<::Actor*>> actors) const;
115
116 MCAPI void _knockBack(::gsl::span<::gsl::not_null<::Actor*>> actors) const;
117
118 MCAPI ::std::unique_ptr<::Path>
119 _reconstructPath(::PathfinderNode& to, ::PathfinderNode& completionType, ::PathCompletionType);
120
121 MCAPI void dieNaturally();
122
123 MCAPI int findClosestNode();
124
125 MCAPI int findClosestNode(::Vec3 const& pos);
126
127 MCAPI ::std::unique_ptr<::Path> findPath(int startIndex, int endIndex, ::PathfinderNode* finalNode);
128
129 MCAPI bool getDragonKilledPreviously() const;
130
131 MCAPI int getFlameCount() const;
132
133 MCAPI ::BlockPos getHeadPos() const;
134
135 MCAPI ::std::vector<float> const getLatencyPos(int step, float a) const;
136
137#ifdef LL_PLAT_C
138 MCAPI ::EnderCrystal const* getNearestCrystal() const;
139#endif
140
141 MCAPI int getNumCrystalsAlive();
142
143 MCAPI ::Vec3 getTargetPos() const;
144
145 MCAPI void incrementFlameCount();
146
147 MCAPI void onCrystalDestroyed(::EnderCrystal const& crystal, ::BlockPos pos, ::ActorDamageSource const& source);
148
149 MCAPI void postAiStep();
150
151 MCAPI void resetFlameCount();
152
153 MCAPI void setDragonKilledCallback(::std::function<void(::EnderDragon&)> onKilled);
154
155 MCAPI void setHasDragonPreviouslyBeenKilled(bool beenKilled);
156
157 MCAPI void setNumCrystalsAlive(int crystalCount);
158
159 MCAPI void setTargetPos(::Vec3 pos);
160
161 MCAPI void setTurnSpeed(float speed);
162 // NOLINTEND
163
164public:
165 // static functions
166 // NOLINTBEGIN
167 MCAPI static bool _isDragonImmuneBlock(::BlockType const& block);
168 // NOLINTEND
169
170public:
171 // static variables
172 // NOLINTBEGIN
173 MCAPI static int& GROWL_INTERVAL_MAX();
174
175 MCAPI static int& GROWL_INTERVAL_MIN();
176
177 MCAPI static int& MAX_PATH_RADIUS();
178
179 MCAPI static float& SITTING_ALLOWED_DAMAGE_PERCENTAGE();
180 // NOLINTEND
181
182public:
183 // constructor thunks
184 // NOLINTBEGIN
185 MCAPI void* $ctor(
186 ::ActorDefinitionGroup* definitions,
187 ::ActorDefinitionIdentifier const& definitionName,
188 ::EntityContext& entityContext
189 );
190 // NOLINTEND
191
192public:
193 // destructor thunk
194 // NOLINTBEGIN
195 MCAPI void $dtor();
196 // NOLINTEND
197
198public:
199 // virtual function thunks
200 // NOLINTBEGIN
201 MCFOLD void $reloadHardcoded(::ActorInitializationMethod method, ::VariantParameterList const& params);
202
203 MCAPI void $remove();
204
205 MCAPI void $setSitting(bool value);
206
207 MCFOLD bool $canBeAffected(uint id) const;
208
209 MCAPI bool $isImmobile() const;
210
211 MCAPI void $handleEntityEvent(::ActorEvent id, int data);
212
213 MCAPI ::Vec3 $getHeadLookVector(float a) const;
214
215 MCAPI void $die(::ActorDamageSource const& source);
216
217 MCAPI float $getShadowRadius() const;
218
219 MCAPI bool $isInvulnerableTo(::ActorDamageSource const& source) const;
220
221 MCFOLD bool $canBePulledIntoVehicle() const;
222
223 MCAPI ::ActorHurtResult $_hurt(::ActorDamageSource const& source, float damage, bool knock, bool ignite);
224
225
226 // NOLINTEND
227
228public:
229 // vftables
230 // NOLINTBEGIN
231 MCAPI static void** $vftable();
232 // NOLINTEND
233};
Definition AABB.h:18
Definition ActorDamageSource.h:18
Definition ActorDefinitionGroup.h:37
Definition ActorHurtResult.h:5
Definition Actor.h:125
Definition BlockPos.h:21
Definition BlockType.h:84
Definition EnderCrystal.h:20
Definition EntityContext.h:17
Definition Path.h:16
Definition PathfinderNode.h:13
Definition Vec3.h:10
Definition ActorDefinitionIdentifier.h:15
Definition VariantParameterList.h:14