Class ArgumentTypeInfos

java.lang.Object
net.minecraft.commands.synchronization.ArgumentTypeInfos

public class ArgumentTypeInfos extends Object
  • Field Details

  • Constructor Details

    • ArgumentTypeInfos

      public ArgumentTypeInfos()
  • Method Details

    • registerByClass

      public static <A extends com.mojang.brigadier.arguments.ArgumentType<?>, T extends ArgumentTypeInfo.Template<A>, I extends ArgumentTypeInfo<A, T>> I registerByClass(Class<A> infoClass, I argumentTypeInfo)
      Forge: Use this in conjunction with a DeferredRegister#register(String, Supplier) call to both populate the BY_CLASS map and register the argument type info so it can be used in commands.
      Parameters:
      infoClass - the class type of the argument type info
      argumentTypeInfo - 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

      public static ArgumentTypeInfo<?,?> bootstrap(Registry<ArgumentTypeInfo<?,?>> p_235385_)
    • fixClassType

      private static <T extends com.mojang.brigadier.arguments.ArgumentType<?>> Class<T> fixClassType(Class<? super T> p_235396_)
    • isClassRecognized

      public static boolean isClassRecognized(Class<?> p_235392_)
    • 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_)