Package net.minecraft.commands.functions
Class MacroFunction<T extends ExecutionCommandSource<T>>
java.lang.Object
net.minecraft.commands.functions.MacroFunction<T>
- All Implemented Interfaces:
CommandFunction<T>
public class MacroFunction<T extends ExecutionCommandSource<T>>
extends Object
implements CommandFunction<T>
-
Nested Class Summary
Modifier and TypeClassDescription(package private) static interface
(package private) static class
MacroFunction.MacroEntry<T extends ExecutionCommandSource<T>>
(package private) static class
-
Field Summary
Modifier and TypeFieldDescriptionprivate final it.unimi.dsi.fastutil.objects.Object2ObjectLinkedOpenHashMap<List<String>,
InstantiatedFunction<T>> private static final DecimalFormat
private final List<MacroFunction.Entry<T>>
private final ResourceLocation
private static final int
-
Constructor Summary
ConstructorDescriptionMacroFunction
(ResourceLocation p_305933_, List<MacroFunction.Entry<T>> p_305814_, List<String> p_306148_) -
Method Summary
Modifier and TypeMethodDescriptionid()
instantiate
(CompoundTag p_305810_, com.mojang.brigadier.CommandDispatcher<T> p_306149_, T p_306153_) private static void
lookupValues
(List<String> p_305843_, it.unimi.dsi.fastutil.ints.IntList p_305967_, List<String> p_305797_) private static String
private InstantiatedFunction<T>
substituteAndParse
(List<String> p_306226_, List<String> p_306024_, com.mojang.brigadier.CommandDispatcher<T> p_306281_, T p_306083_)
-
Field Details
-
DECIMAL_FORMAT
-
MAX_CACHE_ENTRIES
private static final int MAX_CACHE_ENTRIES- See Also:
-
parameters
-
cache
private final it.unimi.dsi.fastutil.objects.Object2ObjectLinkedOpenHashMap<List<String>,InstantiatedFunction<T extends ExecutionCommandSource<T>>> cache -
id
-
entries
-
-
Constructor Details
-
MacroFunction
public MacroFunction(ResourceLocation p_305933_, List<MacroFunction.Entry<T>> p_305814_, List<String> p_306148_)
-
-
Method Details
-
id
- Specified by:
id
in interfaceCommandFunction<T extends ExecutionCommandSource<T>>
-
instantiate
public InstantiatedFunction<T> instantiate(@Nullable CompoundTag p_305810_, com.mojang.brigadier.CommandDispatcher<T> p_306149_, T p_306153_) throws FunctionInstantiationException - Specified by:
instantiate
in interfaceCommandFunction<T extends ExecutionCommandSource<T>>
- Throws:
FunctionInstantiationException
-
stringify
-
lookupValues
-
substituteAndParse
private InstantiatedFunction<T> substituteAndParse(List<String> p_306226_, List<String> p_306024_, com.mojang.brigadier.CommandDispatcher<T> p_306281_, T p_306083_) throws FunctionInstantiationException - Throws:
FunctionInstantiationException
-