Skip to content

Commit

Permalink
chore(core): Derive Serialize and Deserialize for direction types (#…
Browse files Browse the repository at this point in the history
…197)

When crate's `serde` feature is enabled
  • Loading branch information
GaspardCulis authored Dec 12, 2024
1 parent e9136c9 commit 1f06a15
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions azalea-core/src/direction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 1f06a15

Please sign in to comment.