Class ArgumentTypeInfos
java.lang.Object
net.minecraft.commands.synchronization.ArgumentTypeInfos
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ArgumentTypeInfo
<?, ?> bootstrap
(Registry<ArgumentTypeInfo<?, ?>> p_235385_) static <A extends com.mojang.brigadier.arguments.ArgumentType<?>>
ArgumentTypeInfo<A, ?> byClass
(A p_235383_) private static <T extends com.mojang.brigadier.arguments.ArgumentType<?>>
Class<T> fixClassType
(Class<? super T> p_235396_) static boolean
isClassRecognized
(Class<?> p_235392_) private static <A extends com.mojang.brigadier.arguments.ArgumentType<?>,
T extends ArgumentTypeInfo.Template<A>>
ArgumentTypeInfo<A, T> register
(Registry<ArgumentTypeInfo<?, ?>> p_235387_, String p_235388_, Class<? extends A> p_235389_, ArgumentTypeInfo<A, T> p_235390_) static <A extends com.mojang.brigadier.arguments.ArgumentType<?>,
T extends ArgumentTypeInfo.Template<A>, I extends ArgumentTypeInfo<A, T>>
IregisterByClass
(Class<A> infoClass, I argumentTypeInfo) Forge: Use this in conjunction with aDeferredRegister#register(String, Supplier)
call to both populate theBY_CLASS
map and register the argument type info so it can be used in commands.static <A extends com.mojang.brigadier.arguments.ArgumentType<?>>
ArgumentTypeInfo.Template<A> unpack
(A p_235394_)
-
Field Details
-
BY_CLASS
-
-
Constructor Details
-
ArgumentTypeInfos
public ArgumentTypeInfos()
-
-
Method Details
-
registerByClass
public static <A extends com.mojang.brigadier.arguments.ArgumentType<?>,T extends ArgumentTypeInfo.Template<A>, I registerByClassI extends ArgumentTypeInfo<A, T>> (Class<A> infoClass, I argumentTypeInfo) Forge: Use this in conjunction with aDeferredRegister#register(String, Supplier)
call to both populate theBY_CLASS
map and register the argument type info so it can be used in commands.- Parameters:
infoClass
- the class type of the argument type infoargumentTypeInfo
- the argument type info instance- Returns:
- the provided argument type info instance for chaining
-
register
private static <A extends com.mojang.brigadier.arguments.ArgumentType<?>,T extends ArgumentTypeInfo.Template<A>> ArgumentTypeInfo<A,T> register(Registry<ArgumentTypeInfo<?, ?>> p_235387_, String p_235388_, Class<? extends A> p_235389_, ArgumentTypeInfo<A, T> p_235390_) -
bootstrap
-
fixClassType
-
isClassRecognized
-
byClass
public static <A extends com.mojang.brigadier.arguments.ArgumentType<?>> ArgumentTypeInfo<A,?> byClass(A p_235383_) -
unpack
public static <A extends com.mojang.brigadier.arguments.ArgumentType<?>> ArgumentTypeInfo.Template<A> unpack(A p_235394_)
-