diff options
Diffstat (limited to 'azalea-registry/src')
| -rw-r--r-- | azalea-registry/src/data.rs | 17 | ||||
| -rw-r--r-- | azalea-registry/src/extra.rs | 9 |
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", |
