mirror of
https://github.com/neocturne/MinedMap.git
synced 2025-07-03 14:19:07 +02:00
world: add Eq + Ord to all block entity types
This commit is contained in:
parent
825cf70e51
commit
e36ae4601d
3 changed files with 7 additions and 7 deletions
|
@ -8,7 +8,7 @@ use super::{
|
|||
};
|
||||
|
||||
/// Kind of sign block
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
#[derive(Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum SignKind {
|
||||
/// Standing or attached sign
|
||||
|
@ -18,7 +18,7 @@ pub enum SignKind {
|
|||
}
|
||||
|
||||
/// Processed sign data
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
#[derive(Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord)]
|
||||
pub struct Sign {
|
||||
/// The kind of the sign
|
||||
pub kind: SignKind,
|
||||
|
@ -45,7 +45,7 @@ impl Sign {
|
|||
}
|
||||
|
||||
/// Data for different kinds of [BlockEntity]
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
#[derive(Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord)]
|
||||
#[serde(tag = "type", rename_all = "snake_case")]
|
||||
pub enum BlockEntityData {
|
||||
/// A sign block
|
||||
|
@ -53,7 +53,7 @@ pub enum BlockEntityData {
|
|||
}
|
||||
|
||||
/// A processed block entity
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
#[derive(Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord)]
|
||||
pub struct BlockEntity {
|
||||
/// Global X coordinate
|
||||
pub x: i32,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue