aboutsummaryrefslogtreecommitdiff
path: root/azalea-core/src
diff options
context:
space:
mode:
authormat <27899617+mat-1@users.noreply.github.com>2025-08-04 20:43:10 -0500
committerGitHub <noreply@github.com>2025-08-04 20:43:10 -0500
commit23b7f20a0d88b54d430820baeb4a6da0316a009a (patch)
treef3e780515b3bbb9973d2b94338be6194b5ec0af3 /azalea-core/src
parent827d943c3f27c65724ff83689b40c87d1cd1838c (diff)
downloadazalea-drasl-23b7f20a0d88b54d430820baeb4a6da0316a009a.tar.xz
Default components (#232)
* add default components * remove debug prints * clippy * use default components * fix tests
Diffstat (limited to 'azalea-core/src')
-rw-r--r--azalea-core/src/resource_location.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/azalea-core/src/resource_location.rs b/azalea-core/src/resource_location.rs
index a4309035..c6e39150 100644
--- a/azalea-core/src/resource_location.rs
+++ b/azalea-core/src/resource_location.rs
@@ -11,7 +11,7 @@ use azalea_buf::{AzaleaRead, AzaleaWrite, BufReadError};
use serde::{Deserialize, Deserializer, Serialize, Serializer, de};
use simdnbt::{FromNbtTag, ToNbtTag, owned::NbtTag};
-#[derive(Hash, Clone, PartialEq, Eq)]
+#[derive(Hash, Clone, PartialEq, Eq, Default)]
pub struct ResourceLocation {
pub namespace: String,
pub path: String,
@@ -59,6 +59,11 @@ impl FromStr for ResourceLocation {
Ok(ResourceLocation::new(s))
}
}
+impl From<&str> for ResourceLocation {
+ fn from(s: &str) -> Self {
+ ResourceLocation::new(s)
+ }
+}
impl AzaleaRead for ResourceLocation {
fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result<Self, BufReadError> {