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