aboutsummaryrefslogtreecommitdiff
path: root/azalea-registry/src
diff options
context:
space:
mode:
authormat <27899617+mat-1@users.noreply.github.com>2025-02-21 13:43:56 -0600
committerGitHub <noreply@github.com>2025-02-21 13:43:56 -0600
commit833f306e8b8faddd232b5c736b2134ed08adcb6c (patch)
tree08a59009f3118d5c56891d6c4fb6a0293aa9e6fc /azalea-registry/src
parent63b1036a96c45b0fefc6ca2501f1cc479acc95de (diff)
downloadazalea-drasl-833f306e8b8faddd232b5c736b2134ed08adcb6c.tar.xz
Fix errors on switching dimensions (#204)
* Fix errors on switching dimensions * fix other tests * clippy * fix log feature in test_simulation * fix chunks oops
Diffstat (limited to 'azalea-registry/src')
-rw-r--r--azalea-registry/src/data.rs17
-rw-r--r--azalea-registry/src/extra.rs9
2 files changed, 17 insertions, 9 deletions
diff --git a/azalea-registry/src/data.rs b/azalea-registry/src/data.rs
index c80889d6..17338c8f 100644
--- a/azalea-registry/src/data.rs
+++ b/azalea-registry/src/data.rs
@@ -22,3 +22,20 @@ impl DataRegistry for Enchantment {
self.id
}
}
+
+#[derive(Debug, Clone, Copy, AzBuf, PartialEq, Eq, Hash)]
+pub struct DimensionType {
+ #[var]
+ id: u32,
+}
+impl DimensionType {
+ pub fn new_raw(id: u32) -> Self {
+ Self { id }
+ }
+}
+impl DataRegistry for DimensionType {
+ const NAME: &'static str = "dimension_type";
+ fn protocol_id(&self) -> u32 {
+ self.id
+ }
+}
diff --git a/azalea-registry/src/extra.rs b/azalea-registry/src/extra.rs
index ba5d8559..1ba1f0a9 100644
--- a/azalea-registry/src/extra.rs
+++ b/azalea-registry/src/extra.rs
@@ -28,15 +28,6 @@ impl Default for WolfVariant {
}
registry! {
-enum DimensionType {
- Overworld => "minecraft:overworld",
- Nether => "minecraft:the_nether",
- End => "minecraft:the_end",
- OverworldCaves => "minecraft:overworld_caves",
-}
-}
-
-registry! {
enum TrimMaterial {
Quartz => "minecraft:quartz",
Iron => "minecraft:iron",