Json block behaviors CanAttach

From Vintage Story Wiki

Purpose

This behavior can be added to parent blocks. It overrides the parent block's CanAttachBlockAt to accept attachments on the faces listed in the sides property. Unlisted sides use the parent block's default behavior.

Used by blocks

  • drystonefence
  • woodenfence
  • roughhewnfence

Fences use it to allow attachments on their top and bottom faces, which would otherwise be rejected because those faces are not solid.

Properties

sides: (array of block face codes)
The faces that the parent block should accept an attachment on. This array should be a subset of [ "north", "east", "south", "west", "up", "down" ]. Faces that are not listed use the parent block's default behavior.
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.

Modding
Modding Introduction Getting Started Theme Pack
Content Modding Content Mods Developing a Content Mod Basic Tutorials Intermediate Tutorials Advanced Tutorials Content Mod Concepts
Code Modding Code Mods Setting up your Development Environment
Property Overview ItemEntityBlockBlock BehaviorsBlock ClassesBlock EntitiesBlock Entity BehaviorsWorld properties
Workflows & Infrastructure Modding Efficiency TipsMod-engine compatibilityMod ExtensibilityVS Engine
Additional Resources Community Resources Modding API Updates Programming Languages List of server commandsList of client commandsClient startup parametersServer startup parameters
Example ModsAPI DocsGitHub Repository