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
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
52 // NOLINTEND
53
54 public:
55 // destructor thunk
56 // NOLINTBEGIN
57 MCNAPI 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 bool _areaIsLoaded(::ChunkPos const& center, ::ChunkViewSource& source, int radius) const;
104
105 MCAPI bool _canSpawnNewGateway(::ChunkViewSource* source, ::BlockPos const& pos) const;
106
107 MCAPI void _createNewDragon();
108
109 MCAPI ::BuildMatch _findExitPortal();
110
111 MCAPI void _initializeDragon(::EnderDragon& enderDragon);
112
113 MCAPI void _makeEndIslandFeature(::BlockSource& region, ::BlockPos position);
114
115 MCAPI ::ActorSoundIdentifier _makeSoundIdentifier() const;
116
117 MCAPI void _placeAndLinkNewGatewayPair();
118
119 MCAPI bool _setEndGatewayBlockActorExitPosition(
120 ::BlockSource& entrySource,
121 ::BlockSource& exitSource,
122 ::BlockPos const& endGatewayActorPos,
123 ::BlockPos const& destinationPos,
124 bool lookForGateway
125 );
126
127 MCAPI void _setRespawnStage(::RespawnAnimation stage);
128
129 MCAPI void _spawnExitPortal(bool activated);
130
131 MCAPI void _spawnNewGatewayChunksTask(
132 ::std::tuple<
133 ::EndDragonFight::GatewayTask,
136 );
137
138 MCAPI void _spawnNewGatewayPair();
139
140 MCAPI void _tickRespawnAnimation(::std::vector<::ActorUniqueID> const& crystalIDs, int time);
141
142 MCAPI void _updateCrystalCount();
143
144 MCAPI void _verifyExitPositionsTask(
145 ::std::tuple<
146 ::EndDragonFight::GatewayTask,
149 );
150
151 MCAPI void loadData(::CompoundTag const& tag);
152
153 MCAPI void onCrystalDestroyed(::EnderCrystal const& crystal, ::ActorDamageSource const& source);
154
155 MCAPI void resetSpikeCrystals();
156
157 MCAPI void saveData(::CompoundTag& tag);
158
159 MCAPI void spawnNewGatewayChunks(::BlockPos const& pos, bool placeEntryBlocks, bool placeExitBlocks);
160
161 MCAPI void tick();
162
163 MCAPI void tryRespawn();
164
165 MCAPI ~EndDragonFight();
166 // NOLINTEND
167
168public:
169 // static variables
170 // NOLINTBEGIN
171 MCAPI static ::BlockPos const& DEFAULT_PORTAL_LOCATION();
172 // NOLINTEND
173
174public:
175 // constructor thunks
176 // NOLINTBEGIN
177 MCAPI void* $ctor(::BlockSource& level);
178 // NOLINTEND
179
180public:
181 // destructor thunk
182 // NOLINTBEGIN
183 MCAPI void $dtor();
184 // NOLINTEND
185};
Definition ActorDamageSource.h:18
Definition ActorSoundIdentifier.h:17
Definition BlockPatternMatcher.h:17
Definition BlockPos.h:19
Definition BlockSource.h:68
Definition ChunkPos.h:11
Definition ChunkViewSource.h:22
Definition CompoundTag.h:23
Definition EnderCrystal.h:18
Definition EnderDragon.h:29
Definition BuildMatch.h:9
Definition EndDragonFight.h:39