package ru.dbotthepony.kstarbound.network.packets.clientbound

import it.unimi.dsi.fastutil.bytes.ByteArrayList
import ru.dbotthepony.kommons.io.readByteArray
import ru.dbotthepony.kommons.io.writeByteArray
import ru.dbotthepony.kstarbound.client.ClientConnection
import ru.dbotthepony.kstarbound.network.IClientPacket
import java.io.DataInputStream
import java.io.DataOutputStream

class SystemObjectCreatePacket(val data: ByteArrayList) : IClientPacket {
	constructor(stream: DataInputStream, isLegacy: Boolean) : this(ByteArrayList.wrap(stream.readByteArray()))

	override fun write(stream: DataOutputStream, isLegacy: Boolean) {
		stream.writeByteArray(data.elements(), 0, data.size)
	}

	override fun play(connection: ClientConnection) {
		TODO("Not yet implemented")
	}
}
