{
  "format_version": "1.21.0",
  "minecraft:entity": {
    "description": {
      "identifier": "mdrb:elevator_button_mdrb",
      "spawn_category": "creature",
      "is_spawnable": false,
      "is_summonable": true,
      "is_experimental": false,
      "properties": {
        "md:open_menu": {
          "type": "bool",
          "default": false,
          "client_sync": false
        }
      }
    },
    "component_groups": {
      "despawn": {
        "minecraft:instant_despawn": {}
      }
    },
    "components": {
      "minecraft:damage_sensor": {
        "triggers": {
          "cause": "all",
          "deals_damage": false
        }
      },
      "minecraft:type_family": {
        "family": [ "elevator_button", "md" ]
      },
      "minecraft:collision_box": {
        "width": 0.4,
        "height": 0.4
      },
      "minecraft:physics": {
        "has_gravity": false,
        "has_collision": false
      },
      "minecraft:environment_sensor": {
        "triggers": {
          "filters": {
           "test": "is_riding", "value": false
          },
          "event": "despawn"
        }
      },
      "minecraft:interact": {
        "interactions": [
          {
            "on_interact": {
              "filters": {
                "all_of": [
                  {
                    "test": "bool_property",
                    "domain": "md:open_menu",
                    "value": false
                  },
                  {
                    "test": "is_family",
                    "subject": "other",
                    "value": "player"
                  }
                ]
              }
            },
            "interact_text": "Access"
          }
        ]
      },
      "minecraft:knockback_resistance": {"value": 9},
      "minecraft:conditional_bandwidth_optimization": {
      }
    },
    "events": {
      "despawn": {
        "add" : { "component_groups": ["despawn"] }
      }
    }
  }
}