{
  "format_version": "1.16.100",
  "minecraft:block": {
    "description": {
      "identifier": "darkgato:snowman_body",
      "properties": {
        "block:rotation": [ 2, 3, 4, 5 ],
        "block:scarf1": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ],
        "block:scarf2": [ 0, 1, 2, 3, 4, 5, 6, 7, 8 ],
        "block:pose": [ 0, 1, 2, 3, 4, 5 ]
      }
    },
    "components": {
      "minecraft:material_instances": {
        "*": {
          "texture": "snowman_body",
          "render_method": "opaque"
        }
      },
      "minecraft:geometry": "geometry.snowman_pose_default",
      "minecraft:loot": "loot_tables/blocks/snowman.json",
      "minecraft:destroy_time": 1.5,
      "minecraft:map_color": "#CBFFFB",
      "minecraft:explosion_resistance": 0,
      "minecraft:flammable": {
        "flame_odds": 15,
        "burn_odds": 15
      },
      "minecraft:block_light_absorption": 0,
      "minecraft:on_player_placing": {
        "event": "update_rotation"
      },
      "minecraft:on_interact": {
        "event": "change_scarf_or_pose"
      },
      "minecraft:on_placed": {
        "event": "add_head"
      },
      "minecraft:pick_collision": {
        "origin": [ -6, 0, -6 ],
        "size": [ 12, 16, 12 ]
      },
      "minecraft:entity_collision": {
        "origin": [ -6, 0, -6 ],
        "size": [ 12, 12, 12 ]
      }
    },
    "permutations": [
      {
        "condition": "query.block_property('block:rotation') == 2",
        "components": {
          "minecraft:rotation": [ 0, 0, 0 ],
          "tag:darkgato:rotation2": {}
        }
      },
      {
        "condition": "query.block_property('block:rotation') == 3",
        "components": {
          "minecraft:rotation": [ 0, -180, 0 ],
          "tag:darkgato:rotation3": {}
        }
      },
      {
        "condition": "query.block_property('block:rotation') == 4",
        "components": {
          "minecraft:rotation": [ 0, 90, 0 ],
          "tag:darkgato:rotation4": {}
        }
      },
      {
        "condition": "query.block_property('block:rotation') == 5",
        "components": {
          "minecraft:rotation": [ 0, -90, 0 ],
          "tag:darkgato:rotation5": {}
        }
      },
      {
        "condition": "query.block_property('block:pose') == 0",
        "components": {
          "minecraft:geometry": "geometry.snowman_pose_default"
        }
      },
      {
        "condition": "query.block_property('block:pose') == 1",
        "components": {
          "minecraft:geometry": "geometry.snowman_pose1"
        }
      },
      {
        "condition": "query.block_property('block:pose') == 2",
        "components": {
          "minecraft:geometry": "geometry.snowman_pose2"
        }
      },
      {
        "condition": "query.block_property('block:pose') == 3",
        "components": {
          "minecraft:geometry": "geometry.snowman_pose3"
        }
      },
      {
        "condition": "query.block_property('block:pose') == 4",
        "components": {
          "minecraft:geometry": "geometry.snowman_pose4"
        }
      },
      {
        "condition": "query.block_property('block:pose') == 5",
        "components": {
          "minecraft:geometry": "geometry.snowman_pose5"
        }
      },
      {
        "condition": "query.block_property('block:scarf1') == 0",
        "components": {
          "minecraft:material_instances": {
            "*": {
              "texture": "snowman_body",
              "render_method": "opaque"
            }
          }
        }
      },
      {
        "condition": "query.block_property('block:scarf1') == 1",
        "components": {
          "minecraft:material_instances": {
            "*": {
              "texture": "snowman_scarf_black",
              "render_method": "opaque"
            }
          }
        }
      },
      {
        "condition": "query.block_property('block:scarf1') == 2",
        "components": {
          "minecraft:material_instances": {
            "*": {
              "texture": "snowman_scarf_blue",
              "render_method": "opaque"
            }
          }
        }
      },
      {
        "condition": "query.block_property('block:scarf1') == 3",
        "components": {
          "minecraft:material_instances": {
            "*": {
              "texture": "snowman_scarf_brown",
              "render_method": "opaque"
            }
          }
        }
      },
      {
        "condition": "query.block_property('block:scarf1') == 4",
        "components": {
          "minecraft:material_instances": {
            "*": {
              "texture": "snowman_scarf_cyan",
              "render_method": "opaque"
            }
          }
        }
      },
      {
        "condition": "query.block_property('block:scarf1') == 5",
        "components": {
          "minecraft:material_instances": {
            "*": {
              "texture": "snowman_scarf_gray",
              "render_method": "opaque"
            }
          }
        }
      },
      {
        "condition": "query.block_property('block:scarf1') == 6",
        "components": {
          "minecraft:material_instances": {
            "*": {
              "texture": "snowman_scarf_green",
              "render_method": "opaque"
            }
          }
        }
      },
      {
        "condition": "query.block_property('block:scarf1') == 7",
        "components": {
          "minecraft:material_instances": {
            "*": {
              "texture": "snowman_scarf_light_blue",
              "render_method": "opaque"
            }
          }
        }
      },
      {
        "condition": "query.block_property('block:scarf1') == 8",
        "components": {
          "minecraft:material_instances": {
            "*": {
              "texture": "snowman_scarf_lime",
              "render_method": "opaque"
            }
          }
        }
      },
      {
        "condition": "query.block_property('block:scarf2') == 1",
        "components": {
          "minecraft:material_instances": {
            "*": {
              "texture": "snowman_scarf_magenta",
              "render_method": "opaque"
            }
          }
        }
      },
      {
        "condition": "query.block_property('block:scarf2') == 2",
        "components": {
          "minecraft:material_instances": {
            "*": {
              "texture": "snowman_scarf_orange",
              "render_method": "opaque"
            }
          }
        }
      },
      {
        "condition": "query.block_property('block:scarf2') == 3",
        "components": {
          "minecraft:material_instances": {
            "*": {
              "texture": "snowman_scarf_pink",
              "render_method": "opaque"
            }
          }
        }
      },
      {
        "condition": "query.block_property('block:scarf2') == 4",
        "components": {
          "minecraft:material_instances": {
            "*": {
              "texture": "snowman_scarf_purple",
              "render_method": "opaque"
            }
          }
        }
      },
      {
        "condition": "query.block_property('block:scarf2') == 5",
        "components": {
          "minecraft:material_instances": {
            "*": {
              "texture": "snowman_scarf_red",
              "render_method": "opaque"
            }
          }
        }
      },
      {
        "condition": "query.block_property('block:scarf2') == 6",
        "components": {
          "minecraft:material_instances": {
            "*": {
              "texture": "snowman_scarf_silver",
              "render_method": "opaque"
            }
          }
        }
      },
      {
        "condition": "query.block_property('block:scarf2') == 7",
        "components": {
          "minecraft:material_instances": {
            "*": {
              "texture": "snowman_scarf_white",
              "render_method": "opaque"
            }
          }
        }
      },
      {
        "condition": "query.block_property('block:scarf2') == 8",
        "components": {
          "minecraft:material_instances": {
            "*": {
              "texture": "snowman_scarf_yellow",
              "render_method": "opaque"
            }
          }
        }
      }
    ],
    "events": {
      "update_rotation": {
        "set_block_property": {
          "block:rotation": "query.cardinal_facing_2d"
        }
      },
      "add_head": {
        "run_command": {
          "command": [
            "fill ~ ~1 ~ ~ ~1 ~ darkgato:snowman_head 0 replace air"
          ]
        }
      },
      "change_scarf_or_pose": {
        "sequence": [
          {
            "condition": "query.get_equipped_item_name == 'scarf_black'",
            "set_block_property": {
              "block:scarf1": 1,
              "block:scarf2": 0
            }
          },
          {
            "condition": "query.get_equipped_item_name == 'scarf_blue'",
            "set_block_property": {
              "block:scarf1": 2,
              "block:scarf2": 0
            }
          },
          {
            "condition": "query.get_equipped_item_name == 'scarf_brown'",
            "set_block_property": {
              "block:scarf1": 3,
              "block:scarf2": 0
            }
          },
          {
            "condition": "query.get_equipped_item_name == 'scarf_cyan'",
            "set_block_property": {
              "block:scarf1": 4,
              "block:scarf2": 0
            }
          },
          {
            "condition": "query.get_equipped_item_name == 'scarf_gray'",
            "set_block_property": {
              "block:scarf1": 5,
              "block:scarf2": 0
            }
          },
          {
            "condition": "query.get_equipped_item_name == 'scarf_green'",
            "set_block_property": {
              "block:scarf1": 6,
              "block:scarf2": 0
            }
          },
          {
            "condition": "query.get_equipped_item_name == 'scarf_light_blue'",
            "set_block_property": {
              "block:scarf1": 7,
              "block:scarf2": 0
            }
          },
          {
            "condition": "query.get_equipped_item_name == 'scarf_lime'",
            "set_block_property": {
              "block:scarf1": 8,
              "block:scarf2": 0
            }
          },
          {
            "condition": "query.get_equipped_item_name == 'scarf_magenta'",
            "set_block_property": {
              "block:scarf2": 1,
              "block:scarf1": 9
            }
          },
          {
            "condition": "query.get_equipped_item_name == 'scarf_orange'",
            "set_block_property": {
              "block:scarf2": 2,
              "block:scarf1": 9
            }
          },
          {
            "condition": "query.get_equipped_item_name == 'scarf_pink'",
            "set_block_property": {
              "block:scarf2": 3,
              "block:scarf1": 9
            }
          },
          {
            "condition": "query.get_equipped_item_name == 'scarf_purple'",
            "set_block_property": {
              "block:scarf2": 4,
              "block:scarf1": 9
            }
          },
          {
            "condition": "query.get_equipped_item_name == 'scarf_red'",
            "set_block_property": {
              "block:scarf2": 5,
              "block:scarf1": 9
            }
          },
          {
            "condition": "query.get_equipped_item_name == 'scarf_silver'",
            "set_block_property": {
              "block:scarf2": 6,
              "block:scarf1": 9
            }
          },
          {
            "condition": "query.get_equipped_item_name == 'scarf_white'",
            "set_block_property": {
              "block:scarf2": 7,
              "block:scarf1": 9
            }
          },
          {
            "condition": "query.get_equipped_item_name == 'scarf_yellow'",
            "set_block_property": {
              "block:scarf2": 8,
              "block:scarf1": 9
            }
          },
          {
            "condition": "query.equipped_item_any_tag('slot.weapon.mainhand', 'darkgato:christmas_scarf')",
            "run_command": {
              "command": [
                "playsound dig.snow @a[r=8]"
              ]
            },
            "decrement_stack": {}
          },
          {
            "condition": "query.equipped_item_any_tag('slot.weapon.mainhand', 'darkgato:christmas_scarf') && query.block_property('block:scarf1') == 1",
            "spawn_loot": {
              "table": "loot_tables/blocks/scarf_black.json"
            }
          },
          {
            "condition": "query.equipped_item_any_tag('slot.weapon.mainhand', 'darkgato:christmas_scarf') && query.block_property('block:scarf1') == 2",
            "spawn_loot": {
              "table": "loot_tables/blocks/scarf_blue.json"
            }
          },
          {
            "condition": "query.equipped_item_any_tag('slot.weapon.mainhand', 'darkgato:christmas_scarf') && query.block_property('block:scarf1') == 3",
            "spawn_loot": {
              "table": "loot_tables/blocks/scarf_brown.json"
            }
          },
          {
            "condition": "query.equipped_item_any_tag('slot.weapon.mainhand', 'darkgato:christmas_scarf') && query.block_property('block:scarf1') == 4",
            "spawn_loot": {
              "table": "loot_tables/blocks/scarf_cyan.json"
            }
          },
          {
            "condition": "query.equipped_item_any_tag('slot.weapon.mainhand', 'darkgato:christmas_scarf') && query.block_property('block:scarf1') == 5",
            "spawn_loot": {
              "table": "loot_tables/blocks/scarf_gray.json"
            }
          },
          {
            "condition": "query.equipped_item_any_tag('slot.weapon.mainhand', 'darkgato:christmas_scarf') && query.block_property('block:scarf1') == 6",
            "spawn_loot": {
              "table": "loot_tables/blocks/scarf_green.json"
            }
          },
          {
            "condition": "query.equipped_item_any_tag('slot.weapon.mainhand', 'darkgato:christmas_scarf') && query.block_property('block:scarf1') == 7",
            "spawn_loot": {
              "table": "loot_tables/blocks/scarf_light_blue.json"
            }
          },
          {
            "condition": "query.equipped_item_any_tag('slot.weapon.mainhand', 'darkgato:christmas_scarf') && query.block_property('block:scarf1') == 8",
            "spawn_loot": {
              "table": "loot_tables/blocks/scarf_lime.json"
            }
          },
          {
            "condition": "query.equipped_item_any_tag('slot.weapon.mainhand', 'darkgato:christmas_scarf') && query.block_property('block:scarf2') == 1",
            "spawn_loot": {
              "table": "loot_tables/blocks/scarf_magenta.json"
            }
          },
          {
            "condition": "query.equipped_item_any_tag('slot.weapon.mainhand', 'darkgato:christmas_scarf') && query.block_property('block:scarf2') == 2",
            "spawn_loot": {
              "table": "loot_tables/blocks/scarf_orange.json"
            }
          },
          {
            "condition": "query.equipped_item_any_tag('slot.weapon.mainhand', 'darkgato:christmas_scarf') && query.block_property('block:scarf2') == 3",
            "spawn_loot": {
              "table": "loot_tables/blocks/scarf_pink.json"
            }
          },
          {
            "condition": "query.equipped_item_any_tag('slot.weapon.mainhand', 'darkgato:christmas_scarf') && query.block_property('block:scarf2') == 4",
            "spawn_loot": {
              "table": "loot_tables/blocks/scarf_purple.json"
            }
          },
          {
            "condition": "query.equipped_item_any_tag('slot.weapon.mainhand', 'darkgato:christmas_scarf') && query.block_property('block:scarf2') == 5",
            "spawn_loot": {
              "table": "loot_tables/blocks/scarf_red.json"
            }
          },
          {
            "condition": "query.equipped_item_any_tag('slot.weapon.mainhand', 'darkgato:christmas_scarf') && query.block_property('block:scarf2') == 6",
            "spawn_loot": {
              "table": "loot_tables/blocks/scarf_silver.json"
            }
          },
          {
            "condition": "query.equipped_item_any_tag('slot.weapon.mainhand', 'darkgato:christmas_scarf') && query.block_property('block:scarf2') == 7",
            "spawn_loot": {
              "table": "loot_tables/blocks/scarf_white.json"
            }
          },
          {
            "condition": "query.equipped_item_any_tag('slot.weapon.mainhand', 'darkgato:christmas_scarf') && query.block_property('block:scarf2') == 8",
            "spawn_loot": {
              "table": "loot_tables/blocks/scarf_yellow.json"
            }
          },
          {
            "condition": "query.get_equipped_item_name == 'shears' && query.block_property('block:scarf1') == 1",
            "spawn_loot": {
              "table": "loot_tables/blocks/scarf_black.json"
            },
            "set_block_property": {
              "block:scarf1": 0,
              "block:scarf2": 0
            }
          },
          {
            "condition": "query.get_equipped_item_name == 'shears' && query.block_property('block:scarf1') == 2",
            "spawn_loot": {
              "table": "loot_tables/blocks/scarf_blue.json"
            },
            "set_block_property": {
              "block:scarf1": 0,
              "block:scarf2": 0
            }
          },
          {
            "condition": "query.get_equipped_item_name == 'shears' && query.block_property('block:scarf1') == 3",
            "spawn_loot": {
              "table": "loot_tables/blocks/scarf_brown.json"
            },
            "set_block_property": {
              "block:scarf1": 0,
              "block:scarf2": 0
            }
          },
          {
            "condition": "query.get_equipped_item_name == 'shears' && query.block_property('block:scarf1') == 4",
            "spawn_loot": {
              "table": "loot_tables/blocks/scarf_cyan.json"
            },
            "set_block_property": {
              "block:scarf1": 0,
              "block:scarf2": 0
            }
          },
          {
            "condition": "query.get_equipped_item_name == 'shears' && query.block_property('block:scarf1') == 5",
            "spawn_loot": {
              "table": "loot_tables/blocks/scarf_gray.json"
            },
            "set_block_property": {
              "block:scarf1": 0,
              "block:scarf2": 0
            }
          },
          {
            "condition": "query.get_equipped_item_name == 'shears' && query.block_property('block:scarf1') == 6",
            "spawn_loot": {
              "table": "loot_tables/blocks/scarf_green.json"
            },
            "set_block_property": {
              "block:scarf1": 0,
              "block:scarf2": 0
            }
          },
          {
            "condition": "query.get_equipped_item_name == 'shears' && query.block_property('block:scarf1') == 7",
            "spawn_loot": {
              "table": "loot_tables/blocks/scarf_light_blue.json"
            },
            "set_block_property": {
              "block:scarf1": 0,
              "block:scarf2": 0
            }
          },
          {
            "condition": "query.get_equipped_item_name == 'shears' && query.block_property('block:scarf1') == 8",
            "spawn_loot": {
              "table": "loot_tables/blocks/scarf_lime.json"
            },
            "set_block_property": {
              "block:scarf1": 0,
              "block:scarf2": 0
            }
          },
          {
            "condition": "query.get_equipped_item_name == 'shears' && query.block_property('block:scarf2') == 1",
            "spawn_loot": {
              "table": "loot_tables/blocks/scarf_magenta.json"
            },
            "set_block_property": {
              "block:scarf1": 0,
              "block:scarf2": 0
            }
          },
          {
            "condition": "query.get_equipped_item_name == 'shears' && query.block_property('block:scarf2') == 2",
            "spawn_loot": {
              "table": "loot_tables/blocks/scarf_orange.json"
            },
            "set_block_property": {
              "block:scarf1": 0,
              "block:scarf2": 0
            }
          },
          {
            "condition": "query.get_equipped_item_name == 'shears' && query.block_property('block:scarf2') == 3",
            "spawn_loot": {
              "table": "loot_tables/blocks/scarf_pink.json"
            },
            "set_block_property": {
              "block:scarf1": 0,
              "block:scarf2": 0
            }
          },
          {
            "condition": "query.get_equipped_item_name == 'shears' && query.block_property('block:scarf2') == 4",
            "spawn_loot": {
              "table": "loot_tables/blocks/scarf_purple.json"
            },
            "set_block_property": {
              "block:scarf1": 0,
              "block:scarf2": 0
            }
          },
          {
            "condition": "query.get_equipped_item_name == 'shears' && query.block_property('block:scarf2') == 5",
            "spawn_loot": {
              "table": "loot_tables/blocks/scarf_red.json"
            },
            "set_block_property": {
              "block:scarf1": 0,
              "block:scarf2": 0
            }
          },
          {
            "condition": "query.get_equipped_item_name == 'shears' && query.block_property('block:scarf2') == 6",
            "spawn_loot": {
              "table": "loot_tables/blocks/scarf_silver.json"
            },
            "set_block_property": {
              "block:scarf1": 0,
              "block:scarf2": 0
            }
          },
          {
            "condition": "query.get_equipped_item_name == 'shears' && query.block_property('block:scarf2') == 7",
            "spawn_loot": {
              "table": "loot_tables/blocks/scarf_white.json"
            },
            "set_block_property": {
              "block:scarf1": 0,
              "block:scarf2": 0
            }
          },
          {
            "condition": "query.get_equipped_item_name == 'shears' && query.block_property('block:scarf2') == 8",
            "spawn_loot": {
              "table": "loot_tables/blocks/scarf_yellow.json"
            },
            "set_block_property": {
              "block:scarf1": 0,
              "block:scarf2": 0
            }
          },
          {
            "condition": "query.block_property('block:pose') == 0 && query.get_equipped_item_name == 'stick'",
            "set_block_property": {
              "block:pose": 1
            }
          },
          {
            "condition": "query.block_property('block:pose') == 1 && query.get_equipped_item_name == 'stick'",
            "set_block_property": {
              "block:pose": 2
            }
          },
          {
            "condition": "query.block_property('block:pose') == 2 && query.get_equipped_item_name == 'stick'",
            "set_block_property": {
              "block:pose": 3
            }
          },
          {
            "condition": "query.block_property('block:pose') == 3 && query.get_equipped_item_name == 'stick'",
            "set_block_property": {
              "block:pose": 4
            }
          },
          {
            "condition": "query.block_property('block:pose') == 4 && query.get_equipped_item_name == 'stick'",
            "set_block_property": {
              "block:pose": 5
            }
          },
          {
            "condition": "query.block_property('block:pose') == 5 && query.get_equipped_item_name == 'stick'",
            "set_block_property": {
              "block:pose": 0
            }
          }
        ]
      }
    }
  }
}