aboutsummaryrefslogtreecommitdiff
path: root/azalea-protocol/src/mc_buf/read.rs
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2022-05-26 17:55:07 -0500
committermat <github@matdoes.dev>2022-05-26 17:55:07 -0500
commit0530c5757925c615d0529926b1550da05f0669d9 (patch)
tree24b40c461a8117dee019c8941e205f375e3a3c21 /azalea-protocol/src/mc_buf/read.rs
parent1e145a82b80fb0402e8a64624454d9bfee77bc72 (diff)
downloadazalea-drasl-0530c5757925c615d0529926b1550da05f0669d9.tar.xz
Fixes
Diffstat (limited to 'azalea-protocol/src/mc_buf/read.rs')
-rw-r--r--azalea-protocol/src/mc_buf/read.rs12
1 files changed, 11 insertions, 1 deletions
diff --git a/azalea-protocol/src/mc_buf/read.rs b/azalea-protocol/src/mc_buf/read.rs
index 350c0998..7cb0bb09 100644
--- a/azalea-protocol/src/mc_buf/read.rs
+++ b/azalea-protocol/src/mc_buf/read.rs
@@ -2,7 +2,8 @@ use super::{UnsizedByteArray, MAX_STRING_LENGTH};
use azalea_chat::component::Component;
use azalea_core::{
difficulty::Difficulty, game_type::GameType, resource_location::ResourceLocation,
- serializable_uuid::SerializableUuid, BlockPos, ChunkSectionPos, Direction, Slot, SlotData,
+ serializable_uuid::SerializableUuid, BlockPos, ChunkSectionPos, Direction, GlobalPos, Slot,
+ SlotData,
};
use azalea_crypto::SaltSignaturePair;
use byteorder::{ReadBytesExt, BE};
@@ -481,6 +482,15 @@ impl McBufReadable for BlockPos {
}
}
+impl McBufReadable for GlobalPos {
+ fn read_into(buf: &mut impl Read) -> Result<Self, String> {
+ Ok(GlobalPos {
+ pos: BlockPos::read_into(buf)?,
+ dimension: ResourceLocation::read_into(buf)?,
+ })
+ }
+}
+
impl McBufReadable for Direction {
fn read_into(buf: &mut impl Read) -> Result<Self, String> {
match buf.read_varint()? {