aboutsummaryrefslogtreecommitdiff
path: root/azalea-core/src
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2022-12-08 18:39:35 -0600
committermat <github@matdoes.dev>2022-12-08 18:39:35 -0600
commit70e2dfed16da8d5130460ea15b47701e622f4a9f (patch)
tree41f670baf3a05ed180880ec2a11d8e5f6a1a1599 /azalea-core/src
parentf2076daba5cfcce81399b075ba9258fbdc2012fa (diff)
downloadazalea-drasl-70e2dfed16da8d5130460ea15b47701e622f4a9f.tar.xz
wrap_comments = true
Diffstat (limited to 'azalea-core/src')
-rwxr-xr-xazalea-core/src/bitset.rs3
-rw-r--r--azalea-core/src/game_type.rs9
-rwxr-xr-xazalea-core/src/position.rs6
3 files changed, 12 insertions, 6 deletions
diff --git a/azalea-core/src/bitset.rs b/azalea-core/src/bitset.rs
index 41d43165..266bdc62 100755
--- a/azalea-core/src/bitset.rs
+++ b/azalea-core/src/bitset.rs
@@ -77,7 +77,8 @@ impl BitSet {
}
}
- /// Returns the maximum potential items in the BitSet. This will be divisible by 64.
+ /// Returns the maximum potential items in the BitSet. This will be
+ /// divisible by 64.
fn len(&self) -> usize {
self.data.len() * 64
}
diff --git a/azalea-core/src/game_type.rs b/azalea-core/src/game_type.rs
index c4b4cf76..a4930c5d 100644
--- a/azalea-core/src/game_type.rs
+++ b/azalea-core/src/game_type.rs
@@ -49,7 +49,8 @@ impl GameType {
}
pub fn short_name(&self) -> &'static str {
- // TODO: these should be translated TranslatableComponent("selectWorld.gameMode." + string2)
+ // TODO: these should be translated
+ // TranslatableComponent("selectWorld.gameMode." + string2)
match self {
GameType::Survival => "Survival",
GameType::Creative => "Creative",
@@ -59,7 +60,8 @@ impl GameType {
}
pub fn long_name(&self) -> &'static str {
- // TODO: These should be translated TranslatableComponent("gameMode." + string2);
+ // TODO: These should be translated TranslatableComponent("gameMode." +
+ // string2);
match self {
GameType::Survival => "Survival Mode",
GameType::Creative => "Creative Mode",
@@ -92,7 +94,8 @@ impl McBufWritable for GameType {
}
}
-/// Rust doesn't let us `impl McBufReadable for Option<GameType>` so we have to make a new type :(
+/// Rust doesn't let us `impl McBufReadable for Option<GameType>` so we have to
+/// make a new type :(
#[derive(Hash, Copy, Clone, Debug)]
pub struct OptionalGameType(Option<GameType>);
diff --git a/azalea-core/src/position.rs b/azalea-core/src/position.rs
index 6c18d147..ea54c60c 100755
--- a/azalea-core/src/position.rs
+++ b/azalea-core/src/position.rs
@@ -126,7 +126,8 @@ pub struct BlockPos {
vec3_impl!(BlockPos, i32);
impl BlockPos {
- /// Get the absolute center of a block position by adding 0.5 to each coordinate.
+ /// Get the absolute center of a block position by adding 0.5 to each
+ /// coordinate.
pub fn center(&self) -> Vec3 {
Vec3 {
x: self.x as f64 + 0.5,
@@ -176,7 +177,8 @@ impl ChunkBlockPos {
}
}
-/// The coordinates of a block inside a chunk section. Each coordinate must be in the range [0, 15].
+/// The coordinates of a block inside a chunk section. Each coordinate must be
+/// in the range [0, 15].
#[derive(Clone, Debug, Default, PartialEq, Eq)]
pub struct ChunkSectionBlockPos {
pub x: u8,