Package net.minecraft.command.argument
Class ArgumentTypes
java.lang.Object
net.minecraft.command.argument.ArgumentTypes
public class ArgumentTypes extends Object
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
ArgumentTypes.Entry<T extends com.mojang.brigadier.arguments.ArgumentType<?>>
-
Field Summary
Fields Modifier and Type Field Description private static Map<Class<?>,ArgumentTypes.Entry<?>>
classMap
private static Map<Identifier,ArgumentTypes.Entry<?>>
idMap
private static Logger
LOGGER
-
Constructor Summary
Constructors Constructor Description ArgumentTypes()
-
Method Summary
Modifier and Type Method Description private static ArgumentTypes.Entry<?>
byClass(com.mojang.brigadier.arguments.ArgumentType<?> argumentType)
private static ArgumentTypes.Entry<?>
byId(Identifier identifier)
static com.mojang.brigadier.arguments.ArgumentType<?>
fromPacket(PacketByteBuf buf)
static <T> Set<com.mojang.brigadier.arguments.ArgumentType<?>>
getAllArgumentTypes(com.mojang.brigadier.tree.CommandNode<T> node)
private static <T> void
getAllArgumentTypes(com.mojang.brigadier.tree.CommandNode<T> node, Set<com.mojang.brigadier.arguments.ArgumentType<?>> argumentTypes, Set<com.mojang.brigadier.tree.CommandNode<T>> ignoredNodes)
static boolean
hasClass(com.mojang.brigadier.arguments.ArgumentType<?> argumentType)
static void
register()
static <T extends com.mojang.brigadier.arguments.ArgumentType<?>>
voidregister(String id, Class<T> class2, ArgumentSerializer<T> argumentSerializer)
Registers an argument type's serializer.private static <T extends com.mojang.brigadier.arguments.ArgumentType<?>>
voidtoJson(JsonObject jsonObject, T t)
static <S> JsonObject
toJson(com.mojang.brigadier.CommandDispatcher<S> commandDispatcher, com.mojang.brigadier.tree.CommandNode<S> commandNode)
static <T extends com.mojang.brigadier.arguments.ArgumentType<?>>
voidtoPacket(PacketByteBuf packetByteBuf, T t)
-
Field Details
-
LOGGER
-
classMap
-
idMap
-
-
Constructor Details
-
ArgumentTypes
public ArgumentTypes()
-
-
Method Details
-
register
public static <T extends com.mojang.brigadier.arguments.ArgumentType<?>> void register(String id, Class<T> class2, ArgumentSerializer<T> argumentSerializer)Registers an argument type's serializer.- Parameters:
id
- the id of the argument type
-
register
public static void register() -
byId
-
byClass
@Nullable private static ArgumentTypes.Entry<?> byClass(com.mojang.brigadier.arguments.ArgumentType<?> argumentType) -
toPacket
public static <T extends com.mojang.brigadier.arguments.ArgumentType<?>> void toPacket(PacketByteBuf packetByteBuf, T t) -
fromPacket
@Nullable public static com.mojang.brigadier.arguments.ArgumentType<?> fromPacket(PacketByteBuf buf) -
toJson
private static <T extends com.mojang.brigadier.arguments.ArgumentType<?>> void toJson(JsonObject jsonObject, T t) -
toJson
public static <S> JsonObject toJson(com.mojang.brigadier.CommandDispatcher<S> commandDispatcher, com.mojang.brigadier.tree.CommandNode<S> commandNode) -
hasClass
public static boolean hasClass(com.mojang.brigadier.arguments.ArgumentType<?> argumentType) -
getAllArgumentTypes
public static <T> Set<com.mojang.brigadier.arguments.ArgumentType<?>> getAllArgumentTypes(com.mojang.brigadier.tree.CommandNode<T> node) -
getAllArgumentTypes
-