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-client/src/player.rs | |
| 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-client/src/player.rs')
| -rwxr-xr-x | azalea-client/src/player.rs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/azalea-client/src/player.rs b/azalea-client/src/player.rs index ea6125ad..a355831b 100755 --- a/azalea-client/src/player.rs +++ b/azalea-client/src/player.rs @@ -1,13 +1,13 @@ use azalea_world::entity::Entity; -use azalea_world::Dimension; +use azalea_world::World; use uuid::Uuid; -/// Something that has a dimension associated to it. Usually, this is a `Client`. -pub trait DimensionHaver { - fn dimension(&self) -> &Dimension; +/// Something that has a world associated to it. Usually, this is a `Client`. +pub trait WorldHaver { + fn world(&self) -> &World; } -/// A player in the dimension or tab list. +/// A player in the world or tab list. #[derive(Default, Debug)] pub struct Player { /// The player's uuid. @@ -18,13 +18,13 @@ pub struct Player { impl Player { /// Get a reference to the entity of the player in the world. - pub fn entity<'d>(&'d self, dimension: &'d Dimension) -> Option<Entity<&Dimension>> { - dimension.entity(self.entity_id) + pub fn entity<'d>(&'d self, world: &'d World) -> Option<Entity<&World>> { + world.entity(self.entity_id) } /// Get a mutable reference to the entity of the player in the world. - pub fn entity_mut<'d>(&'d self, dimension: &'d mut Dimension) -> Option<Entity> { - dimension.entity_mut(self.entity_id) + pub fn entity_mut<'d>(&'d self, world: &'d mut World) -> Option<Entity> { + world.entity_mut(self.entity_id) } pub fn set_uuid(&mut self, uuid: Uuid) { |
