{
    "format_version": "1.20.0",
    "minecraft:entity": {
        "description": {
            "identifier": "lv_te:oil_refinery",
            "is_spawnable": false,
            "is_summonable": true,
            "is_experimental": false,
            "properties": {
                "lv.te:cracking": {
                    "client_sync": true,
                    "default": 0,
                    "range": [
                        0,
                        3
                    ],
                    "type": "int"
                }
            }
        },
        "component_groups": {
            "lv_te:despawn": {
                "minecraft:instant_despawn": {
                    "remove_child_entities": false
                }
            }
        },
        "components": {
            "minecraft:type_family": {
                "family": [
                    "lv.te.machine",
                    "inanimate"
                ]
            },
            "minecraft:nameable": {
                "allow_name_tag_renaming": false
            },
            "minecraft:damage_sensor": {
                "triggers": [
                    {
                        "on_damage": {
                            "filters": [
                                {
                                    "all_of": [
                                        {
                                            "test": "is_family",
                                            "subject": "damager",
                                            "value": "player"
                                        }
                                    ]
                                }
                            ],
                            "target": "self",
                            "event": "lv_te:cracking"
                        },
                        "deals_damage": false
                    },
                    {
                        "cause": "all",
                        "deals_damage": false
                    }
                ]
            },
            "minecraft:health": {
                "min": 1,
                "value": 1,
                "max": 1
            },
            "minecraft:collision_box": {
                "width": 0.01,
                "height": 0.01
            },
            "minecraft:custom_hit_test": {
                "hitboxes": [
                    {
                        "width": 1,
                        "height": 1,
                        "pivot": [
                            0,
                            0.5,
                            0
                        ]
                    }
                ]
            },
            "minecraft:breathable": {
                "total_supply": 15,
                "suffocate_time": 0
            },
            "minecraft:physics": {
                "has_gravity": false,
                "has_collision": false
            },
            "minecraft:pushable": {
                "is_pushable": false,
                "is_pushable_by_piston": false
            },
            "minecraft:knockback_resistance": {
                "value": 1
            },
            "minecraft:fire_immune": {},
            "minecraft:conditional_bandwidth_optimization": {}
        },
        "events": {
            "minecraft:entity_spawned": {},
            "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:machines.cracking"
                }
            }
        }
    }
}