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 stores physics-related properties per block state. You define them through JSON files in a datapack under the physics_block_properties folder. Any datapack — including a mod’s built-in data — can contribute these files, and multiple definitions for the same block are resolved by priority.

Available properties

sable:mass
number
default:"1.0"
Mass of the block in kilopascal-grams (kpg). Heavier blocks resist movement and impart more force on collision.
sable:inertia
number[]
default:"[1/6, 1/6, 1/6]"
Inertia multiplier along each axis in kpg·m². Multiplied by the block’s mass before use. Controls resistance to rotational acceleration around each axis.
sable:volume
number
default:"1.0"
Volume of the block in m³. Used for buoyancy calculations — blocks with a smaller volume displace less fluid.
sable:restitution
number
default:"0.0"
Bounciness of the block, from 0.0 (no bounce) to 1.0 (perfectly elastic). Values above 0.5 produce noticeably springy collisions.
sable:friction
number
default:"1.0"
Friction multiplier applied when this block slides against another surface. 0.0 is frictionless.
sable:fragile
boolean
default:"false"
When true, the block breaks on impact rather than bouncing or sliding.
sable:floating_material
string
default:"null"
Resource location of the floating block material to assign. Determines buoyancy behaviour when the block is submerged.
sable:floating_scale
number
default:"1.0"
Multiplier applied to the floating block material’s buoyancy force.

JSON structure

Place definition files anywhere inside a datapack at the path data/<namespace>/physics_block_properties/<name>.json.
// /data/examplemod/physics_block_properties/example_block.json
{
    // The selector can either be a tag, or block ID.
    // If a tag is used, all blocks in the tag will be effected.
    // Ex. `#examplemod:example_blocks` or `examplemod:example_block`
    "selector": "examplemod:example_block",

    // Priority is default 1000.
    // Definitions are applied in order of ascending priority
    "priority": 1001,

    "properties": {
        // Any properties can be defined here
        "sable:mass": 2.0
    },

    "overrides": {
        // Override keys are block-state conditions
        "lit=true": {
            // Any properties can be defined here
            // All block-states meeting the condition will be affected
            "sable:mass": 3.0
        }
    }
}
FieldRequiredDescription
selectorYesA block ID (e.g. examplemod:example_block) or a tag prefixed with # (e.g. #examplemod:example_blocks). Tags apply the definition to every member block.
priorityNoInteger, default 1000. Definitions are applied in ascending order — a higher number wins over a lower one. Sable’s built-in definitions use 1000, so use 1001 or higher to override them.
propertiesNoObject mapping property names to values. Applied to all block states matched by selector.
overridesNoObject whose keys are block-state conditions (e.g. "lit=true"). Each value is an object of properties applied on top of properties for matching states.

Examples

A block that bounces:
// /data/examplemod/physics_block_properties/bouncy_block.json
{
  "selector": "examplemod:bouncy_block",

  "properties": {
    "sable:restitution": 0.5
  }
}
A piston that doesn’t weigh as much when extended:
// /data/examplemod/physics_block_properties/piston.json
{
  "selector": "examplemod:piston",

  "properties": {
    "sable:mass": 1.0
  },

  "overrides": {
    "extended=true": {
      "sable:mass": 0.5
    }
  }
}

Built-in tags

Sable ships a built-in datapack with pre-defined block tags for the most common physics configurations. Adding your block to one of these tags is the fastest way to apply standard properties without writing a custom definition file.
TagEffect
#sable:super_lightmass = 0.25
#sable:lightmass = 0.5
#sable:heavymass = 2.0
#sable:super_heavymass = 4.0
#sable:half_volumevolume = 0.5
#sable:quarter_volumevolume = 0.25
#sable:slipperyfriction = 0.0
#sable:bouncyrestitution = 0.5
If one of the built-in tags describes your block well enough, prefer it over a custom definition file. Tags are simpler to maintain, compose cleanly with other datapacks, and keep priority management straightforward.

Build docs developers (and LLMs) love