# Lungs
by Kreative Blocks
How long can you keep running before you can't breathe?
Lungs gives you a real breath bar. Two realistic lungs sit at the bottom right of your screen. They fill with air, breathe in and out, and change color as you get more tired. You can hear every breath too.
## The Lungs
- Anatomical lungs with a windpipe and a branching bronchial tree
- They breathe in and out on screen, faster and deeper as you tire
- Healthy lungs are pink. As you run out of air they turn purple-blue
- A small bar under the lungs shows your exact breath level
## What drains your breath
- Sprinting
- Swimming
- Climbing ladders and vines
- Fighting (hits you deal and hits you take)
- Smoke: standing near fire, lava or a lit campfire, or being on fire
- Thin air: the higher you climb (from y=110 up), the faster you tire
- The Nether (hot, dry air)
## How to recover
- Stop and rest
- Crouch to breathe deeper (it recovers faster)
- Use an Inhaler (see below)
## How it feels
- Slightly tired: soft breathing
- Tired: louder, deeper breaths
- Winded: fast panting and a wheeze
- Out of air: you gasp, slow down, your vision darkens and your arms get weak
All breathing sounds are custom: a slow inhale, a long exhale, panting, a gasp, a wheeze and a cough.
## Lung Fitness
The more you sprint and swim, the stronger your lungs get (level 0 to 10). At level 10 you lose about 35% less breath and recover about 30% faster. Your fitness is saved.
## Inhaler
- You get 2 Inhalers when you first join
- Right-click to get 50 breath back instantly (10 second cooldown)
- Craft more: iron ingot + glass bottle + paper (shapeless)
## Why am I not taking damage?
Lungs is designed to be realistic, so running out of air does not hurt you by itself. Here is the logic:
- Just being out of breath is not harmful. When you are out of breath your body slows you down and makes you rest. That is why you get slowness, weak arms and dark vision, not damage.
- You can only be hurt if you keep pushing while out of air. Because the slowness stops you from sprinting, most players simply stop and recover, so no damage happens.
- Walking is not exertion. Walking slowly, even when out of breath, does not hurt you. Your lungs can keep up with walking.
- Fire alone does not hurt your lungs. You only take lung damage from smoke if your breath hits 0 and you stay in it. If you walk away, you just catch your breath.
- Breath drains in smoke but you keep breathing. Your bar drops, you cough and you slow down, but you do not suffocate right away, just like in real life.
- Safety: lung damage will never kill you from running. It stops at 2 hearts (only smoke can finish you).
So if you are not taking damage, the addon is working as intended. Try sprinting, swimming or standing in smoke until your bar hits 0 and keep pushing, and you will feel your lungs burn.
## Features
- Works with Script API
- Realistic animated lungs HUD with a breath gauge
- Custom breathing, panting, gasping, wheezing and cough sounds
- Breath drain from sprinting, swimming, climbing, fighting, smoke and altitude
- Out of breath state with slowness, weak arms and dark vision
- Lung fitness that grows as you exercise
- Craftable Inhaler
- Custom title logo and pack icon
- Test commands for creators
## Test commands
Turn on cheats and type these in chat:
- /scriptevent lg:exhaust (empty your breath)
- /scriptevent lg:air 40 (set your breath to 40)
- /scriptevent lg:smoke (10 seconds of smoke)
- /scriptevent lg:dmg (test lung damage once)
- /scriptevent lg:stats (see breath and fitness)
- /scriptevent lg:fit 10 (set lung fitness)
- /scriptevent lg:inhaler (give 2 Inhalers)
- /scriptevent lg:help (all commands)
- /scriptevent lg:ui static (still lungs, if the animation does not show)
- /scriptevent lg:ui text (text only, if the lungs do not show)
## How to install
1. Download the .mcaddon file and open it with Minecraft
2. Create a world and turn on BOTH the Behavior Pack and the Resource Pack
3. Play in Survival mode (Creative and Spectator are not affected)
Note: the lungs use the same part of the screen as some other HUD addons, so it may not work together with addons that also use screen titles (like my Heartbeat and Sleepless addons).
Bugs or ideas? Leave a comment and I will fix it.