LeviLamina
Loading...
Searching...
No Matches
ServerScoreboard.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/utility/NonOwnerPointer.h"
7#include "mc/deps/core/utility/pub_sub/Subscription.h"
8#include "mc/world/scores/ObjectiveSortOrder.h"
9#include "mc/world/scores/Scoreboard.h"
10#include "mc/world/scores/ScoreboardId.h"
11
12// auto generated forward declare list
13// clang-format off
14class Actor;
15class BasicTimer;
17class CompoundTag;
19class EntityContext;
23class LevelStorage;
24class Objective;
25class PacketSender;
26class Player;
29struct ScorePacketInfo;
30// clang-format on
31
33public:
34 // ServerScoreboard inner types declare
35 // clang-format off
36 struct unit_test_ctor_t;
37 // clang-format on
38
39 // ServerScoreboard inner types define
41
42public:
43 // member variables
44 // NOLINTBEGIN
45 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::BasicTimer>> mSaveTimer;
46 ::ll::TypedStorage<8, 8, ::LevelStorage*> mLevelStorage;
47 ::ll::TypedStorage<1, 1, bool> mIsDirty;
48 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::GameplayUserManager> const> mGameplayUserManager;
49 ::ll::TypedStorage<8, 24, ::std::vector<::Objective const*>> mTrackedObjectives;
50 ::ll::TypedStorage<8, 8, ::PacketSender*> mPacketSender;
51 ::ll::TypedStorage<8, 16, ::ScoreboardId> mLastUniqueSBID;
52 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnSaveSubscription;
53 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnLevelStorageManagerStartLeaveGameSubscription;
54 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnRemoveActorEntityReferencesSubscription;
55 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnGameplayUserRemovedSubscription;
56 // NOLINTEND
57
58public:
59 // prevent constructor by default
61
62public:
63 // virtual functions
64 // NOLINTBEGIN
65 // vIndex: 0
66 virtual ~ServerScoreboard() /*override*/;
67
68 // vIndex: 6
69 virtual void onObjectiveAdded(::Objective const& objective) /*override*/;
70
71 // vIndex: 7
72 virtual void onObjectiveRemoved(::Objective& objective) /*override*/;
73
74 // vIndex: 8
75 virtual void onScoreChanged(::ScoreboardId const& id, ::Objective const& obj) /*override*/;
76
77 // vIndex: 9
78 virtual void onPlayerScoreRemoved(::ScoreboardId const& id, ::Objective const& objective) /*override*/;
79
80 // vIndex: 13
81 virtual void setPacketSender(::PacketSender* sender) /*override*/;
82
83 // vIndex: 1
84 virtual ::DisplayObjective const* setDisplayObjective(
85 ::std::string const& displaySlotName,
86 ::Objective const& objective,
87 ::ObjectiveSortOrder const order
88 ) /*override*/;
89
90 // vIndex: 2
91 virtual ::Objective* clearDisplayObjective(::std::string const& displaySlotName) /*override*/;
92
93 // vIndex: 10
94 virtual void onPlayerJoined(::Player const& player) /*override*/;
95
96 // vIndex: 11
97 virtual void onPlayerIdentityUpdated(::PlayerScoreboardId const& playerId) /*override*/;
98
99 // vIndex: 12
100 virtual void tick() /*override*/;
101
102 // vIndex: 5
103 virtual ::ScoreboardId const& createScoreboardId(::Player const& player) /*override*/;
104
105 // vIndex: 4
106 virtual ::ScoreboardId const& createScoreboardId(::Actor const& entity) /*override*/;
107
108 // vIndex: 3
109 virtual ::ScoreboardId const& createScoreboardId(::std::string const& fakePlayer) /*override*/;
110
111 // vIndex: 14
112 virtual void writeToLevelStorage() /*override*/;
113
114 // vIndex: 15
115 virtual bool isClientSide() const /*override*/;
116 // NOLINTEND
117
118public:
119 // member functions
120 // NOLINTBEGIN
121 MCAPI ServerScoreboard(
122 ::CommandSoftEnumRegistry registry,
123 ::LevelStorage* levelStorage,
124 ::Bedrock::NotNullNonOwnerPtr<::GameplayUserManager> gameplayUserManager
125 );
126
127 MCAPI void
128 _clearAllScoreTagsForObjective(::std::string const& displaySlotName, ::DisplayObjective const& displayObjective);
129
130 MCAPI void _clearScoreTag(::ScoreboardId const& scoreboardId);
131
132 MCAPI void _onGameplayUserRemoved(::EntityContext& entity);
133
134 MCAPI void _onRemoveActorEntityReferences(::Actor& actor);
135
136 MCAPI void _onSaveEvent(::LevelStorage&);
137
138 MCAPI ::ScorePacketInfo _unpackIdentityDefToScorePacket(
139 ::ScoreboardIdentityRef const& identityDef,
140 ::std::string const& objName,
141 int score
142 );
143
144 MCAPI void
145 _updateAllScoreTagsForObjective(::std::string const& displaySlotName, ::DisplayObjective const& displayObjective);
146
147 MCAPI void _updateScoreTag(::ScoreboardId const& scoreboardId, bool assertOnFakePlayer);
148
149 MCAPI void deserialize(::std::unique_ptr<::CompoundTag> root);
150
151 MCAPI void
152 initializeWithLevelStorageManagerConnector(::ILevelStorageManagerConnector& levelStorageManagerConnector);
153
154 MCAPI void intializeWithActorManager(::IActorManagerConnector& actorManagerConnector);
155
156 MCAPI ::std::unique_ptr<::CompoundTag> serialize() const;
157 // NOLINTEND
158
159public:
160 // constructor thunks
161 // NOLINTBEGIN
162 MCAPI void* $ctor(
163 ::CommandSoftEnumRegistry registry,
164 ::LevelStorage* levelStorage,
165 ::Bedrock::NotNullNonOwnerPtr<::GameplayUserManager> gameplayUserManager
166 );
167 // NOLINTEND
168
169public:
170 // destructor thunk
171 // NOLINTBEGIN
172 MCAPI void $dtor();
173 // NOLINTEND
174
175public:
176 // virtual function thunks
177 // NOLINTBEGIN
178 MCAPI void $onObjectiveAdded(::Objective const& objective);
179
180 MCAPI void $onObjectiveRemoved(::Objective& objective);
181
182 MCAPI void $onScoreChanged(::ScoreboardId const& id, ::Objective const& obj);
183
184 MCAPI void $onPlayerScoreRemoved(::ScoreboardId const& id, ::Objective const& objective);
185
186 MCAPI void $setPacketSender(::PacketSender* sender);
187
188 MCAPI ::DisplayObjective const* $setDisplayObjective(
189 ::std::string const& displaySlotName,
190 ::Objective const& objective,
191 ::ObjectiveSortOrder const order
192 );
193
194 MCAPI ::Objective* $clearDisplayObjective(::std::string const& displaySlotName);
195
196 MCAPI void $onPlayerJoined(::Player const& player);
197
198 MCAPI void $onPlayerIdentityUpdated(::PlayerScoreboardId const& playerId);
199
200 MCAPI void $tick();
201
202 MCAPI ::ScoreboardId const& $createScoreboardId(::Player const& player);
203
204 MCAPI ::ScoreboardId const& $createScoreboardId(::Actor const& entity);
205
206 MCAPI ::ScoreboardId const& $createScoreboardId(::std::string const& fakePlayer);
207
208 MCAPI void $writeToLevelStorage();
209
210 MCFOLD bool $isClientSide() const;
211 // NOLINTEND
212
213public:
214 // vftables
215 // NOLINTBEGIN
216 MCNAPI static void** $vftable();
217 // NOLINTEND
218};
Definition Actor.h:102
Definition BasicTimer.h:5
Definition CommandSoftEnumRegistry.h:10
Definition CompoundTag.h:13
Definition DisplayObjective.h:14
Definition EntityContext.h:16
Definition GameplayUserManager.h:22
Definition IActorManagerConnector.h:14
Definition ILevelStorageManagerConnector.h:13
Definition LevelStorage.h:25
Definition Objective.h:17
Definition PacketSender.h:17
Definition Player.h:123
Definition ScoreboardIdentityRef.h:18
Definition Scoreboard.h:34
Definition ServerScoreboard.h:32
static MCAPI void ** $vftable()
STL namespace.
Definition PlayerScoreboardId.h:6
Definition ScorePacketInfo.h:11
Definition ScoreboardId.h:11
Definition ServerScoreboard.h:40
Definition serialize.h:11