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