aboutsummaryrefslogtreecommitdiff
path: root/azalea-core/src
diff options
context:
space:
mode:
Diffstat (limited to 'azalea-core/src')
-rwxr-xr-xazalea-core/src/position.rs6
-rw-r--r--azalea-core/src/tick.rs4
2 files changed, 10 insertions, 0 deletions
diff --git a/azalea-core/src/position.rs b/azalea-core/src/position.rs
index 369607c5..e2a9c4cc 100755
--- a/azalea-core/src/position.rs
+++ b/azalea-core/src/position.rs
@@ -564,6 +564,12 @@ impl fmt::Display for BlockPos {
write!(f, "{} {} {}", self.x, self.y, self.z)
}
}
+impl fmt::Display for Vec3 {
+ /// Display a position as `x y z`.
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+ write!(f, "{} {} {}", self.x, self.y, self.z)
+ }
+}
const PACKED_X_LENGTH: u64 = 1 + 25; // minecraft does something a bit more complicated to get this 25
const PACKED_Z_LENGTH: u64 = PACKED_X_LENGTH;
diff --git a/azalea-core/src/tick.rs b/azalea-core/src/tick.rs
index db10d80a..c6f02c12 100644
--- a/azalea-core/src/tick.rs
+++ b/azalea-core/src/tick.rs
@@ -1,4 +1,8 @@
use bevy_ecs::schedule::ScheduleLabel;
+/// A Bevy schedule that runs every Minecraft game tick, i.e. every 50ms.
+///
+/// Many client systems run on this schedule, the most important one being
+/// physics.
#[derive(ScheduleLabel, Hash, Copy, Clone, Debug, Default, Eq, PartialEq)]
pub struct GameTick;