{
   "format_version": "1.16.100",
   "minecraft:block": {
      "description": {
         "identifier": "vatonage:toaster",
         "register_to_creative_menu": true,
         "properties": {
            "vatonage:color": [
               0,
               1,
               2,
               3,
               4,
               5,
               6,
               7,
               8,
               9,
               10,
               11,
               12,
               13,
               14,
               15
            ],
            "vatonage:data":[
               2,
               3,
               4,
               5
            ]
         }
      },
      "components": {
         "minecraft:creative_category": {
            "category": "construction"
         },
         "minecraft:pick_collision": {
            "origin": [
               -7,
               0,
               -7
            ],
            "size": [
               14,
               8,
               14
            ]
         },
         "minecraft:entity_collision": {
            "origin": [
               -7,
               0,
               -7
            ],
            "size": [
               14,
               8,
               14
            ]
         },
         "minecraft:geometry": "geometry.toasterv",
         "minecraft:destroy_time": 0.2,
         "minecraft:block_light_absorption": 0,
         "minecraft:on_interact": {
            "event": "vatonage:interact"
         },
         "minecraft:on_player_placing":{
            "event":"vatonage:place"
         }
      },
      "events": {
         "vatonage:place":{
            "set_block_property":{
               "vatonage:data":"(query.cardinal_facing_2d)"
            }
         },
         "vatonage:interact": {
            "sequence": [
               {
                  "condition": "query.get_equipped_item_name == 'white_dye'",
                  "decrement_stack": {},
                  "set_block_property": {
                     "vatonage:color": 0
                  }
               },
               {
                  "condition": "query.get_equipped_item_name == 'red_dye'",
                  "decrement_stack": {},
                  "set_block_property": {
                     "vatonage:color": 1
                  }
               },
               {
                  "condition": "query.get_equipped_item_name == 'orange_dye'",
                  "decrement_stack": {},
                  "set_block_property": {
                     "vatonage:color": 2
                  }
               },
               {
                  "condition": "query.get_equipped_item_name == 'pink_dye'",
                  "decrement_stack": {},
                  "set_block_property": {
                     "vatonage:color": 3
                  }
               },
               {
                  "condition": "query.get_equipped_item_name == 'yellow_dye'",
                  "decrement_stack": {},
                  "set_block_property": {
                     "vatonage:color": 4
                  }
               },
               {
                  "condition": "query.get_equipped_item_name == 'lime_dye'",
                  "decrement_stack": {},
                  "set_block_property": {
                     "vatonage:color": 5
                  }
               },
               {
                  "condition": "query.get_equipped_item_name == 'green_dye'",
                  "decrement_stack": {},
                  "set_block_property": {
                     "vatonage:color": 6
                  }
               },
               {
                  "condition": "query.get_equipped_item_name == 'light_blue_dye'",
                  "decrement_stack": {},
                  "set_block_property": {
                     "vatonage:color": 7
                  }
               },
               {
                  "condition": "query.get_equipped_item_name == 'cyan_dye'",
                  "decrement_stack": {},
                  "set_block_property": {
                     "vatonage:color": 8
                  }
               },
               {
                  "condition": "query.get_equipped_item_name == 'blue_dye'",
                  "decrement_stack": {},
                  "set_block_property": {
                     "vatonage:color": 9
                  }
               },
               {
                  "condition": "query.get_equipped_item_name == 'magenta_dye'",
                  "decrement_stack": {},
                  "set_block_property": {
                     "vatonage:color": 10
                  }
               },
               {
                  "condition": "query.get_equipped_item_name == 'purple_dye'",
                  "decrement_stack": {},
                  "set_block_property": {
                     "vatonage:color": 11
                  }
               },
               {
                  "condition": "query.get_equipped_item_name == 'brown_dye'",
                  "decrement_stack": {},
                  "set_block_property": {
                     "vatonage:color": 12
                  }
               },
               {
                  "condition": "query.get_equipped_item_name == 'gray_dye'",
                  "decrement_stack": {},
                  "set_block_property": {
                     "vatonage:color": 13
                  }
               },
               {
                  "condition": "query.get_equipped_item_name == 'light_gray_dye'",
                  "decrement_stack": {},
                  "set_block_property": {
                     "vatonage:color": 14
                  }
               },
               {
                  "condition": "query.get_equipped_item_name == 'black_dye'",
                  "decrement_stack": {},
                  "set_block_property": {
                     "vatonage:color": 15
                  }
               }
            ]
         }
      },
      "permutations": [
         {
            "condition": "query.block_property('vatonage:color') == 0",
            "components": {
               "minecraft:material_instances": {
                  "*": {
                     "texture": "quartz_block_top",
                     "render_method": "alpha_test"
                  },
                  "stand": {
                     "texture": "quartz_block_top",
                     "render_method": "alpha_test"
                  },
                  "wool": {
                     "texture": "wool_white",
                     "render_method": "alpha_test"
                  }
               }
            }
         },
         {
            "condition": "query.block_property('vatonage:color') == 1",
            "components": {
               "minecraft:material_instances": {
                  "*": {
                     "texture": "quartz_block_top",
                     "render_method": "alpha_test"
                  },
                  "stand": {
                     "texture": "quartz_block_top",
                     "render_method": "alpha_test"
                  },
                  "wool": {
                     "texture": "wool_red",
                     "render_method": "alpha_test"
                  }
               }
            }
         },
         {
            "condition": "query.block_property('vatonage:color') == 2",
            "components": {
               "minecraft:material_instances": {
                  "*": {
                     "texture": "quartz_block_top",
                     "render_method": "alpha_test"
                  },
                  "stand": {
                     "texture": "quartz_block_top",
                     "render_method": "alpha_test"
                  },
                  "wool": {
                     "texture": "wool_orange",
                     "render_method": "alpha_test"
                  }
               }
            }
         },
         {
            "condition": "query.block_property('vatonage:color') == 3",
            "components": {
               "minecraft:material_instances": {
                  "*": {
                     "texture": "quartz_block_top",
                     "render_method": "alpha_test"
                  },
                  "stand": {
                     "texture": "quartz_block_top",
                     "render_method": "alpha_test"
                  },
                  "wool": {
                     "texture": "wool_pink",
                     "render_method": "alpha_test"
                  }
               }
            }
         },
         {
            "condition": "query.block_property('vatonage:color') == 4",
            "components": {
               "minecraft:material_instances": {
                  "*": {
                     "texture": "quartz_block_top",
                     "render_method": "alpha_test"
                  },
                  "stand": {
                     "texture": "quartz_block_top",
                     "render_method": "alpha_test"
                  },
                  "wool": {
                     "texture": "wool_yellow",
                     "render_method": "alpha_test"
                  }
               }
            }
         },
         {
            "condition": "query.block_property('vatonage:color') == 5",
            "components": {
               "minecraft:material_instances": {
                  "*": {
                     "texture": "quartz_block_top",
                     "render_method": "alpha_test"
                  },
                  "stand": {
                     "texture": "quartz_block_top",
                     "render_method": "alpha_test"
                  },
                  "wool": {
                     "texture": "wool_lime",
                     "render_method": "alpha_test"
                  }
               }
            }
         },
         {
            "condition": "query.block_property('vatonage:color') == 6",
            "components": {
               "minecraft:material_instances": {
                  "*": {
                     "texture": "quartz_block_top",
                     "render_method": "alpha_test"
                  },
                  "stand": {
                     "texture": "quartz_block_top",
                     "render_method": "alpha_test"
                  },
                  "wool": {
                     "texture": "wool_green",
                     "render_method": "alpha_test"
                  }
               }
            }
         },
         {
            "condition": "query.block_property('vatonage:color') == 7",
            "components": {
               "minecraft:material_instances": {
                  "*": {
                     "texture": "quartz_block_top",
                     "render_method": "alpha_test"
                  },
                  "stand": {
                     "texture": "quartz_block_top",
                     "render_method": "alpha_test"
                  },
                  "wool": {
                     "texture": "wool_light_blue",
                     "render_method": "alpha_test"
                  }
               }
            }
         },
         {
            "condition": "query.block_property('vatonage:color') == 8",
            "components": {
               "minecraft:material_instances": {
                  "*": {
                     "texture": "quartz_block_top",
                     "render_method": "alpha_test"
                  },
                  "stand": {
                     "texture": "quartz_block_top",
                     "render_method": "alpha_test"
                  },
                  "wool": {
                     "texture": "wool_cyan",
                     "render_method": "alpha_test"
                  }
               }
            }
         },
         {
            "condition": "query.block_property('vatonage:color') == 9",
            "components": {
               "minecraft:material_instances": {
                  "*": {
                     "texture": "quartz_block_top",
                     "render_method": "alpha_test"
                  },
                  "stand": {
                     "texture": "quartz_block_top",
                     "render_method": "alpha_test"
                  },
                  "wool": {
                     "texture": "wool_blue",
                     "render_method": "alpha_test"
                  }
               }
            }
         },
         {
            "condition": "query.block_property('vatonage:color') == 10",
            "components": {
               "minecraft:material_instances": {
                  "*": {
                     "texture": "quartz_block_top",
                     "render_method": "alpha_test"
                  },
                  "stand": {
                     "texture": "quartz_block_top",
                     "render_method": "alpha_test"
                  },
                  "wool": {
                     "texture": "wool_magenta",
                     "render_method": "alpha_test"
                  }
               }
            }
         },
         {
            "condition": "query.block_property('vatonage:color') == 11",
            "components": {
               "minecraft:material_instances": {
                  "*": {
                     "texture": "quartz_block_top",
                     "render_method": "alpha_test"
                  },
                  "stand": {
                     "texture": "quartz_block_top",
                     "render_method": "alpha_test"
                  },
                  "wool": {
                     "texture": "wool_purple",
                     "render_method": "alpha_test"
                  }
               }
            }
         },
         {
            "condition": "query.block_property('vatonage:color') == 12",
            "components": {
               "minecraft:material_instances": {
                  "*": {
                     "texture": "quartz_block_top",
                     "render_method": "alpha_test"
                  },
                  "stand": {
                     "texture": "quartz_block_top",
                     "render_method": "alpha_test"
                  },
                  "wool": {
                     "texture": "wool_brown",
                     "render_method": "alpha_test"
                  }
               }
            }
         },
         {
            "condition": "query.block_property('vatonage:color') == 13",
            "components": {
               "minecraft:material_instances": {
                  "*": {
                     "texture": "quartz_block_top",
                     "render_method": "alpha_test"
                  },
                  "stand": {
                     "texture": "quartz_block_top",
                     "render_method": "alpha_test"
                  },
                  "wool": {
                     "texture": "wool_gray",
                     "render_method": "alpha_test"
                  }
               }
            }
         },
         {
            "condition": "query.block_property('vatonage:color') == 14",
            "components": {
               "minecraft:material_instances": {
                  "*": {
                     "texture": "quartz_block_top",
                     "render_method": "alpha_test"
                  },
                  "stand": {
                     "texture": "quartz_block_top",
                     "render_method": "alpha_test"
                  },
                  "wool": {
                     "texture": "wool_light_gray",
                     "render_method": "alpha_test"
                  }
               }
            }
         },
         {
            "condition": "query.block_property('vatonage:color') == 15",
            "components": {
               "minecraft:material_instances": {
                  "*": {
                     "texture": "quartz_block_top",
                     "render_method": "alpha_test"
                  },
                  "stand": {
                     "texture": "quartz_block_top",
                     "render_method": "alpha_test"
                  },
                  "wool": {
                     "texture": "wool_black",
                     "render_method": "alpha_test"
                  }
               }
            }
         },
         {
            "condition":"query.block_property('vatonage:data') == 2",
            "components":{
               "minecraft:rotation":[
                  0,
                  0,
                  0
               ]
            }
         },
         {
            "condition":"query.block_property('vatonage:data') == 3",
            "components":{
               "minecraft:rotation":[
                  0,
                  180,
                  0
               ]
            }
         },
         {
            "condition":"query.block_property('vatonage:data') == 4",
            "components":{
               "minecraft:rotation":[
                  0,
                  90,
                  0
               ]
            }
         },
         {
            "condition":"query.block_property('vatonage:data') == 5",
            "components":{
               "minecraft:rotation":[
                  0,
                  270,
                  0
               ]
            }
         }
      ]
   }
}