public class BlockedDataSerializer<T>
extends java.lang.Object
implements net.minecraft.network.datasync.IDataSerializer<T>
Constructor and Description |
---|
BlockedDataSerializer(java.util.function.BiConsumer<net.minecraft.network.PacketBuffer,T> write,
java.util.function.Function<net.minecraft.network.PacketBuffer,T> read,
java.util.function.Function<T,T> copy) |
BlockedDataSerializer(java.util.function.BiConsumer<net.minecraft.network.PacketBuffer,T> write,
java.util.function.Function<net.minecraft.network.PacketBuffer,T> read,
java.util.function.Function<T,T> copy,
java.util.function.Function<java.lang.Integer,net.minecraft.network.datasync.DataParameter<T>> createAccessor) |
BlockedDataSerializer(java.lang.String context,
java.util.function.BiConsumer<net.minecraft.network.PacketBuffer,T> write,
java.util.function.Function<net.minecraft.network.PacketBuffer,T> read,
java.util.function.Function<T,T> copy) |
BlockedDataSerializer(java.lang.String context,
java.util.function.BiConsumer<net.minecraft.network.PacketBuffer,T> write,
java.util.function.Function<net.minecraft.network.PacketBuffer,T> read,
java.util.function.Function<T,T> copy,
java.util.function.Function<java.lang.Integer,net.minecraft.network.datasync.DataParameter<T>> createAccessor) |
Modifier and Type | Method and Description |
---|---|
T |
copy(T instance) |
net.minecraft.network.datasync.DataParameter<T> |
createAccessor(int id) |
T |
read(net.minecraft.network.PacketBuffer buffer) |
void |
write(net.minecraft.network.PacketBuffer buffer,
T instance) |
public BlockedDataSerializer(java.util.function.BiConsumer<net.minecraft.network.PacketBuffer,T> write, java.util.function.Function<net.minecraft.network.PacketBuffer,T> read, java.util.function.Function<T,T> copy)
public BlockedDataSerializer(java.util.function.BiConsumer<net.minecraft.network.PacketBuffer,T> write, java.util.function.Function<net.minecraft.network.PacketBuffer,T> read, java.util.function.Function<T,T> copy, java.util.function.Function<java.lang.Integer,net.minecraft.network.datasync.DataParameter<T>> createAccessor)
public BlockedDataSerializer(java.lang.String context, java.util.function.BiConsumer<net.minecraft.network.PacketBuffer,T> write, java.util.function.Function<net.minecraft.network.PacketBuffer,T> read, java.util.function.Function<T,T> copy)
public BlockedDataSerializer(java.lang.String context, java.util.function.BiConsumer<net.minecraft.network.PacketBuffer,T> write, java.util.function.Function<net.minecraft.network.PacketBuffer,T> read, java.util.function.Function<T,T> copy, java.util.function.Function<java.lang.Integer,net.minecraft.network.datasync.DataParameter<T>> createAccessor)
public void write(net.minecraft.network.PacketBuffer buffer, T instance)
write
in interface net.minecraft.network.datasync.IDataSerializer<T>
public T read(net.minecraft.network.PacketBuffer buffer)
read
in interface net.minecraft.network.datasync.IDataSerializer<T>
public net.minecraft.network.datasync.DataParameter<T> createAccessor(int id)
createAccessor
in interface net.minecraft.network.datasync.IDataSerializer<T>