{
    "format_version": "1.20.60",
    "minecraft:entity": {
        "description": {
            "identifier": "project_emc:transmutation_table_ui",
            "is_summonable": true
        },
        "component_groups": {
            "not_interactable": {
                "minecraft:interact": {
                    "interactions": [
                        {
                            "on_interact": {
                                "event": "project_emc:transmutation_interacted"
                            }
                        }
                    ]
                }
            }
        },
        "components": {
            "minecraft:custom_hit_test": {
                "hitboxes": [
                    {
                        "width": 0.9,
                        "height": 0.3,
                        "pivot": [
                            0,
                            0.73,
                            0
                        ]
                    }
                ]
            },
            "minecraft:type_family": {
                "family": [
                    "inanimate"
                ]
            },
            "minecraft:collision_box": {
                "height": 0,
                "width": 0
            },
            "minecraft:knockback_resistance": {
                "value": 100,
                "maximum": 100
            },
            "minecraft:damage_sensor": {
                "triggers": [
                    {
                        "cause": "all",
                        "deals_damage": false
                    }
                ]
            },
            "minecraft:inside_block_notifier": {
                "block_list": [
                    {
                        "block": {
                            "name": "air"
                        },
                        "entered_block_event": {
                            "event": "project_emc:transmutation_remove",
                            "target": "self"
                        }
                    }
                ]
            },
            "minecraft:timer": {
                "time": 0.1,
                "looping": true,
                "time_down_event": {
                    "event": "project_emc:transmutation_table_update",
                    "target": "self"
                }
            },
            "minecraft:inventory": {
                "inventory_size": 38,
                "container_type": "inventory"
            },
            "minecraft:entity_sensor": {
                "subsensors": [
                    {
                        "range": 2.5,
                        "minimum_count": 1,
                        "event_filters": {
                            "any_of": [
                                {
                                    "test": "is_family",
                                    "subject": "other",
                                    "value": "mob"
                                },
                                {
                                    "all_of": [
                                        {
                                            "test": "is_family",
                                            "subject": "other",
                                            "value": "player"
                                        },
                                        {
                                            "test": "has_container_open",
                                            "subject": "other",
                                            "value": true
                                        }
                                    ]
                                }
                            ]
                        },
                        "event": "project_emc:transmutation_opened"
                    },
                    {
                        "range": 2.5,
                        "minimum_count": 1,
                        "event_filters": {
                            "all_of": [
                                {
                                    "test": "is_family",
                                    "subject": "other",
                                    "value": "player"
                                },
                                {
                                    "test": "has_container_open",
                                    "subject": "other",
                                    "value": false
                                }
                            ]
                        },
                        "event": "project_emc:transmutation_closed"
                    }
                ]
            },
            "minecraft:nameable": {
                "allow_name_tag_renaming": false,
                "always_show": false
            },
            "minecraft:persistent":{}
        },
        "events": {
            "project_emc:transmutation_remove": {
                "queue_command": {
                    "command": "scriptevent project_emc:transmutation_despawn"
                }
            },
            "project_emc:transmutation_table_update": {
                "filters": {
                    "test": "has_tag",
                    "value": "transmutation_initialized"
                },
                "queue_command": {
                    "command": "scriptevent project_emc:transmutation_update"
                }
            },
            "minecraft:entity_spawned": {
                "sequence": [
                    {
                        "remove": {
                            "component_groups": [
                                "interactable"
                            ]
                        }
                    },
                    {
                        "add": {
                            "component_groups": [
                                "interactable"
                            ]
                        }
                    },
                    {
                        "queue_command": {
                            "command": "scriptevent project_emc:transmutation_initialize"
                        }
                    }
                ]
            },
            "project_emc:transmutation_opened": {
                "add": {
                    "component_groups": [
                        "not_interactable"
                    ]
                }
            },
            "project_emc:transmutation_closed": {
                "remove": {
                    "component_groups": [
                        "not_interactable"
                    ]
                }
            },
            "project_emc:transmutation_interacted": {}
        }
    }
}