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

Gaps in an animation's used frames throws ArrayIndexOutOfBoundsException

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reopened
    • Resolution: Unresolved
    • Affects Version/s: Minecraft 17w45b, Minecraft 18w07c
    • Fix Version/s: Minecraft 18w01a
    • Labels:
      None
    • Confirmation Status:
      Confirmed

      Description

      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.

        Attachments

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

          Issue Links

            Activity

              People

              • Assignee:
                fry [Mojang] Georgii Gavrichev
                Reporter:
                AjaxGb AjaxGb
              • Votes:
                2 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  CHK: