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