1
2
Fork 0
mirror of https://github.com/mat-1/azalea.git synced 2025-08-02 14:26:04 +00:00

Don't crash when missing extra registries (#108)

* Fix decoding on missing Nbt structures

* Fix default and renaming
This commit is contained in:
EightFactorial 2023-09-07 10:40:53 -07:00 committed by GitHub
parent bf8f533d9f
commit e6a787f777
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -101,14 +101,14 @@ pub mod registry {
#[serde(rename = "minecraft:trim_material")]
pub trim_material: RegistryType<TrimMaterialElement>,
#[cfg(not(feature = "strict_registry"))]
#[serde(rename = "minecraft:trim_material")]
#[serde(default, rename = "minecraft:trim_material")]
pub trim_material: Nbt,
#[cfg(feature = "strict_registry")]
#[serde(rename = "minecraft:chat_type")]
pub chat_type: RegistryType<ChatTypeElement>,
#[cfg(not(feature = "strict_registry"))]
#[serde(rename = "minecraft:chat_type")]
#[serde(default, rename = "minecraft:chat_type")]
pub chat_type: Nbt,
#[serde(rename = "minecraft:dimension_type")]
@ -118,21 +118,21 @@ pub mod registry {
#[serde(rename = "minecraft:worldgen/biome")]
pub world_type: RegistryType<WorldTypeElement>,
#[cfg(not(feature = "strict_registry"))]
#[serde(rename = "minecraft:worldgen/biome")]
#[serde(default, rename = "minecraft:worldgen/biome")]
pub world_type: Nbt,
#[cfg(feature = "strict_registry")]
#[serde(rename = "minecraft:trim_pattern")]
pub trim_pattern: RegistryType<TrimPatternElement>,
#[cfg(not(feature = "strict_registry"))]
#[serde(rename = "minecraft:trim_pattern")]
#[serde(default, rename = "minecraft:trim_pattern")]
pub trim_pattern: Nbt,
#[cfg(feature = "strict_registry")]
#[serde(rename = "minecraft:damage_type")]
pub damage_type: RegistryType<DamageTypeElement>,
#[cfg(not(feature = "strict_registry"))]
#[serde(rename = "minecraft:damage_type")]
#[serde(default, rename = "minecraft:damage_type")]
pub damage_type: Nbt,
}