From 0d004b72ac22641978c6ef93ca8641eb621e2f48 Mon Sep 17 00:00:00 2001 From: mat <27899617+mat-1@users.noreply.github.com> Date: Tue, 15 Nov 2022 14:52:26 -0600 Subject: Rename "dimension" to "world" (#39) * rename "dimension" to "world" * Update mod.rs --- azalea-core/src/position.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'azalea-core/src') diff --git a/azalea-core/src/position.rs b/azalea-core/src/position.rs index 61368b28..6c18d147 100755 --- a/azalea-core/src/position.rs +++ b/azalea-core/src/position.rs @@ -197,12 +197,12 @@ impl Add for ChunkSectionPos { } } -/// A block pos with an attached dimension +/// A block pos with an attached world #[derive(Debug, Clone)] pub struct GlobalPos { pub pos: BlockPos, // this is actually a ResourceKey in Minecraft, but i don't think it matters? - pub dimension: ResourceLocation, + pub world: ResourceLocation, } impl From<&BlockPos> for ChunkPos { @@ -297,7 +297,7 @@ impl McBufReadable for BlockPos { impl McBufReadable for GlobalPos { fn read_from(buf: &mut Cursor<&[u8]>) -> Result { Ok(GlobalPos { - dimension: ResourceLocation::read_from(buf)?, + world: ResourceLocation::read_from(buf)?, pos: BlockPos::read_from(buf)?, }) } @@ -326,7 +326,7 @@ impl McBufWritable for BlockPos { impl McBufWritable for GlobalPos { fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { - ResourceLocation::write_into(&self.dimension, buf)?; + ResourceLocation::write_into(&self.world, buf)?; BlockPos::write_into(&self.pos, buf)?; Ok(()) -- cgit v1.2.3