LeviLamina
Loading...
Searching...
No Matches
ScriptScoreboard.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/scripting/lifetime_registry/StrongTypedObjectHandle.h"
7#include "mc/deps/scripting/lifetime_registry/WeakHandleFromThis.h"
8#include "mc/deps/scripting/lifetime_registry/WeakLifetimeScope.h"
9#include "mc/deps/scripting/runtime/Result_deprecated.h"
10#include "mc/scripting/modules/minecraft/scoreboard/ScriptDisplayObjectiveSlotId.h"
11#include "mc/world/scores/ScoreboardId.h"
12
13// auto generated forward declare list
14// clang-format off
16class Level;
17class Objective;
18class Scoreboard;
20namespace ScriptModuleMinecraft { class ScriptActor; }
21namespace ScriptModuleMinecraft { class ScriptScoreboardIdentity; }
22namespace ScriptModuleMinecraft { class ScriptScoreboardListener; }
23namespace ScriptModuleMinecraft { class ScriptScoreboardObjective; }
24namespace ScriptModuleMinecraft { class ScriptScoreboardObjectiveDisplayOptions; }
25namespace Scripting { struct ClassBinding; }
26// clang-format on
27
28namespace ScriptModuleMinecraft {
29
30class ScriptScoreboard : public ::Scripting::WeakHandleFromThis<::ScriptModuleMinecraft::ScriptScoreboard> {
31public:
32 // ScriptScoreboard inner types define
33 using Key = ::Scoreboard const*;
34
35public:
36 // member variables
37 // NOLINTBEGIN
38 ::ll::TypedStorage<8, 16, ::Scripting::WeakLifetimeScope> mScope;
39 ::ll::TypedStorage<8, 8, ::gsl::not_null<::Scoreboard*>> mScoreboard;
40 ::ll::TypedStorage<8, 8, ::gsl::not_null<::Level*>> mLevel;
41 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ScriptModuleMinecraft::ScriptScoreboardListener>> mScoreboardListener;
42 ::ll::TypedStorage<
43 8,
44 64,
45 ::std::unordered_map<
46 ::std::string,
48 mObjectives;
49 ::ll::TypedStorage<
50 8,
51 64,
52 ::std::unordered_map<
55 mIdentities;
56 // NOLINTEND
57
58public:
59 // prevent constructor by default
60 ScriptScoreboard();
61
62public:
63 // virtual functions
64 // NOLINTBEGIN
65 virtual ~ScriptScoreboard();
66 // NOLINTEND
67
68public:
69 // member functions
70 // NOLINTBEGIN
71 MCAPI ScriptScoreboard(::Scoreboard& scoreboard, ::Level& level, ::Scripting::WeakLifetimeScope const& scope);
72
73 MCAPI ::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptScoreboardObjective>
74 _getOrCreateScoreboardObjective(::Objective const& objective);
75
76 MCAPI ::Scripting::Result_deprecated<
78 addObjective(::std::string const& objectiveId, ::std::optional<::std::string> const& displayName);
79
80 MCAPI ::std::optional<::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptScoreboardObjective>>
81 clearObjectiveAtDisplaySlot(::ScriptModuleMinecraft::ScriptDisplayObjectiveSlotId displaySlotId);
82
83 MCAPI ::std::optional<::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptScoreboardObjective>>
84 getObjective(::std::string const& objectiveId);
85
86 MCAPI ::std::optional<::ScriptModuleMinecraft::ScriptScoreboardObjectiveDisplayOptions>
87 getObjectiveAtDisplaySlot(::ScriptModuleMinecraft::ScriptDisplayObjectiveSlotId displaySlotId);
88
89 MCAPI ::std::vector<::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptScoreboardObjective>>
90 getObjectives();
91
92 MCAPI ::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptScoreboardIdentity>
93 getOrCreateScoreboardIdentity(::IdentityDefinition const& identity);
94
95 MCAPI ::ScoreboardIdentityRef* getOrCreateScoreboardIdentityRef(
96 ::std::variant<
99 ::std::string> const& participant
100 );
101
102 MCAPI ::std::vector<::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptScoreboardIdentity>>
103 getParticipants();
104
105 MCAPI void removeIdentityById(::ScoreboardId const& id);
106
107 MCAPI ::Scripting::Result_deprecated<bool> removeObjective(
108 ::std::variant<
110 ::std::string> const& objectiveId
111 );
112
113 MCAPI void removeObjectiveByName(::std::string const& objective);
114
115 MCAPI ::Scripting::Result_deprecated<
116 ::std::optional<::Scripting::StrongTypedObjectHandle<::ScriptModuleMinecraft::ScriptScoreboardObjective>>>
117 setObjectiveAtDisplaySlot(
118 ::ScriptModuleMinecraft::ScriptDisplayObjectiveSlotId displaySlotId,
120 );
121
122 MCAPI ::std::optional<::ScoreboardId> tryGetScoreboardParticipantScoreboardId(
123 ::std::variant<
126 ::std::string> const& participant
127 ) const;
128 // NOLINTEND
129
130public:
131 // static functions
132 // NOLINTBEGIN
133 MCAPI static ::Scripting::ClassBinding bind();
134 // NOLINTEND
135
136public:
137 // constructor thunks
138 // NOLINTBEGIN
139 MCAPI void* $ctor(::Scoreboard& scoreboard, ::Level& level, ::Scripting::WeakLifetimeScope const& scope);
140 // NOLINTEND
141
142public:
143 // destructor thunk
144 // NOLINTBEGIN
145 MCAPI void $dtor();
146 // NOLINTEND
147
148public:
149 // vftables
150 // NOLINTBEGIN
151 MCNAPI static void** $vftable();
152 // NOLINTEND
153};
154
155} // namespace ScriptModuleMinecraft
Definition IdentityDefinition.h:10
Definition Level.h:255
Definition Objective.h:17
Definition ScoreboardIdentityRef.h:20
Definition Scoreboard.h:35
Definition ScriptActor.h:69
Definition ScriptScoreboardIdentity.h:20
Definition ScriptScoreboardListener.h:18
Definition ScriptScoreboardObjectiveDisplayOptions.h:17
Definition ScriptScoreboardObjective.h:22
Definition StrongTypedObjectHandle.h:8
Definition WeakHandleFromThis.h:8
Definition WeakLifetimeScope.h:14
Definition ScoreboardId.h:11
Definition ClassBinding.h:19