{
    "format_version": "1.16.100",
    "minecraft:block": {
      "description": {
        "identifier": "loled:bedside_lamp",
        "properties": {
          "loled:face": [
            2,
            3,
            4,
            5,
            6
          ],
          "loled:on": [
            false,
            true
          ]
        }
      },
      "components": {
        "minecraft:material_instances": {
          "*": {
            "texture": "bedside_lamp",
            "render_method": "opaque"
          }
        },
        "minecraft:pick_collision": {
          "origin": [
            -4,
            0,
            -4
          ],
          "size": [
            8,
            11,
            8
          ]
        },
        "minecraft:creative_category": {
          "group": "itemGroup.name.bedroom",
          "category": "construction"
        },
        "minecraft:loot": "loot_tables/bedroom/bedside_lamp.json",
        "minecraft:geometry": "geometry.bedside_lamp",
        "minecraft:destroy_time": 2,
        "minecraft:block_light_absorption": 2,
        "minecraft:entity_collision": {
          "origin": [
            -4,
            0,
            -4
          ],
          "size": [
            8,
            11,
            8
          ]
        },
        "minecraft:friction": 0.6,
        "minecraft:map_color": "#00ff00",
        "minecraft:flammable": {
          "flame_odds": 0,
          "burn_odds": 0
        },
        "minecraft:on_interact": {
          "event": "loled:toggle"
        },
        "minecraft:on_player_placing": {
          "event": "loled:face"
        },
        "minecraft:block_light_emission": 0.8
      },
      "permutations": [
        {
          "condition": "query.block_property('loled:face')==3",
          "components": {
            "minecraft:rotation": [
              0,
              180,
              0
            ]
          }
        },
        {
          "condition": "query.block_property('loled:face')==4",
          "components": {
            "minecraft:rotation": [
              0,
              90,
              0
            ]
          }
        },
        {
          "condition": "query.block_property('loled:face')==5",
          "components": {
            "minecraft:rotation": [
              0,
              270,
              0
            ]
          }
        },
        {
          "condition": "!query.block_property('loled:on')",
          "components": {
            "minecraft:material_instances": {
              "*": {
                "texture": "bedside_lamp_off",
                "render_method": "opaque"
              }
            },
            "minecraft:block_light_emission": 0
          }
        }
      ],
      "events": {
        "loled:face": {
          "set_block_property": {
            "loled:face": "(query.cardinal_player_facing)"
          }
        },
        "loled:toggle": {
          "set_block_property": {
            "loled:on": "query.block_property('loled:on')?false:true"
          }
        }
      }
    }
  }