From bf55c91e91b1347c9a5dbf9899dc486b1db4a760 Mon Sep 17 00:00:00 2001 From: Serkyo Date: Tue, 7 Jul 2026 18:14:52 +0200 Subject: [PATCH] feat(shared): derive serde on EntityPos --- crates/shared/Cargo.toml | 2 +- crates/shared/src/world.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/shared/Cargo.toml b/crates/shared/Cargo.toml index 5f3e105..ed3cd05 100644 --- a/crates/shared/Cargo.toml +++ b/crates/shared/Cargo.toml @@ -11,6 +11,6 @@ workspace = true [dependencies] bytemuck = { version = "1.15", features = ["derive"] } fastrand = "2.4.1" -glam = "0.27" +glam = { version = "0.27", features = ["serde"] } noise = "0.9" serde = { version = "1.0", features = ["derive"] } diff --git a/crates/shared/src/world.rs b/crates/shared/src/world.rs index 25a2fbe..9cc54eb 100644 --- a/crates/shared/src/world.rs +++ b/crates/shared/src/world.rs @@ -101,7 +101,7 @@ impl ChunkPos { } /// A precision-safe position of an entity in the world. -#[derive(Copy, Clone, Debug, PartialEq)] +#[derive(Copy, Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct EntityPos { /// The chunk containing the entity; the exact integer anchor of the position. pub chunk: ChunkPos,