{
	"format_version": "1.20.80",
	"minecraft:entity": {
		"description": {
			"identifier": "v360:goblin",
			"is_spawnable": true,
			"is_summonable": true
		},
		"component_groups": {
			"interactable_goblin": {
				"minecraft:interact": {
					"interactions": [
						{
							"on_interact": {
								"filters": {
									"all_of": [
										{
											"test": "has_equipment",
											"subject": "other",
											"domain": "hand",
											"value": "v360:rainbow_shard"
										},
										{
											"test": "is_family",
											"subject": "other",
											"value": "player"
										}
									]
								}
							},
							"barter": true,
							"admire": true,
							"use_item": true,
							"cooldown_after_being_attacked": 20,
							"interact_text": "action.interact.barter"
						}
					]
				}
			},
			"angry": {
				"minecraft:equipment": {
					"table": "loot_tables/goblin_equipment.json"
				},
				"minecraft:behavior.melee_attack": {
					"priority": 0,
					"attack_once": false,
					"speed_multiplier": 0.4,
					"reach_multiplier": 0.2,
					"track_target": true
				},
				"minecraft:behavior.nearest_attackable_target": {
					"priority": 0,
					"within_radius": 25,
					"entity_types": [
						{
							"filters": {
								"any_of": [
									{
										"test": "is_family",
										"subject": "other",
										"value": "player"
									}
								]
							},
							"max_dist": 35
						}
					]
				},
				"minecraft:attack": {
					"damage": 4
				},
				"minecraft:on_target_acquired": {
					"event": "angry",
					"target": "self"
				}
			},
			"calm": {
				"minecraft:on_hurt_by_player": {
					"event": "angry"
				}
			}
		},
		"components": {
			"minecraft:is_hidden_when_invisible": {},
			"minecraft:admire_item": {
				"duration": 8,
				"cooldown_after_being_attacked": 20
			},
			"minecraft:collision_box": {
				"width": 0.6,
				"height": 1.2
			},
			"minecraft:breathable": {
				"total_supply": 15,
				"suffocate_time": 0
			},
			"minecraft:health": {
				"value": 16,
				"max": 16
			},
			"minecraft:hurt_on_condition": {
				"damage_conditions": [
					{
						"filters": {
							"test": "in_lava",
							"subject": "self",
							"operator": "==",
							"value": true
						},
						"cause": "lava",
						"damage_per_tick": 4
					}
				]
			},
			"minecraft:navigation.walk": {
				"can_path_over_water": true,
				"can_open_doors": true
			},
			"minecraft:movement.basic": {},
			"minecraft:jump.static": {},
			"minecraft:nameable": {},
			"minecraft:inventory": {
				"inventory_size": 8
			},
			"minecraft:despawn": {
				"despawn_from_distance": {}
			},
			"minecraft:behavior.hurt_by_target": {
				"priority": 1
			},
			"minecraft:behavior.admire_item": {
				"priority": 2,
				"admire_item_sound": "admire",
				"sound_interval": {
					"range_min": 2,
					"range_max": 5
				},
				"on_admire_item_start": {
					"event": "admire_item_started_event",
					"target": "self"
				},
				"on_admire_item_stop": {
					"event": "admire_item_stopped_event",
					"target": "self"
				}
			},
			"minecraft:behavior.barter": {
				"priority": 3
			},
			"minecraft:conditional_bandwidth_optimization": {},
			"minecraft:behavior.random_stroll": {
				"priority": 10,
				"speed_multiplier": 0.6
			},
			"minecraft:behavior.look_at_player": {
				"priority": 11,
				"look_distance": 8
			},
			"minecraft:behavior.random_look_around": {
				"priority": 12
			},
			"minecraft:physics": {},
			"minecraft:pushable": {
				"is_pushable": true,
				"is_pushable_by_piston": true
			},
			"minecraft:follow_range": {
				"value": 64
			},
			"minecraft:barter": {
				"barter_table": "loot_tables/goblin_barter.json",
				"cooldown_after_being_attacked": 20
			},
			"minecraft:movement": {
				"value": 0.3
			}
		},
		"events": {
			"admire_item_started_event": {
				"remove": {
					"component_groups": [
						"interactable_goblin"
					]
				}
			},
			"admire_item_stopped_event": {
				"add": {
					"component_groups": [
						"interactable_goblin"
					]
				}
			},
			"angry": {
				"add": {
					"component_groups": [
						"angry"
					]
				},
				"remove": {
					"component_groups": [
						"interactable_goblin",
						"calm"
					]
				}
			},
			"minecraft:entity_spawned": {
				"add": {
					"component_groups": [
						"interactable_goblin",
						"calm"
					]
				}
			}
		}
	}
}