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

Texture metadata parsing fails if animation block is not present

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: Minecraft 18w11a
    • Fix Version/s: Minecraft 18w20a
    • Labels:
      None
    • Environment:

      Windows 10
      Java 8 u162

    • Confirmation Status:
      Unconfirmed

      Description

      Behavior

      When using a texture .mcmeta without an "animation" section, the parsing fails with an error (example below). The JSON is otherwise perfectly valid.

      Error

      [01:11:08] [Client thread/ERROR]: Unable to parse metadata from minecraft:textures/blocks/glass.png : com.google.gson.JsonSyntaxException: Missing animation, expected to find a JsonObject
      

      Source (glass.png.mcmeta)

      {
          "ctm": {
              "ctm_version": 1,
              "type": "CTM",
              "layer": "CUTOUT",
              "textures": [ "blocks/glass_ctm" ],
              "extra": { "connect_inside": true }
          }
      }
      

      Expected Behavior

      The mcmeta is loaded normally, the animation section is skipped, and the texture just has no animation.

        Attachments

          Activity

            People

            • Assignee:
              grum [Mojang] Grum (Erik Broes)
              Reporter:
              tterrag tterrag
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: