{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/minecraft-resource-pack-texture-mcmeta/_shared/latest--partial-fusion-texture-metadata.json",
  "title": "Fusion Texture Metadata",
  "description": "Fusion extension for Minecraft texture metadata",
  "x-lintel": {
    "source": "https://json.schemastore.org/partial-fusion-texture-metadata.json",
    "sourceSha256": "48b44e58faddd038d46b920238e76508d46758768ed8743e7811a0a7707425ae"
  },
  "type": "object",
  "oneOf": [
    {
      "type": "object",
      "properties": {
        "animation": {
          "description": "Animation",
          "type": "object",
          "properties": {
            "frames": {
              "items": {
                "oneOf": [
                  {
                    "type": "integer"
                  },
                  {
                    "properties": {
                      "index": {
                        "type": "integer"
                      },
                      "time": {
                        "type": "integer"
                      }
                    },
                    "type": "object"
                  }
                ]
              },
              "type": "array"
            },
            "frametime": {
              "default": 1,
              "type": "integer"
            },
            "height": {
              "type": "integer"
            },
            "interpolate": {
              "default": false,
              "type": "boolean"
            },
            "width": {
              "type": "integer"
            }
          }
        }
      },
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "fusion": {
          "$ref": "#/$defs/fusion-properties"
        }
      },
      "additionalProperties": false
    }
  ],
  "$defs": {
    "fusion-properties": {
      "description": "Properties for Fusion's texture types\n<https://github.com/SuperMartijn642/Fusion/wiki/Default-Texture-Types>",
      "else": {
        "properties": {
          "frame_height": {
            "description": "Height of the frame\n<https://github.com/SuperMartijn642/Fusion/wiki/Default-Texture-Types#scrolling-textures>",
            "default": 16,
            "minimum": 1,
            "title": "Frame Height",
            "type": "integer"
          },
          "frame_width": {
            "description": "Width of the frame\n<https://github.com/SuperMartijn642/Fusion/wiki/Default-Texture-Types#scrolling-textures>",
            "default": 16,
            "minimum": 1,
            "title": "Frame Width",
            "type": "integer"
          },
          "frame_time": {
            "description": "Duration each frame is displayed for in ticks, 1 second = 20 ticks\n<https://github.com/SuperMartijn642/Fusion/wiki/Default-Texture-Types#scrolling-textures>",
            "default": 10,
            "minimum": 1,
            "title": "Frame Duration",
            "type": "integer"
          },
          "from": {
            "description": "Where the frame starts\n<https://github.com/SuperMartijn642/Fusion/wiki/Default-Texture-Types#scrolling-textures>",
            "default": "top_left",
            "enum": [
              "bottom_left",
              "bottom_right",
              "top_left",
              "top_right"
            ],
            "title": "Frame Start Position",
            "type": "string"
          },
          "loop_pause": {
            "description": "Pause duration between loops in ticks, 1 second = 20 ticks\n<https://github.com/SuperMartijn642/Fusion/wiki/Default-Texture-Types#scrolling-textures>",
            "default": 0,
            "minimum": 0,
            "title": "Loop Pause Duration",
            "type": "integer"
          },
          "loop_type": {
            "description": "Loop type, 'reset' restarts from the start position, 'reverse' displays the frames in reverse order\n<https://github.com/SuperMartijn642/Fusion/wiki/Default-Texture-Types#scrolling-textures>",
            "default": "reset",
            "enum": [
              "reset",
              "reverse"
            ],
            "title": "Loop Type",
            "type": "string"
          },
          "to": {
            "description": "Where the frame ends\n<https://github.com/SuperMartijn642/Fusion/wiki/Default-Texture-Types#scrolling-textures>",
            "default": "bottom_left",
            "enum": [
              "bottom_left",
              "bottom_right",
              "top_left",
              "top_right"
            ],
            "title": "Frame End Position",
            "type": "string"
          }
        }
      },
      "properties": {
        "type": {
          "description": "The type of the texture corresponding to the metadata file\n<https://github.com/SuperMartijn642/Fusion/wiki/Default-Texture-Types>",
          "enum": [
            "connecting",
            "scrolling"
          ],
          "title": "Texture Type",
          "type": "string"
        }
      },
      "if": {
        "properties": {
          "type": {
            "const": "connecting"
          }
        }
      },
      "required": [
        "type"
      ],
      "then": {
        "properties": {
          "layout": {
            "default": "full",
            "description": "The format of the connecting texture\n<https://github.com/SuperMartijn642/Fusion/wiki/Default-Texture-Types#connecting-textures>",
            "enum": [
              "compact",
              "full",
              "horizontal",
              "simple",
              "vertical"
            ],
            "title": "Connecting Texture Format",
            "type": "string"
          },
          "render_type": {
            "default": "opaque",
            "description": "Specifies the render type to be used when drawing this texture\n<https://github.com/SuperMartijn642/Fusion/wiki/Default-Texture-Types#render-type-overwrites>",
            "enum": [
              "cutout",
              "opaque",
              "translucent"
            ],
            "title": "Render Type",
            "type": "string"
          }
        }
      },
      "title": "Fusion Texture Properties",
      "type": "object"
    }
  }
}
