{
  "format_version": "1.16.100",
  "minecraft:block": {
    "description": {
      "identifier": "darkgato:gift_big",
      "properties": {
        "block:color1": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ],
        "block:color2": [ 0, 1, 2, 3, 4, 5, 6, 7, 8 ]
      }
    },
    "components": {
      "minecraft:creative_category": {
        "group": "items",
        "category": "items"
      },
      "minecraft:material_instances": {
        "*": {
          "texture": "carton_box_big",
          "render_method": "opaque"
        }
      },
      "minecraft:geometry": "geometry.gift_big",
      "minecraft:loot": "loot_tables/gifts/gift_big.json",
      "minecraft:destroy_time": 1,
      "minecraft:map_color": "#FFFFFF",
      "minecraft:explosion_resistance": 0,
      "minecraft:block_light_absorption": 0,
      "minecraft:on_interact": {
        "event": "change_color"
      },
      "minecraft:flammable": {
        "flame_odds": 15,
        "burn_odds": 15
      },
      "minecraft:pick_collision": {
        "origin": [ -7, 0, -7 ],
        "size": [ 14, 12, 14 ]
      },
      "minecraft:entity_collision": {
        "origin": [ -7, 0, -7 ],
        "size": [ 14, 12, 14 ]
      }
    },
    "permutations": [
      {
        "condition": "query.block_property('block:color1') == 1",
        "components": {
          "minecraft:material_instances": {
            "*": {
              "texture": "gift_big_black",
              "render_method": "opaque"
            }
          }
        }
      },
      {
        "condition": "query.block_property('block:color1') == 2",
        "components": {
          "minecraft:material_instances": {
            "*": {
              "texture": "gift_big_blue",
              "render_method": "opaque"
            }
          }
        }
      },
      {
        "condition": "query.block_property('block:color1') == 3",
        "components": {
          "minecraft:material_instances": {
            "*": {
              "texture": "gift_big_brown",
              "render_method": "opaque"
            }
          }
        }
      },
      {
        "condition": "query.block_property('block:color1') == 4",
        "components": {
          "minecraft:material_instances": {
            "*": {
              "texture": "gift_big_cyan",
              "render_method": "opaque"
            }
          }
        }
      },
      {
        "condition": "query.block_property('block:color1') == 5",
        "components": {
          "minecraft:material_instances": {
            "*": {
              "texture": "gift_big_gray",
              "render_method": "opaque"
            }
          }
        }
      },
      {
        "condition": "query.block_property('block:color1') == 6",
        "components": {
          "minecraft:material_instances": {
            "*": {
              "texture": "gift_big_green",
              "render_method": "opaque"
            }
          }
        }
      },
      {
        "condition": "query.block_property('block:color1') == 7",
        "components": {
          "minecraft:material_instances": {
            "*": {
              "texture": "gift_big_light_blue",
              "render_method": "opaque"
            }
          }
        }
      },
      {
        "condition": "query.block_property('block:color1') == 8",
        "components": {
          "minecraft:material_instances": {
            "*": {
              "texture": "gift_big_lime",
              "render_method": "opaque"
            }
          }
        }
      },
      {
        "condition": "query.block_property('block:color2') == 1",
        "components": {
          "minecraft:material_instances": {
            "*": {
              "texture": "gift_big_magenta",
              "render_method": "opaque"
            }
          }
        }
      },
      {
        "condition": "query.block_property('block:color2') == 2",
        "components": {
          "minecraft:material_instances": {
            "*": {
              "texture": "gift_big_orange",
              "render_method": "opaque"
            }
          }
        }
      },
      {
        "condition": "query.block_property('block:color2') == 3",
        "components": {
          "minecraft:material_instances": {
            "*": {
              "texture": "gift_big_pink",
              "render_method": "opaque"
            }
          }
        }
      },
      {
        "condition": "query.block_property('block:color2') == 4",
        "components": {
          "minecraft:material_instances": {
            "*": {
              "texture": "gift_big_purple",
              "render_method": "opaque"
            }
          }
        }
      },
      {
        "condition": "query.block_property('block:color2') == 5",
        "components": {
          "minecraft:material_instances": {
            "*": {
              "texture": "gift_big_red",
              "render_method": "opaque"
            }
          }
        }
      },
      {
        "condition": "query.block_property('block:color2') == 6",
        "components": {
          "minecraft:material_instances": {
            "*": {
              "texture": "gift_big_silver",
              "render_method": "opaque"
            }
          }
        }
      },
      {
        "condition": "query.block_property('block:color2') == 7",
        "components": {
          "minecraft:material_instances": {
            "*": {
              "texture": "gift_big_white",
              "render_method": "opaque"
            }
          }
        }
      },
      {
        "condition": "query.block_property('block:color2') == 8",
        "components": {
          "minecraft:material_instances": {
            "*": {
              "texture": "gift_big_yellow",
              "render_method": "opaque"
            }
          }
        }
      }
    ],
    "events": {
      "change_color": {
        "sequence": [
          {
            "condition": "query.get_equipped_item_name == 'paper_black'",
            "set_block_property": {
              "block:color1": 1,
              "block:color2": 0
            }
          },
          {
            "condition": "query.get_equipped_item_name == 'paper_blue'",
            "set_block_property": {
              "block:color1": 2,
              "block:color2": 0
            }
          },
          {
            "condition": "query.get_equipped_item_name == 'paper_brown'",
            "set_block_property": {
              "block:color1": 3,
              "block:color2": 0
            }
          },
          {
            "condition": "query.get_equipped_item_name == 'paper_cyan'",
            "set_block_property": {
              "block:color1": 4,
              "block:color2": 0
            }
          },
          {
            "condition": "query.get_equipped_item_name == 'paper_gray'",
            "set_block_property": {
              "block:color1": 5,
              "block:color2": 0
            }
          },
          {
            "condition": "query.get_equipped_item_name == 'paper_green'",
            "set_block_property": {
              "block:color1": 6,
              "block:color2": 0
            }
          },
          {
            "condition": "query.get_equipped_item_name == 'paper_light_blue'",
            "set_block_property": {
              "block:color1": 7,
              "block:color2": 0
            }
          },
          {
            "condition": "query.get_equipped_item_name == 'paper_lime'",
            "set_block_property": {
              "block:color1": 8,
              "block:color2": 0
            }
          },
          {
            "condition": "query.get_equipped_item_name == 'paper_magenta'",
            "set_block_property": {
              "block:color2": 1,
              "block:color1": 9
            }
          },
          {
            "condition": "query.get_equipped_item_name == 'paper_orange'",
            "set_block_property": {
              "block:color2": 2,
              "block:color1": 9
            }
          },
          {
            "condition": "query.get_equipped_item_name == 'paper_pink'",
            "set_block_property": {
              "block:color2": 3,
              "block:color1": 9
            }
          },
          {
            "condition": "query.get_equipped_item_name == 'paper_purple'",
            "set_block_property": {
              "block:color2": 4,
              "block:color1": 9
            }
          },
          {
            "condition": "query.get_equipped_item_name == 'paper_red'",
            "set_block_property": {
              "block:color2": 5,
              "block:color1": 9
            }
          },
          {
            "condition": "query.get_equipped_item_name == 'paper_silver'",
            "set_block_property": {
              "block:color2": 6,
              "block:color1": 9
            }
          },
          {
            "condition": "query.get_equipped_item_name == 'paper_white'",
            "set_block_property": {
              "block:color2": 7,
              "block:color1": 9
            }
          },
          {
            "condition": "query.get_equipped_item_name == 'paper_yellow'",
            "set_block_property": {
              "block:color2": 8,
              "block:color1": 9
            }
          },
          {
            "condition": "query.equipped_item_any_tag('slot.weapon.mainhand', 'darkgato:glitter_paper')",
            "run_command": {
              "command": [
                "playsound mob.sheep.shear @a[r=8]"
              ]
            },
            "decrement_stack": {}
          },
          {
            "condition": "query.equipped_item_any_tag('slot.weapon.mainhand', 'darkgato:glitter_paper') && query.block_property('block:color1') == 1",
            "spawn_loot": {
              "table": "loot_tables/blocks/paper_black.json"
            }
          },
          {
            "condition": "query.equipped_item_any_tag('slot.weapon.mainhand', 'darkgato:glitter_paper') && query.block_property('block:color1') == 2",
            "spawn_loot": {
              "table": "loot_tables/blocks/paper_blue.json"
            }
          },
          {
            "condition": "query.equipped_item_any_tag('slot.weapon.mainhand', 'darkgato:glitter_paper') && query.block_property('block:color1') == 3",
            "spawn_loot": {
              "table": "loot_tables/blocks/paper_brown.json"
            }
          },
          {
            "condition": "query.equipped_item_any_tag('slot.weapon.mainhand', 'darkgato:glitter_paper') && query.block_property('block:color1') == 4",
            "spawn_loot": {
              "table": "loot_tables/blocks/paper_cyan.json"
            }
          },
          {
            "condition": "query.equipped_item_any_tag('slot.weapon.mainhand', 'darkgato:glitter_paper') && query.block_property('block:color1') == 5",
            "spawn_loot": {
              "table": "loot_tables/blocks/paper_gray.json"
            }
          },
          {
            "condition": "query.equipped_item_any_tag('slot.weapon.mainhand', 'darkgato:glitter_paper') && query.block_property('block:color1') == 6",
            "spawn_loot": {
              "table": "loot_tables/blocks/paper_green.json"
            }
          },
          {
            "condition": "query.equipped_item_any_tag('slot.weapon.mainhand', 'darkgato:glitter_paper') && query.block_property('block:color1') == 7",
            "spawn_loot": {
              "table": "loot_tables/blocks/paper_light_blue.json"
            }
          },
          {
            "condition": "query.equipped_item_any_tag('slot.weapon.mainhand', 'darkgato:glitter_paper') && query.block_property('block:color1') == 8",
            "spawn_loot": {
              "table": "loot_tables/blocks/paper_lime.json"
            }
          },
          {
            "condition": "query.equipped_item_any_tag('slot.weapon.mainhand', 'darkgato:glitter_paper') && query.block_property('block:color2') == 1",
            "spawn_loot": {
              "table": "loot_tables/blocks/paper_magenta.json"
            }
          },
          {
            "condition": "query.equipped_item_any_tag('slot.weapon.mainhand', 'darkgato:glitter_paper') && query.block_property('block:color2') == 2",
            "spawn_loot": {
              "table": "loot_tables/blocks/paper_orange.json"
            }
          },
          {
            "condition": "query.equipped_item_any_tag('slot.weapon.mainhand', 'darkgato:glitter_paper') && query.block_property('block:color2') == 3",
            "spawn_loot": {
              "table": "loot_tables/blocks/paper_pink.json"
            }
          },
          {
            "condition": "query.equipped_item_any_tag('slot.weapon.mainhand', 'darkgato:glitter_paper') && query.block_property('block:color2') == 4",
            "spawn_loot": {
              "table": "loot_tables/blocks/paper_purple.json"
            }
          },
          {
            "condition": "query.equipped_item_any_tag('slot.weapon.mainhand', 'darkgato:glitter_paper') && query.block_property('block:color2') == 5",
            "spawn_loot": {
              "table": "loot_tables/blocks/paper_red.json"
            }
          },
          {
            "condition": "query.equipped_item_any_tag('slot.weapon.mainhand', 'darkgato:glitter_paper') && query.block_property('block:color2') == 6",
            "spawn_loot": {
              "table": "loot_tables/blocks/paper_silver.json"
            }
          },
          {
            "condition": "query.equipped_item_any_tag('slot.weapon.mainhand', 'darkgato:glitter_paper') && query.block_property('block:color2') == 7",
            "spawn_loot": {
              "table": "loot_tables/blocks/paper_white.json"
            }
          },
          {
            "condition": "query.equipped_item_any_tag('slot.weapon.mainhand', 'darkgato:glitter_paper') && query.block_property('block:color2') == 8",
            "spawn_loot": {
              "table": "loot_tables/blocks/paper_yellow.json"
            }
          },
          {
            "condition": "query.get_equipped_item_name == 'shears' && query.block_property('block:color1') == 1",
            "spawn_loot": {
              "table": "loot_tables/blocks/paper_black.json"
            },
            "set_block_property": {
              "block:color1": 0,
              "block:color2": 0
            }
          },
          {
            "condition": "query.get_equipped_item_name == 'shears' && query.block_property('block:color1') == 2",
            "spawn_loot": {
              "table": "loot_tables/blocks/paper_blue.json"
            },
            "set_block_property": {
              "block:color1": 0,
              "block:color2": 0
            }
          },
          {
            "condition": "query.get_equipped_item_name == 'shears' && query.block_property('block:color1') == 3",
            "spawn_loot": {
              "table": "loot_tables/blocks/paper_brown.json"
            },
            "set_block_property": {
              "block:color1": 0,
              "block:color2": 0
            }
          },
          {
            "condition": "query.get_equipped_item_name == 'shears' && query.block_property('block:color1') == 4",
            "spawn_loot": {
              "table": "loot_tables/blocks/paper_cyan.json"
            },
            "set_block_property": {
              "block:color1": 0,
              "block:color2": 0
            }
          },
          {
            "condition": "query.get_equipped_item_name == 'shears' && query.block_property('block:color1') == 5",
            "spawn_loot": {
              "table": "loot_tables/blocks/paper_gray.json"
            },
            "set_block_property": {
              "block:color1": 0,
              "block:color2": 0
            }
          },
          {
            "condition": "query.get_equipped_item_name == 'shears' && query.block_property('block:color1') == 6",
            "spawn_loot": {
              "table": "loot_tables/blocks/paper_green.json"
            },
            "set_block_property": {
              "block:color1": 0,
              "block:color2": 0
            }
          },
          {
            "condition": "query.get_equipped_item_name == 'shears' && query.block_property('block:color1') == 7",
            "spawn_loot": {
              "table": "loot_tables/blocks/paper_light_blue.json"
            },
            "set_block_property": {
              "block:color1": 0,
              "block:color2": 0
            }
          },
          {
            "condition": "query.get_equipped_item_name == 'shears' && query.block_property('block:color1') == 8",
            "spawn_loot": {
              "table": "loot_tables/blocks/paper_lime.json"
            },
            "set_block_property": {
              "block:color1": 0,
              "block:color2": 0
            }
          },
          {
            "condition": "query.get_equipped_item_name == 'shears' && query.block_property('block:color2') == 1",
            "spawn_loot": {
              "table": "loot_tables/blocks/paper_magenta.json"
            },
            "set_block_property": {
              "block:color1": 0,
              "block:color2": 0
            }
          },
          {
            "condition": "query.get_equipped_item_name == 'shears' && query.block_property('block:color2') == 2",
            "spawn_loot": {
              "table": "loot_tables/blocks/paper_orange.json"
            },
            "set_block_property": {
              "block:color1": 0,
              "block:color2": 0
            }
          },
          {
            "condition": "query.get_equipped_item_name == 'shears' && query.block_property('block:color2') == 3",
            "spawn_loot": {
              "table": "loot_tables/blocks/paper_pink.json"
            },
            "set_block_property": {
              "block:color1": 0,
              "block:color2": 0
            }
          },
          {
            "condition": "query.get_equipped_item_name == 'shears' && query.block_property('block:color2') == 4",
            "spawn_loot": {
              "table": "loot_tables/blocks/paper_purple.json"
            },
            "set_block_property": {
              "block:color1": 0,
              "block:color2": 0
            }
          },
          {
            "condition": "query.get_equipped_item_name == 'shears' && query.block_property('block:color2') == 5",
            "spawn_loot": {
              "table": "loot_tables/blocks/paper_red.json"
            },
            "set_block_property": {
              "block:color1": 0,
              "block:color2": 0
            }
          },
          {
            "condition": "query.get_equipped_item_name == 'shears' && query.block_property('block:color2') == 6",
            "spawn_loot": {
              "table": "loot_tables/blocks/paper_silver.json"
            },
            "set_block_property": {
              "block:color1": 0,
              "block:color2": 0
            }
          },
          {
            "condition": "query.get_equipped_item_name == 'shears' && query.block_property('block:color2') == 7",
            "spawn_loot": {
              "table": "loot_tables/blocks/paper_white.json"
            },
            "set_block_property": {
              "block:color1": 0,
              "block:color2": 0
            }
          },
          {
            "condition": "query.get_equipped_item_name == 'shears' && query.block_property('block:color2') == 8",
            "spawn_loot": {
              "table": "loot_tables/blocks/paper_yellow.json"
            },
            "set_block_property": {
              "block:color1": 0,
              "block:color2": 0
            }
          }
        ]
      }
    }
  }
}