{
	"format_version": "1.16.0",
	"minecraft:entity": {
		"description": {
			"identifier": "dds_camping:tent",
			"is_summonable": true,
			"is_spawnable": true,
			"is_experimental": false,
            "properties": {
                "dds_camping:color": {
                    "type": "int",
                    "range": [ -1, 15 ],
                    "client_sync": true,
                    "default": -1
                }
            }
		},
		"component_groups": {
			"entity_death": {
				"minecraft:instant_despawn": {},
				"minecraft:spawn_entity": {
					"entities": [
						{
							"num_to_spawn": 1,
							"min_wait_time": 0,
							"max_wait_time": 0,
							"spawn_item": "dds_camping:tent_spawn_egg",
							"single_use": true
						}
					]
				}
			}
		},
		"components": {
			"minecraft:type_family": {
				"family": [
					"tent"
				]
			},
			"minecraft:health": {
				"value": 20
			},
			"minecraft:physics": {
				"has_collision": true,
				"has_gravity": false
			},
			"minecraft:collision_box": {
				"height": 1,
				"width": 1
			},
			"minecraft:interact": {
                "interactions": [
                    {
                        "on_interact": {
                            "filters": [
                                { "all_of": [ { "test": "has_equipment", "subject": "other", "domain": "hand", "value": "white_dye" }, { "test": "int_property", "domain": "dds_camping:color", "value": 0, "operator": "!=" } ] }
                            ], "target": "self", "event": "dds_camping:color_white"
                        }, "use_item": true, "interact_text": "action.dds.tent.dye"
                    },
                    {
                        "on_interact": {
                            "filters": [
                                { "all_of": [ { "test": "has_equipment", "subject": "other", "domain": "hand", "value": "orange_dye" }, { "test": "int_property", "domain": "dds_camping:color", "value": 1, "operator": "!=" } ] }
                            ], "target": "self", "event": "dds_camping:color_orange"
                        }, "use_item": true, "interact_text": "action.dds.tent.dye"
                    },
                    {
                        "on_interact": {
                            "filters": [
                                { "all_of": [ { "test": "has_equipment", "subject": "other", "domain": "hand", "value": "magenta_dye" }, { "test": "int_property", "domain": "dds_camping:color", "value": 2, "operator": "!=" } ] }
                            ], "target": "self", "event": "dds_camping:color_magenta"
                        }, "use_item": true, "interact_text": "action.dds.tent.dye"
                    },
                    {
                        "on_interact": {
                            "filters": [
                                { "all_of": [ { "test": "has_equipment", "subject": "other", "domain": "hand", "value": "light_blue_dye" }, { "test": "int_property", "domain": "dds_camping:color", "value": 3, "operator": "!=" } ] }
                            ], "target": "self", "event": "dds_camping:color_light_blue"
                        }, "use_item": true, "interact_text": "action.dds.tent.dye"
                    },
                    {
                        "on_interact": {
                            "filters": [
                                { "all_of": [ { "test": "has_equipment", "subject": "other", "domain": "hand", "value": "yellow_dye" }, { "test": "int_property", "domain": "dds_camping:color", "value": 4, "operator": "!=" } ] }
                            ], "target": "self", "event": "dds_camping:color_yellow"
                        }, "use_item": true, "interact_text": "action.dds.tent.dye"
                    },
                    {
                        "on_interact": {
                            "filters": [
                                { "all_of": [ { "test": "has_equipment", "subject": "other", "domain": "hand", "value": "lime_dye" }, { "test": "int_property", "domain": "dds_camping:color", "value": 5, "operator": "!=" } ] }
                            ], "target": "self", "event": "dds_camping:color_lime"
                        }, "use_item": true, "interact_text": "action.dds.tent.dye"
                    },
                    {
                        "on_interact": {
                            "filters": [
                                { "all_of": [ { "test": "has_equipment", "subject": "other", "domain": "hand", "value": "pink_dye" }, { "test": "int_property", "domain": "dds_camping:color", "value": 6, "operator": "!=" } ] }
                            ], "target": "self", "event": "dds_camping:color_pink"
                        }, "use_item": true, "interact_text": "action.dds.tent.dye"
                    },
                    {
                        "on_interact": {
                            "filters": [
                                { "all_of": [ { "test": "has_equipment", "subject": "other", "domain": "hand", "value": "gray_dye" }, { "test": "int_property", "domain": "dds_camping:color", "value": 7, "operator": "!=" } ] }
                            ], "target": "self", "event": "dds_camping:color_gray"
                        }, "use_item": true, "interact_text": "action.dds.tent.dye"
                    },
                    {
                        "on_interact": {
                            "filters": [
                                { "all_of": [ { "test": "has_equipment", "subject": "other", "domain": "hand", "value": "light_gray_dye" }, { "test": "int_property", "domain": "dds_camping:color", "value": 8, "operator": "!=" } ] }
                            ], "target": "self", "event": "dds_camping:color_silver"
                        }, "use_item": true, "interact_text": "action.dds.tent.dye"
                    },
                    {
                        "on_interact": {
                            "filters": [
                                { "all_of": [ { "test": "has_equipment", "subject": "other", "domain": "hand", "value": "cyan_dye" }, { "test": "int_property", "domain": "dds_camping:color", "value": 9, "operator": "!=" } ] }
                            ], "target": "self", "event": "dds_camping:color_cyan"
                        }, "use_item": true, "interact_text": "action.dds.tent.dye"
                    },
                    {
                        "on_interact": {
                            "filters": [
                                { "all_of": [ { "test": "has_equipment", "subject": "other", "domain": "hand", "value": "purple_dye" }, { "test": "int_property", "domain": "dds_camping:color", "value": 10, "operator": "!=" } ] }
                            ], "target": "self", "event": "dds_camping:color_purple"
                        }, "use_item": true, "interact_text": "action.dds.tent.dye"
                    },
                    {
                        "on_interact": {
                            "filters": [
                                { "all_of": [ { "test": "has_equipment", "subject": "other", "domain": "hand", "value": "blue_dye" }, { "test": "int_property", "domain": "dds_camping:color", "value": 11, "operator": "!=" } ] }
                            ], "target": "self", "event": "dds_camping:color_blue"
                        }, "use_item": true, "interact_text": "action.dds.tent.dye"
                    },
                    {
                        "on_interact": {
                            "filters": [
                                { "all_of": [ { "test": "has_equipment", "subject": "other", "domain": "hand", "value": "brown_dye" }, { "test": "int_property", "domain": "dds_camping:color", "value": 12, "operator": "!=" } ] }
                            ], "target": "self", "event": "dds_camping:color_brown"
                        }, "use_item": true, "interact_text": "action.dds.tent.dye"
                    },
                    {
                        "on_interact": {
                            "filters": [
                                { "all_of": [ { "test": "has_equipment", "subject": "other", "domain": "hand", "value": "green_dye" }, { "test": "int_property", "domain": "dds_camping:color", "value": 13, "operator": "!=" } ] }
                            ], "target": "self", "event": "dds_camping:color_green"
                        }, "use_item": true, "interact_text": "action.dds.tent.dye"
                    },
                    {
                        "on_interact": {
                            "filters": [
                                { "all_of": [ { "test": "has_equipment", "subject": "other", "domain": "hand", "value": "red_dye" }, { "test": "int_property", "domain": "dds_camping:color", "value": 14, "operator": "!=" } ] }
                            ], "target": "self", "event": "dds_camping:color_red"
                        }, "use_item": true, "interact_text": "action.dds.tent.dye"
                    },
                    {
                        "on_interact": {
                            "filters": [
                                { "all_of": [ { "test": "has_equipment", "subject": "other", "domain": "hand", "value": "black_dye" }, { "test": "int_property", "domain": "dds_camping:color", "value": 15, "operator": "!=" } ] }
                            ], "target": "self", "event": "dds_camping:color_black"
                        }, "use_item": true, "interact_text": "action.dds.tent.dye"
                    }
                ]
            },
			"minecraft:inventory": {
				"additional_slots_per_strength": 0,
				"can_be_siphoned_from": false,
				"container_type": "minecart_chest",
				"inventory_size": 27,
				"private": false,
				"restrict_to_owner": false
			},
			"minecraft:knockback_resistance": {
				"value": 1
			},
			"minecraft:custom_hit_test": {
				"hitboxes": [
					{
						"width": 2,
						"height": 2,
						"pivot": [
							0,
							1,
							0
						]
					}
				]
			},
			"minecraft:damage_sensor": {
				"triggers": [
					{
						"cause": "fire",
						"deals_damage": false
					},
					{
						"cause": "entity_attack",
						"deals_damage": true
					}
				]
			}
		},
		"events": {
			"dds_camping:despawn": {
				"add": {
					"component_groups": [
						"entity_death"
					]
				}
			},
			"dds_camping:color_undyed": {
                "set_property": {
                    "dds_camping:color": -1
                }
            },
            "dds_camping:color_white": {
                "set_property": {
                    "dds_camping:color": 0
                }
            },
            "dds_camping:color_orange": {
                "set_property": {
                    "dds_camping:color": 1
                }
            },
            "dds_camping:color_magenta": {
                "set_property": {
                    "dds_camping:color": 2
                }
            },
            "dds_camping:color_light_blue": {
                "set_property": {
                    "dds_camping:color": 3
                }
            },
            "dds_camping:color_yellow": {
                "set_property": {
                    "dds_camping:color": 4
                }
            },
            "dds_camping:color_lime": {
                "set_property": {
                    "dds_camping:color": 5
                }
            },
            "dds_camping:color_pink": {
                "set_property": {
                    "dds_camping:color": 6
                }
            },
            "dds_camping:color_gray": {
                "set_property": {
                    "dds_camping:color": 7
                }
            },
            "dds_camping:color_silver": {
                "set_property": {
                    "dds_camping:color": 8
                }
            },
            "dds_camping:color_cyan": {
                "set_property": {
                    "dds_camping:color": 9
                }
            },
            "dds_camping:color_purple": {
                "set_property": {
                    "dds_camping:color": 10
                }
            },
            "dds_camping:color_blue": {
                "set_property": {
                    "dds_camping:color": 11
                }
            },
            "dds_camping:color_brown": {
                "set_property": {
                    "dds_camping:color": 12
                }
            },
            "dds_camping:color_green": {
                "set_property": {
                    "dds_camping:color": 13
                }
            },
            "dds_camping:color_red": {
                "set_property": {
                    "dds_camping:color": 14
                }
            },
            "dds_camping:color_black": {
                "set_property": {
                    "dds_camping:color": 15
                }
            }
		}
	}
}