mirror of
https://github.com/mat-1/azalea.git
synced 2025-08-02 14:26:04 +00:00
Add serde to BlockPos
This commit is contained in:
parent
2992fc6b47
commit
6194c52b88
1 changed files with 3 additions and 1 deletions
|
@ -10,7 +10,8 @@ use std::{
|
|||
io::{Cursor, Write},
|
||||
ops::{Add, AddAssign, Mul, Rem, Sub},
|
||||
};
|
||||
|
||||
#[cfg(feature = "serde")]
|
||||
use serde::{Deserialize, Serialize};
|
||||
use crate::resource_location::ResourceLocation;
|
||||
|
||||
macro_rules! vec3_impl {
|
||||
|
@ -235,6 +236,7 @@ impl Vec3 {
|
|||
/// The coordinates of a block in the world. For entities (if the coordinate
|
||||
/// with decimals), use [`Vec3`] instead.
|
||||
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
|
||||
#[cfg_attr(feature = "serde", derive(Deserialize, Serialize))]
|
||||
pub struct BlockPos {
|
||||
pub x: i32,
|
||||
pub y: i32,
|
||||
|
|
Loading…
Add table
Reference in a new issue