Archived
0

refactoring: Packet interfaces

This commit is contained in:
2021-05-10 02:11:04 +03:00
parent 3165eca0ca
commit a3fcfcf65a
5 changed files with 6 additions and 4 deletions

View File

@@ -1,12 +0,0 @@
package mc.protocol.packets;
import mc.protocol.io.NetByteBuf;
import mc.protocol.pool.Passivable;
/**
* Пакеты отправляемые клиентом.
*/
public interface ClientSidePacket extends Packet, Passivable {
void readSelf(NetByteBuf netByteBuf);
}

View File

@@ -1,19 +0,0 @@
package mc.protocol.packets;
/**
* Пакет.
*
* <p>Структура пакета</p>
* <pre>
* | FIELD | TYPE | NOTES |
* |-------------|--------|-------------------------------------------|
* | SIZE | VarInt | = sizeOf(PACKET ID) + sizeOf(PACKET DATA) |
* | PACKET ID | VarInt | |
* | PACKET DATA | bytes | |
* </pre>
*
* @see <a href="https://wiki.vg/index.php?title=Protocol&oldid=7368#Without_compression">Packet without compression</a>
*/
public interface Packet {
}

View File

@@ -1,11 +0,0 @@
package mc.protocol.packets;
import mc.protocol.io.NetByteBuf;
/**
* Пакеты отправляемые сервером.
*/
public interface ServerSidePacket extends Packet {
void writeSelf(NetByteBuf netByteBuf);
}