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;
19class EnderCrystal;
20class EnderDragon;
21// clang-format on
22
24public:
25 // EndDragonFight inner types declare
26 // clang-format off
27 struct GateWayGenerator;
28 // clang-format on
29
30 // EndDragonFight inner types define
31 enum class GatewayTask : uchar {
32 GeneratePair = 0,
33 VerifyPair = 1,
34 NoTask = 2,
35 };
36
38 public:
39 // member variables
40 // NOLINTBEGIN
41 ::ll::TypedStorage<1, 1, bool> mPlaceNewBlocks;
42 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ChunkViewSource>> mSource;
43 ::ll::TypedStorage<4, 12, ::BlockPos> mPosition;
44 // NOLINTEND
45
46 public:
47 // member functions
48 // NOLINTBEGIN
49 MCAPI ~GateWayGenerator();
50 // NOLINTEND
51
52 public:
53 // destructor thunk
54 // NOLINTBEGIN
55 MCAPI void $dtor();
56 // NOLINTEND
57 };
58
59public:
60 // member variables
61 // NOLINTBEGIN
62 ::ll::TypedStorage<8, 8, ::BlockSource*> mRegion;
63 ::ll::TypedStorage<8, 24, ::std::vector<int>> mGateways;
64 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::BlockPatternMatcher const>> mExitPortalPattern;
65 ::ll::TypedStorage<4, 4, int> mNumCrystalsAlive;
66 ::ll::TypedStorage<4, 4, int> mTicksSinceCrystalsScanned;
67 ::ll::TypedStorage<4, 4, int> mTicksSincePortalScanned;
68 ::ll::TypedStorage<4, 4, int> mTicksSinceLastPlayerScan;
69 ::ll::TypedStorage<1, 1, bool> mDragonKilled;
70 ::ll::TypedStorage<1, 1, bool> mPreviouslyKilled;
71 ::ll::TypedStorage<1, 1, bool> mDragonSpawned;
72 ::ll::TypedStorage<8, 8, ::ActorUniqueID> mDragonUUID;
73 ::ll::TypedStorage<4, 12, ::BlockPos> mPortalLocation;
74 ::ll::TypedStorage<4, 12, ::BlockPos const> mDragonSpawnPos;
75 ::ll::TypedStorage<4, 4, ::RespawnAnimation> mRespawnStage;
76 ::ll::TypedStorage<4, 4, int> mRespawnTime;
77 ::ll::TypedStorage<8, 24, ::std::vector<::ActorUniqueID>> mRespawnCrystals;
78 ::ll::TypedStorage<1, 1, ::EndDragonFightVersion> mFightVersion;
79 ::ll::TypedStorage<8, 32, ::EndDragonFight::GateWayGenerator> mEntryGenerator;
80 ::ll::TypedStorage<8, 32, ::EndDragonFight::GateWayGenerator> mExitGenerator;
81 ::ll::TypedStorage<1, 1, ::EndDragonFight::GatewayTask> mBuildingOrVerifyingEndGatewayPair;
82 ::ll::TypedStorage<
83 8,
84 40,
85 ::std::deque<::std::tuple<
86 ::EndDragonFight::GatewayTask,
89 mGatewayTasks;
90 // NOLINTEND
91
92public:
93 // member functions
94 // NOLINTBEGIN
95 MCAPI void _createNewDragon();
96
97 MCAPI void _initializeDragon(::EnderDragon& enderDragon);
98
99 MCAPI void _makeEndIslandFeature(::BlockSource& region, ::BlockPos const position);
100
101 MCAPI ::ActorSoundIdentifier _makeSoundIdentifier() const;
102
103 MCAPI void _spawnExitPortal(bool activated);
104
105 MCAPI void _spawnNewGatewayChunksTask(
106 ::std::tuple<
107 ::EndDragonFight::GatewayTask,
110 );
111
112 MCAPI void _updateCrystalCount();
113
114 MCAPI void _verifyExitPositionsTask(
115 ::std::tuple<
116 ::EndDragonFight::GatewayTask,
119 );
120
121 MCAPI void onCrystalDestroyed(::EnderCrystal const& crystal, ::ActorDamageSource const& source);
122
123 MCAPI void resetSpikeCrystals();
124
125 MCAPI void spawnNewGatewayChunks(::BlockPos const& pos, bool placeEntryBlocks, bool placeExitBlocks);
126
127 MCAPI void tryRespawn();
128
129 MCAPI void verifyExitPositions(::EndGatewayBlockActor& endGatewayBlockActor);
130 // NOLINTEND
131
132public:
133 // static functions
134 // NOLINTBEGIN
135 MCAPI static bool _canSpawnNewGateway(::ChunkViewSource* source, ::BlockPos const& pos);
136
137 MCAPI static bool _setEndGatewayBlockActorExitPosition(
138 ::BlockSource& entrySource,
139 ::BlockSource& exitSource,
140 ::BlockPos const& endGatewayActorPos,
141 ::BlockPos const& destinationPos,
142 bool lookForGateway
143 );
144 // NOLINTEND
145};
Definition ActorDamageSource.h:18
Definition ActorSoundIdentifier.h:17
Definition BlockPatternMatcher.h:17
Definition BlockPos.h:17
Definition BlockSource.h:71
Definition ChunkViewSource.h:22
Definition EndDragonFight.h:23
Definition EndGatewayBlockActor.h:21
Definition EnderCrystal.h:20
Definition EnderDragon.h:31
Definition EndDragonFight.h:37