{ "format_version": "1.26.50", "minecraft:entity": { "description": { "identifier": "minecraft:pig", "spawn_category": "creature", "is_spawnable": true, "is_summonable": true, "properties": { "minecraft:climate_variant": { "type": "enum", "values": [ "temperate", "warm", "cold" ], "default": "temperate", "client_sync": true }, "minecraft:sound_variant": { "type": "enum", "values": [ "default", "big", "mini" ], "default": "default", "client_sync": true } } }, "component_groups": { "minecraft:pig_baby": { "minecraft:is_baby": {}, "minecraft:scale": { "value": 0.5 }, "minecraft:ageable": { "duration": 1200, "feed_items": [ "carrot", "beetroot", "potato" ], "pause_growth_items": [ "golden_dandelion" ], "reset_growth_items": [ "golden_dandelion" ], "grow_up": { "event": "minecraft:ageable_grow_up", "target": "self" } }, "minecraft:behavior.follow_parent": { "priority": 6, "speed_multiplier": 1.1 } }, "minecraft:pig_transform": { "minecraft:transformation": { "into": "minecraft:pig_zombie", "transformation_sound": "mob.pig.death", "delay": 0.5 } }, "minecraft:pig_adult": { "minecraft:experience_reward": { "on_bred": "Math.Random(1,7)", "on_death": "query.last_hit_by_player ? Math.Random(1,3) : 0" }, "minecraft:loot": { "table": "loot_tables/entities/pig.json" }, "minecraft:leashable_to": {}, "minecraft:behavior.breed": { "priority": 4, "speed_multiplier": 1.0 }, "minecraft:breedable": { "require_tame": false, "breeds_with": { "minecraft:pig": {} }, "breed_items": [ "carrot", "beetroot", "potato" ] } }, "minecraft:pig_unsaddled": { "minecraft:interact": { "interactions": [ { "on_interact": { "filters": { "test": "has_equipment", "subject": "other", "domain": "hand", "value": "saddle" }, "event": "minecraft:on_saddled" }, "use_item": true, "swing": true, "play_sounds": [ "saddle" ], "interact_text": "action.interact.saddle" } ] }, "minecraft:rideable": { "seat_count": 1, "family_types": [ "baby_undead" ], "seats": { "position": [ 0.0, 0.7, 0.0 ] } } }, "minecraft:pig_saddled": { "minecraft:is_saddled": {}, "minecraft:loot": { "table": "loot_tables/entities/pig_saddled.json" }, "minecraft:interact": { "interactions": [ { "on_interact": { "filters": { "all_of": [ { "test": "is_sneak_held", "subject": "other", "value": false }, { "test": "has_equipment", "subject": "other", "domain": "hand", "value": "shears" }, { "test": "rider_count", "subject": "self", "operator": "equals", "value": 0 } ] }, "event": "minecraft:on_unsaddled" }, "hurt_item": 1, "spawn_items": { "table": "loot_tables/entities/saddle.json" }, "interact_text": "action.interact.removesaddle", "play_sounds": [ "unsaddle" ], "vibration": "shear" } ] }, "minecraft:boostable": { "speed_multiplier": 1.35, "duration": 3.0, "boost_items": [ { "item": "carrotOnAStick", "damage": 2, "replace_item": "fishing_rod" } ] }, "minecraft:rideable": { "seat_count": 1, "interact_text": "action.interact.ride.horse", "family_types": [ "player" ], "seats": { "position": [ 0.0, 0.63, 0.0 ] } }, "minecraft:item_controllable": { "control_items": "carrotOnAStick" }, "minecraft:behavior.controlled_by_player": { "priority": 0 } } }, "components": { "minecraft:ambient_sound_interval": { "event_name": "ambient", "event_names": [ { "condition": "query.is_baby", "event_name": "ambient.baby" } ], "range": 16.0, "value": 6.0 }, "minecraft:is_hidden_when_invisible": {}, "minecraft:damage_sensor": { "triggers": { "on_damage": { "filters": [ { "test": "is_family", "subject": "other", "value": "lightning" }, { "test": "is_difficulty", "operator": "!=", "value": "peaceful" } ], "event": "become_zombie" }, "deals_damage": "no" } }, "minecraft:type_family": { "family": [ "pig", "mob" ] }, "minecraft:breathable": { "total_supply": 15, "suffocate_time": 0 }, "minecraft:nameable": {}, "minecraft:offspring": { "offspring_pairs": { "minecraft:pig": "minecraft:pig" }, "property_inheritance": { "minecraft:climate_variant": {} } }, "minecraft:spawn_egg_interaction": {}, "minecraft:health": { "value": 10, "max": 10 }, "minecraft:hurt_on_condition": { "damage_conditions": [ { "filters": { "test": "in_lava", "subject": "self" }, "cause": "lava", "damage_per_tick": 4 } ] }, "minecraft:movement": { "value": 0.25 }, "minecraft:navigation.walk": { "can_path_over_water": true, "avoid_water": true, "avoid_damage_blocks": true, "using_door_annotation": true }, "minecraft:movement.basic": {}, "minecraft:jump.static": {}, "minecraft:can_climb": {}, "minecraft:collision_box": { "width": 0.9, "height": 0.9 }, "minecraft:leashable": {}, "minecraft:balloonable": { "mass": 0.9 }, "minecraft:despawn": { "despawn_from_distance": {} }, "minecraft:behavior.mount_pathing": { "priority": 1, "speed_multiplier": 1.25, "target_dist": 0.0, "track_target": true }, "minecraft:behavior.float": { "priority": 2 }, "minecraft:behavior.panic": { "priority": 3, "speed_multiplier": 1.25 }, "minecraft:behavior.tempt": { "priority": 5, "speed_multiplier": 1.2, "items": [ "potato", "carrot", "beetroot", "carrotOnAStick" ] }, "minecraft:behavior.random_stroll": { "priority": 7, "speed_multiplier": 1.0 }, "minecraft:behavior.look_at_player": { "priority": 8, "look_distance": 6.0, "probability": 0.02 }, "minecraft:behavior.random_look_around": { "priority": 9 }, "minecraft:physics": {}, "minecraft:pushable_by_entity": { "presets": [ { "filters": { "all_of": [ { "test": "is_family", "subject": "other", "value": "sulfur_cube" }, { "test": "enum_property", "subject": "other", "domain": "minecraft:sulfur_cube_archetype", "operator": "not", "value": "none" }, { "test": "is_controlling_passenger_family", "subject": "self", "value": "player" } ] }, "push_mode": "none", "require_collision_overlap": false } ] }, "minecraft:pushable_by_block": {}, "minecraft:conditional_bandwidth_optimization": {} }, "events": { "become_zombie": { "add": { "component_groups": [ "minecraft:pig_transform" ] } }, "minecraft:entity_spawned": { "sequence": [ { "randomize": [ { "weight": 95, "trigger": "minecraft:spawn_adult" }, { "weight": 5, "add": { "component_groups": [ "minecraft:pig_baby" ] } } ] }, { "first_valid": [ { "filters": { "test": "has_biome_tag", "value": "spawns_warm_variant_farm_animals" }, "set_property": { "minecraft:climate_variant": "warm" } }, { "filters": { "test": "has_biome_tag", "value": "spawns_cold_variant_farm_animals" }, "set_property": { "minecraft:climate_variant": "cold" } } ] } ] }, "minecraft:entity_born": { "remove": {}, "add": { "component_groups": [ "minecraft:pig_baby" ] }, "trigger": "minecraft:randomize_sound_variant" }, "minecraft:ageable_grow_up": { "remove": { "component_groups": [ "minecraft:pig_baby" ] }, "add": { "component_groups": [ "minecraft:pig_adult", "minecraft:pig_unsaddled" ] } }, "minecraft:on_saddled": { "remove": { "component_groups": [ "minecraft:pig_unsaddled" ] }, "add": { "component_groups": [ "minecraft:pig_saddled" ] } }, "minecraft:on_unsaddled": { "remove": { "component_groups": [ "minecraft:pig_saddled" ] }, "add": { "component_groups": [ "minecraft:pig_unsaddled" ] } }, "minecraft:spawn_adult": { "add": { "component_groups": [ "minecraft:pig_adult", "minecraft:pig_unsaddled" ] }, "trigger": "minecraft:randomize_sound_variant" }, "minecraft:randomize_sound_variant": { "randomize": [ { "weight": 1, "set_property": { "minecraft:sound_variant": "default" } }, { "weight": 1, "set_property": { "minecraft:sound_variant": "big" } }, { "weight": 1, "set_property": { "minecraft:sound_variant": "mini" } } ] } } } }