{
  "format_version": "1.20.50",
  "minecraft:block": {
    "description": {
      "identifier": "nicothekid:rose_quartz_lamp",
      "menu_category": {
				"category": "items"
      },
			"states": {
				"nicothekid:light_emission": [
				  0,
				  1,
					2,
					3,
					4
				]
			}
    },
    "components": {
      "minecraft:material_instances": {
        "*": {
          "texture": "nicothekid_rose_quartz_lamp_15",
          "render_method": "opaque",
          "ambient_occlusion": true,
					"face_dimming": false
        }
      },
      "minecraft:unit_cube": {},
      "minecraft:map_color": "#F8EDF6",
      "minecraft:breathability": "solid",
      "minecraft:light_dampening": 15,
      "minecraft:light_emission": 15,
      "minecraft:friction": 0.4,
      "minecraft:flammable": false,
      "minecraft:destructible_by_explosion": {
        "explosion_resistance": 25.0
      },
      "minecraft:destructible_by_mining": {
        "seconds_to_destroy": 0.3
      },
      "minecraft:loot": "loot_tables/nicos_cave_expansion/blocks/nicothekid_quartz_lamp.json",
      "minecraft:on_player_placing": {
				"event": "nicothekid:place_rose_quartz_lamp"
			},
      
      "tag:rose_quartz_lamp": {},
      "tag:custom_lamp": {},
      "tag:stone": {}
    },
    "permutations": [
      {
        "condition": "query.block_state('nicothekid:light_emission') == 0",
        "components": {
          "minecraft:material_instances": {
						"*": {
							"texture": "nicothekid_rose_quartz_lamp_15",
							"render_method": "opaque",
							"ambient_occlusion": true,
							"face_dimming": false
						}
					},
          "minecraft:light_emission": 15,
          "minecraft:on_interact": {
            "event": "nicothekid:rose_quartz_lamp_15_interact",
            "target": "self"
          }
        }
      },
      {
        "condition": "query.block_state('nicothekid:light_emission') == 1",
        "components": {
          "minecraft:material_instances": {
						"*": {
							"texture": "nicothekid_rose_quartz_lamp_12",
							"render_method": "opaque",
							"ambient_occlusion": true,
							"face_dimming": false
						}
					},
          "minecraft:light_emission": 12,
          "minecraft:on_interact": {
            "event": "nicothekid:rose_quartz_lamp_12_interact",
            "target": "self"
          }
        }
      },
      {
        "condition": "query.block_state('nicothekid:light_emission') == 2",
        "components": {
          "minecraft:material_instances": {
						"*": {
							"texture": "nicothekid_rose_quartz_lamp_9",
							"render_method": "opaque",
							"ambient_occlusion": true,
							"face_dimming": false
						}
					},
          "minecraft:light_emission": 9,
          "minecraft:on_interact": {
            "event": "nicothekid:rose_quartz_lamp_9_interact",
            "target": "self"
          }
        }
      },
      {
        "condition": "query.block_state('nicothekid:light_emission') == 3",
        "components": {
          "minecraft:material_instances": {
						"*": {
							"texture": "nicothekid_rose_quartz_lamp_6",
							"render_method": "opaque",
							"ambient_occlusion": true,
							"face_dimming": false
						}
					},
          "minecraft:light_emission": 6,
          "minecraft:on_interact": {
            "event": "nicothekid:rose_quartz_lamp_6_interact",
            "target": "self"
          }
        }
      },
      {
        "condition": "query.block_state('nicothekid:light_emission') == 4",
        "components": {
          "minecraft:material_instances": {
						"*": {
							"texture": "nicothekid_rose_quartz_lamp_3",
							"render_method": "opaque",
							"ambient_occlusion": true,
							"face_dimming": false
						}
					},
          "minecraft:light_emission": 3,
          "minecraft:on_interact": {
            "event": "nicothekid:rose_quartz_lamp_3_interact",
            "target": "self"
          }
        }
      }
    ],
    "events": {
      "nicothekid:place_rose_quartz_lamp": {
        "set_block_state": {
          "nicothekid:light_emission": 0
        }
      },
      "nicothekid:rose_quartz_lamp_15_interact": {
        "sequence": [
          {
            "set_block_state": {
              "nicothekid:light_emission": 1
            }
          },
          {
						"run_command": {
							"command": [
								"playsound random.lever_click @a[r=10]"
							]
						}
					}
        ]
      },
      "nicothekid:rose_quartz_lamp_12_interact": {
        "sequence": [
          {
            "set_block_state": {
              "nicothekid:light_emission": 2
            }
          },
          {
						"run_command": {
							"command": [
								"playsound random.lever_click @a[r=10]"
							]
						}
					}
        ]
      },
      "nicothekid:rose_quartz_lamp_9_interact": {
        "sequence": [
          {
            "set_block_state": {
              "nicothekid:light_emission": 3
            }
          },
          {
						"run_command": {
							"command": [
								"playsound random.lever_click @a[r=10]"
							]
						}
					}
        ]
      },
      "nicothekid:rose_quartz_lamp_6_interact": {
        "sequence": [
          {
            "set_block_state": {
              "nicothekid:light_emission": 4
            }
          },
          {
						"run_command": {
							"command": [
								"playsound random.lever_click @a[r=10]"
							]
						}
					}
        ]
      },
      "nicothekid:rose_quartz_lamp_3_interact": {
        "sequence": [
          {
            "set_block_state": {
              "nicothekid:light_emission": 0
            }
          },
          {
						"run_command": {
							"command": [
								"playsound random.lever_click @a[r=10]"
							]
						}
					}
        ]
      }
    }
  }
}
