mirror of
https://github.com/mat-1/azalea.git
synced 2025-08-02 14:26:04 +00:00
chore(core): Derive Serialize and Deserialize for direction
types (#197)
When crate's `serde` feature is enabled
This commit is contained in:
parent
e9136c9cbb
commit
1f06a1540f
1 changed files with 2 additions and 0 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue