You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Code from https://github.com/FabricMC/fabric/blob/1.17/fabric-command-api-v1/src/main/java/net/fabricmc/fabric/impl/command/client/ClientCommandInternals.java
36
-
37
-
@Environment(EnvType.CLIENT)
38
3
publicfinalclassClientCommandInternals {
39
-
//#if MC <= 11605
40
-
//$$ private static final Logger LOGGER = LogManager.getLogger();
41
-
//$$ private static final char PREFIX = '/';
42
-
//$$ private static final String API_COMMAND_NAME = "fabric-command-api-v1:client";
43
-
//$$ private static final String SHORT_API_COMMAND_NAME = "fcc";
44
-
//$$
45
-
//$$ /**
46
-
//$$ * Executes a client-sided command from a message.
47
-
//$$ *
48
-
//$$ * @param message the command message
49
-
//$$ * @return true if the message should not be sent to the server, false otherwise
50
-
//$$ */
51
-
//$$ public static boolean executeCommand(String message) {
//$$ LOGGER.warn("Ambiguity between arguments {} and {} with inputs: {}", ClientCommandManager.DISPATCHER.getPath(child), ClientCommandManager.DISPATCHER.getPath(sibling), inputs);
136
-
//$$ });
137
-
//$$ }
138
-
//$$
139
-
//$$ private static int executeRootHelp(CommandContext<FabricClientCommandSource> context) {
// Code from https://github.com/FabricMC/fabric/blob/1.17/fabric-command-api-v1/src/main/java/net/fabricmc/fabric/api/client/command/v1/ClientCommandManager.java
14
-
15
-
/**
16
-
* Manages client-sided commands and provides some related helper methods.
17
-
*
18
-
* <p>Client-sided commands are fully executed on the client,
19
-
* so players can use them in both singleplayer and multiplayer.
20
-
*
21
-
* <p>Registrations can be done in the {@link #DISPATCHER} during a {@link net.fabricmc.api.ClientModInitializer}'s
22
-
* initialization. (See example below.)
23
-
*
24
-
* <p>The commands are run on the client game thread by default.
25
-
* Avoid doing any heavy calculations here as that can freeze the game's rendering.
26
-
* For example, you can move heavy code to another thread.
27
-
*
28
-
* <p>This class also has alternatives to the server-side helper methods in
29
-
* {@link net.minecraft.commands.Commands}:
30
-
* {@link #literal(String)} and {@link #argument(String, ArgumentType)}.
31
-
*
32
-
* <p>The precedence rules of client-sided and server-sided commands with the same name
33
-
* are an implementation detail that is not guaranteed to remain the same in future versions.
34
-
* The aim is to make commands from the server take precedence over client-sided commands
0 commit comments