Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/ryanhcode/sable/llms.txt

Use this file to discover all available pages before exploring further.

Sable allows datapacks to specify custom physics parameters for any dimension via JSON files at /data/<namespace>/dimension_physics/<name>.json. Multiple files can target the same dimension; the one with the highest priority value wins. Sable’s built-in defaults all use priority 0, so any datapack config overrides them automatically.

Fields

dimension
string
required
Resource location of the dimension this config applies to (e.g. minecraft:overworld or examplemod:moon).
priority
number
default:"1000"
When multiple configs target the same dimension, the one with the highest priority wins. Sable’s built-in defaults use priority 0, so datapack values take effect without any extra configuration.
base_gravity
number[]
default:"[0.0, -11.0, 0.0]"
Gravitational acceleration as a 3D vector in m/s². The default pulls straight down at 11 m/s². You can set a non-vertical vector to simulate unusual gravitational fields.
base_pressure
number
default:"1.0"
Pressure multiplier applied uniformly across the entire dimension. Set to 0.0 for a vacuum. If pressure_function is also defined, the two values combine.
pressure_function
object[]
A list of bezier control points for altitude-based pressure variation. Omit this field for uniform pressure at base_pressure. Each point has three fields:
  • altitude — y-level at which the point is anchored.
  • value — pressure multiplier at that altitude.
  • slope — rate of change of pressure at that altitude.
universal_drag
number
default:"0.09"
Flat drag coefficient applied to all motion in the dimension. Higher values slow objects down more quickly.
magnetic_north
number[]
default:"[0.0, 0.0, 0.0]"
Direction vector pointing toward magnetic north. [0.0, 0.0, 0.0] means no magnetic field is present in the dimension.

Example

A moon dimension with lower gravity, no drag, and no air pressure:
// /data/examplemod/dimension_physics/moon.json
{
    "dimension": "examplemod:moon",
  
    // Default priority of 1000
    // Higher priority configs "win"
    "priority": 1000,
  
    // Modify the gravity to be low
    "base_gravity": [0.0, -4.0, 0.0],
    
    // No air pressure   
    "base_pressure": 0.0,
  
    // No universal drag
    "universal_drag": 0.0, 
    
    // No magnetic north
    "magnetic_north": [0.0, 0.0, 0.0]
}

Built-in defaults

Sable generates physics configs for all three vanilla dimensions. These are shown below for reference with approximate values. All three use priority: 0 so any datapack can override them. The pressure_function in each config approximates an exponential pressure decay curve centered around sea level. Underground pressure is clamped to at most 1.5, and there is a smooth 40-metre drop-off near the build height limit where pressure falls to 0.0.
{
    "dimension": "minecraft:overworld",
    "priority": 0,
    "universal_drag": 0.09,
    "base_gravity": [0.0, -11.0, 0.0],
    "base_pressure": 1.0,
    "pressure_function": [
        { "altitude": -38.366277, "value": 1.5,      "slope": -0.006    },
        { "altitude": 63.0,       "value": 1.0,      "slope": -0.004    },
        { "altitude": 263.0,      "value": 0.449329, "slope": -0.001797 },
        { "altitude": 280.0,      "value": 0.419786, "slope": -0.001679 },
        { "altitude": 320.0,      "value": 0.0,      "slope": -0.020989 }
    ],
    "magnetic_north": [0.0, 0.0, 0.0]
}
{
    "dimension": "minecraft:the_nether",
    "priority": 0,
    "universal_drag": 0.09,
    "base_gravity": [0.0, -11.0, 0.0],
    "base_pressure": 1.0,
    "pressure_function": [
        { "altitude": 0.0,   "value": 1.136553, "slope": -0.004546 },
        { "altitude": 32.0,  "value": 1.0,      "slope": -0.004    },
        { "altitude": 88.0,  "value": 0.799315, "slope": -0.003197 },
        { "altitude": 128.0, "value": 0.0,      "slope": -0.039966 }
    ],
    "magnetic_north": [0.0, 0.0, 0.0]
}
{
    "dimension": "minecraft:the_end",
    "priority": 0,
    "universal_drag": 0.09,
    "base_gravity": [0.0, -11.0, 0.0],
    "base_pressure": 1.0,
    "pressure_function": [
        { "altitude": 0.0,   "value": 1.0,      "slope": -0.004    },
        { "altitude": 200.0, "value": 0.449329, "slope": -0.001797 },
        { "altitude": 216.0, "value": 0.421473, "slope": -0.001686 },
        { "altitude": 256.0, "value": 0.0,      "slope": -0.021074 }
    ],
    "magnetic_north": [0.0, 0.0, 0.0]
}

Build docs developers (and LLMs) love