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.
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 | Item • Entity • Entity Behaviors • Block • Block Behaviors • Block Classes • Block Entities • Block Entity Behaviors • Collectible Behaviors • World properties |
Workflows & Infrastructure | Modding Efficiency Tips • Mod-engine compatibility • Mod Extensibility • VS Engine |
Additional Resources | Community Resources • Modding API Updates • Programming Languages • List of server commands • List of client commands • Client startup parameters • Server startup parameters Example Mods • API Docs • GitHub Repository |