{
  "model": {
    "type": "minecraft:select",
    "property": "minecraft:custom_model_data",
    "cases": [
      {
        "when": "needle",
        "model": {
          "type": "minecraft:select",
          "property": "minecraft:display_context",
          "cases": [
            {
              "when": [
                "gui",
                "ground",
                "fixed",
                "on_shelf"
              ],
              "model": {
                "type": "minecraft:model",
                "model": "item/needle"
              }
            }
          ],
          "fallback": {
            "type": "minecraft:model",
            "model": "item/needle_in_hand"
          }
        }
      }
    ],
    "fallback": {
      "type": "minecraft:select",
      "property": "minecraft:display_context",
      "cases": [
        {
          "when": [
            "gui",
            "ground",
            "fixed",
            "on_shelf"
          ],
          "model": {
            "type": "minecraft:model",
            "model": "minecraft:item/diamond_sword"
          }
        }
      ],
      "fallback": {
        "type": "minecraft:model",
        "model": "minecraft:item/diamond_sword"
      }
    }
  }
}
