summaryrefslogtreecommitdiffstats
path: root/src/Packet.hpp
diff options
context:
space:
mode:
authorLaG1924 <12997935+LaG1924@users.noreply.github.com>2020-07-27 06:05:53 +0200
committerLaG1924 <12997935+LaG1924@users.noreply.github.com>2020-07-27 06:05:53 +0200
commitd899b21504c02cae99eb3688e561cf9bad4120c4 (patch)
treebfa380e1b81ab848766becff8322e783e4dcde1a /src/Packet.hpp
parentMerge pull request #40 from LaG1924/lua-scripting (diff)
downloadAltCraft-d899b21504c02cae99eb3688e561cf9bad4120c4.tar
AltCraft-d899b21504c02cae99eb3688e561cf9bad4120c4.tar.gz
AltCraft-d899b21504c02cae99eb3688e561cf9bad4120c4.tar.bz2
AltCraft-d899b21504c02cae99eb3688e561cf9bad4120c4.tar.lz
AltCraft-d899b21504c02cae99eb3688e561cf9bad4120c4.tar.xz
AltCraft-d899b21504c02cae99eb3688e561cf9bad4120c4.tar.zst
AltCraft-d899b21504c02cae99eb3688e561cf9bad4120c4.zip
Diffstat (limited to '')
-rw-r--r--src/Packet.hpp24
1 files changed, 23 insertions, 1 deletions
diff --git a/src/Packet.hpp b/src/Packet.hpp
index 7b18ce1..275de75 100644
--- a/src/Packet.hpp
+++ b/src/Packet.hpp
@@ -1146,4 +1146,26 @@ struct PacketPlayerBlockPlacement : Packet {
float cursorPositionX;
float cursorPositionY;
float cursorPositionZ;
-}; \ No newline at end of file
+};
+
+struct PacketRespawn : Packet {
+ void ToStream(StreamOutput* stream) override {
+
+ }
+
+ void FromStream(StreamInput* stream) override {
+ Dimension = stream->ReadInt();
+ Difficulty = stream->ReadUByte();
+ Gamemode = stream->ReadUByte();
+ LevelType = stream->ReadString();
+ }
+
+ int GetPacketId() override {
+ return PacketNamePlayCB::Respawn;
+ }
+
+ int Dimension;
+ unsigned char Difficulty;
+ unsigned char Gamemode;
+ std::string LevelType;
+};