{
  "format_version": "1.17.0",
  "minecraft:item": {
    "description": {
      "identifier": "bbr:alarmclock",
      "category": "equipment"
    },
    "components": {
      "minecraft:hand_equipped": false,
      "minecraft:max_stack_size": 1,
      "minecraft:foil": false,
      "minecraft:allow_off_hand": false,
      "minecraft:icon": {
        "texture": "bbr:alarmclock"
      },
      "minecraft:display_name": {
        "value": "§3Alarm Clock"
      },
      "tag:minecraft:transform_materials": {},
      "minecraft:cooldown": {
        "category": "alarmclock",
        "duration": 30
      },
      "minecraft:on_use": {
        "on_use": {
          "event": "alarm"
        }
      }
    },
    "events": {
      "alarm": {
        "swing": {},
        "run_command": {
          "command": [
            "function alarm"
          ]
        }
      },
      "hurt": {
        "damage": {
          "type": "magic",
          "amount": 1,
          "target": "self"
        }
      }
    }
  }
}