User:Hankskyjames/sandbox/Drowned/Friendly behavior/drowned.json

{   "format_version": "1.11.0", "minecraft:entity": { "component_groups": { "minecraft:adult_drowned": { "minecraft:behavior.breed": { "priority": 1, "speed_multiplier": 1 },               "minecraft:behavior.look_at_trading_player": { "priority": 19 },               "minecraft:behavior.make_love": { "priority": 9 },               "minecraft:behavior.offer_flower": {}, "minecraft:behavior.receive_love": { "priority": 10 },               "minecraft:behavior.take_flower": { "priority": 30 },               "minecraft:behavior.trade_interest": { "carried_item_switch_time": 2, "cooldown": 2, "interest_time": 45, "remove_item_time": 1, "within_radius": 6 },               "minecraft:behavior.trade_with_player": { "priority": 20 },               "minecraft:breedable": { "breedItems": [ "cake", "bread", "fish" ],                   "breedsWith": [ {                           "babyType": "minecraft:drowned", "breed_event": { "event": "minecraft:entity_born", "target": "baby" },                           "mateType": "minecraft:player" }                   ],                    "inheritTamed": false, "requireTame": false },               "minecraft:economy_trade_table": { "display_name": "entity.drowned.name", "new_screen": true, "table": "trading/economy_trades/drowned_trades.json" },               "minecraft:loot": { "table": "loot_tables/entities/drowned.json" },               "minecraft:trusting": { "probability": 1, "trust_items": { "items": [ "bread", "bucket:2", "cake", "diamond", "emerald", "raw_cod", "cooked_cod", "cookie" ],                       "max_count": 5 }               }            },            "minecraft:baby_drowned": { "minecraft:ageable": { "duration": 1000, "feedItems": [ {                           "growth": 0.01666700000000000125854882071507745422422885894775390625, "item": "wheat" },                       {                            "growth": 0.025000000000000001387778780781445675529539585113525390625, "item": "sugar" },                       {                            "growth": 1, "item": "cake" },                       {                            "growth": 0.05000000000000000277555756156289135105907917022705078125, "item": "apple" },                       {                            "growth": 0.05000000000000000277555756156289135105907917022705078125, "item": "golden_carrot" },                       {                            "growth": 0.97499999999999997779553950749686919152736663818359375, "item": "fish" },                       {                            "growth": 0.99499999999999999555910790149937383830547332763671875, "item": "bread" }                   ],                    "grow_up": { "event": "minecraft:ageable_grow_up", "target": "self" }               },                "minecraft:is_baby": {}, "minecraft:movement": { "value": 0.25 },               "minecraft:scale": { "value": 0.5 },               "minecraft:underwater_movement": { "value": 0.08000000000000000166533453693773481063544750213623046875 }           },            "minecraft:bed_scedule_drowned": { "minecraft:behavior.sleep": { "goal_radius": 1.5, "sleep_collider_height": 0.299999999999999988897769753748434595763683319091796875, "sleep_collider_width": 1, "sleep_y_offset": 0.59999999999999997779553950749686919152736663818359375, "speed_multiplier": 1.3000000000000000444089209850062616169452667236328125 }           },            "minecraft:drowned_hungry_eating": { "minecraft:behavior.snacking": { "items": [ "bread", "cookie" ],                   "snacking_cooldown": 10, "snacking_cooldown_min": 1, "snacking_stop_change": 0.75 }           },            "minecraft:drowned_scedule": { "minecraft:scheduler": [ {                       "scheduled_event": { "event": "minecraft:drowned_awake", "filters": { "all_of": [ {                                       "operator": "\u003E=", "test": "hourly_clock_time", "value": 0 },                                   {                                        "operator": "\u003C", "test": "hourly_clock_time", "value": 2000 }                               ]                            }                        }                    },                    {                        "scheduled_event": { "event": "minecraft:drowned_at_work", "filters": { "all_of": [ {                                       "operator": "\u003E=", "test": "hourly_clock_time", "value": 2000 },                                   {                                        "operator": "\u003C", "test": "hourly_clock_time", "value": 11000 }                               ]                            }                        }                    },                    {                        "scheduled_event": { "event": "minecraft:drowned_home", "filters": { "all_of": [ {                                       "operator": "\u003E=", "test": "hourly_clock_time", "value": 11000 },                                   {                                        "operator": "\u003C", "test": "hourly_clock_time", "value": 12000 }                               ]                            }                        }                    },                    {                        "scheduled_event": { "event": "minecraft:drowned_asleep", "filters": { "all_of": [ {                                       "operator": "\u003E=", "test": "hourly_clock_time", "value": 18000 },                                   {                                        "operator": "\u003C", "test": "hourly_clock_time", "value": 24000 }                               ]                            }                        }                    }                ]            },            "minecraft:dwell_configuration": { "minecraft:behavior.defend_village_target": {}, "minecraft:behavior.move_to_village": { "priority": 26, "speed_multiplier": 1 },               "minecraft:dweller": { "can_find_poi": true, "can_migrate": true, "dweller_role": "defender", "dwelling_type": "village", "first_founding_reward": 1, "update_interval_base": 60, "update_interval_variant": 40 }           },            "minecraft:employed_drowned": { "minecraft:behavior.work": { "active_time": 250, "can_work_in_rain": false, "goal_cooldown": 200, "on_arrival": { "event": "minecraft:resupply_trades", "target": "all" },                   "sound_delay_max": 200, "sound_delay_min": 100, "speed_multiplier": 0.5, "work_in_rain_tolerance": 100 }           },            "minecraft:heal_player": {}, "minecraft:hunter_mode": { "minecraft:angry": { "broadcastAnger": true, "broadcastRange": 40, "calm_event": { "event": "minecraft:lost_target", "target": "self" },                   "duration": 30 },               "minecraft:navigation.generic": { "avoid_sun": false, "can_path_over_water": true, "can_swim": true, "can_walk": true, "is_amphibious": true }           },            "minecraft:indoor_wander_mode": { "minecraft:behavior.gO_home": { "priority": 22 },               "minecraft:behavior.move_indoors": { "priority": 23, "speed_multiplier": 1.1999999999999999555910790149937383830547332763671875 },               "minecraft:navigation.walk": { "avoid_water": false, "can_open_doors": true, "can_pass_doors": true, "can_path_over_water": true }           },            "minecraft:melee_mode": { "minecraft:attack": { "damage": 6 },               "minecraft:behavior.melee_attack": { "priority": 3, "speed_multiplier": 1, "track_target": false },               "minecraft:equipment": { "table": "loot_tables/entities/drowned_equipment.json" }           },            "minecraft:mode_switcher": { "minecraft:equipment": { "table": "loot_tables/empty.json" },               "minecraft:target_nearby_sensor": { "inside_range": 3, "on_inside_range": { "event": "minecraft:switch_to_melee", "target": "self" },                   "on_outside_range": { "event": "minecraft:switch_to_primary_ranged", "target": "self" },                   "outside_range": 5 }           },            "minecraft:primary_ranged_mode": { "minecraft:behavior.ranged_attack": { "attack_interval_max": 3, "attack_interval_min": 1, "attack_radius": 10, "priority": 26 },               "minecraft:equipment": { "table": "loot_tables/entities/drowned_equipment.json" },               "minecraft:shooter": { "def": "minecraft:thrown_trident" },               "minecraft:target_nearby_sensor": { "inside_range": 6, "on_inside_range": { "event": "minecraft:switch_to_primary_ranged", "target": "self" },                   "on_outside_range": { "event": "minecraft:switch_to_secondary_ranged", "target": "self" },                   "outside_range": 11 }           },            "minecraft:secondary_ranged_mode": { "minecraft:behavior.ranged_attack": { "attack_interval_max": 3, "attack_interval_min": 1, "attack_radius": 40, "priority": 27 },               "minecraft:equipment": { "table": "loot_tables/entities/pillager_gear.json" },               "minecraft:shooter": { "def": "minecraft:arrow", "type": "Arrow" }           },            "minecraft:tamed_drowned": { "minecraft:behavior.bribe": {}, "minecraft:behavior.fOllow_OwNER": { "speed_multiplier": 1.399999999999999911182158029987476766109466552734375, "start_distance": 25, "stop_distance": 1 },               "minecraft:behavior.owner_hurt_by_target": { "priority": 13 },               "minecraft:behavior.pet_sleep_with_owner": { "goal_radius": 5, "search_height": 10, "search_radius": 1, "speed_multiplier": 1.1999999999999999555910790149937383830547332763671875 },               "minecraft:behavior.share_items": { "entity_types": [ {                           "filters": { "subject": "other", "test": "is_family", "value": "player" }                       }                    ],                    "goal_radius": 2, "max_dist": 3, "priority": 8, "speed_multiplier": 0.5 },               "minecraft:bribeable": { "bribe_cooldown": -1, "bribe_items": [ "cake", "diamond" ]               },                "minecraft:interact": { "interact_text": "action.interact.separate", "on_interact": { "event": "minecraft:separate_from_player", "filters": { "other_with_item": "poisonous_potato" }                   }                },                "minecraft:is_tamed": {}, "minecraft:wants_jockey": { "entity_types": [ {                           "filters": [ {                                   "operator": "==", "subject": "other", "test": "is_family", "value": "drowned_favorite_mob" }                           ]                        }                    ]                }            },            "minecraft:trade_preparation": { "minecraft:trade_resupply": {} },           "minecraft:wander_mode": { "minecraft:navigation.generic": { "can_open_doors": true, "can_pass_doors": true, "can_path_over_water": true, "can_swim": true, "can_walk": true, "is_amphibious": true }           }        },        "components": { "minecraft:annotation.open_door": {}, "minecraft:behavior.beg": { "items": [ "cake", "bread", "fish", "cookie", "diamond" ],               "look_distance": 20, "look_time": [ 1,                   3                ],                "priority": 3, "speed_multiplier": 1.5 },           "minecraft:behavior.break_door": { "priority": 0 },           "minecraft:behavior.door_interact": { "priority": 16 },           "minecraft:behavior.hide": { "duration": 30, "poi_type": "bed", "priority": 32, "speed_multiplier": 1.3000000000000000444089209850062616169452667236328125 },           "minecraft:behavior.hurt_by_target": { "entity_types": { "filters": { "operator": "!=", "subject": "other", "test": "is_family", "value": "villager" }               },                "priority": 4 },           "minecraft:behavior.look_at_player": { "look_distance": 6, "priority": 7, "probability": 1.100000000000000088817841970012523233890533447265625 },           "minecraft:behavior.move_towards_restriction": { "priority": 5, "speed_multiplier": 1 },           "minecraft:behavior.nearest_attackable_target": { "entity_types": [ {                       "filters": { "all_of": [ {                                   "any_of": [ {                                           "subject": "other", "test": "is_family", "value": "monster" },                                       {                                            "subject": "other", "test": "is_family", "value": "evoker" },                                       {                                            "subject": "other", "test": "is_family", "value": "vindicator" }                                   ]                                },                                {                                    "any_of": [ {                                           "subject": "other", "test": "in_water", "value": true },                                       {                                            "operator": "\u003C", "subject": "other", "test": "is_brightness", "value": 0.4899999999999999911182158029987476766109466552734375 }                                   ]                                }                            ]                        },                        "max_dist": 45 },                   {                        "filters": { "all_of": [ {                                   "subject": "other", "test": "is_family", "value": "baby_zombie" },                               {                                    "operator": "!=", "subject": "other", "test": "in_water", "value": true }                           ]                        },                        "max_dist": 45 }               ],                "must_see": true, "must_see_forget_duration": 17, "persist_time": 0.5, "priority": 2, "reselect_targets": true, "within_radius": 40 },           "minecraft:behavior.open_door": { "close_door_after": true },           "minecraft:behavior.random_look_around": { "priority": 8 },           "minecraft:behavior.random_stroll": { "priority": 6, "speed_multiplier": 1 },           "minecraft:behavior.restrict_open_door": { "priority": 15 },           "minecraft:behavior.share_items": { "entity_types": [ {                       "filters": { "all_of": [ {                                   "any_of": [ {                                           "subject": "other", "test": "is_family", "value": "drowned_favorite_mob" },                                       {                                            "subject": "other", "test": "is_family", "value": "villager" },                                       {                                            "subject": "other", "test": "is_family", "value": "friendly" }                                   ]                                }                            ]                        }                    }                ],                "goal_radius": 2, "max_dist": 3, "priority": 8, "speed_multiplier": 1.8000000000000000444089209850062616169452667236328125 },           "minecraft:breathable": { "breathesAir": true, "breathesWater": true, "suffocateTime": 0, "totalSupply": 30 },           "minecraft:can_climb": {}, "minecraft:collision_box": { "height": 1.8000000000000000444089209850062616169452667236328125, "width": 0.59999999999999997779553950749686919152736663818359375 },           "minecraft:damage_sensor": { "on_damage": { "event": "minecraft:gain_hero_of_the_village", "filters": { "all_of": [ {                               "test": "has_health", "value": 4 },                           {                                "subject": "other", "test": "is_family", "value": "monster" }                       ]                    },                    "target": "all" }           },            "minecraft:genetics": { "genes": { "allele_range": { "range_max": 10, "range_min": 10 },                   "genetic_variants": [ {                           "birth_event": "minecraft:entity_born", "both_allele": 0, "either_allele": 0, "hidden_allele": 0, "main_allele": 0, "name": "entity.drowned.player.name" }                   ]                },                "mutation_rate": "0" },           "minecraft:healable": { "items": [ {                       "heal_amount": 3, "item": "fish" },                   {                        "heal_amount": 1, "item": "sugar" },                   {                        "heal_amount": 20, "item": "cake" },                   {                        "heal_amount": 3, "item": "apple" },                   {                        "heal_amount": 4, "item": "golden_carrot" },                   {                        "heal_amount": 10, "item": "golden_apple" },                   {                        "heal_amount": 10, "item": "appleEnchanted" }               ]            },            "minecraft:health": { "max": 80, "value": 30 },           "minecraft:hide": {}, "minecraft:inventory": [ {                   "container_type": "hotbar", "inventory_size": 9, "private": true },               {                    "container_type": "inventory", "inventory_size": 31, "private": true }           ],            "minecraft:jump.static": {}, "minecraft:movement": { "value": 0.299999999999999988897769753748434595763683319091796875 },           "minecraft:movement.generic": {}, "minecraft:nameable": {}, "minecraft:navigation.generic": { "avoid_sun": false, "can_open_doors": true, "can_pass_doors": true, "can_path_over_water": true, "can_swim": true, "can_walk": true, "is_amphibious": true },           "minecraft:on_target_acquired": { "event": "minecraft:has_target", "target": "self" },           "minecraft:on_target_escape": { "event": "minecraft:lost_target", "target": "self" },           "minecraft:physics": {}, "minecraft:scaffolding_climber": {}, "minecraft:scheduler": [ {                   "scheduled_event": { "event": "minecraft:drowned_awake", "filters": { "all_of": [ {                                   "operator": "\u003E=", "test": "hourly_clock_time", "value": 0 },                               {                                    "operator": "\u003C", "test": "hourly_clock_time", "value": 11000 }                           ]                        }                    }                },                {                    "scheduled_event": { "event": "minecraft:drowned_home", "filters": { "all_of": [ {                                   "operator": "\u003E=", "test": "hourly_clock_time", "value": 11000 },                               {                                    "operator": "\u003C", "test": "hourly_clock_time", "value": 18000 }                           ]                        }                    }                },                {                    "scheduled_event": { "event": "minecraft:drowned_asleep", "filters": { "all_of": [ {                                   "operator": "\u003E=", "test": "hourly_clock_time", "value": 18000 },                               {                                    "operator": "\u003C", "test": "hourly_clock_time", "value": 24000 }                           ]                        }                    }                }            ],            "minecraft:tameable": { "probability": 1, "tame_event": { "event": "minecraft:on_tame", "target": "self" },               "tameItems": "cake" },           "minecraft:type_family": { "family": [ "player", "villager", "friendly" ]           },            "minecraft:underwater_movement": { "value": 0.059999999999999997779553950749686919152736663818359375 }       },        "description": { "identifier": "minecraft:drowned", "is_experimental": true, "is_spawnable": true, "is_summonable": true },       "events": { "minecraft:ageable_grow_up": { "add": { "component_groups": [ "minecraft:mode_switcher", "minecraft:adult_drowned" ]               },                "remove": { "component_groups": [ "minecraft:baby_drowned" ]               }            },            "minecraft:as_adult": { "add": { "component_groups": [ "minecraft:melee_mode", "minecraft:mode_switcher", "minecraft:adult_drowned", "minecraft:dwell_configuration" ]               }            },            "minecraft:as_baby": { "add": { "component_groups": [ "minecraft:melee_mode", "minecraft:baby_drowned", "minecraft:dwell_configuration" ]               }            },            "minecraft:drowned_asleep": { "add": { "component_groups": [ "minecraft:bed_scedule_drowned" ]               },                "remove": { "component_groups": [ "minecraft:wander_mode", "minecraft:indoor_wander_mode" ]               }            },            "minecraft:drowned_at_work": {}, "minecraft:drowned_awake": { "add": { "component_groups": [ "minecraft:wander_mode" ]               },                "remove": { "component_groups": [ "minecraft:bed_scedule_drowned" ]               }            },            "minecraft:drowned_home": { "add": { "component_groups": [ "minecraft:indoor_wander_mode" ]               },                "remove": { "component_groups": [ "minecraft:wander_mode", "minecraft:employed_drowned" ]               }            },            "minecraft:drowned_hungry": { "add": { "component_groups": [ "drowned_hungry_eating" ]               },                "remove": { "component_groups": [] }           },            "minecraft:entity_born": { "add": { "component_groups": [ "minecraft:melee_mode", "minecraft:baby_drowned", "minecraft:dwell_configuration" ]               },                "remove": {}, "weight": 5 },           "minecraft:entity_spawned": { "randomize": [ {                       "add": { "component_groups": [ "minecraft:mode_switcher", "minecraft:ranged_mode", "minecraft:adult_drowned", "minecraft:dwell_configuration" ]                       },                        "remove": {}, "weight": 15 },                   {                        "randomize": [ {                               "add": { "component_groups": [ "minecraft:melee_mode", "minecraft:adult_drowned", "minecraft:dwell_configuration" ]                               },                                "remove": {}, "weight": 95 },                           {                                "add": { "component_groups": [ "minecraft:melee_mode", "minecraft:baby_drowned", "minecraft:dwell_configuration" ]                               },                                "remove": {}, "weight": 5 }                       ],                        "weight": 85 }               ]            },            "minecraft:has_target": { "add": { "component_groups": [ "minecraft:hunter_mode" ]               },                "remove": { "component_groups": [ "minecraft:wander_mode" ]               }            },            "minecraft:lost_target": { "add": { "component_groups": [ "minecraft:wander_mode" ]               },                "remove": { "component_groups": [ "minecraft:hunter_mode" ]               }            },            "minecraft:on_tame": { "add": { "component_groups": [ "minecraft:tamed_drowned" ]               },                "remove": {} },           "minecraft:resupply_trades": { "add": { "component_groups": [ "minecraft:trade_preparation" ]               },                "remove": { "component_groups": [] }           },            "minecraft:separate_from_player": { "remove": { "component_groups": [ "minecraft:tamed_drowned" ]               }            },            "minecraft:start_healing": {}, "minecraft:switch_to_melee": { "add": { "component_groups": [ "minecraft:melee_mode" ]               },                "remove": { "component_groups": [ "minecraft:ranged_mode" ]               }            },            "minecraft:switch_to_primary_ranged": { "add": { "component_groups": [ "minecraft:primary_ranged_mode" ]               },                "remove": { "component_groups": [ "minecraft:melee_mode" ]               }            },            "minecraft:switch_to_secondary_ranged": { "add": { "component_groups": [ "minecraft:secondary_ranged_mode" ]               },                "remove": { "component_groups": [ "minecraft:primary_ranged_mode" ]               }            }        }    } }