Archived
0

Destroy entity

This commit is contained in:
2018-05-11 22:42:15 +03:00
parent ecc6d6fb35
commit fa2909b38d
3 changed files with 25 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
/*
* DmitriyMX <dimon550@gmail.com>
* 2018-05-11
*/
package mc.core.network.proto_125.packets;
import lombok.AllArgsConstructor;
import lombok.ToString;
import mc.core.network.SCPacket;
import mc.core.network.proto_125.ByteArrayOutputNetStream;
@AllArgsConstructor
@ToString
public class DestroyEntityPacket implements SCPacket {
private final int id;
@Override
public byte[] toByteArray() {
ByteArrayOutputNetStream netStream = new ByteArrayOutputNetStream();
netStream.writeInt(id);
return netStream.toByteArray();
}
}

View File

@@ -21,6 +21,7 @@ public class PacketManager {
.put(0x0C, PlayerLookPacket.class)
.put(0x0D, PositionAndLookPacket.class)
.put(0x14, SpawnNamedEntityPacket.class)
.put(0x1D, DestroyEntityPacket.class)
.put(0x32, ChunkAllocationPacket.class)
.put(0x33, ChunkDataPacket.class)
.put(0xC9, PlayerInfoPacket.class)