aboutsummaryrefslogtreecommitdiff
path: root/azalea-core/src/position.rs
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2022-06-25 02:33:28 -0500
committermat <github@matdoes.dev>2022-06-25 02:33:28 -0500
commitcd9a05e5a62190b3d4a2a733bf637d6324aec5fd (patch)
tree15fb360678dfb5e8d81330144b810735b73f6ef4 /azalea-core/src/position.rs
parentc9faf25fab4f89319731fec87ad4d2cf45864632 (diff)
downloadazalea-drasl-cd9a05e5a62190b3d4a2a733bf637d6324aec5fd.tar.xz
read_into -> read_from
yeah
Diffstat (limited to 'azalea-core/src/position.rs')
-rw-r--r--azalea-core/src/position.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/azalea-core/src/position.rs b/azalea-core/src/position.rs
index de8e2516..195558e8 100644
--- a/azalea-core/src/position.rs
+++ b/azalea-core/src/position.rs
@@ -225,8 +225,8 @@ impl From<&EntityPos> for ChunkPos {
}
impl McBufReadable for BlockPos {
- fn read_into(buf: &mut impl Read) -> Result<Self, String> {
- let val = u64::read_into(buf)?;
+ fn read_from(buf: &mut impl Read) -> Result<Self, String> {
+ let val = u64::read_from(buf)?;
let x = (val >> 38) as i32;
let y = (val & 0xFFF) as i32;
let z = ((val >> 12) & 0x3FFFFFF) as i32;
@@ -235,17 +235,17 @@ impl McBufReadable for BlockPos {
}
impl McBufReadable for GlobalPos {
- fn read_into(buf: &mut impl Read) -> Result<Self, String> {
+ fn read_from(buf: &mut impl Read) -> Result<Self, String> {
Ok(GlobalPos {
- dimension: ResourceLocation::read_into(buf)?,
- pos: BlockPos::read_into(buf)?,
+ dimension: ResourceLocation::read_from(buf)?,
+ pos: BlockPos::read_from(buf)?,
})
}
}
impl McBufReadable for ChunkSectionPos {
- fn read_into(buf: &mut impl Read) -> Result<Self, String> {
- let long = i64::read_into(buf)?;
+ fn read_from(buf: &mut impl Read) -> Result<Self, String> {
+ let long = i64::read_from(buf)?;
Ok(ChunkSectionPos {
x: (long >> 42) as i32,
y: (long << 44 >> 44) as i32,