LeviLamina
Loading...
Searching...
No Matches
Raid.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/math/Vec3.h"
7#include "mc/deps/shared_types/legacy/Difficulty.h"
8#include "mc/legacy/ActorUniqueID.h"
9#include "mc/world/level/Tick.h"
10
11// auto generated forward declare list
12// clang-format off
13class CompoundTag;
14// clang-format on
15
16class Raid {
17public:
18 // Raid inner types define
19 using GroupNumberType = uchar;
20
21 using RaiderCountType = uchar;
22
23 using FailureCountType = uchar;
24
25 using CallbackCallCountType = uint64;
26
27 using DurationType = int;
28
29 using ActorIDCollection = ::std::unordered_set<::ActorUniqueID>;
30
31 using PickSpawnPointCallback = ::std::function<bool(uint64, ::Vec3&)>;
32
33 using SpawnGroupCallback = ::std::function<bool(uint64, ::Vec3, uchar, ::std::unordered_set<::ActorUniqueID>&)>;
34
35 using DoesActorExistCallback = ::std::function<bool(::ActorUniqueID const&)>;
36
37 using ApplyHeroOfTheVillageCallback = ::std::function<void(::ActorUniqueID const&)>;
38
39 using ActorRemovedFromRaidCallback = ::std::function<void(::ActorUniqueID const&)>;
40
41 using IsVillageDefeatedCallback = ::std::function<bool()>;
42
43 using NotificationCallback = ::std::function<void(::Raid const&)>;
44
45 using RaiderHealthCallback = ::std::function<float(::ActorUniqueID const&)>;
46
47 enum class RaidState : int {
48 PreparingGroup = 0,
49 PickingSpawnPoint = 1,
50 SpawningGroup = 2,
51 GroupInPlay = 3,
52 AwardingRewards = 4,
53 Finished = 5,
54 Stopped = 6,
55 };
56
57 enum class RaidStatus : int {
58 Ongoing = 0,
59 Victory = 1,
60 Defeat = 2,
61 };
62
63public:
64 // member variables
65 // NOLINTBEGIN
66 ::ll::TypedStorage<4, 4, ::Raid::RaidState> mCurrentRaidState;
67 ::ll::TypedStorage<4, 4, ::Raid::RaidStatus> mRaidStatus;
68 ::ll::TypedStorage<1, 1, uchar> mCurrentGroupNumber;
69 ::ll::TypedStorage<1, 1, uchar> mNumGroupsInRaid;
70 ::ll::TypedStorage<8, 8, ::Tick> mGameTick;
71 ::ll::TypedStorage<8, 8, ::Tick> mTicksInState;
72 ::ll::TypedStorage<4, 4, int> mRaidPreparationTime;
73 ::ll::TypedStorage<4, 4, int const> mGroupCompleteDelay;
74 ::ll::TypedStorage<4, 4, int> mTicksUntilGroupComplete;
75 ::ll::TypedStorage<4, 4, int const> mLocationHelpDelay;
76 ::ll::TypedStorage<4, 4, int> mTicksUntilLocationHelp;
77 ::ll::TypedStorage<4, 4, int const> mFinishedDelay;
78 ::ll::TypedStorage<4, 12, ::Vec3> mCurrentGroupSpawnPoint;
79 ::ll::TypedStorage<8, 64, ::std::unordered_set<::ActorUniqueID>> mRaiders;
80 ::ll::TypedStorage<1, 1, uchar> mNumRaidersSpawnedInCurrentGroup;
81 ::ll::TypedStorage<4, 4, float> mCurrentGroupTotalMaxHealth;
82 ::ll::TypedStorage<1, 1, uchar const> mAllowedSpawnFailures;
83 ::ll::TypedStorage<1, 1, uchar> mSpawnFailures;
84 ::ll::TypedStorage<8, 64, ::std::unordered_set<::ActorUniqueID>> mHeroesOfTheVillage;
85 ::ll::TypedStorage<8, 64, ::std::function<bool(uint64, ::Vec3&)> const> mPickSpawnPointCallback;
86 ::ll::
87 TypedStorage<8, 64, ::std::function<bool(uint64, ::Vec3, uchar, ::std::unordered_set<::ActorUniqueID>&)> const>
88 mSpawnGroupCallback;
89 ::ll::TypedStorage<8, 64, ::std::function<bool(::ActorUniqueID const&)> const> mDoesActorExistCallback;
90 ::ll::TypedStorage<8, 64, ::std::function<bool()> const> mIsVillageDefeatedCallback;
91 ::ll::TypedStorage<8, 64, ::std::function<void(::Raid const&)>> mOnSpawnPointChosenCallback;
92 ::ll::TypedStorage<8, 64, ::std::function<void(::Raid const&)>> mOnGroupSpawnedCallback;
93 ::ll::TypedStorage<8, 64, ::std::function<void(::Raid const&)>> mOnAwardRewardsCallback;
94 ::ll::TypedStorage<8, 64, ::std::function<void(::Raid const&)>> mOnHelpLocateRaidersCallback;
95 ::ll::TypedStorage<8, 64, ::std::function<void(::Raid const&)>> mOnVillageDefeatedCallback;
96 ::ll::TypedStorage<8, 64, ::std::function<void(::ActorUniqueID const&)>> mApplyHeroOfTheVillageCallback;
97 ::ll::TypedStorage<8, 64, ::std::function<void(::ActorUniqueID const&)>> mOnActorRemovedFromRaidCallback;
98 ::ll::TypedStorage<8, 64, ::std::function<float(::ActorUniqueID const&)>> mGetRaiderHealthCallback;
99 // NOLINTEND
100
101public:
102 // prevent constructor by default
103 Raid();
104
105public:
106 // member functions
107 // NOLINTBEGIN
108 MCAPI Raid(
109 int raidPreparationTime,
110 int groupCompleteDelayInTicks,
111 int locationHelpDelayInTicks,
112 int finishedDelayInTicks,
113 ::SharedTypes::Legacy::Difficulty difficulty,
114 uchar allowedSpawnFailures,
115 ::std::function<bool(uint64, ::Vec3&)>&& pickSpawnPointCallback,
116 ::std::function<bool(uint64, ::Vec3, uchar, ::std::unordered_set<::ActorUniqueID>&)>&& spawnGroupCallback,
117 ::std::function<bool(::ActorUniqueID const&)>&& doesActorExistCallback,
118 ::std::function<bool()>&& isVillageDefeatedCallback
119 );
120
121 MCAPI float _calcBossBarUsingHealth() const;
122
123 MCAPI float _calcBossBarUsingMobs() const;
124
125 MCAPI float _getTotalRaiderHealth() const;
126
127 MCAPI void _tickGroupInPlay();
128
129 MCAPI void addAdditionalSaveData(::CompoundTag& tag) const;
130
131 MCAPI float getBossBarFilledFraction() const;
132
133 MCAPI void readAdditionalSaveData(::CompoundTag const& tag);
134
135 MCAPI void tick(::Tick tick);
136
137 MCAPI ~Raid();
138 // NOLINTEND
139
140public:
141 // static variables
142 // NOLINTBEGIN
143 MCAPI static ::Vec3 const& INVALID_SPAWN_POINT();
144 // NOLINTEND
145
146public:
147 // constructor thunks
148 // NOLINTBEGIN
149 MCAPI void* $ctor(
150 int raidPreparationTime,
151 int groupCompleteDelayInTicks,
152 int locationHelpDelayInTicks,
153 int finishedDelayInTicks,
154 ::SharedTypes::Legacy::Difficulty difficulty,
155 uchar allowedSpawnFailures,
156 ::std::function<bool(uint64, ::Vec3&)>&& pickSpawnPointCallback,
157 ::std::function<bool(uint64, ::Vec3, uchar, ::std::unordered_set<::ActorUniqueID>&)>&& spawnGroupCallback,
158 ::std::function<bool(::ActorUniqueID const&)>&& doesActorExistCallback,
159 ::std::function<bool()>&& isVillageDefeatedCallback
160 );
161 // NOLINTEND
162
163public:
164 // destructor thunk
165 // NOLINTBEGIN
166 MCAPI void $dtor();
167 // NOLINTEND
168};
Definition CompoundTag.h:13
Definition Raid.h:16
Definition Vec3.h:10
Definition ActorUniqueID.h:5
Definition Tick.h:5