{
	"format_version": "1.18.0",
	"minecraft:entity": {
		"description": {
			"identifier": "ldz:magic_barrier",
			"is_spawnable": false,
			"is_summonable": true,
			"is_experimental": false,
			"animations": {
				"animation_delay": "animation.magic_barrier.animation_delay",
				"duplication_check": "animation.magic_barrier.duplication_check",
				"effects_clear_clock": "animation.inanimate_entity.effect_clear_clock",
				"state_check": "animation.magic_barrier.state_check",
				"ctrl.fx": "controller.animation.magic_barrier.fx"
			},
			"scripts": {
				"animate": [
					{ "duplication_check": "q.is_tamed" },
					"effects_clear_clock",
					{ "state_check": "q.has_any_family('beast_dungeon_barrier','mystic_dungeon_barrier','scourge_dungeon_barrier''wraith_dungeon_barrier')" },
					"ctrl.fx"
				]
			},
			"properties": {
				"ldz:barrier": {
					"type": "enum",
					"default": "default",
					"values": [
						"appear",
						"default",
						"disappear"
					],
					"client_sync": true
				}
			}
		},
		"component_groups": {
			"instant_despawn": {
				"minecraft:instant_despawn": {}
			},
			"duplication_check_toggle": {
				"minecraft:is_tamed": {}
			},
			"default": {
				"minecraft:variant": {
					"value": 0
				}
			},
			"rotate_90": {
				"minecraft:variant": {
					"value": 1
				}
			},
			"pos_x": {
				"minecraft:variant": {
					"value": 2
				}
			},
			"neg_x": {
				"minecraft:variant": {
					"value": 3
				}
			},
			"pos_z": {
				"minecraft:variant": {
					"value": 4
				}
			},
			"neg_z": {
				"minecraft:variant": {
					"value": 5
				}
			},
			"portal_room_barrier": {
				"minecraft:type_family": {
					"family": [ "ldz", "magic_barrier", "portal_room_barrier" ]
				}
			},
			"beast_hub_barrier": {
				"minecraft:type_family": {
					"family": [ "ldz", "magic_barrier", "beast_hub_barrier" ]
				}
			},
			"beast_dungeon_barrier": {
				"minecraft:type_family": {
					"family": [ "ldz", "magic_barrier", "beast_dungeon_barrier" ]
				}
			},
			"mystic_hub_barrier": {
				"minecraft:type_family": {
					"family": [ "ldz", "magic_barrier", "mystic_hub_barrier" ]
				}
			},
			"mystic_dungeon_barrier": {
				"minecraft:type_family": {
					"family": [ "ldz", "magic_barrier", "mystic_dungeon_barrier" ]
				}
			},
			"scourge_hub_barrier": {
				"minecraft:type_family": {
					"family": [ "ldz", "magic_barrier", "scourge_hub_barrier" ]
				}
			},
			"scourge_dungeon_barrier": {
				"minecraft:type_family": {
					"family": [ "ldz", "magic_barrier", "scourge_dungeon_barrier" ]
				}
			},
			"wraith_hub_barrier": {
				"minecraft:type_family": {
					"family": [ "ldz", "magic_barrier", "wraith_hub_barrier" ]
				}
			},
			"wraith_dungeon_barrier": {
				"minecraft:type_family": {
					"family": [ "ldz", "magic_barrier", "wraith_dungeon_barrier" ]
				}
			}
		},
		"components": {
			"minecraft:type_family": {
				"family": [ "ldz", "magic_barrier" ]
			},
			"minecraft:collision_box": {
				"height": 0,
				"width": 0
			},
			"minecraft:fire_immune": {},
			"minecraft:knockback_resistance": {
				"value": 100,
				"maximum": 100
			},
			"minecraft:damage_sensor": {
				"triggers": [
					{
						"on_damage": {
							"filters": {
								"test": "has_damage",
								"value": "void"
							},
							"event": "despawn"
						},
						"deals_damage": false
					},
					{
						"cause": "all",
						"deals_damage": false
					}
				]
			},
			"minecraft:physics": {
				"has_collision": false,
				"has_gravity": false
			},
			"minecraft:pushable": {
				"is_pushable": false,
				"is_pushable_by_piston": false
			}
		},
		"events": {
			"default": {
				"add": {
					"component_groups": [
						"default"
					]
				}
			},
			"portal_room_barrier": {
				"add": {
					"component_groups": [
						"duplication_check_toggle",
						"default",
						"portal_room_barrier"
					]
				}
			},
			"portal_room_barrier_levered": {
				"add": {
					"component_groups": [
						"default",
						"portal_room_barrier"
					]
				},
				"trigger": {
					"event": "set_barrier_to_appear"
				}
			},
			"beast_hub_barrier": {
				"add": {
					"component_groups": [
						"duplication_check_toggle",
						"neg_z",
						"beast_hub_barrier"
					]
				}
			},
			"beast_hub_barrier_levered": {
				"add": {
					"component_groups": [
						"neg_z",
						"beast_hub_barrier"
					]
				},
				"trigger": {
					"event": "set_barrier_to_appear"
				}
			},
			"beast_dungeon_barrier": {
				"add": {
					"component_groups": [
						"duplication_check_toggle",
						"beast_dungeon_barrier"
					]
				}
			},
			"beast_dungeon_barrier_levered": {
				"add": {
					"component_groups": [
						"duplication_check_toggle",
						"beast_dungeon_barrier"
					]
				},
				"trigger": {
					"event": "set_barrier_to_appear"
				}
			},
			"mystic_hub_barrier": {
				"add": {
					"component_groups": [
						"duplication_check_toggle",
						"neg_x",
						"mystic_hub_barrier"
					]
				}
			},
			"mystic_hub_barrier_levered": {
				"add": {
					"component_groups": [
						"neg_x",
						"mystic_hub_barrier"
					]
				},
				"trigger": {
					"event": "set_barrier_to_appear"
				}
			},
			"mystic_dungeon_barrier": {
				"add": {
					"component_groups": [
						"duplication_check_toggle",
						"rotate_90",
						"mystic_dungeon_barrier"
					]
				}
			},
			"mystic_dungeon_barrier_levered": {
				"add": {
					"component_groups": [
						"duplication_check_toggle",
						"rotate_90",
						"mystic_dungeon_barrier"
					]
				},
				"trigger": {
					"event": "set_barrier_to_appear"
				}
			},
			"scourge_hub_barrier": {
				"add": {
					"component_groups": [
						"duplication_check_toggle",
						"pos_z",
						"scourge_hub_barrier"
					]
				}
			},
			"scourge_hub_barrier_levered": {
				"add": {
					"component_groups": [
						"pos_z",
						"scourge_hub_barrier"
					]
				},
				"trigger": {
					"event": "set_barrier_to_appear"
				}
			},
			"scourge_dungeon_barrier": {
				"add": {
					"component_groups": [
						"duplication_check_toggle",
						"rotate_90",
						"scourge_dungeon_barrier"
					]
				}
			},
			"scourge_dungeon_barrier_levered": {
				"add": {
					"component_groups": [
						"duplication_check_toggle",
						"rotate_90",
						"scourge_dungeon_barrier"
					]
				},
				"trigger": {
					"event": "set_barrier_to_appear"
				}
			},
			"wraith_hub_barrier": {
				"add": {
					"component_groups": [
						"duplication_check_toggle",
						"pos_x",
						"wraith_hub_barrier"
					]
				}
			},
			"wraith_hub_barrier_levered": {
				"add": {
					"component_groups": [
						"pos_x",
						"wraith_hub_barrier"
					]
				},
				"trigger": {
					"event": "set_barrier_to_appear"
				}
			},
			"wraith_dungeon_barrier": {
				"add": {
					"component_groups": [
						"duplication_check_toggle",
						"rotate_90",
						"wraith_dungeon_barrier"
					]
				}
			},
			"wraith_dungeon_barrier_levered": {
				"add": {
					"component_groups": [
						"duplication_check_toggle",
						"rotate_90",
						"wraith_dungeon_barrier"
					]
				},
				"trigger": {
					"event": "set_barrier_to_appear"
				}
			},
			"rotate_90": {
				"add": {
					"component_groups": [
						"rotate_90"
					]
				}
			},
			"pos_x": {
				"add": {
					"component_groups": [
						"pos_x"
					]
				}
			},
			"neg_x": {
				"add": {
					"component_groups": [
						"neg_x"
					]
				}
			},
			"pos_z": {
				"add": {
					"component_groups": [
						"pos_z"
					]
				}
			},
			"neg_z": {
				"add": {
					"component_groups": [
						"neg_z"
					]
				}
			},
			"set_barrier_to_appear": {
				"set_property": {
					"ldz:barrier": "appear"
				}
			},
			"set_barrier_to_default": {
				"set_property": {
					"ldz:barrier": "default"
				}
			},
			"set_barrier_to_disappear": {
				"set_property": {
					"ldz:barrier": "disappear"
				}
			},
			"remove_duplication_check_toggle": {
				"remove": {
					"component_groups": [
						"duplication_check_toggle"
					]
				}
			},
			"despawn": {
				"add": {
					"component_groups": [
						"instant_despawn"
					]
				}
			}
		}
	}
}