39 ::ll::TypedStorage<8, 8, ::CommandSoftEnumRegistry> mRegistry;
40 ::ll::TypedStorage<8, 64, ::std::unordered_map<::std::string, ::DisplayObjective>> mDisplayObjectives;
41 ::ll::TypedStorage<8, 256, ::IdentityDictionary> mIdentityDict;
42 ::ll::TypedStorage<8, 64, ::std::unordered_map<::ScoreboardId, ::ScoreboardIdentityRef>> mIdentityRefs;
43 ::ll::TypedStorage<1, 1, bool> mShouldUpdateUI;
44 ::ll::TypedStorage<8, 64, ::std::unordered_map<::std::string, ::std::unique_ptr<::Objective>>> mObjectives;
45 ::ll::TypedStorage<8, 64, ::std::unordered_map<uint64, ::Bedrock::NonOwnerPointer<::Objective>>>
46 mObjectivesHashLookup;
47 ::ll::TypedStorage<8, 64, ::std::unordered_map<::std::string, ::std::unique_ptr<::ObjectiveCriteria>>> mCriteria;
48 ::ll::TypedStorage<8, 96, ::ScoreboardEventCoordinator> mScoreboardEventCoordinator;
49 ::ll::TypedStorage<8, 72, ::PlayerScoreboardEventListener> mPlayerListener;
57 LLAPI
int modifyPlayerScore(
58 ScoreboardOperationResult& result,
62 PlayerScoreSetFunction action
68 virtual ~Scoreboard();
70 virtual ::DisplayObjective
const* setDisplayObjective(
71 ::std::string
const& displaySlotName,
73 ::ObjectiveSortOrder
const order
76 virtual ::Objective* clearDisplayObjective(::std::string
const& displaySlotName);
78 virtual ::ScoreboardId
const& createScoreboardId(
::Player const& player);
80 virtual ::ScoreboardId
const& createScoreboardId(
::Actor const& entity);
82 virtual ::ScoreboardId
const& createScoreboardId(::std::string
const& name);
84 virtual void onObjectiveAdded(
::Objective const& objective);
86 virtual void onObjectiveRemoved(
::Objective& objective);
92 virtual void onPlayerJoined(
::Player const& player);
100 virtual void writeToLevelStorage();
102 virtual bool isClientSide()
const;
110 MCAPI
void _addLoadedCriteria(::std::unique_ptr<::ObjectiveCriteria> newCriteria);
112 MCAPI
void _addLoadedObjective(::std::unique_ptr<::Objective> newObjective);
114 MCAPI
void _initCoordinator();
117 addObjective(::std::string
const& name, ::std::string
const& displayName,
::ObjectiveCriteria const& criteria);
119 MCAPI
void addScoreListener(
::Player& player, ::std::string
const& objective);
121 MCAPI
int applyPlayerOperation(
122 ::ScoreboardOperationResult& result,
123 ::std::vector<::ScoreboardId>& sourceErrorIds,
126 ::std::vector<::ScoreboardId>& selector,
128 ::CommandOperator opCode
132 MCAPI
bool clearScoreboardIdentity(
::ScoreboardId const& scoreboardId);
135 MCAPI ::ObjectiveCriteria
const&
136 createObjectiveCriteria(::std::string
const& name,
bool readOnly, ::ObjectiveRenderType renderType);
140 MCAPI
void forEachObjective(::std::function<
void(
::Objective&)> callback);
142 MCAPI ::ObjectiveCriteria* getCriteria(::std::string
const& criteriaName)
const;
144 MCAPI ::std::vector<::std::string> getCriteriaNames()
const;
146 MCAPI ::ObjectiveCriteria
const& getDefaultCriteria()
const;
148 MCAPI ::std::vector<::PlayerScore> getDisplayInfoFiltered(::std::string
const& displaySlot)
const;
151 MCAPI ::std::vector<::PlayerScore> getDisplayInfoSorted(
152 ::std::string
const& displaySlot,
153 ::std::function<
void(::ObjectiveSortOrder, ::std::vector<::PlayerScore>&)> sortMethod
157 MCAPI ::DisplayObjective
const* getDisplayObjective(::std::string
const& displaySlotName)
const;
159 MCAPI ::std::vector<::std::string> getDisplayObjectiveSlotNames()
const;
161 MCAPI ::std::vector<::ScoreInfo> getIdScores(
::ScoreboardId const&
id)
const;
163 MCAPI ::Objective* getObjective(::std::string
const& name)
const;
165 MCAPI ::std::vector<::std::string> getObjectiveNames()
const;
167 MCAPI ::std::vector<::Objective const*> getObjectives()
const;
169 MCFOLD ::ScoreboardEventCoordinator& getScoreboardEventCoordinator();
171 MCAPI ::ScoreboardId
const& getScoreboardId(
::Actor const& entity)
const;
173 MCAPI ::ScoreboardId
const& getScoreboardId(
::ActorUniqueID const& entityId)
const;
175 MCAPI ::ScoreboardId
const& getScoreboardId(::std::string
const& name)
const;
177 MCAPI ::ScoreboardId
const& getScoreboardId(
::Player const& player)
const;
181 MCAPI ::ScoreboardIdentityRef* getScoreboardIdentityRef(
::ScoreboardId const& scoreboardId);
183 MCAPI ::std::vector<::ScoreboardIdentityRef> getScoreboardIdentityRefs()
const;
185 MCAPI ::std::vector<::ScoreboardId> getTrackedIds()
const;
187 MCAPI
bool hasIdentityFor(
::ScoreboardId const& scoreboardId)
const;
190 MCAPI
bool isObjectiveDisplayed(
::Objective const& objective)
const;
193 MCAPI
int modifyPlayerScore(
194 ::ScoreboardOperationResult& result,
198 ::PlayerScoreSetFunction action
202 MCAPI
void onUpdateUI();
205 MCAPI ::ScoreboardIdentityRef
const& registerScoreboardIdentity(
::CompoundTag const& loadedData);
207 MCAPI ::ScoreboardIdentityRef
const&
211 MCAPI ::ScoreboardIdentityRef
const&
212 registerScoreboardIdentity(
::ScoreboardId const& scoreboardId, ::std::string
const& name);
215 MCAPI ::ScoreboardIdentityRef
const&
218 MCAPI
bool removeObjective(
::Objective* objective);
220 MCAPI
void removeScoreListener(
::Player const& player);
222 MCAPI
void removeScoreListener(
::Player const& player, ::std::string
const& objective);
233 MCFOLD
bool shouldUpdateUI()
const;
236 MCAPI ::std::optional<::ScoreInfo> tryGetIdScore(
::ScoreboardId const&
id, uint64
const& objectiveHash)
const;
242 MCAPI static ::std::string
const& DEFAULT_CRITERIA();
244 MCAPI static ::std::string
const& DISPLAY_SLOT_BELOWNAME();
246 MCAPI static ::std::string
const& DISPLAY_SLOT_LIST();
248 MCAPI static ::std::string
const& DISPLAY_SLOT_SIDEBAR();
250 MCAPI
static char const*& OBJECTIVES_ENUM();
268 MCAPI ::DisplayObjective
const* $setDisplayObjective(
269 ::std::string
const& displaySlotName,
271 ::ObjectiveSortOrder
const order
274 MCAPI ::Objective* $clearDisplayObjective(::std::string
const& displaySlotName);
276 MCFOLD ::ScoreboardId
const& $createScoreboardId(
::Player const& player);
278 MCFOLD ::ScoreboardId
const& $createScoreboardId(
::Actor const& entity);
280 MCFOLD ::ScoreboardId
const& $createScoreboardId(::std::string
const& name);
282 MCAPI
void $onObjectiveAdded(
::Objective const& objective);
284 MCAPI
void $onObjectiveRemoved(
::Objective& objective);
290 MCFOLD
void $onPlayerJoined(
::Player const& player);
298 MCFOLD
void $writeToLevelStorage();
300 MCFOLD
bool $isClientSide()
const;
308 MCAPI
static void** $vftable();