Class ArgumentTypeRegistry

java.lang.Object
net.fabricmc.fabric.api.command.v2.ArgumentTypeRegistry

public final class ArgumentTypeRegistry extends Object
  • Method Summary

    Modifier and Type
    Method
    Description
    static <A extends com.mojang.brigadier.arguments.ArgumentType<?>, T extends net.minecraft.command.argument.serialize.ArgumentSerializer.ArgumentTypeProperties<A>>
    void
    registerArgumentType(net.minecraft.util.Identifier id, Class<? extends A> clazz, net.minecraft.command.argument.serialize.ArgumentSerializer<A,T> serializer)
    Register a new argument type.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • registerArgumentType

      public static <A extends com.mojang.brigadier.arguments.ArgumentType<?>, T extends net.minecraft.command.argument.serialize.ArgumentSerializer.ArgumentTypeProperties<A>> void registerArgumentType(net.minecraft.util.Identifier id, Class<? extends A> clazz, net.minecraft.command.argument.serialize.ArgumentSerializer<A,T> serializer)
      Register a new argument type.
      Type Parameters:
      A - the argument type
      T - the argument type properties
      Parameters:
      id - the identifier of the argument type
      clazz - the class of the argument type
      serializer - the serializer for the argument type