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": {
"minecraft:look_to_start_drowned_transformation": {
"triggers": {
"filters": {
"test": "is_underwater", "subject": "self", "operator": "==", "value": true
},
}
}
},
"triggers": {
"filters": {
"test": "is_underwater", "subject": "self", "operator": "==", "value": false
},
}
},
"looping": false,
"time": 30,
"time_down_event": {
}
}
},
"transformation_sound": "convert_to_drowned",
"delay": {
}
},
}
},
"transformation_sound": "convert_to_drowned",
"delay": {
}
},
}
},
"on_death": "query.last_hit_by_player ? 12 + (query.equipment_count * Math.Random(1,3)) : 0"
},
},
}
},
"on_death": "query.last_hit_by_player ? 5 + (query.equipment_count * Math.Random(1,3)) : 0"
},
},
"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
}
},
"table": "loot_tables/entities/zombie_equipment.json"
}
},
//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
},
"minecraft:behavior.nearest_attackable_target": {
"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": [
{
"filters": { "test": "in_lava", "subject": "self", "operator": "==", "value": true },
"cause": "lava",
"damage_per_tick": 4
}
]
},
"total_supply": 15,
"suffocate_time": 0,
"breathes_water": true
},
"damage": 3
},
"table": "loot_tables/entities/zombie.json"
},
"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,
"pickup_based_on_chance": true,
"can_pickup_any_item": true
},
"priority": 7,
"speed_multiplier": 1
},
"priority": 8,
"look_distance": 6,
"probability": 0.02
},
"priority": 9
},
"priority": 1
},
"minecraft:behavior.nearest_attackable_target": {
"priority": 2,
"must_see": true,
"reselect_targets": true,
"must_see_forget_duration": 17.0,
"entity_types": [
{
"filters": {
"any_of": [
{ "test": "is_family", "subject": "other", "value": "player" },
{ "test": "is_family", "subject": "other", "value": "snowgolem" },
{ "test": "is_family", "subject": "other", "value": "irongolem" }
]
},
"max_dist": 35
},
{
"filters": {
"any_of": [
{ "test": "is_family", "subject": "other", "value": "villager" },
{ "test": "is_family", "subject": "other", "value": "wandering_trader" }
]
},
"max_dist": 35,
"must_see": false
},
{
"filters": {
"all_of": [
{ "test": "is_family", "subject": "other", "value": "baby_turtle" },
{ "test": "in_water", "subject": "other", "operator": "!=", "value": true }
]
},
"max_dist": 35
}
]
},
},
"is_pushable": true,
"is_pushable_by_piston": true
},
"minecraft:conditional_bandwidth_optimization": {
}
},
"events": {
"randomize": [
{
"weight": 380,
"remove": {},
"add": {
"component_groups": [
]
}
},
{
"weight": 17,
"remove": {
},
"add": {
"component_groups": [
]
}
},
{
"weight": 3,
"remove": {
},
"add": {
"component_groups": [
]
}
}
]
},
"add": {
"component_groups": [
]
}
},
"add": {
"component_groups": [
]
}
},
"add": {
"component_groups": [
]
},
"remove": {
"component_groups": [ "minecraft:look_to_start_drowned_transformation" ]
}
},
"add": {
"component_groups": [
"minecraft:look_to_start_drowned_transformation"
]
},
"remove": {
"component_groups": [
]
}
},
"sequence": [
{
"filters": {
"test": "has_component",
"operator": "!=",
},
"add": {
"component_groups": [ "minecraft:convert_to_drowned" ]
},
"remove": {
"component_groups": [ "minecraft:start_drowned_transformation" ]
}
},
{
"filters": {
"test": "has_component",
},
"add": {
"component_groups": [ "minecraft:convert_to_baby_drowned" ]
},
"remove": {
"component_groups": [ "minecraft:start_drowned_transformation" ]
}
}
]
},
"remove": {
"component_groups": [
]
},
"add": {
"component_groups": [
]
}
}
}
}
}