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;
27struct HurtParameters;
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*/ = default;
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, ::HurtParameters const& hurtParameters) /*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 bool _checkWalls(::AABB bb);
107
108 MCAPI ::ActorHurtResult _hurt(::AABB* part, ::ActorDamageSource const& source, float damage);
109
110 MCAPI void _hurtEntities(::gsl::span<::gsl::not_null<::Actor*>> actors) const;
111
112 MCAPI void _knockBack(::gsl::span<::gsl::not_null<::Actor*>> actors) const;
113
114 MCAPI ::std::unique_ptr<::Path>
115 _reconstructPath(::PathfinderNode& from, ::PathfinderNode& to, ::PathCompletionType const completionType);
116
117 MCAPI int findClosestNode();
118
119 MCAPI ::std::unique_ptr<::Path> findPath(int startIndex, int endIndex, ::PathfinderNode* finalNode);
120
121 MCAPI ::std::vector<float> const getLatencyPos(int step, float a) const;
122
123 MCAPI void onCrystalDestroyed(::EnderCrystal const& crystal, ::BlockPos pos, ::ActorDamageSource const& source);
124
125 MCAPI void postAiStep();
126
127 MCAPI void setDragonKilledCallback(::std::function<void(::EnderDragon&)> onKilled);
128 // NOLINTEND
129
130public:
131 // constructor thunks
132 // NOLINTBEGIN
133 MCAPI void* $ctor(
134 ::ActorDefinitionGroup* definitions,
135 ::ActorDefinitionIdentifier const& definitionName,
136 ::EntityContext& entityContext
137 );
138 // NOLINTEND
139
140public:
141 // virtual function thunks
142 // NOLINTBEGIN
143 MCAPI void $reloadHardcoded(::ActorInitializationMethod method, ::VariantParameterList const& params);
144
145 MCAPI void $remove();
146
147 MCAPI void $setSitting(bool value);
148
149 MCFOLD bool $canBeAffected(uint id) const;
150
151 MCAPI bool $isImmobile() const;
152
153 MCAPI void $handleEntityEvent(::ActorEvent id, int data);
154
155 MCAPI ::Vec3 $getHeadLookVector(float a) const;
156
157 MCAPI void $die(::ActorDamageSource const& source);
158
159 MCAPI float $getShadowRadius() const;
160
161 MCAPI bool $isInvulnerableTo(::ActorDamageSource const& source) const;
162
163 MCFOLD bool $canBePulledIntoVehicle() const;
164
165 MCAPI ::ActorHurtResult
166 $_hurt(::ActorDamageSource const& source, float damage, ::HurtParameters const& hurtParameters);
167
168
169 // NOLINTEND
170};
Definition AABB.h:18
Definition ActorDamageSource.h:18
Definition ActorDefinitionGroup.h:26
Definition ActorHurtResult.h:5
Definition Actor.h:113
Definition BlockPos.h:17
Definition EnderCrystal.h:20
Definition EntityContext.h:15
Definition Path.h:16
Definition PathfinderNode.h:5
Definition ActorDefinitionIdentifier.h:15
Definition HurtParameters.h:8
Definition VariantParameterList.h:14