When a player tries to play a goat horn with a sound variant of less than 0 or more than 7, the game crashes.
How to reproduce:
Use the command:
/give @s goat_horn{SoundVariant:8
}Right click the goat horn you are given.
Stack trace:
Description: Unexpected error
java.lang.ArrayIndexOutOfBoundsException: Index 8 out of bounds for length 8
at com.google.common.collect.RegularImmutableList.get(RegularImmutableList.java:77)
at byb.a(SourceFile:93)
at byl.a(SourceFile:276)
at err.a(SourceFile:387)
at err.a(SourceFile:278)
at err.a(SourceFile:379)
at edb.aS(SourceFile:1723)
at edb.aU(SourceFile:1956)
at edb.q(SourceFile:1783)
at edb.f(SourceFile:1093)
at edb.e(SourceFile:730)
at net.minecraft.client.main.Main.main(SourceFile:237)
Attachments
Comments 3
Can confirm. Defining your own "item.goat_horn.sound.8" in sounds.json does not seem to avert this issue either.
Interestingly the additional line on the item works fine (shows the translation key for the variant); perhaps it would be best if invalid types just turn into sound variant 0.