LeviLamina
Loading...
Searching...
No Matches
MinecraftCommands.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/server/commands/CommandOutputType.h"
7#include "mc/server/commands/CommandPermissionLevel.h"
8#include "mc/server/commands/CurrentCmdVersion.h"
9
10// auto generated forward declare list
11// clang-format off
13class ActorFactory;
14class BaseGameVersion;
15class CameraPresets;
16class Command;
17class CommandContext;
18class CommandOrigin;
19class CommandOutput;
21class CommandRegistry;
23class Experiments;
24class HashedString;
25class ItemRegistryRef;
26class Level;
27class Minecraft;
28class Recipes;
29struct MCRESULT;
30namespace br::worldgen { class StructureRegistry; }
31// clang-format on
32
34public:
35 // member variables
36 // NOLINTBEGIN
37 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::CommandOutputSender>> mOutputSender;
38 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::CommandRegistry>> mRegistry;
39 ::ll::TypedStorage<1, 1, ::CommandPermissionLevel> mOpPermissionLevel;
40 ::ll::TypedStorage<8, 8, ::Minecraft&> mMinecraft;
41 ::ll::TypedStorage<8, 64, ::std::function<bool()>> mChatPermissionsCallback;
42 ::ll::TypedStorage<8, 64, ::std::unordered_map<::HashedString, ::std::unique_ptr<::Command>>> mCompiledCommandMap;
43 ::ll::TypedStorage<8, 24, ::std::vector<::std::unique_ptr<::DeferredCommandBase>>> mDeferredCommands;
44 ::ll::TypedStorage<8, 8, uint64> mDeferredScriptCommandCount;
45 // NOLINTEND
46
47public:
48 // virtual functions
49 // NOLINTBEGIN
50 // vIndex: 0
51 virtual ~MinecraftCommands();
52 // NOLINTEND
53
54public:
55 // member functions
56 // NOLINTBEGIN
57 MCAPI explicit MinecraftCommands(::Minecraft& minecraft);
58
59 MCAPI ::Command* compileCommand(
60 ::HashedString const& commandStr,
61 ::CommandOrigin& origin,
62 ::CurrentCmdVersion commandVersion,
63 ::std::function<void(::std::string const&)> onParserError
64 );
65
66 MCAPI void enqueueDeferredCommand(
67 ::std::unique_ptr<::CommandContext> context,
68 bool isRequest,
69 bool callback,
70 ::std::function<void(::MCRESULT)> suppressOutput
71 );
72
73 MCAPI ::MCRESULT executeCommand(::CommandContext& context, bool suppressOutput) const;
74
75 MCAPI void handleOutput(::CommandOrigin const& origin, ::CommandOutput const& output) const;
76
77 MCAPI void initCoreEnums(
78 ::ItemRegistryRef itemRegistry,
79 ::Level const& level,
80 ::ActorFactory const& actorFactory,
81 ::Experiments const& experiments,
82 ::BaseGameVersion const& worldBaseGameVersion
83 );
84
85 MCAPI void initCoreEnumsServer(
86 ::ActorDefinitionGroup const& actorDefinitionGroup,
87 ::CameraPresets const& cameraPresets,
88 ::Recipes const& recipes
89 );
90
91 MCAPI ::MCRESULT requestCommandExecution(::CommandContext& context, bool suppressOutput);
92 // NOLINTEND
93
94public:
95 // static functions
96 // NOLINTBEGIN
97 MCAPI static ::CommandOutputType getOutputType(::CommandOrigin const& origin);
98
99 MCAPI static void initBlockEnum(::CommandRegistry& registry, ::BaseGameVersion const& worldBaseGameVersion);
100
101 MCAPI static void
102 initEntityEnum(::CommandRegistry& registry, ::ActorFactory const& actorFactory, ::Experiments const& experiments);
103
104 MCAPI static void initEntityPropertyEnum(::CommandRegistry& registry, ::Level const& level);
105
106 MCAPI static void initItemEnum(
107 ::ItemRegistryRef itemRegistry,
108 ::CommandRegistry& registry,
109 ::BaseGameVersion const& worldBaseGameVersion
110 );
111
112 MCAPI static void initItemTagEnum(::ItemRegistryRef itemRegistry, ::CommandRegistry& registry);
113
114 MCAPI static void initStructureFeatureEnum(
115 ::CommandRegistry& registry,
116 ::Experiments const& structureRegistry,
117 ::br::worldgen::StructureRegistry const& experiments
118 );
119
120 MCAPI static void initUnlockableRecipesEnum(::CommandRegistry& registry, ::Recipes const& recipes);
121
122 MCAPI static void registerSharedClientServerEnums(::CommandRegistry& registry);
123 // NOLINTEND
124
125public:
126 // constructor thunks
127 // NOLINTBEGIN
128 MCAPI void* $ctor(::Minecraft& minecraft);
129 // NOLINTEND
130
131public:
132 // destructor thunk
133 // NOLINTBEGIN
134 MCAPI void $dtor();
135 // NOLINTEND
136
137public:
138 // vftables
139 // NOLINTBEGIN
140 MCAPI static void** $vftable();
141 // NOLINTEND
142};
Definition ActorDefinitionGroup.h:27
Definition ActorFactory.h:32
Definition BaseGameVersion.h:13
Definition CameraPresets.h:18
Definition CommandContext.h:10
Definition CommandOrigin.h:32
Definition CommandOutputSender.h:15
Definition CommandOutput.h:19
Definition CommandRegistry.h:44
Definition Command.h:17
Definition DeferredCommandBase.h:10
Definition Experiments.h:14
Definition HashedString.h:5
Definition ItemRegistryRef.h:29
Definition Level.h:234
Definition MinecraftCommands.h:33
Definition Minecraft.h:53
Definition Recipes.h:36
Definition StructureRegistry.h:12
Definition MCRESULT.h:8
Definition context.h:5