aboutsummaryrefslogtreecommitdiff
path: root/azalea-core/src
diff options
context:
space:
mode:
Diffstat (limited to 'azalea-core/src')
-rw-r--r--azalea-core/src/registry_holder.rs9
-rw-r--r--azalea-core/src/sound.rs4
2 files changed, 9 insertions, 4 deletions
diff --git a/azalea-core/src/registry_holder.rs b/azalea-core/src/registry_holder.rs
index 6730cd20..b44d5155 100644
--- a/azalea-core/src/registry_holder.rs
+++ b/azalea-core/src/registry_holder.rs
@@ -7,6 +7,7 @@
use std::{collections::HashMap, io::Cursor};
+use azalea_buf::AzBuf;
use indexmap::IndexMap;
use simdnbt::{
Deserialize, FromNbtTag, Serialize, ToNbtTag,
@@ -14,7 +15,7 @@ use simdnbt::{
};
use tracing::error;
-use crate::identifier::Identifier;
+use crate::{codec_utils::*, identifier::Identifier};
/// The base of the registry.
///
@@ -330,12 +331,16 @@ pub struct TrimPatternElement {
pub pattern: HashMap<String, String>,
}
-#[derive(Debug, Clone, Serialize, Deserialize)]
+#[derive(
+ Debug, Clone, serde::Serialize, simdnbt::Serialize, simdnbt::Deserialize, AzBuf, PartialEq,
+)]
#[cfg_attr(feature = "strict_registry", simdnbt(deny_unknown_fields))]
pub struct DamageTypeElement {
pub message_id: String,
pub scaling: String,
pub exhaustion: f32,
+ #[serde(skip_serializing_if = "is_default")]
pub effects: Option<String>,
+ #[serde(skip_serializing_if = "is_default")]
pub death_message_type: Option<String>,
}
diff --git a/azalea-core/src/sound.rs b/azalea-core/src/sound.rs
index ebc18928..ab4bf431 100644
--- a/azalea-core/src/sound.rs
+++ b/azalea-core/src/sound.rs
@@ -5,6 +5,6 @@ use crate::identifier::Identifier;
#[derive(Clone, Debug, PartialEq, AzBuf, Serialize)]
pub struct CustomSound {
- pub location: Identifier,
- pub fixed_range: Option<f32>,
+ pub sound_id: Identifier,
+ pub range: Option<f32>,
}