aboutsummaryrefslogtreecommitdiff
path: root/azalea-core/src
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2024-02-24 21:03:02 -0600
committermat <git@matdoes.dev>2024-02-24 21:03:02 -0600
commit13426b035e43c4435854f175155439ab28a18544 (patch)
tree20b6c64ccf6947320f926bb3bc0951971d5c4c22 /azalea-core/src
parentc38957374c288eb41b7dbd905071a469c7bbb2b1 (diff)
downloadazalea-drasl-13426b035e43c4435854f175155439ab28a18544.tar.xz
add Display for Vec3, add SimulationSet, and add EntityChunkPos component
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;