diff options
| author | mat <git@matdoes.dev> | 2024-02-24 21:03:02 -0600 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2024-02-24 21:03:02 -0600 |
| commit | 13426b035e43c4435854f175155439ab28a18544 (patch) | |
| tree | 20b6c64ccf6947320f926bb3bc0951971d5c4c22 /azalea-core/src/position.rs | |
| parent | c38957374c288eb41b7dbd905071a469c7bbb2b1 (diff) | |
| download | azalea-drasl-13426b035e43c4435854f175155439ab28a18544.tar.xz | |
add Display for Vec3, add SimulationSet, and add EntityChunkPos component
Diffstat (limited to 'azalea-core/src/position.rs')
| -rwxr-xr-x | azalea-core/src/position.rs | 6 |
1 files changed, 6 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; |
