{
  "format_version": "1.16.0",
  "minecraft:entity": {
    "description": {
      "identifier": "nicothekid:wandering_collector",
      "is_spawnable": true,
      "is_summonable": true,
      "is_experimental": false
    },
    "component_groups": {
      "component:crop_collector": {
        "minecraft:variant": {
          "value": 0
        }
      },
      "component:crop_collector_trade_1": {
        "minecraft:economy_trade_table": {
          "display_name": "entity.nicothekid:wandering_crop_collector.name",
          "table": "trading/nicos_mobs/nicothekid_crop_collector_trades.json",
          "new_screen": true
        },
        "minecraft:timer": {
          "looping": false,
          "time": 72000,
          "time_down_event": {
            "event": "event:crop_collector_trade_1_change"
          }
        }
      },
      "component:crop_collector_trade_2": {
        "minecraft:economy_trade_table": {
          "display_name": "entity.nicothekid:wandering_crop_collector.name",
          "table": "trading/nicos_mobs/nicothekid_crop_collector_trades.json",
          "new_screen": true
        },
        "minecraft:timer": {
          "looping": false,
          "time": 72000,
          "time_down_event": {
            "event": "event:crop_collector_trade_2_change"
          }
        }
      },
      
      "component:item_collector": {
        "minecraft:variant": {
          "value": 1
        }
      },
      "component:item_collector_trade_1": {
        "minecraft:economy_trade_table": {
          "display_name": "entity.nicothekid:wandering_item_collector.name",
          "table": "trading/nicos_mobs/nicothekid_item_collector_trades.json",
          "new_screen": true
        },
        "minecraft:timer": {
          "looping": false,
          "time": 72000,
          "time_down_event": {
            "event": "event:item_collector_trade_1_change"
          }
        }
      },
      "component:item_collector_trade_2": {
        "minecraft:economy_trade_table": {
          "display_name": "entity.nicothekid:wandering_item_collector.name",
          "table": "trading/nicos_mobs/nicothekid_item_collector_trades.json",
          "new_screen": true
        },
        "minecraft:timer": {
          "looping": false,
          "time": 72000,
          "time_down_event": {
            "event": "event:item_collector_trade_2_change"
          }
        }
      },
      
      "component:oceanic_collector": {
        "minecraft:variant": {
          "value": 2
        }
      },
      "component:oceanic_collector_trade_1": {
        "minecraft:economy_trade_table": {
          "display_name": "entity.nicothekid:wandering_oceanic_collector.name",
          "table": "trading/nicos_mobs/nicothekid_oceanic_collector_trades.json",
          "new_screen": true
        },
        "minecraft:timer": {
          "looping": false,
          "time": 72000,
          "time_down_event": {
            "event": "event:oceanic_collector_trade_1_change"
          }
        }
      },
      "component:oceanic_collector_trade_2": {
        "minecraft:economy_trade_table": {
          "display_name": "entity.nicothekid:wandering_oceanic_collector.name",
          "table": "trading/nicos_mobs/nicothekid_oceanic_collector_trades.json",
          "new_screen": true
        },
        "minecraft:timer": {
          "looping": false,
          "time": 72000,
          "time_down_event": {
            "event": "event:oceanic_collector_trade_2_change"
          }
        }
      },
      
      "component:plant_collector": {
        "minecraft:variant": {
          "value": 3
        }
      },
      "component:plant_collector_trade_1": {
        "minecraft:economy_trade_table": {
          "display_name": "entity.nicothekid:wandering_plant_collector.name",
          "table": "trading/nicos_mobs/nicothekid_plant_collector_trades.json",
          "new_screen": true
        },
        "minecraft:timer": {
          "looping": false,
          "time": 72000,
          "time_down_event": {
            "event": "event:plant_collector_trade_1_change"
          }
        }
      },
      "component:plant_collector_trade_2": {
        "minecraft:economy_trade_table": {
          "display_name": "entity.nicothekid:wandering_plant_collector.name",
          "table": "trading/nicos_mobs/nicothekid_plant_collector_trades.json",
          "new_screen": true
        },
        "minecraft:timer": {
          "looping": false,
          "time": 72000,
          "time_down_event": {
            "event": "event:plant_collector_trade_2_change"
          }
        }
      },
      
      "component:stone_collector": {
        "minecraft:variant": {
          "value": 4
        }
      },
      "component:stone_collector_trade_1": {
        "minecraft:economy_trade_table": {
          "display_name": "entity.nicothekid:wandering_stone_collector.name",
          "table": "trading/nicos_mobs/nicothekid_stone_collector_trades.json",
          "new_screen": true
        },
        "minecraft:timer": {
          "looping": false,
          "time": 72000,
          "time_down_event": {
            "event": "event:stone_collector_trade_1_change"
          }
        }
      },
      "component:stone_collector_trade_2": {
        "minecraft:economy_trade_table": {
          "display_name": "entity.nicothekid:wandering_stone_collector.name",
          "table": "trading/nicos_mobs/nicothekid_stone_collector_trades.json",
          "new_screen": true
        },
        "minecraft:timer": {
          "looping": false,
          "time": 72000,
          "time_down_event": {
            "event": "event:stone_collector_trade_2_change"
          }
        }
      },
      
      "component:wild_collector": {
        "minecraft:variant": {
          "value": 5
        }
      },
      "component:wild_collector_trade_1": {
        "minecraft:economy_trade_table": {
          "display_name": "entity.nicothekid:wandering_wild_collector.name",
          "table": "trading/nicos_mobs/nicothekid_wild_collector_trades.json",
          "new_screen": true
        },
        "minecraft:timer": {
          "looping": false,
          "time": 72000,
          "time_down_event": {
            "event": "event:wild_collector_trade_1_change"
          }
        }
      },
      "component:wild_collector_trade_2": {
        "minecraft:economy_trade_table": {
          "display_name": "entity.nicothekid:wandering_wild_collector.name",
          "table": "trading/nicos_mobs/nicothekid_wild_collector_trades.json",
          "new_screen": true
        },
        "minecraft:timer": {
          "looping": false,
          "time": 72000,
          "time_down_event": {
            "event": "event:wild_collector_trade_2_change"
          }
        }
      }
    },
    "components": {
      "minecraft:balloonable": {
        "mass": 1.0
      },
      "minecraft:can_climb": {},
      "minecraft:collision_box": {
        "width": 0.6,
        "height": 1.9
      },
      "minecraft:health": {
        "value": 26,
        "max": 26
      },
      "minecraft:is_hidden_when_invisible": {},
      "minecraft:movement": {
        "value": 0.30
      },
      "minecraft:type_family": {
        "family": [
          "wandering_collector",
          "wandering_trader",
          "mob"
        ]
      },
      
      "minecraft:annotation.open_door": {},
      "minecraft:breathable": {
        "breathes_air": true,
        "breathes_lava": false,
        "breathes_solids": false,
        "breathes_water": false,
        "generates_bubbles": true,
        "inhale_time": 0,
        "suffocate_time": 0,
        "total_supply": 15
      },
      "minecraft:damage_sensor": {
        "triggers": [
          {
            "cause": "fall",
            "deals_damage": true,
						"damage_modifier": 0.0,
						"damage_multiplier": 1.0
          }
        ]
      },
      "minecraft:despawn": {
        "despawn_from_chance": true,
        "despawn_from_inactivity": true,
        "despawn_from_simulation_edge": true,
        "remove_child_entities": false,
        "min_range_inactivity_timer": 30,
        "min_range_random_chance": 800,
        "despawn_from_distance": {
          "max_distance": 128,
          "min_distance": 32
        }
      },
      "minecraft:hurt_on_condition": {
        "damage_conditions": [
          {
            "filters": {
              "test": "in_lava",
              "subject": "self",
              "operator": "==",
              "value": true
            },
            "cause": "lava",
            "damage_per_tick": 4
          }
        ]
      },
      "minecraft:jump.static": {
        "jump_power": 0.42
      },
      "minecraft:movement.basic": {
        "max_turn": 30.0
      },
      "minecraft:nameable": {
        "allow_name_tag_renaming": true,
        "always_show": false
      },
      "minecraft:navigation.walk": {
        "avoid_damage_blocks": true,
        "avoid_portals": false,
        "avoid_sun": false,
        "avoid_water": true,
        "can_breach": false,
        "can_break_doors": false,
        "can_jump": true,
        "can_open_doors": true,
        "can_open_iron_doors": false,
        "can_pass_doors": true,
        "can_path_from_air": false,
        "can_path_over_lava": false,
        "can_path_over_water": true,
        "can_sink": true,
        "can_swim": false,
        "can_walk": true,
        "can_walk_in_lava": false,
        "is_amphibious": false,
        "blocks_to_avoid": [
          {
            "tags": "query.any_tag('heated_netherrack_active')"
          },
          "minecraft:cactus",
          "minecraft:fire",
          "minecraft:flowing_lava",
          "minecraft:lava",
          "minecraft:magma",
          "minecraft:sculk",
          "minecraft:sculk_catalyst",
          "minecraft:sculk_sensor",
          "minecraft:sculk_shrieker",
          "minecraft:soul_fire",
          "minecraft:web"
        ]
      },
      "minecraft:physics": {
        "has_collision": true,
        "has_gravity": true
      },
      "minecraft:pushable": {
        "is_pushable": true,
        "is_pushable_by_piston": true
      },
      "minecraft:shooter": {
        "def": "nicothekid:mud_ball"
      },
      
      "minecraft:behavior.float": {
        "priority": 0
      },
      "minecraft:behavior.open_door": {
        "priority": 1,
        "close_door_after": true
      },
      "minecraft:behavior.restrict_open_door": {
        "priority": 2
      },
      "minecraft:behavior.hurt_by_target": {
        "priority": 3,
        "alert_same_type": false,
        "hurt_owner": false,
        "entity_types": [
          {
            "must_see": false,
            "reevaluate_description": false,
            "max_dist": 16,
            "walk_speed_multiplier": 1.0,
            "sprint_speed_multiplier": 1.0,
            "filters": {
              "all_of": [
                {
                  "test": "is_family",
                  "subject": "other",
                  "value": "wandering_collector",
                  "operator": "!="
                }
              ]
            }
          }
        ]
      },
      "minecraft:behavior.ranged_attack": {
        "priority": 4,
        "burst_shots": 2,
        "attack_interval_min": 1.0,
        "attack_interval_max": 3.0,
        "attack_radius": 16.0
      },
      "minecraft:behavior.avoid_mob_type": {
        "priority": 5,
        "remove_target": false,
        "avoid_target_xz": 16,
        "avoid_target_y": 7,
        "max_dist": 3.0,
        "max_flee": 10.0,
        "probability_per_strength": 1.0,
        "sprint_distance": 7.0,
        "sprint_speed_multiplier": 1.0,
        "walk_speed_multiplier": 1.0,
        "entity_types": [
          {
            "must_see": true,
            "reevaluate_description": false,
            "max_dist": 8,
            "walk_speed_multiplier": 1.10,
            "sprint_speed_multiplier": 1.10,
            "filters": {
              "any_of": [
                {
                  "test": "is_family",
                  "subject": "other",
                  "value": "monster",
                  "operator": "=="
                }
              ]
            }
          }
        ]
      },
      "minecraft:behavior.panic": {
        "priority": 6,
        "force": false,
        "ignore_mob_damage": false,
        "prefer_water": false,
        "speed_multiplier": 1.25
      },
      "minecraft:behavior.avoid_block": {
        "priority": 7,
        "search_height": 4,
        "search_range": 8,
        "sprint_speed_modifier": 1.1,
        "walk_speed_modifier": 1.0,
        "tick_interval": 2,
        "target_selection_method": "nearest",
        "target_blocks": [
          "minecraft:sculk",
          "minecraft:sculk_catalyst",
          "minecraft:sculk_sensor",
          "minecraft:sculk_shrieker"
        ]
      },
      "minecraft:behavior.trade_with_player": {
        "priority": 8
      },
      "minecraft:behavior.trade_interest": {
        "priority": 9,
        "carried_item_switch_time": 2.0,
        "cooldown": 2.0,
        "interest_time": 45.0,
        "remove_item_time": 1.0,
        "within_radius": 6.0
      },
      "minecraft:behavior.look_at_trading_player": {
        "priority": 10,
        "probability": 0.02,
        "angle_of_view_horizontal": 360,
        "angle_of_view_vertical": 360,
        "look_distance": 8.0,
        "look_time": [ 2, 4 ]
      },
      "minecraft:behavior.random_stroll": {
        "priority": 11,
        "speed_multiplier": 0.8
      },
      "minecraft:behavior.look_at_player": {
        "priority": 12,
        "probability": 0.02,
        "angle_of_view_horizontal": 360,
        "angle_of_view_vertical": 360,
        "look_distance": 8.0,
        "look_time": [ 2, 4 ]
      },
      "minecraft:behavior.random_look_around": {
        "priority": 13,
        "look_time": [ 2, 4 ]
      },
      "minecraft:behavior.look_at_entity": {
        "priority": 14,
        "probability": 0.02,
        "angle_of_view_horizontal": 360,
        "angle_of_view_vertical": 360,
        "look_distance": 4.0,
        "look_time": [ 1, 2 ],
        "filters": {
          "any_of": [
            {
              "test": "is_family",
              "subject": "other",
              "value": "mob",
              "operator": "=="
            }
          ]
        }
      },
      
      "minecraft:experience_reward": {
        "on_death": "query.last_hit_by_player ? 5 + (query.equipment_count * Math.Random(1,3)) : 0"
      },
      "minecraft:loot": {
        "table": "loot_tables/nicos_mobs/entities/nicothekid_wandering_collector.json"
      },
      "minecraft:conditional_bandwidth_optimization": {
      }
    },
    "events": {
      "minecraft:entity_spawned": {
        "randomize": [
          {
            "weight": 100,
            "remove": {},
            "add": {
              "component_groups": [
                "component:crop_collector",
                "component:crop_collector_trade_1"
              ]
            }
          },
          {
            "weight": 100,
            "remove": {},
            "add": {
              "component_groups": [
                "component:item_collector",
                "component:item_collector_trade_1"
              ]
            }
          },
          {
            "weight": 100,
            "remove": {},
            "add": {
              "component_groups": [
                "component:oceanic_collector",
                "component:oceanic_collector_trade_1"
              ]
            }
          },
          {
            "weight": 100,
            "remove": {},
            "add": {
              "component_groups": [
                "component:plant_collector",
                "component:plant_collector_trade_1"
              ]
            }
          },
          {
            "weight": 100,
            "remove": {},
            "add": {
              "component_groups": [
                "component:stone_collector",
                "component:stone_collector_trade_1"
              ]
            }
          },
          {
            "weight": 100,
            "remove": {},
            "add": {
              "component_groups": [
                "component:wild_collector",
                "component:wild_collector_trade_1"
              ]
            }
          }
        ]
      },
      "event:crop_collector_trade_1_change": {
        "remove": {
					"component_groups": [
						"component:crop_collector_trade_1_change"
					]
				},
        "add": {
					"component_groups": [
						"component:crop_collector_trade_2_change"
					]
				}
      },
      "event:crop_collector_trade_2_change": {
        "remove": {
					"component_groups": [
						"component:crop_collector_trade_2_change"
					]
				},
        "add": {
					"component_groups": [
						"component:crop_collector_trade_1_change"
					]
				}
      },
      "event:item_collector_trade_1_change": {
        "remove": {
					"component_groups": [
						"component:item_collector_trade_1_change"
					]
				},
        "add": {
					"component_groups": [
						"component:item_collector_trade_2_change"
					]
				}
      },
      "event:item_collector_trade_2_change": {
        "remove": {
					"component_groups": [
						"component:item_collector_trade_2_change"
					]
				},
        "add": {
					"component_groups": [
						"component:item_collector_trade_1_change"
					]
				}
      },
      "event:oceanic_collector_trade_1_change": {
        "remove": {
					"component_groups": [
						"component:oceanic_collector_trade_1_change"
					]
				},
        "add": {
					"component_groups": [
						"component:oceanic_collector_trade_2_change"
					]
				}
      },
      "event:oceanic_collector_trade_2_change": {
        "remove": {
					"component_groups": [
						"component:oceanic_collector_trade_2_change"
					]
				},
        "add": {
					"component_groups": [
						"component:oceanic_collector_trade_1_change"
					]
				}
      },
      "event:plant_collector_trade_1_change": {
        "remove": {
					"component_groups": [
						"component:plant_collector_trade_1_change"
					]
				},
        "add": {
					"component_groups": [
						"component:plant_collector_trade_2_change"
					]
				}
      },
      "event:plant_collector_trade_2_change": {
        "remove": {
					"component_groups": [
						"component:plant_collector_trade_2_change"
					]
				},
        "add": {
					"component_groups": [
						"component:plant_collector_trade_1_change"
					]
				}
      },
      "event:stone_collector_trade_1_change": {
        "remove": {
					"component_groups": [
						"component:stone_collector_trade_1_change"
					]
				},
        "add": {
					"component_groups": [
						"component:stone_collector_trade_2_change"
					]
				}
      },
      "event:stone_collector_trade_2_change": {
        "remove": {
					"component_groups": [
						"component:stone_collector_trade_2_change"
					]
				},
        "add": {
					"component_groups": [
						"component:stone_collector_trade_1_change"
					]
				}
      },
      "event:wild_collector_trade_1_change": {
        "remove": {
					"component_groups": [
						"component:wild_collector_trade_1_change"
					]
				},
        "add": {
					"component_groups": [
						"component:wild_collector_trade_2_change"
					]
				}
      },
      "event:wild_collector_trade_2_change": {
        "remove": {
					"component_groups": [
						"component:wild_collector_trade_2_change"
					]
				},
        "add": {
					"component_groups": [
						"component:wild_collector_trade_1_change"
					]
				}
      }
    }
  }
}
