diff options
| author | mat <27899617+mat-1@users.noreply.github.com> | 2022-11-15 14:52:26 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-15 14:52:26 -0600 |
| commit | 0d004b72ac22641978c6ef93ca8641eb621e2f48 (patch) | |
| tree | 61eca3b0bd0339b36b947afd76724b2b6447572c /azalea-core/src | |
| parent | b9da6f74756abb8daf7253765fdc5f5521381090 (diff) | |
| download | azalea-drasl-0d004b72ac22641978c6ef93ca8641eb621e2f48.tar.xz | |
Rename "dimension" to "world" (#39)
* rename "dimension" to "world"
* Update mod.rs
Diffstat (limited to 'azalea-core/src')
| -rwxr-xr-x | azalea-core/src/position.rs | 8 |
1 files changed, 4 insertions, 4 deletions
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<ChunkSectionBlockPos> 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<Self, BufReadError> { 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(()) |
