Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-250939

Game crashes when a goat horn with an invalid sound variant is used / java.lang.ArrayIndexOutOfBoundsException: Index <index> out of bounds for length 8

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Fixed
    • 22w17a
    • 22w18a
    • Confirmed
    • Crash
    • Very Important

    Description

      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:

      1. Use the command: /give @s goat_horn{SoundVariant:8}
      2. 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

        Issue Links

          Activity

            People

              slicedlime [Mojang] slicedlime
              ManosSef ManosSef
              Votes:
              9 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                CHK: