diff options
| author | mat <27899617+mat-1@users.noreply.github.com> | 2024-06-13 19:52:05 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-13 19:52:05 -0500 |
| commit | f66d2d476759085601fc398afcac7d8b1940ebf7 (patch) | |
| tree | 6faf7bb89996eb7c37b2a4dc72c1f08b02a4ef0d /azalea-inventory/src | |
| parent | 38eab50b4fc53f10c3f607935e47b65a8c4f3ef9 (diff) | |
| download | azalea-drasl-f66d2d476759085601fc398afcac7d8b1940ebf7.tar.xz | |
1.21 (#145)
* 24w18a (data driven enchantments not implemented yet)
* 1.21
Diffstat (limited to 'azalea-inventory/src')
| -rw-r--r-- | azalea-inventory/src/components.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/azalea-inventory/src/components.rs b/azalea-inventory/src/components.rs index 948bb96d..9c9b90ad 100644 --- a/azalea-inventory/src/components.rs +++ b/azalea-inventory/src/components.rs @@ -49,6 +49,8 @@ pub fn from_kind( kind: azalea_registry::DataComponentKind, buf: &mut Cursor<&[u8]>, ) -> Result<Box<dyn EncodableDataComponent>, BufReadError> { + // if this is causing a compile-time error, look at DataComponents.java in the + // decompiled vanilla code to see how to implement new components Ok(match kind { DataComponentKind::CustomData => Box::new(CustomData::read_from(buf)?), DataComponentKind::MaxStackSize => Box::new(MaxStackSize::read_from(buf)?), @@ -114,6 +116,7 @@ pub fn from_kind( DataComponentKind::Bees => Box::new(Bees::read_from(buf)?), DataComponentKind::Lock => Box::new(Lock::read_from(buf)?), DataComponentKind::ContainerLoot => Box::new(ContainerLoot::read_from(buf)?), + DataComponentKind::JukeboxPlayable => todo!(), }) } @@ -654,3 +657,10 @@ pub struct ContainerLoot { pub loot: NbtCompound, } impl DataComponent for ContainerLoot {} + +#[derive(Clone, PartialEq, McBuf)] +pub struct JukeboxPlayable { + pub song: azalea_registry::JukeboxSong, + pub show_in_tooltip: bool, +} +impl DataComponent for JukeboxPlayable {} |
