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
12// auto generated forward declare list
13// clang-format off
15class Level;
16class Objective;
17class Scoreboard;
19struct ScoreboardId;
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 ::ScoreboardIdentityRef* tryGetScoreboardParticipantIdentityRef(
123 ::std::variant<
126 ::std::string> const& participant
127 ) const;
128
129 MCAPI ::std::optional<::ScoreboardId> tryGetScoreboardParticipantScoreboardId(
130 ::std::variant<
133 ::std::string> const& participant
134 ) const;
135 // NOLINTEND
136
137public:
138 // static functions
139 // NOLINTBEGIN
140 MCAPI static ::Scripting::ClassBinding bind();
141 // NOLINTEND
142
143public:
144 // constructor thunks
145 // NOLINTBEGIN
146 MCAPI void* $ctor(::Scoreboard& scoreboard, ::Level& level, ::Scripting::WeakLifetimeScope const& scope);
147 // NOLINTEND
148
149public:
150 // destructor thunk
151 // NOLINTBEGIN
152 MCAPI void $dtor();
153 // NOLINTEND
154
155public:
156 // vftables
157 // NOLINTBEGIN
158 MCNAPI static void** $vftable();
159 // NOLINTEND
160};
161
162} // namespace ScriptModuleMinecraft
Definition IdentityDefinition.h:10
Definition Level.h:249
Definition Objective.h:17
Definition ScoreboardIdentityRef.h:18
Definition Scoreboard.h:34
Definition ScriptActor.h:65
Definition ScriptScoreboardIdentity.h:20
Definition ScriptScoreboardListener.h:18
Definition ScriptScoreboardObjectiveDisplayOptions.h:17
Definition ScriptScoreboardObjective.h:23
Definition StrongTypedObjectHandle.h:8
Definition WeakHandleFromThis.h:8
Definition WeakLifetimeScope.h:7
Definition ScoreboardId.h:11
Definition ClassBinding.h:19