Game crashes when a goat horn with an invalid sound variant is used / java.lang.ArrayIndexOutOfBoundsException: Index <index> out of bounds for length 8
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)
2022-04-27, 04:57 PM
2022-05-03, 02:09 PM
2022-05-03, 09:10 AM
9
3