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_311437_, List<MacroFunction.Entry<T>> p_310862_, List<String> p_310686_) -
Method Summary
Modifier and TypeMethodDescriptionid()
instantiate
(CompoundTag p_309697_, com.mojang.brigadier.CommandDispatcher<T> p_309980_, T p_312968_) private static void
lookupValues
(List<String> p_313206_, it.unimi.dsi.fastutil.ints.IntList p_310595_, List<String> p_310258_) private static String
private InstantiatedFunction<T>
substituteAndParse
(List<String> p_312865_, List<String> p_312778_, com.mojang.brigadier.CommandDispatcher<T> p_311234_, T p_311575_)
-
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_311437_, List<MacroFunction.Entry<T>> p_310862_, List<String> p_310686_)
-
-
Method Details
-
id
- Specified by:
id
in interfaceCommandFunction<T extends ExecutionCommandSource<T>>
-
instantiate
public InstantiatedFunction<T> instantiate(@Nullable CompoundTag p_309697_, com.mojang.brigadier.CommandDispatcher<T> p_309980_, T p_312968_) throws FunctionInstantiationException - Specified by:
instantiate
in interfaceCommandFunction<T extends ExecutionCommandSource<T>>
- Throws:
FunctionInstantiationException
-
stringify
-
lookupValues
-
substituteAndParse
private InstantiatedFunction<T> substituteAndParse(List<String> p_312865_, List<String> p_312778_, com.mojang.brigadier.CommandDispatcher<T> p_311234_, T p_311575_) throws FunctionInstantiationException - Throws:
FunctionInstantiationException
-