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

Gaps in an animation's used frames throws ArrayIndexOutOfBoundsException

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Minecraft 18w01a, 21w03a
    • Minecraft 17w45b, Minecraft 18w07c
    • None
    • Confirmed
    • (Unassigned)

      Take the frames list of an animated texture and sort it. If there are any gaps between frames in the result, or if the frames do not start at 0, the parser fails with an ArrayIndexOutOfBoundsException. Unused frames at the end of a sprite sheet are fine, but unused ones at the start or in the middle bug out.

      For example,

      {
      	"animation":{
      		"frames":[1,2]
      	}
      }
      

      and

      {
      	"animation":{
      		"frames":[2,0]
      	}
      }
      

      will fail, but

      {
      	"animation":{
      		"frames":[1,2,0]
      	}
      }
      

      will succeed.

        1. lava_flow.png.mcmeta
          0.4 kB
        2. lava_flow.png
          lava_flow.png
          5 kB
        3. cactus_side.png.mcmeta
          0.1 kB
        4. cactus_side.png
          cactus_side.png
          0.8 kB

            Unassigned Unassigned
            AjaxGb AjaxGb
            Votes:
            3 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: