promotional banner

Diving & Oxygen

Realistic diving, pressure, decompression and oxygen mechanics for Minecraft 1.12.2.
video thumbnail

Description

🌊 Diving & Oxygen — Diving & Pressure for Minecraft 1.12.2

Bring realistic diving, oxygen, atmospheric pressure and environmental physics to Minecraft 1.12.2!

Diving & Oxygen transforms underwater exploration and high-altitude environments with dynamic systems for pressure, oxygen, decompression, wind and water physics.

Every depth, altitude, biome and weather condition can influence the environment around you, making exploration more immersive, technical and dangerous.


✨ Features

🤿 Diving & Water Pressure

  • Pressure naturally increases as you dive deeper

  • Pressure is calculated from the actual depth of the water

  • Pressure is displayed in atmospheres (atm)

  • Atmospheric pressure also changes depending on your altitude above sea level

  • Above 2.2 atm, increased pressure begins causing physiological effects

  • Extreme pressure can cause Slowness, Nitrogen Narcosis, Muscle Fatigue and direct damage

  • The pressure system continuously updates based on your current environment


🫁 Oxygen System

Diving & Oxygen replaces the vanilla air bubble system with a dedicated oxygen reserve.

Oxygen consumption dynamically changes depending on your activity:

  • Resting: 1× base consumption

  • Moving: 1.3×

  • Sprinting: 1.8×

  • Active swimming: 2×

  • High pressure: +15% consumption per additional atmosphere

At the surface, oxygen gradually regenerates after a short configurable delay.

At high altitude, the thinner atmosphere reduces oxygen recovery and can eventually prevent oxygen from regenerating without proper equipment.


⚠️ Decompression

Your body gradually absorbs pressure while diving.

A simplified tissue decompression model continuously compares tissue pressure with the surrounding ambient pressure.

Ascending too quickly can cause increasing levels of decompression stress:

  • Stage 1 — Stress > 1.0: Muscle fatigue

  • Stage 2 — Stress > 2.5: Slowness and nausea

  • Stage 3 — Stress > 4.5: Blindness and recurring internal damage

The deeper you dive and the faster you ascend, the greater the potential decompression stress.

Ascend carefully after deep dives to reduce the risk of decompression effects.


⛰️ Atmospheric Pressure & Altitude

Pressure doesn't only change underwater.

As you climb higher, atmospheric pressure gradually decreases:

  • Below 0.75 atm: Slowness

  • Below 0.55 atm: Fatigue and Weakness; oxygen can no longer regenerate without equipment

  • Below 0.40 atm: Direct hypoxia damage

Altitude also affects the recovery rate of your oxygen reserve.


🌬️ Environmental Physics

Diving & Oxygen adds dynamic environmental forces that affect players and living entities.

💨 Wind

Wind is calculated in 3D using multiple environmental factors:

  • Altitude — wind becomes stronger at higher elevations

  • Terrain exposure — 12 3D detection rays analyze surrounding blocks

  • Shelter — nearby solid blocks reduce wind exposure

  • Weather — rain and thunderstorms can increase wind intensity

  • Random gusts — wind strength and duration vary dynamically

  • Elytra — flying with an Elytra gives the player maximum wind exposure

Wind applies a vector force to entities, with the resulting acceleration being affected by their mass.


🌊 Currents & Surface Waves

Water movement changes depending on the environment.

Oceans

  • Semi-stable current cells

  • Slowly changing rotational patterns

  • Dynamic underwater movement

Rivers

  • Current direction is based on the terrain slope

  • Terrain is detected in four directions to determine the flow

Surface Waves

  • Uses a double harmonic sinusoidal system

  • Combines a main frequency with a modulation frequency

  • Causes players at the surface to gently oscillate vertically

At the surface, players can slowly drift and move with the waves, creating a more dynamic water environment.


⚖️ Mob Physics

Environmental forces also affect living entities.

All EntityLivingBase entities can be affected by wind and water currents depending on their mass.

The basic physics model is:

acceleration = force / mass

Minecraft vanilla mobs have predefined masses.

For mobs from unknown mods, their mass can automatically be estimated from their hitbox volume:

width × height × width

This allows the environmental physics system to interact with mobs from other mods without requiring predefined values.


🛠️ /mobmass Command

An administrator command allows you to manage mob masses individually for each world.

Command Description
/mobmass set <id> <mass|immune> Sets the mass of a mob type
/mobmass get <id> Displays the current mass
/mobmass reset <id> Removes the custom mass override
/mobmass list Lists all custom mass overrides

Using immune or 0 makes a mob immune to environmental forces.

Mass overrides are stored per world using WorldSavedData (NBT).


📊 Dive Computer HUD

