minecraft:behavior.sneeze for you with a switch.Get GodCraftOverview
minecraft:behavior.sneeze is an entity component: it goes in the components object of a custom mob, or in one of its component groups. Makes the mob sneeze now and then, which can drop an item and make nearby mobs jump. Baby pandas use it to drop slimeballs.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
cooldown_time | number | 0 | Seconds the mob waits before it can sneeze again. |
probability | number | 0.02 | Chance of sneezing. 1 means always. |
drop_item_chance | number | 1 | Chance that a sneeze drops an item. |
loot_table | string | "" | Path to the loot table that picks the dropped item. |
sound | string | "" | Sound played when the mob sneezes. |
prepare_sound | string | "" | Sound played just before the sneeze. |
prepare_time | number | 1 | Seconds the mob spends getting ready to sneeze. |
entity_types | EntityTypes | none | Which nearby mobs get startled and jump when it sneezes. |
within_radius | number | 0 | How close mobs must be to get startled. |
priority | integer | 0 | Decides which goal wins when several want to run: lower numbers run first.Range: 0 to … |
control_flags | Goal's control flags[] | none | Lists the body parts this goal takes control of (such as move, look or jump), so goals that need the same part don't run together. |
Example
Inside the components object of BP/entities/<name>.json (values are the defaults or placeholders):
BP/entities/<name>.json
{
"minecraft:behavior.sneeze": {
"cooldown_time": 0,
"probability": 0.02,
"drop_item_chance": 1,
"loot_table": "",
"sound": "",
"prepare_sound": "",
"prepare_time": 1,
"entity_types": {}
}
}