world: add Eq + Ord to all block entity types

This commit is contained in:
Matthias Schiffer 2023-11-26 12:27:18 +01:00
parent 825cf70e51
commit e36ae4601d
Signed by: neocturne
GPG key ID: 16EF3F64CB201D9C
3 changed files with 7 additions and 7 deletions

View file

@ -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,