A dedicated HUD replaces the vanilla air indicators and provides real-time information about your environment and physical condition.

The HUD displays:

  • Ambient pressure in atm

  • Environment type: SURFACE / DIVING / ALTITUDE

  • Dive time

  • Decompression stress

  • Oxygen reserve

  • Ascent rate, smoothed to prevent sudden value changes

  • Wind and current direction

  • Environmental warnings when conditions become dangerous

The oxygen gauge dynamically changes appearance as your oxygen level decreases, making low oxygen levels more noticeable when you are in danger.

The vanilla air bubbles are removed to prevent conflicts with the new oxygen system.

The HUD system has been refactored using DataUI, which provides the UI and rendering framework for the new HUD.


🖥️ Debug Overlay — F9

Press F9 to display detailed environmental and physics information in real time:

  • Player position and biome

  • Wind vector

  • Wind speed in km/h

  • Wind exposure

  • Gust status

  • Water current

  • Water depth

  • Current direction

  • Applied forces: Fx, Fy, Fz

  • Player mass

  • Weather conditions

  • Shelter status

  • Elytra flight status


🎨 Visual Effects

Extreme environmental conditions can affect your screen.

Hypoxia Vignette

  • Pulsing dark vignette around the edges of the screen

  • Activates when oxygen falls below 30%

Decompression Vignette

  • Pulsing crimson effect around the edges of the screen

  • Activates when decompression stress becomes high

Both effects can be enabled or disabled through the configuration.


⚙️ Configuration

The configuration file:

config/divingoxygen.cfg

allows you to customize many aspects of the simulation:

  • Water pressure coefficient

  • Atmospheric pressure coefficient

  • Sea level

  • Tissue absorption rate

  • Critical decompression gradient

  • Pressure damage

  • Oxygen consumption rate

  • Oxygen recovery rate

  • Altitude hypoxia

  • Screen visual effects


🔗 Swimming & Crawling Integration

Diving & Oxygen supports Swimming & Crawling 1.5.2+.

The two mods can work together to provide a complete swimming and diving system:

  • Detects the Swimming & Crawling swimming pose

  • Active swimming increases oxygen consumption

  • Diving depth is dynamically calculated while swimming

  • Pressure and oxygen systems react to player movement

  • Swimming activity is taken into account by the oxygen system

  • Java reflection is used to detect the swimming posture

  • A vanilla fallback system is included when Swimming & Crawling is not installed


📋 Compatibility

  • Minecraft 1.12.2

  • Minecraft Forge 14.23.x

  • DataUI — required for the new HUD system

  • Swimming & Crawling 1.5.2+ — optional integration

  • Compatible with living entities from other mods

  • Custom mob masses can be configured per world

  • Environmental forces are handled server-side to reduce synchronization issues in multiplayer


❓ FAQ

Do I need Swimming & Crawling?
No. The mod includes a vanilla fallback, but Swimming & Crawling 1.5.2+ provides additional swimming posture detection and integration.

Do I need DataUI?
Yes. DataUI is required for the new HUD system and provides the UI and rendering framework used by the Dive Computer HUD.

Does the mod replace the vanilla air bubbles?
Yes. Diving & Oxygen uses its own oxygen reserve system instead of the vanilla air bubble system.

Does pressure depend only on diving depth?
No. Pressure is affected by both water depth and altitude above sea level.

Does it work in multiplayer?
Yes. Environmental forces are calculated server-side to help keep the simulation synchronized between players.

Does the mod affect mobs?
Yes. Living entities can be affected by wind and water currents according to their mass. Custom masses can also be configured using /mobmass.

Is this a realistic medical simulation?
No. The pressure, oxygen and decompression systems are simplified gameplay models inspired by real diving physiology.

Does the mod add keybinds?
No. The main systems work automatically based on your environment and player activity.


Developed by Agnist_greg

The Diving & Oxygen Team

profile avatar
  • 3
    Projects
  • 1.1K
    Downloads

More from Agnist_greg

  • DataUI project image

    DataUI

    DataUI is a Minecraft UI API for building dynamic, data-driven interfaces with reactive components, charts, tables, and customizable rendering.

    • 23
    • September 19, 2026
  • Swimming & Crawling project image

    Swimming & Crawling

    Modern 1.13+ Swimming & Automatic Crawling for Minecraft 1.12.2

    • 1.0K
    • September 19, 2026
  • DataUI project image

    DataUI

    DataUI is a Minecraft UI API for building dynamic, data-driven interfaces with reactive components, charts, tables, and customizable rendering.

    • 23
    • September 19, 2026
  • Swimming & Crawling project image

    Swimming & Crawling

    Modern 1.13+ Swimming & Automatic Crawling for Minecraft 1.12.2

    • 1.0K
    • September 19, 2026