LeviLamina
Loading...
Searching...
No Matches
EndDragonFight.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/legacy/ActorUniqueID.h"
7#include "mc/world/level/BlockPos.h"
8#include "mc/world/level/dimension/end/EndDragonFightVersion.h"
9#include "mc/world/level/dimension/end/RespawnAnimation.h"
10
11// auto generated forward declare list
12// clang-format off
16class BlockSource;
17class ChunkPos;
18class ChunkViewSource;
19class CompoundTag;
20class EnderCrystal;
21class EnderDragon;
22struct BuildMatch;
23// clang-format on
24
26public:
27 // EndDragonFight inner types declare
28 // clang-format off
29 struct GateWayGenerator;
30 // clang-format on
31
32 // EndDragonFight inner types define
34 public:
35 // member variables
36 // NOLINTBEGIN
40 // NOLINTEND
41
42 public:
43 // prevent constructor by default
44 GateWayGenerator& operator=(GateWayGenerator const&);
47
48 public:
49 // member functions
50 // NOLINTBEGIN
52 // NOLINTEND
53
54 public:
55 // destructor thunk
56 // NOLINTBEGIN
57 MCNAPI void $dtor();
58 // NOLINTEND
59 };
60
61 enum class GatewayTask : uchar {
62 GeneratePair = 0,
63 VerifyPair = 1,
64 NoTask = 2,
65 };
66
67public:
68 // member variables
69 // NOLINTBEGIN
70 ::ll::TypedStorage<8, 8, ::BlockSource*> mRegion;
71 ::ll::TypedStorage<8, 24, ::std::vector<int>> mGateways;
72 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::BlockPatternBuilder>> mExitPortalPattern;
73 ::ll::TypedStorage<4, 4, int> mNumCrystalsAlive;
74 ::ll::TypedStorage<4, 4, int> mTicksSinceCrystalsScanned;
75 ::ll::TypedStorage<4, 4, int> mTicksSincePortalScanned;
76 ::ll::TypedStorage<4, 4, int> mTicksSinceLastPlayerScan;
77 ::ll::TypedStorage<1, 1, bool> mDragonKilled;
78 ::ll::TypedStorage<1, 1, bool> mPreviouslyKilled;
79 ::ll::TypedStorage<1, 1, bool> mDragonSpawned;
80 ::ll::TypedStorage<8, 8, ::ActorUniqueID> mDragonUUID;
81 ::ll::TypedStorage<4, 12, ::BlockPos> mPortalLocation;
82 ::ll::TypedStorage<4, 12, ::BlockPos const> mDragonSpawnPos;
83 ::ll::TypedStorage<4, 4, ::RespawnAnimation> mRespawnStage;
84 ::ll::TypedStorage<4, 4, int> mRespawnTime;
85 ::ll::TypedStorage<8, 24, ::std::vector<::ActorUniqueID>> mRespawnCrystals;
86 ::ll::TypedStorage<1, 1, ::EndDragonFightVersion> mFightVersion;
87 ::ll::TypedStorage<8, 32, ::EndDragonFight::GateWayGenerator> mEntryGenerator;
88 ::ll::TypedStorage<8, 32, ::EndDragonFight::GateWayGenerator> mExitGenerator;
89 ::ll::TypedStorage<1, 1, ::EndDragonFight::GatewayTask> mBuildingOrVerifyingEndGatewayPair;
90 ::ll::TypedStorage<
91 8,
92 40,
93 ::std::deque<::std::tuple<
94 ::EndDragonFight::GatewayTask,
97 mGatewayTasks;
98 // NOLINTEND
99
100public:
101 // prevent constructor by default
103
104public:
105 // member functions
106 // NOLINTBEGIN
107 MCAPI explicit EndDragonFight(::BlockSource& level);
108
109 MCAPI bool _areaIsLoaded(::ChunkPos const& center, ::ChunkViewSource& source, int radius) const;
110
111 MCAPI bool _canSpawnNewGateway(::ChunkViewSource* source, ::BlockPos const& pos) const;
112
113 MCAPI void _createNewDragon();
114
115 MCAPI ::BuildMatch _findExitPortal();
116
117 MCAPI void _initializeDragon(::EnderDragon& enderDragon);
118
119 MCAPI void _makeEndIslandFeature(::BlockSource& region, ::BlockPos position);
120
121 MCAPI ::ActorSoundIdentifier _makeSoundIdentifier() const;
122
123 MCAPI void _placeAndLinkNewGatewayPair();
124
125 MCAPI bool _setEndGatewayBlockActorExitPosition(
126 ::BlockSource& entrySource,
127 ::BlockSource& exitSource,
128 ::BlockPos const& endGatewayActorPos,
129 ::BlockPos const& destinationPos,
130 bool lookForGateway
131 );
132
133 MCAPI void _setRespawnStage(::RespawnAnimation stage);
134
135 MCAPI void _spawnExitPortal(bool activated);
136
137 MCAPI void _spawnNewGatewayChunksTask(
138 ::std::tuple<
139 ::EndDragonFight::GatewayTask,
142 );
143
144 MCAPI void _spawnNewGatewayPair();
145
146 MCAPI void _tickRespawnAnimation(::std::vector<::ActorUniqueID> const& crystalIDs, int time);
147
148 MCAPI void _updateCrystalCount();
149
150 MCAPI void _verifyExitPositionsTask(
151 ::std::tuple<
152 ::EndDragonFight::GatewayTask,
155 );
156
157 MCAPI void loadData(::CompoundTag const& tag);
158
159 MCAPI void onCrystalDestroyed(::EnderCrystal const& crystal, ::ActorDamageSource const& source);
160
161 MCAPI void resetSpikeCrystals();
162
163 MCAPI void saveData(::CompoundTag& tag);
164
165 MCAPI void spawnNewGatewayChunks(::BlockPos const& pos, bool placeEntryBlocks, bool placeExitBlocks);
166
167 MCAPI void tick();
168
169 MCAPI void tryRespawn();
170
171 MCAPI ~EndDragonFight();
172 // NOLINTEND
173
174public:
175 // static variables
176 // NOLINTBEGIN
177 MCAPI static ::BlockPos const& DEFAULT_PORTAL_LOCATION();
178 // NOLINTEND
179
180public:
181 // constructor thunks
182 // NOLINTBEGIN
183 MCAPI void* $ctor(::BlockSource& level);
184 // NOLINTEND
185
186public:
187 // destructor thunk
188 // NOLINTBEGIN
189 MCAPI void $dtor();
190 // NOLINTEND
191};
Definition ActorDamageSource.h:18
Definition ActorSoundIdentifier.h:16
Definition BlockPatternBuilder.h:13
Definition BlockPos.h:18
Definition BlockSource.h:67
Definition ChunkPos.h:11
Definition ChunkViewSource.h:22
Definition CompoundTag.h:13
Definition EndDragonFight.h:25
Definition EnderCrystal.h:18
Definition EnderDragon.h:27
Definition BuildMatch.h:5
Definition EndDragonFight.h:33
Definition Alias.h:14