38 ::ll::TypedStorage<8, 8, ::CommandSoftEnumRegistry> mRegistry;
39 ::ll::TypedStorage<8, 64, ::std::unordered_map<::std::string, ::DisplayObjective>> mDisplayObjectives;
40 ::ll::TypedStorage<8, 256, ::IdentityDictionary> mIdentityDict;
41 ::ll::TypedStorage<8, 64, ::std::unordered_map<::ScoreboardId, ::ScoreboardIdentityRef>> mIdentityRefs;
42 ::ll::TypedStorage<1, 1, bool> mShouldUpdateUI;
43 ::ll::TypedStorage<8, 64, ::std::unordered_map<::std::string, ::std::unique_ptr<::Objective>>> mObjectives;
44 ::ll::TypedStorage<8, 64, ::std::unordered_map<uint64, ::Bedrock::NonOwnerPointer<::Objective>>>
45 mObjectivesHashLookup;
46 ::ll::TypedStorage<8, 64, ::std::unordered_map<::std::string, ::std::unique_ptr<::ObjectiveCriteria>>> mCriteria;
47 ::ll::TypedStorage<8, 96, ::ScoreboardEventCoordinator> mScoreboardEventCoordinator;
48 ::ll::TypedStorage<8, 72, ::PlayerScoreboardEventListener> mPlayerListener;
56 LLAPI
int modifyPlayerScore(
57 ScoreboardOperationResult& result,
61 PlayerScoreSetFunction action
67 virtual ~Scoreboard();
69 virtual ::DisplayObjective
const* setDisplayObjective(
70 ::std::string
const& displaySlotName,
72 ::ObjectiveSortOrder
const order
75 virtual ::Objective* clearDisplayObjective(::std::string
const& displaySlotName);
77 virtual ::ScoreboardId
const& createScoreboardId(
::Player const& player);
79 virtual ::ScoreboardId
const& createScoreboardId(
::Actor const& entity);
81 virtual ::ScoreboardId
const& createScoreboardId(::std::string
const& fakePlayer);
83 virtual void onObjectiveAdded(
::Objective const& objective);
85 virtual void onObjectiveRemoved(
::Objective& objective);
91 virtual void onPlayerJoined(
::Player const& player);
99 virtual void writeToLevelStorage();
101 virtual bool isClientSide()
const;
110 addObjective(::std::string
const& name, ::std::string
const& displayName,
::ObjectiveCriteria const& criteria);
112 MCAPI
void addScoreListener(
::Player& player, ::std::string
const& objective);
114 MCAPI
int applyPlayerOperation(
115 ::ScoreboardOperationResult& result,
116 ::std::vector<::ScoreboardId>& sourceErrorIds,
119 ::std::vector<::ScoreboardId>& selector,
121 ::CommandOperator opCode
124 MCAPI_C
bool clearScoreboardIdentity(
::ScoreboardId const& scoreboardId);
126 MCAPI ::ObjectiveCriteria
const&
127 createObjectiveCriteria(::std::string
const& name,
bool readOnly, ::ObjectiveRenderType renderType);
129 MCAPI ::ObjectiveCriteria* getCriteria(::std::string
const& criteriaName)
const;
131 MCAPI ::std::vector<::PlayerScore> getDisplayInfoFiltered(::std::string
const& displaySlot)
const;
133 MCAPI_C ::std::vector<::PlayerScore> getDisplayInfoSorted(
134 ::std::string
const& displaySlot,
135 ::std::function<
void(::ObjectiveSortOrder, ::std::vector<::PlayerScore>&)> sortMethod
138 MCAPI ::DisplayObjective
const* getDisplayObjective(::std::string
const& displaySlotName)
const;
140 MCAPI ::std::vector<::std::string> getDisplayObjectiveSlotNames()
const;
142 MCAPI ::std::vector<::ScoreInfo> getIdScores(
::ScoreboardId const&
id)
const;
144 MCAPI ::Objective* getObjective(::std::string
const& name)
const;
146 MCAPI ::std::vector<::std::string> getObjectiveNames()
const;
148 MCAPI ::std::vector<::Objective const*> getObjectives()
const;
150 MCAPI ::ScoreboardId
const& getScoreboardId(
::Actor const& entity)
const;
152 MCAPI ::ScoreboardId
const& getScoreboardId(::std::string
const& name)
const;
154 MCAPI ::ScoreboardId
const& getScoreboardId(
::Player const& player)
const;
156 MCAPI ::std::vector<::ScoreboardIdentityRef> getScoreboardIdentityRefs()
const;
158 MCAPI ::std::vector<::ScoreboardId> getTrackedIds()
const;
160 MCAPI ::ScoreboardIdentityRef
const& registerScoreboardIdentity(
::CompoundTag const& loadedData);
162 MCAPI ::ScoreboardIdentityRef
const&
165 MCAPI ::ScoreboardIdentityRef
const&
166 registerScoreboardIdentity(
::ScoreboardId const& scoreboardId, ::std::string
const& name);
168 MCAPI ::ScoreboardIdentityRef
const&
171 MCAPI
bool removeObjective(
::Objective* objective);
173 MCAPI
void removeScoreListener(
::Player const& player, ::std::string
const& objective);
183 MCAPI static ::std::string
const& DEFAULT_CRITERIA();
185 MCAPI static ::std::string
const& DISPLAY_SLOT_BELOWNAME();
187 MCAPI static ::std::string
const& DISPLAY_SLOT_LIST();
189 MCAPI static ::std::string
const& DISPLAY_SLOT_SIDEBAR();
191 MCAPI
static char const*& OBJECTIVES_ENUM();
209 MCAPI ::DisplayObjective
const* $setDisplayObjective(
210 ::std::string
const& displaySlotName,
212 ::ObjectiveSortOrder
const order
215 MCAPI ::Objective* $clearDisplayObjective(::std::string
const& displaySlotName);
217 MCFOLD ::ScoreboardId
const& $createScoreboardId(
::Player const& player);
219 MCFOLD ::ScoreboardId
const& $createScoreboardId(
::Actor const& entity);
221 MCFOLD ::ScoreboardId
const& $createScoreboardId(::std::string
const& fakePlayer);
223 MCAPI
void $onObjectiveAdded(
::Objective const& objective);
225 MCAPI
void $onObjectiveRemoved(
::Objective& objective);
231 MCFOLD
void $onPlayerJoined(
::Player const& player);
239 MCFOLD
void $writeToLevelStorage();
241 MCFOLD
bool $isClientSide()
const;
249 MCAPI
static void** $vftable();