Skip to content

Commit

Permalink
Merge pull request #927 from AoElite/2.0
Browse files Browse the repository at this point in the history
Fix sound exception on 1.21
  • Loading branch information
booky10 authored Aug 11, 2024
2 parents fe67c23 + 7778768 commit 40f7463
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,10 @@ public interface IJukeboxSong extends MappedEntity, CopyableEntity<IJukeboxSong>

static IJukeboxSong decode(NBT nbt, ClientVersion version, @Nullable TypesBuilderData data) {
NBTCompound compound = (NBTCompound) nbt;

Sound sound = Sound.decode(compound.getCompoundTagOrThrow("sound_event"), version);
Sound sound = Sound.decode(compound.getTagOrThrow("sound_event"), version);
Component description = AdventureSerializer.fromNbt(compound.getTagOrThrow("description"));
float length = compound.getNumberTagOrThrow("length_in_seconds").getAsFloat();
int comparator_output = compound.getNumberTagOrThrow("comparator_output").getAsInt();

return new JukeboxSong(data, sound, description, length, comparator_output);
}

Expand Down

0 comments on commit 40f7463

Please sign in to comment.