Package net.minecraft.server.function
Class CommandFunction
java.lang.Object
net.minecraft.server.function.CommandFunction
- Direct Known Subclasses:
CommandFunction.Macro
- Mappings:
Namespace Name official dp
intermediary net/minecraft/class_2158
named net/minecraft/server/function/CommandFunction
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
A standard element of a command function.static interface
static class
A synthetic element to be stored in aCommandFunctionManager.Entry
.static class
A lazy reference to another command function that may or may not exist.private static class
static class
-
Field Summary
Modifier and TypeFieldDescriptionprivate final CommandFunction.Element[]
(package private) final Identifier
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate static boolean
continuesToNextLine
(CharSequence string) static CommandFunction
create
(Identifier id, com.mojang.brigadier.CommandDispatcher<ServerCommandSource> dispatcher, ServerCommandSource source, List<String> lines) Parses a function in the context ofsource
.getId()
private static boolean
static CommandFunction.MacroElement
parseMacro
(String macro, int line) withMacroReplaced
(@Nullable NbtCompound arguments, com.mojang.brigadier.CommandDispatcher<ServerCommandSource> dispatcher, ServerCommandSource source)
-
Field Details
-
elements
- Mappings:
Namespace Name Mixin selector official a
Ldp;a:[Ldp$d;
intermediary field_9805
Lnet/minecraft/class_2158;field_9805:[Lnet/minecraft/class_2158$class_2161;
named elements
Lnet/minecraft/server/function/CommandFunction;elements:[Lnet/minecraft/server/function/CommandFunction$Element;
-
id
- Mappings:
Namespace Name Mixin selector official b
Ldp;b:Laew;
intermediary field_9806
Lnet/minecraft/class_2158;field_9806:Lnet/minecraft/class_2960;
named id
Lnet/minecraft/server/function/CommandFunction;id:Lnet/minecraft/util/Identifier;
-
-
Constructor Details
-
CommandFunction
- Mappings:
Namespace Name Mixin selector official <init>
Ldp;<init>(Laew;[Ldp$d;)V
intermediary <init>
Lnet/minecraft/class_2158;<init>(Lnet/minecraft/class_2960;[Lnet/minecraft/class_2158$class_2161;)V
named <init>
Lnet/minecraft/server/function/CommandFunction;<init>(Lnet/minecraft/util/Identifier;[Lnet/minecraft/server/function/CommandFunction$Element;)V
-
-
Method Details
-
getId
- Mappings:
Namespace Name Mixin selector official a
Ldp;a()Laew;
intermediary method_9194
Lnet/minecraft/class_2158;method_9194()Lnet/minecraft/class_2960;
named getId
Lnet/minecraft/server/function/CommandFunction;getId()Lnet/minecraft/util/Identifier;
-
getElements
- Mappings:
Namespace Name Mixin selector official b
Ldp;b()[Ldp$d;
intermediary method_9193
Lnet/minecraft/class_2158;method_9193()[Lnet/minecraft/class_2158$class_2161;
named getElements
Lnet/minecraft/server/function/CommandFunction;getElements()[Lnet/minecraft/server/function/CommandFunction$Element;
-
withMacroReplaced
public CommandFunction withMacroReplaced(@Nullable @Nullable NbtCompound arguments, com.mojang.brigadier.CommandDispatcher<ServerCommandSource> dispatcher, ServerCommandSource source) throws MacroException - Throws:
MacroException
- Mappings:
Namespace Name Mixin selector official a
Ldp;a(Lqw;Lcom/mojang/brigadier/CommandDispatcher;Ldt;)Ldp;
intermediary method_52595
Lnet/minecraft/class_2158;method_52595(Lnet/minecraft/class_2487;Lcom/mojang/brigadier/CommandDispatcher;Lnet/minecraft/class_2168;)Lnet/minecraft/class_2158;
named withMacroReplaced
Lnet/minecraft/server/function/CommandFunction;withMacroReplaced(Lnet/minecraft/nbt/NbtCompound;Lcom/mojang/brigadier/CommandDispatcher;Lnet/minecraft/server/command/ServerCommandSource;)Lnet/minecraft/server/function/CommandFunction;
-
continuesToNextLine
- Mappings:
Namespace Name Mixin selector official a
Ldp;a(Ljava/lang/CharSequence;)Z
intermediary method_52592
Lnet/minecraft/class_2158;method_52592(Ljava/lang/CharSequence;)Z
named continuesToNextLine
Lnet/minecraft/server/function/CommandFunction;continuesToNextLine(Ljava/lang/CharSequence;)Z
-
create
public static CommandFunction create(Identifier id, com.mojang.brigadier.CommandDispatcher<ServerCommandSource> dispatcher, ServerCommandSource source, List<String> lines) Parses a function in the context ofsource
.Any syntax errors, such as improper comment lines or unknown commands, will be thrown at this point.
- Parameters:
lines
- the raw lines (including comments) read from a function file- Mappings:
Namespace Name Mixin selector official a
Ldp;a(Laew;Lcom/mojang/brigadier/CommandDispatcher;Ldt;Ljava/util/List;)Ldp;
intermediary method_9195
Lnet/minecraft/class_2158;method_9195(Lnet/minecraft/class_2960;Lcom/mojang/brigadier/CommandDispatcher;Lnet/minecraft/class_2168;Ljava/util/List;)Lnet/minecraft/class_2158;
named create
Lnet/minecraft/server/function/CommandFunction;create(Lnet/minecraft/util/Identifier;Lcom/mojang/brigadier/CommandDispatcher;Lnet/minecraft/server/command/ServerCommandSource;Ljava/util/List;)Lnet/minecraft/server/function/CommandFunction;
-
parseMacro
- Mappings:
Namespace Name Mixin selector official a
Ldp;a(Ljava/lang/String;I)Ldp$f;
intermediary method_52594
Lnet/minecraft/class_2158;method_52594(Ljava/lang/String;I)Lnet/minecraft/class_2158$class_8642;
named parseMacro
Lnet/minecraft/server/function/CommandFunction;parseMacro(Ljava/lang/String;I)Lnet/minecraft/server/function/CommandFunction$MacroElement;
-
isValidMacroVariableName
- Mappings:
Namespace Name Mixin selector official a
Ldp;a(Ljava/lang/String;)Z
intermediary method_52593
Lnet/minecraft/class_2158;method_52593(Ljava/lang/String;)Z
named isValidMacroVariableName
Lnet/minecraft/server/function/CommandFunction;isValidMacroVariableName(Ljava/lang/String;)Z
-