Sable provides several interfaces yourDocumentation 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.
Block (and BlockEntity) classes can implement to customize how blocks behave when they are part of a sub-level — from assembly callbacks to custom collision shapes, aerodynamic lift, and collision events.
BlockSubLevelAssemblyListener
Implement on aBlock to receive callbacks when SubLevelAssemblyHelper moves that block into or out of a sub-level.
Called before the block is moved. The old block is still present at
oldPos in originLevel. Use this to read any world state you need before the block is relocated.Called after the block has been placed at
newPos in resultingLevel. The old block has not yet been removed at the time this fires — use it to sync additional data after placement.BlockSubLevelCollisionShape
Implement on aBlock to specify a different VoxelShape for physics collider baking, separate from the regular Minecraft collision shape.
BlockSubLevelDynamicCollider
Implement on aBlock whose physics collider needs to update dynamically based on block state changes (rather than being baked once on chunk load).
BlockSubLevelCustomCenterOfMass
Implement on aBlock to override the center-of-mass contribution for that block state, instead of using the default block-center.
BlockSubLevelLiftProvider
Implement on aBlock to contribute aerodynamic lift and drag forces to the sub-level during each physics substep. Sable groups adjacent lift-provider blocks into LiftProviderGroup clusters for efficient force accumulation.
Key methods to override:
sable$contributeLiftAndDrag method has a default implementation that computes lift and drag from velocity, pressure, and the block’s normal — override it only if you need fully custom aerodynamics.
BlockWithSubLevelCollisionCallback
Implement on aBlock to receive callbacks when the sub-level containing this block collides with another rigid body.
sable$getCallback() returns the BlockSubLevelCollisionCallback instance for this block. Blocks with the sable:fragile physics property automatically use FragileBlockCallback without needing to implement this interface.
Propeller interfaces
BlockEntityPropeller
Implement on aBlockEntity that acts as a propeller. Provides thrust direction, airflow, and thrust magnitude used by the physics system.
getScaledThrust() multiplies base thrust by an airflow scaling factor (clamped 0–1 based on the sub-level’s velocity relative to the thrust direction) and the current air pressure at the block’s location.
BlockEntitySubLevelPropellerActor
ExtendsBlockEntitySubLevelActor. Implement alongside BlockEntityPropeller to have forces automatically applied each physics substep via the PROPULSION force group.
subLevel.getOrCreateQueuedForceGroup(ForceGroups.PROPULSION.get()), which accumulates point forces and submits them to the physics pipeline at the end of the tick.