Package net.minecraft.server.function
Interface CommandFunction<T>
- All Known Implementing Classes:
ExpandedMacro,Macro
public interface CommandFunction<T>
- Mappings:
Namespace Name official hbintermediary net/minecraft/class_2158named net/minecraft/server/function/CommandFunction
-
Method Summary
Modifier and TypeMethodDescriptionprivate static booleancontinuesToNextLine(CharSequence string) static <T extends AbstractServerCommandSource<T>>
CommandFunction<T>create(Identifier id, com.mojang.brigadier.CommandDispatcher<T> dispatcher, T source, List<String> lines) Parses a function in the context ofsource.id()static <T extends AbstractServerCommandSource<T>>
SourcedCommandAction<T>parse(com.mojang.brigadier.CommandDispatcher<T> dispatcher, T source, com.mojang.brigadier.StringReader reader) withMacroReplaced(@Nullable NbtCompound arguments, com.mojang.brigadier.CommandDispatcher<T> dispatcher, T source)
-
Method Details
-
id
Identifier id()- Mappings:
Namespace Name Mixin selector official aLhb;a()Lahg;intermediary comp_1994Lnet/minecraft/class_2158;comp_1994()Lnet/minecraft/class_2960;named idLnet/minecraft/server/function/CommandFunction;id()Lnet/minecraft/util/Identifier;
-
withMacroReplaced
Procedure<T> withMacroReplaced(@Nullable @Nullable NbtCompound arguments, com.mojang.brigadier.CommandDispatcher<T> dispatcher, T source) throws MacroException - Throws:
MacroException- Mappings:
Namespace Name Mixin selector official aLhb;a(Lsn;Lcom/mojang/brigadier/CommandDispatcher;Ljava/lang/Object;)Lhd;intermediary method_52595Lnet/minecraft/class_2158;method_52595(Lnet/minecraft/class_2487;Lcom/mojang/brigadier/CommandDispatcher;Ljava/lang/Object;)Lnet/minecraft/class_8868;named withMacroReplacedLnet/minecraft/server/function/CommandFunction;withMacroReplaced(Lnet/minecraft/nbt/NbtCompound;Lcom/mojang/brigadier/CommandDispatcher;Ljava/lang/Object;)Lnet/minecraft/server/function/Procedure;
-
continuesToNextLine
- Mappings:
Namespace Name Mixin selector official aLhb;a(Ljava/lang/CharSequence;)Zintermediary method_52592Lnet/minecraft/class_2158;method_52592(Ljava/lang/CharSequence;)Znamed continuesToNextLineLnet/minecraft/server/function/CommandFunction;continuesToNextLine(Ljava/lang/CharSequence;)Z
-
create
static <T extends AbstractServerCommandSource<T>> CommandFunction<T> create(Identifier id, com.mojang.brigadier.CommandDispatcher<T> dispatcher, T 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 aLhb;a(Lahg;Lcom/mojang/brigadier/CommandDispatcher;Ldu;Ljava/util/List;)Lhb;intermediary method_9195Lnet/minecraft/class_2158;method_9195(Lnet/minecraft/class_2960;Lcom/mojang/brigadier/CommandDispatcher;Lnet/minecraft/class_8839;Ljava/util/List;)Lnet/minecraft/class_2158;named createLnet/minecraft/server/function/CommandFunction;create(Lnet/minecraft/util/Identifier;Lcom/mojang/brigadier/CommandDispatcher;Lnet/minecraft/server/command/AbstractServerCommandSource;Ljava/util/List;)Lnet/minecraft/server/function/CommandFunction;
-
parse
static <T extends AbstractServerCommandSource<T>> SourcedCommandAction<T> parse(com.mojang.brigadier.CommandDispatcher<T> dispatcher, T source, com.mojang.brigadier.StringReader reader) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException- Mappings:
Namespace Name Mixin selector official aLhb;a(Lcom/mojang/brigadier/CommandDispatcher;Ldu;Lcom/mojang/brigadier/StringReader;)Lgs;intermediary method_54417Lnet/minecraft/class_2158;method_54417(Lcom/mojang/brigadier/CommandDispatcher;Lnet/minecraft/class_8839;Lcom/mojang/brigadier/StringReader;)Lnet/minecraft/class_8856;named parseLnet/minecraft/server/function/CommandFunction;parse(Lcom/mojang/brigadier/CommandDispatcher;Lnet/minecraft/server/command/AbstractServerCommandSource;Lcom/mojang/brigadier/StringReader;)Lnet/minecraft/command/SourcedCommandAction;
-