From cb7ee4ac178690f018836daa3a010592586d5a53 Mon Sep 17 00:00:00 2001 From: LaG1924 <12997935+LaG1924@users.noreply.github.com> Date: Sat, 3 Feb 2018 17:16:43 +0500 Subject: Implemented Position type serialization --- src/Stream.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Stream.cpp b/src/Stream.cpp index a7884d6..d66335e 100644 --- a/src/Stream.cpp +++ b/src/Stream.cpp @@ -289,7 +289,8 @@ void StreamOutput::WriteNbtTag(const std::vector &value) { } void StreamOutput::WritePosition(const Vector &value) { - LOG(FATAL) << "Used unimplemented Position: " << value.x << ", " << value.y << " " << value.z; + unsigned long long pos = ((value.x & 0x3FFFFFF) << 38) | ((value.y & 0xFFF) << 26) | (value.z & 0x3FFFFFF); + WriteLong(pos); } void StreamOutput::WriteAngle(unsigned char value) { -- cgit v1.2.3