blob: d83b6ab9a5c42888d9b38b1199fc3943c24002e9 [file] [log] [blame] [raw]
package protocolsupport.protocol.utils.datawatcher.objects;
import io.netty.buffer.ByteBuf;
import protocolsupport.api.ProtocolVersion;
import protocolsupport.protocol.serializer.PositionSerializer;
import protocolsupport.protocol.utils.datawatcher.ReadableDataWatcherObject;
import protocolsupport.protocol.utils.types.Position;
public class DataWatcherObjectPosition extends ReadableDataWatcherObject<Position> {
@Override
public void readFromStream(ByteBuf from, ProtocolVersion version, String locale) {
value = PositionSerializer.readPosition(from);
}
@Override
public void writeToStream(ByteBuf to, ProtocolVersion version, String locale) {
PositionSerializer.writePosition(to, value);
}
}