Json:block:behaviors

From Vintage Story Wiki
Revision as of 22:49, 25 March 2019 by Tatazaki (talk | contribs)

Jump to: navigation, search

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


Vintage Story: Modding
Basics Mod Types | Asset System | Textures | Items | Recipes | Blocks | Model Creator | Release
Advanced Setup(Windows,Linux) | Items | Blocks | Item-Block interractions | Block Behavior | Block Entity | Particles | World Access
Worldgen Terrain | Ores | Trees | Worldgen API
Rendering Shaders and Renderers
Property Overview Item | Block | Block Behaviors