Json block behaviors CanAttach

From Vintage Story Wiki
Revision as of 04:10, 14 October 2023 by Bluelightning32 (talk | contribs) (Created page with "== Purpose == Placing this behavior on a parent block causes it to accept attachments on more sides. The parent block's default behavior is used for sides that are not overridden. == 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 == ; <code>s...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Purpose

Placing this behavior on a parent block causes it to accept attachments on more sides. The parent block's default behavior is used for sides that are not overridden.

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 ItemEntityEntity BehaviorsBlockBlock BehaviorsBlock ClassesBlock EntitiesBlock Entity BehaviorsCollectible 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