From 13426b035e43c4435854f175155439ab28a18544 Mon Sep 17 00:00:00 2001 From: mat Date: Sat, 24 Feb 2024 21:03:02 -0600 Subject: add Display for Vec3, add SimulationSet, and add EntityChunkPos component --- azalea-core/src/position.rs | 6 ++++++ azalea-core/src/tick.rs | 4 ++++ 2 files changed, 10 insertions(+) (limited to 'azalea-core/src') 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; -- cgit v1.2.3