Class ArgumentSerializer<T extends com.mojang.brigadier.arguments.ArgumentType<?>,V>
java.lang.Object
net.darkhax.bookshelf.common.api.commands.args.ArgumentSerializer<T,V>
- All Implemented Interfaces:
net.minecraft.commands.synchronization.ArgumentTypeInfo<T,ArgumentSerializer.ArgTemplate<T, V>>
public class ArgumentSerializer<T extends com.mojang.brigadier.arguments.ArgumentType<?>,V>
extends Object
implements net.minecraft.commands.synchronization.ArgumentTypeInfo<T,ArgumentSerializer.ArgTemplate<T,V>>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classArgumentSerializer.ArgTemplate<T extends com.mojang.brigadier.arguments.ArgumentType<?>,V> Nested classes/interfaces inherited from interface net.minecraft.commands.synchronization.ArgumentTypeInfo
net.minecraft.commands.synchronization.ArgumentTypeInfo.Template<A extends com.mojang.brigadier.arguments.ArgumentType<?>> -
Constructor Summary
ConstructorsConstructorDescriptionArgumentSerializer(com.mojang.serialization.MapCodec<V> codec, net.minecraft.network.codec.StreamCodec<net.minecraft.network.FriendlyByteBuf, V> stream, BiFunction<net.minecraft.commands.CommandBuildContext, V, T> mapFunc, Function<T, V> toData) -
Method Summary
Modifier and TypeMethodDescription@NotNull ArgumentSerializer.ArgTemplate<T, V> deserializeFromNetwork(@NotNull net.minecraft.network.FriendlyByteBuf buf) voidserializeToJson(@NotNull ArgumentSerializer.ArgTemplate<T, V> template, @NotNull com.google.gson.JsonObject json) voidserializeToNetwork(ArgumentSerializer.ArgTemplate<T, V> template, @NotNull net.minecraft.network.FriendlyByteBuf buf) @NotNull ArgumentSerializer.ArgTemplate<T, V>
-
Constructor Details
-
ArgumentSerializer
-
-
Method Details
-
serializeToNetwork
public void serializeToNetwork(ArgumentSerializer.ArgTemplate<T, V> template, @NotNull @NotNull net.minecraft.network.FriendlyByteBuf buf) -
deserializeFromNetwork
@NotNull public @NotNull ArgumentSerializer.ArgTemplate<T,V> deserializeFromNetwork(@NotNull @NotNull net.minecraft.network.FriendlyByteBuf buf) -
serializeToJson
public void serializeToJson(@NotNull @NotNull ArgumentSerializer.ArgTemplate<T, V> template, @NotNull @NotNull com.google.gson.JsonObject json) -
unpack
-