1. Wiki
  2. /Entities
  3. /minecraft:breathable

minecraft:breathable

Don't want to write this by hand? GodCraft sets minecraft:breathable for you with a switch.Get GodCraft

Overview

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

FieldTypeDefaultDescription
breathe_blocksListnoneExtra blocks the entity can breathe inside.
breathes_airBoolean"true"Whether the entity can breathe in open air.
breathes_lavaBoolean"true"Whether the entity can breathe inside lava.
breathes_solidsBoolean"false"Whether the entity can breathe while stuck inside solid blocks.
breathes_waterBoolean"false"Whether the entity can breathe underwater.
generates_bubblesBoolean"true"Shows bubble particles around the entity when it is in water.
inhale_timeDecimal"0"Seconds needed to refill the breath bar completely.
non_breathe_blocksListnoneExtra blocks the entity cannot breathe inside.
suffocate_timeInteger"-20"Seconds between each hit of damage once the entity runs out of breath.
total_supplyInteger"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": {}
  }
}

We use cookies to improve your experience and analyse site traffic. Learn more