Skip to content

Commit

Permalink
fix sound exception on 1.21
Browse files Browse the repository at this point in the history
  • Loading branch information
AoElite committed Aug 11, 2024
1 parent fe67c23 commit 6a6be44
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.getStringTagOrThrow("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 6a6be44

Please sign in to comment.