Modding:Json Block Behaviors

From Vintage Story Wiki

Adding behaviors to your block

Block behaviors are an array of objects with properties attached to your block. Below is an example of two behaviors, one with properties and one without properties.

  behaviors: [{name: "behavior1", properties: {myProperty1: "myValue1", myProperty2: "myValue2"}},{name: "behavior2"}],

All Block Behaviors

Here is a table containing all properties of the base game as of 1.9.

Behavior Name Additional Properties Detail link
BreakIfFloating none Break if Floating
CanIgnite none Can Ignite
CollectFromThis none Collect From This
Container none Container
ExchangeOnInteract exchangeStates (string array of block states)
sounds (path from sounds folder)
Exchange On Interact
FiniteSpreadingLiquid liquidCollisionSound (path from sounds folder)
sourceReplacementCode (block code)
flowingReplacementCode (block code)
collidesWith (other liquid)
spreadDelay (int, default: 150)
Finite Spreading Liquid
Harvestable none Harvestable
HorizontalAttachable handleDrops (bool, default: true) Horizontal Attachable
HorizontalOrientable dropBlockFace (Compass Direction, default: "North")
dropBlock (block name)
Horizontal Orientable
HorizontalUpDownOrientable none Horizontal Up/Down Orientable
Ignitable none Ignitable
Ladder dropBlockFace (face direction, Default: north) Ladder
NoParticles none No Particles
NWOrientable none North/West Orientable
OmniAttachable facingPos (int, default: 1) Omni-Attachable
OmniRotatable rotateH (bool, default: false)
rotateV (bool, default: false)
rotatev4 (bool, default: false)
rotateSides (bool, default: false)
facing (string)
Omni-Rotatable
Pillar none Pillar
PushEventOnBlockBroken string EventName Push Event on Block Broken
RightClickPickup none Right Click Pickup
Slab none Slab
SneakPlacing none Sneak Placing
Unplaceable none Unplaceable
Unstable attachedToFaces (default: down) Unstable
UnstableFalling none Unstable Falling
Icon Sign.png

Wondering where some links have gone?
The modding navbox is going through some changes! Check out Navigation Box Updates for more info and help finding specific pages.