4.2. ゾンビを飼い馴らす
minecraft:tameable
Entity Documentation - minecraft:tameable | Microsoft Docs
を用いる。
例 燃えない、かつ腐肉を与えると飼いならすことができるゾンビ
{
"format_version": "1.16.0",
"description": {
"is_spawnable": true,
"is_summonable": true,
"is_experimental": false
},
"component_groups": {
"triggers": {
"filters": {
},
}
}
},
"triggers": {
"filters": {
},
}
},
"looping": false,
"time": 30,
"time_down_event": {
}
}
},
"transformation_sound": "convert_to_drowned",
"delay": {
}
},
}
},
"transformation_sound": "convert_to_drowned",
"delay": {
}
},
}
},
},
},
}
},
},
},
"seat_count": 1,
"family_types": [
"zombie"
],
"seats": {
"position": [ 0.0, 1.1, -0.35 ],
"lock_rider_rotation": 0
}
},
"priority": 2,
"speed_multiplier": 1.25,
"target_dist": 0.0,
"track_target": true
}
},
"priority": 1,
"start_delay": 15,
"max_failed_attempts": 20
}
},
}
},
//Added components to tame zombie
"probability": 0.33,
"tame_items": "rotten_flesh",
"tame_event": {
"target": "self"
}
}
},
},
"max": 20
},
"priority": 4,
"speed_multiplier": 1.0,
"start_distance": 10,
"stop_distance": 2
},
"damage": 4
},
"priority": 1
},
"priority": 2
},
"priority": 3,
"must_see": true,
"entity_types": [
{
"filters": {
"all_of": [
{
"test": "is_family",
"subject": "other",
}
]
},
"max_dist": 16
}
]
}
}
},
"components": {
},
},
// Zombie Components
"family": [ "zombie", "undead", "monster", "mob" ]
},
},
"width": 0.6,
"height": 1.9
},
},
"is_amphibious": true,
"can_pass_doors": true,
"can_walk": true,
"can_break_doors": true
},
},
},
},
"max": 20
},
"damage_conditions": [
{
"cause": "lava",
"damage_per_tick": 4
}
]
},
"total_supply": 15,
"suffocate_time": 0,
"breathes_water": true
},
"damage": 3
},
},
"items": [
{
"want_amount": 1,
"surplus_amount": 1,
"priority": 0
},
{
"want_amount": 1,
"surplus_amount": 1,
"priority": 1
},
{
"want_amount": 1,
"surplus_amount": 1,
"priority": 2
},
{
"want_amount": 1,
"surplus_amount": 1,
"priority": 3
},
{
"want_amount": 1,
"surplus_amount": 1,
"priority": 4
},
{
"want_amount": 1,
"surplus_amount": 1,
"priority": 5
},
{
"want_amount": 1,
"surplus_amount": 1,
"priority": 0
},
{
"want_amount": 1,
"surplus_amount": 1,
"priority": 1
},
{
"want_amount": 1,
"surplus_amount": 1,
"priority": 2
},
{
"want_amount": 1,
"surplus_amount": 1,
"priority": 3
},
{
"want_amount": 1,
"surplus_amount": 1,
"priority": 4
},
{
"want_amount": 1,
"surplus_amount": 1,
"priority": 5
},
{
"want_amount": 1,
"surplus_amount": 1,
"priority": 6
},
{
"want_amount": 1,
"surplus_amount": 1,
"priority": 7
},
{
"want_amount": 1,
"surplus_amount": 1,
"priority": 7
},
{
"want_amount": 1,
"surplus_amount": 1,
"priority": 7
},
{
"want_amount": 1,
"surplus_amount": 1,
"priority": 0
},
{
"want_amount": 1,
"surplus_amount": 1,
"priority": 1
},
{
"want_amount": 1,
"surplus_amount": 1,
"priority": 2
},
{
"want_amount": 1,
"surplus_amount": 1,
"priority": 3
},
{
"want_amount": 1,
"surplus_amount": 1,
"priority": 4
},
{
"want_amount": 1,
"surplus_amount": 1,
"priority": 5
},
{
"want_amount": 1,
"surplus_amount": 1,
"priority": 0
},
{
"want_amount": 1,
"surplus_amount": 1,
"priority": 1
},
{
"want_amount": 1,
"surplus_amount": 1,
"priority": 2
},
{
"want_amount": 1,
"surplus_amount": 1,
"priority": 3
},
{
"want_amount": 1,
"surplus_amount": 1,
"priority": 4
},
{
"want_amount": 1,
"surplus_amount": 1,
"priority": 5
},
{
"want_amount": 1,
"surplus_amount": 1,
"priority": 0
},
{
"want_amount": 1,
"surplus_amount": 1,
"priority": 1
},
{
"want_amount": 1,
"surplus_amount": 1,
"priority": 2
},
{
"want_amount": 1,
"surplus_amount": 1,
"priority": 3
},
{
"want_amount": 1,
"surplus_amount": 1,
"priority": 4
},
{
"want_amount": 1,
"surplus_amount": 1,
"priority": 5
}
]
},
"triggers": {
"filters": {
"test": "is_underwater",
"operator": "==",
},
}
},
"despawn_from_distance": {}
},
// Zombie Behaviors
"priority": 2
},
"priority": 3
},
"priority": 4,
"speed_multiplier": 1,
"search_range": 10,
"search_height": 2,
"interval": 20
},
"priority": 6,
"max_dist": 3,
"speed_multiplier": 1.0,
"can_pickup_any_item": true
},
"priority": 7,
"speed_multiplier": 1
},
"priority": 8,
"look_distance": 6,
"probability": 0.02
},
"priority": 9
},
"priority": 1
},
"priority": 2,
"must_see": true,
"reselect_targets": true,
"must_see_forget_duration": 17.0,
"entity_types": [
{
"filters": {
"any_of": [
]
},
"max_dist": 35
},
{
"filters": {
"any_of": [
]
},
"max_dist": 35,
"must_see": false
},
{
"filters": {
"all_of": [
]
},
"max_dist": 35
}
]
},
},
"is_pushable": true,
"is_pushable_by_piston": true
},
}
},
"events": {
"randomize": [
{
"weight": 380,
"remove": {},
"add": {
"component_groups": [
"minecraft:zombie_wild"
]
}
},
{
"weight": 17,
"remove": {
},
"add": {
"component_groups": [
"minecraft:can_have_equipment"
]
}
},
{
"weight": 3,
"remove": {
},
"add": {
"component_groups": [
"minecraft:can_have_equipment"
]
}
}
]
},
"add": {
"component_groups": [
"minecraft:zombie_wild"
]
}
},
"add": {
"component_groups": [
"minecraft:zombie_wild"
]
}
},
"add": {
"component_groups": [
"minecraft:start_drowned_transformation"
]
},
"remove": {
}
},
"add": {
"component_groups": [
"minecraft:look_to_start_drowned_transformation"
]
},
"remove": {
"component_groups": [
"minecraft:start_drowned_transformation"
]
}
},
"sequence": [
{
"filters": {
"test": "has_component",
"operator": "!=",
},
"add": {
},
"remove": {
}
},
{
"filters": {
"test": "has_component",
},
"add": {
},
"remove": {
}
}
]
},
"remove": {
"component_groups": [
"minecraft:zombie_wild"
]
},
"add": {
"component_groups": [
"minecraft:zombie_tame"
]
}
}
}
}
}