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