From 337df05b66eeb4acc5dcb3841f4007f506d4bda8 Mon Sep 17 00:00:00 2001 From: GaspardCulis Date: Thu, 12 Dec 2024 15:28:11 +0100 Subject: [PATCH] chore(core): Derive Serialize and Deserialize for `direction` types When crate's `serde` feature is enabled --- azalea-core/src/direction.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/azalea-core/src/direction.rs b/azalea-core/src/direction.rs index b0b8c9603..aa537858a 100755 --- a/azalea-core/src/direction.rs +++ b/azalea-core/src/direction.rs @@ -3,6 +3,7 @@ use azalea_buf::AzBuf; use crate::position::Vec3; #[derive(Clone, Copy, Debug, AzBuf, Default, Eq, PartialEq)] +#[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))] pub enum Direction { #[default] Down = 0, @@ -63,6 +64,7 @@ impl Direction { // TODO: make azalea_block use this instead of FacingCardinal #[derive(Clone, Copy, Debug, AzBuf, PartialEq, Eq, Hash)] +#[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))] pub enum CardinalDirection { North, South,