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 BlockPos;
21class EnderCrystal;
22class EntityContext;
23class Path;
24class PathfinderNode;
27// clang-format on
28
29class EnderDragon : public ::Monster {
30public:
31 // member variables
32 // NOLINTBEGIN
33 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::Path>> mPath;
34 ::ll::TypedStorage<4, 768, ::std::array<::std::array<float, 3>, 64>> mPositions;
35 ::ll::TypedStorage<4, 4, int> mPosPointer;
36 ::ll::TypedStorage<8, 8, ::AABB*> mHead;
37 ::ll::TypedStorage<8, 8, ::AABB*> mNeck;
38 ::ll::TypedStorage<8, 8, ::AABB*> mBody;
39 ::ll::TypedStorage<8, 8, ::AABB*> mTail1;
40 ::ll::TypedStorage<8, 8, ::AABB*> mTail2;
41 ::ll::TypedStorage<8, 8, ::AABB*> mTail3;
42 ::ll::TypedStorage<8, 8, ::AABB*> mWing1;
43 ::ll::TypedStorage<8, 8, ::AABB*> mWing2;
44 ::ll::TypedStorage<1, 1, bool> mInWall;
45 ::ll::TypedStorage<4, 4, int> mGrowlTime;
46 ::ll::TypedStorage<4, 4, int> mSittingDamageReceived;
47 ::ll::TypedStorage<4, 4, float> mTurnSpeed;
48 ::ll::TypedStorage<4, 12, ::Vec3> mTargetPos;
49 ::ll::TypedStorage<4, 4, int> mFlameAttackCount;
50 ::ll::TypedStorage<1, 1, bool> mNodesFinalized;
51 ::ll::TypedStorage<8, 24, ::std::vector<::PathfinderNode>> mNodes;
52 ::ll::TypedStorage<8, 24, ::std::vector<int>> mNodeAdjacency;
53 ::ll::TypedStorage<8, 32, ::BinaryHeap> mOpenSet;
54 ::ll::TypedStorage<8, 8, ::ActorUniqueID> mNearestCrystal;
55 ::ll::TypedStorage<4, 4, int> mEnderCrystalsAlive;
56 ::ll::TypedStorage<1, 1, bool> mDragonKilledPreviously;
57 ::ll::TypedStorage<8, 64, ::std::function<void(::EnderDragon&)>> mDragonKilledCallback;
58 // NOLINTEND
59
60public:
61 // prevent constructor by default
62 EnderDragon();
63
64public:
65 // virtual functions
66 // NOLINTBEGIN
67 virtual ~EnderDragon() /*override*/;
68
69 virtual void reloadHardcoded(::ActorInitializationMethod method, ::VariantParameterList const& params) /*override*/;
70
71 virtual void remove() /*override*/;
72
73 virtual void setSitting(bool value) /*override*/;
74
75 virtual bool canBeAffected(uint id) const /*override*/;
76
77 virtual bool isImmobile() const /*override*/;
78
79 virtual void handleEntityEvent(::ActorEvent id, int data) /*override*/;
80
81 virtual ::Vec3 getHeadLookVector(float a) const /*override*/;
82
83 virtual void die(::ActorDamageSource const& source) /*override*/;
84
85 virtual float getShadowRadius() const /*override*/;
86
87 virtual bool isInvulnerableTo(::ActorDamageSource const& source) const /*override*/;
88
89 virtual bool canBePulledIntoVehicle() const /*override*/;
90
91 virtual bool _hurt(::ActorDamageSource const& source, float damage, bool knock, bool ignite) /*override*/;
92 // NOLINTEND
93
94public:
95 // member functions
96 // NOLINTBEGIN
97 MCAPI EnderDragon(
98 ::ActorDefinitionGroup* definitions,
99 ::ActorDefinitionIdentifier const& definitionName,
100 ::EntityContext& entityContext
101 );
102
103 MCAPI void _checkCrystals();
104
105 MCAPI bool _checkWalls(::AABB bb);
106
107 MCAPI float _getHeadYOffset(float a) const;
108
109 MCAPI bool _hurt(::AABB* part, ::ActorDamageSource const& source, float damage);
110
111 MCAPI void _hurtEntities(::gsl::span<::gsl::not_null<::Actor*>> actors) const;
112
113 MCAPI void _knockBack(::gsl::span<::gsl::not_null<::Actor*>> actors) const;
114
115 MCAPI ::std::unique_ptr<::Path>
116 _reconstructPath(::PathfinderNode& from, ::PathfinderNode& to, ::PathCompletionType completionType);
117
118 MCAPI void dieNaturally();
119
120 MCAPI int findClosestNode();
121
122 MCAPI int findClosestNode(::Vec3 const& pos);
123
124 MCAPI ::std::unique_ptr<::Path> findPath(int startIndex, int endIndex, ::PathfinderNode* finalNode);
125
126 MCAPI ::std::vector<float> const getLatencyPos(int step, float a) const;
127
128 MCAPI void onCrystalDestroyed(::EnderCrystal const& crystal, ::BlockPos pos, ::ActorDamageSource const& source);
129
130 MCAPI void postAiStep();
131 // NOLINTEND
132
133public:
134 // static variables
135 // NOLINTBEGIN
136 MCAPI static int& GROWL_INTERVAL_MAX();
137
138 MCAPI static int& GROWL_INTERVAL_MIN();
139
140 MCAPI static int& MAX_PATH_RADIUS();
141
142 MCAPI static float& SITTING_ALLOWED_DAMAGE_PERCENTAGE();
143 // NOLINTEND
144
145public:
146 // constructor thunks
147 // NOLINTBEGIN
148 MCAPI void* $ctor(
149 ::ActorDefinitionGroup* definitions,
150 ::ActorDefinitionIdentifier const& definitionName,
151 ::EntityContext& entityContext
152 );
153 // NOLINTEND
154
155public:
156 // destructor thunk
157 // NOLINTBEGIN
158 MCAPI void $dtor();
159 // NOLINTEND
160
161public:
162 // virtual function thunks
163 // NOLINTBEGIN
164 MCFOLD void $reloadHardcoded(::ActorInitializationMethod method, ::VariantParameterList const& params);
165
166 MCAPI void $remove();
167
168 MCAPI void $setSitting(bool value);
169
170 MCFOLD bool $canBeAffected(uint id) const;
171
172 MCFOLD bool $isImmobile() const;
173
174 MCAPI void $handleEntityEvent(::ActorEvent id, int data);
175
176 MCAPI ::Vec3 $getHeadLookVector(float a) const;
177
178 MCAPI void $die(::ActorDamageSource const& source);
179
180 MCAPI float $getShadowRadius() const;
181
182 MCAPI bool $isInvulnerableTo(::ActorDamageSource const& source) const;
183
184 MCFOLD bool $canBePulledIntoVehicle() const;
185
186 MCAPI bool $_hurt(::ActorDamageSource const& source, float damage, bool knock, bool ignite);
187
188
189 // NOLINTEND
190
191public:
192 // vftables
193 // NOLINTBEGIN
194 MCAPI static void** $vftable();
195 // NOLINTEND
196};
Definition AABB.h:18
Definition ActorDamageSource.h:18
Definition ActorDefinitionGroup.h:35
Definition Actor.h:105
Definition BlockPos.h:19
Definition EnderCrystal.h:18
Definition EntityContext.h:16
Definition Path.h:16
Definition PathfinderNode.h:5
Definition Vec3.h:10
Definition ActorDefinitionIdentifier.h:15
Definition VariantParameterList.h:13