minecraft:behavior.sneeze
Allows the mob to sneeze, causing it to drop items and affect nearby mobs.
Properties
| Property | Type | Default | What it does |
|---|---|---|---|
cooldown_time | Decimal | 0 | Time in seconds the mob has to wait before using the goal again |
probability | Decimal | 0.02 | The probability of sneezing. A value of 1.00 is 100% |
drop_item_chance | Decimal | 1 | The probability that the mob will drop an item when it sneezes. |
loot_table | Text | "" | Loot table to select dropped items from. |
sound | Text | "" | Sound to play when the sneeze occurs |
prepare_sound | Text | "" | Sound to play when the sneeze is about to happen. |
prepare_time | Decimal | 1 | The time in seconds that the mob takes to prepare to sneeze (while the prepare_sound is playing). |
entity_types | List of object or Object | [] | List of entity types this mob will startle (cause to jump) when it sneezes. |
filters | Object or List of object | {"AND": null, "NOT": null, "OR": null, "all": null, "all_… | Conditions that make this entry in the list valid |
max_dist | Decimal | 16 | Maximum distance this mob can be away to be a valid choice |
max_height | Decimal | -1 | Maximum height this mob can be away to be a valid choice |
max_flee | Decimal | 10 | Maximum distance this mob can be from the target to stop fleeing |
walk_speed_multiplier | Decimal | 1 | Multiplier for the walking speed. A value of 1.0 means the speed is unchanged |
sprint_speed_multiplier | Decimal | 1 | Multiplier for the sprinting speed. A value of 1.0 means the speed is unchanged |
priority | Integer | 0 | Priority for this mob type |
check_if_outnumbered | Boolean | false | If true, the mob will check if its outnumbered |
reevaluate_description | Boolean | false | If true, the mob will stop being targeted if it stops meeting any conditions. |
cooldown | Integer | 0 | The amount of time in seconds that the mob has to wait before selecting a target of the same type again |
must_see | Boolean | — | If true, the mob has to be visible to be a valid choice |
must_see_forget_duration | Integer | 3 | Determines the amount of time in seconds that this mob will look for a target before forgetting about it and looking for a new one when the target isn't visible any more |
within_radius | Decimal | 0 | Distance in blocks that mobs will be startled. |
priority | Integermin 0 | 0 | |
control_flags | List of text | [] |
Example from the game files
This is how vanilla Panda uses it in Minecraft Bedrock 1.26.60.5:
{
"minecraft:behavior.sneeze": {
"priority": 7,
"probability": 0.0001666,
"cooldown_time": 1.0,
"within_radius": 10.0,
"entity_types": [
{
"filters": {
"all_of": [
{
"test": "has_component",
"subject": "other",
"operator": "!=",
"value": "minecraft:is_baby"
},
{
"test": "is_family",
"subject": "other",
"value": "panda"
},
{
"test": "in_water",
"subject": "other",
"operator": "!=",
"value": true
},
{
"test": "on_ground",
"operator": "==",
"value": true
}
]
},
"max_dist": 10
}
],
"drop_item_chance": 0.001,
"loot_table": "loot_tables/entities/panda_sneeze.json",
"prepare_sound": "presneeze",
"prepare_time": 1.0,
"sound": "sneeze"
}
}Used by 1
Vanilla entities with minecraft:behavior.sneeze in their definition:
Related components
behavior.random_strollbehavior.random_look_aroundbehavior.equip_itembehavior.move_towards_home_restrictionbehavior.timer_flag_1behavior.look_at_entitybehavior.move_towards_dwelling_restrictionbehavior.drink_potionbehavior.jump_to_blockbehavior.squid_divebehavior.squid_idlebehavior.squid_move_away_from_groundbehavior.squid_out_of_waterbehavior.croakbehavior.dragondeathbehavior.drink_milkbehavior.emergebehavior.investigate_suspicious_locationbehavior.lay_downbehavior.napbehavior.rise_to_liquid_levelbehavior.rollbehavior.silverfish_merge_with_stonebehavior.silverfish_wake_up_friends