{
  "format_version": "1.12.0",
  "minecraft:entity": {
    "description": {
      "identifier": "lv_te:tech_drill",
      "is_spawnable": true,
      "is_summonable": true,
      "properties": {
        "lv.te:cracking": {
          "client_sync": true,
          "default": 0,
          "range": [
            0,
            3
          ],
          "type": "int"
        }
      },
      "scripts": {
        "animate": [
          "rider_logic"
        ]
      },
      "animations": {
        "rider_logic": "controller.animation.lv_te.tech_drill"
      }
    },
    "component_groups": {
      "destroy_component": {
        "minecraft:damage_sensor": {
          "triggers": [
            {
              "on_damage": {
                "filters": [
                  {
                    "all_of": [
                      {
                        "test": "is_family",
                        "subject": "damager",
                        "value": "player"
                      },
                      {
                        "test": "rider_count",
                        "subject": "self",
                        "value": 0
                      }
                    ]
                  }
                ],
                "target": "self",
                "event": "lv_te:cracking"
              },
              "deals_damage": false
            },
            {
              "cause": "all",
              "deals_damage": false
            }
          ]
        }
      },
      "has_rider": {
        "minecraft:movement": {
          "value": 0.12
        },
        "minecraft:break_blocks": {
          "breakable_blocks": [
            "stone",
            "cobblestone",
            "mossy_cobblestone",
            "grass",
            "dirt",
            "sand",
            "snow",
            "gravel",
            "leaves",
            "leaves2",
            "moss_block",
            "diamond_ore",
            "gold_ore",
            "emerald_ore",
            "coal_ore",
            "iron_ore",
            "copper_ore",
            "redstone_ore",
            "deepslate_diamond_ore",
            "deepslate_gold_ore",
            "deepslate_emerald_ore",
            "deepslate_coal_ore",
            "deepslate_iron_ore",
            "deepslate_copper_ore",
            "deepslate_redstone_ore",
            "deepslate",
            "tuff",
            "hardened_clay",
            "stained_hardened_clay",
            "sandstone"
          ]
        }
      },
      "lv_te:despawn": {
        "minecraft:instant_despawn": {
          "remove_child_entities": false
        }
      }
    },
    "components": {
      "minecraft:movement": {
        "value": 0.0
      },
      "minecraft:underwater_movement": {
        "value": 0.0
      },
      "minecraft:jump.static": {},
      "minecraft:movement.basic": {},
      "minecraft:behavior.player_ride_tamed": {},
      "minecraft:pushable": {
        "is_pushable": false,
        "is_pushable_by_piston": false
      },
      "minecraft:type_family": {
        "family": [
          "vehicle"
        ]
      },
      "minecraft:input_ground_controlled": {},
      "minecraft:rideable": {
        "seat_count": 1,
        "family_types": [
          "player"
        ],
        "interact_text": "action.interact.drilling_machine",
        "seats": [
          {
            "position": [
              0,
              1.9,
              -0.2
            ]
          }
        ]
      },
      "minecraft:health": {
        "value": 1,
        "max": 1
      },
      "minecraft:push_through": {
        "value": 1.0
      },
      "minecraft:scale": {
        "value": 1.0
      },
      "minecraft:collision_box": {
        "width": 2.5,
        "height": 3.5
      },
      "minecraft:physics": {}
    },
    "events": {
      "minecraft:entity_spawned": {
        "add": {
          "component_groups": [
            "destroy_component"
          ]
        }
      },
      "rider_on": {
        "add": {
          "component_groups": [
            "has_rider"
          ]
        }
      },
      "rider_off": {
        "remove": {
          "component_groups": [
            "has_rider"
          ]
        }
      },
      "lvl:pickup": {
        "add": {
          "component_groups": [
            "lvl:pickup"
          ]
        },
        "remove": {
          "component_groups": [
            "destroy_component"
          ]
        }
      },
      "lv_te:remove_machine": {
        "add": {
          "component_groups": [
            "lv_te:despawn"
          ]
        }
      },
      "lv_te:reset_cracking": {
        "set_property": {
          "lv.te:cracking": 0
        }
      },
      "lv_te:cracking": {
        "queue_command": {
          "command": "scriptevent lv.te:tech_mech.cracking"
        }
      }
    }
  }
}