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 ChunkViewSource;
18class CompoundTag;
20class EnderCrystal;
21class EnderDragon;
22struct BuildMatch;
23// clang-format on
24
25class EndDragonFight {
26public:
27 // EndDragonFight inner types declare
28 // clang-format off
29 struct GateWayGenerator;
30 // clang-format on
31
32 // EndDragonFight inner types define
33 enum class GatewayTask : uchar {
34 GeneratePair = 0,
35 VerifyPair = 1,
36 NoTask = 2,
37 };
38
40 public:
41 // member variables
42 // NOLINTBEGIN
43 ::ll::TypedStorage<1, 1, bool> mPlaceNewBlocks;
44 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ChunkViewSource>> mSource;
45 ::ll::TypedStorage<4, 12, ::BlockPos> mPosition;
46 // NOLINTEND
47
48 public:
49 // member functions
50 // NOLINTBEGIN
51 MCAPI ~GateWayGenerator();
52 // NOLINTEND
53
54 public:
55 // destructor thunk
56 // NOLINTBEGIN
57 MCAPI void $dtor();
58 // NOLINTEND
59 };
60
61public:
62 // member variables
63 // NOLINTBEGIN
64 ::ll::TypedStorage<8, 8, ::BlockSource*> mRegion;
65 ::ll::TypedStorage<8, 24, ::std::vector<int>> mGateways;
66 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::BlockPatternMatcher const>> mExitPortalPattern;
67 ::ll::TypedStorage<4, 4, int> mNumCrystalsAlive;
68 ::ll::TypedStorage<4, 4, int> mTicksSinceCrystalsScanned;
69 ::ll::TypedStorage<4, 4, int> mTicksSincePortalScanned;
70 ::ll::TypedStorage<4, 4, int> mTicksSinceLastPlayerScan;
71 ::ll::TypedStorage<1, 1, bool> mDragonKilled;
72 ::ll::TypedStorage<1, 1, bool> mPreviouslyKilled;
73 ::ll::TypedStorage<1, 1, bool> mDragonSpawned;
74 ::ll::TypedStorage<8, 8, ::ActorUniqueID> mDragonUUID;
75 ::ll::TypedStorage<4, 12, ::BlockPos> mPortalLocation;
76 ::ll::TypedStorage<4, 12, ::BlockPos const> mDragonSpawnPos;
77 ::ll::TypedStorage<4, 4, ::RespawnAnimation> mRespawnStage;
78 ::ll::TypedStorage<4, 4, int> mRespawnTime;
79 ::ll::TypedStorage<8, 24, ::std::vector<::ActorUniqueID>> mRespawnCrystals;
80 ::ll::TypedStorage<1, 1, ::EndDragonFightVersion> mFightVersion;
81 ::ll::TypedStorage<8, 32, ::EndDragonFight::GateWayGenerator> mEntryGenerator;
82 ::ll::TypedStorage<8, 32, ::EndDragonFight::GateWayGenerator> mExitGenerator;
83 ::ll::TypedStorage<1, 1, ::EndDragonFight::GatewayTask> mBuildingOrVerifyingEndGatewayPair;
84 ::ll::TypedStorage<
85 8,
86 40,
87 ::std::deque<::std::tuple<
88 ::EndDragonFight::GatewayTask,
91 mGatewayTasks;
92 // NOLINTEND
93
94public:
95 // prevent constructor by default
96 EndDragonFight();
97
98public:
99 // member functions
100 // NOLINTBEGIN
101 MCAPI explicit EndDragonFight(::BlockSource& level);
102
103 MCAPI void _assignAndExecuteNextGatewayTask();
104
105 MCAPI bool _canSpawnNewGateway(::ChunkViewSource* source, ::BlockPos const& pos) const;
106
107 MCAPI void _createNewDragon();
108
109 MCAPI bool _dragonAndPortalChunksLoaded() const;
110
111 MCAPI ::BuildMatch _findExitPortal();
112
113 MCAPI bool _hasExitPortal() const;
114
115 MCAPI void _initializeDragon(::EnderDragon& enderDragon);
116
117 MCAPI void _makeEndIslandFeature(::BlockSource& region, ::BlockPos position);
118
119 MCAPI ::ActorSoundIdentifier _makeSoundIdentifier() const;
120
121 MCAPI void _placeAndLinkNewGatewayPair();
122
123 MCAPI bool _setEndGatewayBlockActorExitPosition(
124 ::BlockSource& entrySource,
125 ::BlockSource& exitSource,
126 ::BlockPos const& endGatewayActorPos,
127 ::BlockPos const& destinationPos,
128 bool lookForGateway
129 );
130
131 MCAPI void _setEndGatewayExitPositions();
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 setDragonKilled(::EnderDragon& dragon);
166
167 MCAPI void spawnNewGatewayChunks(::BlockPos const& pos, bool placeEntryBlocks, bool placeExitBlocks);
168
169 MCAPI void tick();
170
171 MCAPI void tryRespawn();
172
173 MCAPI void verifyExitPositions(::EndGatewayBlockActor& endGatewayBlockActor);
174
175 MCAPI ~EndDragonFight();
176 // NOLINTEND
177
178public:
179 // constructor thunks
180 // NOLINTBEGIN
181 MCAPI void* $ctor(::BlockSource& level);
182 // NOLINTEND
183
184public:
185 // destructor thunk
186 // NOLINTBEGIN
187 MCAPI void $dtor();
188 // NOLINTEND
189};
Definition ActorDamageSource.h:18
Definition ActorSoundIdentifier.h:17
Definition BlockPatternMatcher.h:17
Definition BlockPos.h:21
Definition BlockSource.h:73
Definition ChunkViewSource.h:23
Definition CompoundTag.h:23
Definition EndGatewayBlockActor.h:22
Definition EnderCrystal.h:20
Definition EnderDragon.h:31
Definition BuildMatch.h:9
Definition EndDragonFight.h:39