minecraft:breathable for you with a switch.Get GodCraftOverview
minecraft:breathable is an entity component: it goes in the components object of a custom mob, or in one of its component groups. Decides where the entity can breathe and how long it can hold its breath before it starts taking damage. Use it for fish, lava mobs or creatures that never need air.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
breathe_blocks | List | none | Extra blocks the entity can breathe inside. |
breathes_air | Boolean | "true" | Whether the entity can breathe in open air. |
breathes_lava | Boolean | "true" | Whether the entity can breathe inside lava. |
breathes_solids | Boolean | "false" | Whether the entity can breathe while stuck inside solid blocks. |
breathes_water | Boolean | "false" | Whether the entity can breathe underwater. |
generates_bubbles | Boolean | "true" | Shows bubble particles around the entity when it is in water. |
inhale_time | Decimal | "0" | Seconds needed to refill the breath bar completely. |
non_breathe_blocks | List | none | Extra blocks the entity cannot breathe inside. |
suffocate_time | Integer | "-20" | Seconds between each hit of damage once the entity runs out of breath. |
total_supply | Integer | "15" | How many seconds the entity can hold its breath. |
Example
Inside the components object of BP/entities/<name>.json (values are the defaults or placeholders):
BP/entities/<name>.json
{
"minecraft:breathable": {
"breathe_blocks": {},
"breathes_air": "true",
"breathes_lava": "true",
"breathes_solids": "false",
"breathes_water": "false",
"generates_bubbles": "true",
"inhale_time": "0",
"non_breathe_blocks": {}
}
}