+void Packet::PlayerUpdate::ReadSlot(uint8_t &slot) const noexcept {
+ Read(slot, 75);
+}
+
+void Packet::SpawnEntity::WriteEntity(const Entity &e) noexcept {
+ Write(e.ID(), 0);
+ if (e.GetModel()) {
+ Write(e.GetModel().GetModel().ID(), 4);
+ } else {
+ Write(uint32_t(0), 4);
+ }
+ Write(e.GetState(), 8);
+ Write(e.Bounds(), 72);
+ uint32_t flags = 0;
+ if (e.WorldCollidable()) {
+ flags |= 1;
+ }
+ Write(flags, 96);
+ WriteString(e.Name(), 100, 32);
+}
+
+void Packet::SpawnEntity::ReadEntityID(uint32_t &id) const noexcept {
+ Read(id, 0);
+}
+
+void Packet::SpawnEntity::ReadSkeletonID(uint32_t &id) const noexcept {
+ Read(id, 4);
+}
+
+void Packet::SpawnEntity::ReadEntity(Entity &e) const noexcept {
+ EntityState state;
+ AABB bounds;
+ uint32_t flags = 0;
+ string name;
+
+ Read(state, 8);
+ Read(bounds, 72);
+ Read(flags, 96);
+ ReadString(name, 100, 32);
+
+ e.SetState(state);
+ e.Bounds(bounds);
+ e.WorldCollidable(flags & 1);
+ e.Name(name);
+}
+
+void Packet::DespawnEntity::WriteEntityID(uint32_t id) noexcept {
+ Write(id, 0);
+}
+
+void Packet::DespawnEntity::ReadEntityID(uint32_t &id) const noexcept {
+ Read(id, 0);
+}
+
+void Packet::EntityUpdate::WriteEntityCount(uint32_t count) noexcept {
+ Write(count, 0);
+}
+
+void Packet::EntityUpdate::ReadEntityCount(uint32_t &count) const noexcept {
+ Read(count, 0);
+}
+
+void Packet::EntityUpdate::WriteEntity(const Entity &entity, uint32_t num) noexcept {
+ uint32_t off = GetSize(num);
+
+ Write(entity.ID(), off);
+ Write(entity.GetState(), off + 4);
+}
+
+void Packet::EntityUpdate::ReadEntityID(uint32_t &id, uint32_t num) const noexcept {
+ uint32_t off = GetSize(num);
+ Read(id, off);
+}
+
+void Packet::EntityUpdate::ReadEntityState(EntityState &state, uint32_t num) const noexcept {
+ uint32_t off = GetSize(num);
+ Read(state, off + 4);
+}
+
+void Packet::PlayerCorrection::WritePacketSeq(std::uint16_t s) noexcept {
+ Write(s, 0);
+}
+
+void Packet::PlayerCorrection::ReadPacketSeq(std::uint16_t &s) const noexcept {
+ Read(s, 0);
+}
+
+void Packet::PlayerCorrection::WritePlayer(const Entity &player) noexcept {
+ Write(player.GetState(), 2);
+}
+
+void Packet::PlayerCorrection::ReadPlayerState(EntityState &state) const noexcept {
+ Read(state, 2);
+}
+
+void Packet::ChunkBegin::WriteTransmissionId(uint32_t id) noexcept {
+ Write(id, 0);
+}
+
+void Packet::ChunkBegin::ReadTransmissionId(uint32_t &id) const noexcept {
+ Read(id, 0);
+}
+
+void Packet::ChunkBegin::WriteFlags(uint32_t f) noexcept {
+ Write(f, 4);
+}
+
+void Packet::ChunkBegin::ReadFlags(uint32_t &f) const noexcept {
+ Read(f, 4);
+}
+
+void Packet::ChunkBegin::WriteChunkCoords(const glm::ivec3 &pos) noexcept {
+ Write(pos, 8);
+}
+
+void Packet::ChunkBegin::ReadChunkCoords(glm::ivec3 &pos) const noexcept {
+ Read(pos, 8);
+}
+
+void Packet::ChunkBegin::WriteDataSize(uint32_t s) noexcept {
+ Write(s, 20);
+}
+
+void Packet::ChunkBegin::ReadDataSize(uint32_t &s) const noexcept {
+ Read(s, 20);
+}
+
+void Packet::ChunkData::WriteTransmissionId(uint32_t id) noexcept {
+ Write(id, 0);
+}
+
+void Packet::ChunkData::ReadTransmissionId(uint32_t &id) const noexcept {
+ Read(id, 0);
+}
+
+void Packet::ChunkData::WriteDataOffset(uint32_t o) noexcept {
+ Write(o, 4);
+}
+
+void Packet::ChunkData::ReadDataOffset(uint32_t &o) const noexcept {
+ Read(o, 4);
+}
+
+void Packet::ChunkData::WriteDataSize(uint32_t s) noexcept {
+ Write(s, 8);
+}
+
+void Packet::ChunkData::ReadDataSize(uint32_t &s) const noexcept {
+ Read(s, 8);
+}
+
+void Packet::ChunkData::WriteData(const uint8_t *d, size_t l) noexcept {
+ size_t len = min(length - 12, l);
+ memcpy(&data[12], d, len);
+}
+
+void Packet::ChunkData::ReadData(uint8_t *d, size_t l) const noexcept {
+ size_t len = min(length - 12, l);
+ memcpy(d, &data[12], len);
+}
+
+void Packet::BlockUpdate::WriteChunkCoords(const glm::ivec3 &coords) noexcept {
+ Write(coords, 0);
+}
+
+void Packet::BlockUpdate::ReadChunkCoords(glm::ivec3 &coords) const noexcept {
+ Read(coords, 0);
+}
+
+void Packet::BlockUpdate::WriteBlockCount(uint32_t count) noexcept {
+ Write(count, 12);
+}
+
+void Packet::BlockUpdate::ReadBlockCount(uint32_t &count) const noexcept {
+ Read(count, 12);
+}
+
+void Packet::BlockUpdate::WriteIndex(uint16_t index, uint32_t num) noexcept {
+ uint32_t off = GetSize(num);
+ Write(index, off);
+}
+
+void Packet::BlockUpdate::ReadIndex(uint16_t &index, uint32_t num) const noexcept {
+ uint32_t off = GetSize(num);
+ Read(index, off);
+}
+
+void Packet::BlockUpdate::WriteBlock(const Block &block, uint32_t num) noexcept {
+ uint32_t off = GetSize(num) + 2;
+ Write(block, off);
+}
+
+void Packet::BlockUpdate::ReadBlock(Block &block, uint32_t num) const noexcept {
+ uint32_t off = GetSize(num) + 2;
+ Read(block, off);