Modding:Block Entity Behaviors
This page is outdated.
Reason: A new system is being worked on to view JSON properties. Please use this page with caution, as it may not be up-to-date.
The content on this page is not up to date with the most recent game update. If you do wish to contribute, please request wiki edit access on the Discord.
Using block Entity Behaviors
Block entity behaviors are an expanded type of behavior that block entities can utilize. At the moment, these are mostly used by mechanical power blocks. If you're looking for regular block behaviors (which are used differently) they can be found here.
The block entity behaviors are added to the entityBehaviors array of the block json file at the top level (same level as code). Some behaviors accept a properties dictionary. The properties dictionary is optional for the majority of behaviors that have no properties. If the block does not set the entityclass field, then adding any block entities will cause it to default to "generic", thus transforming the block type into a block entity. Example:
{
code: "lightningrod",
...
entityBehaviors: [
{
"name": "AttractsLightning",
"properties": {
"artificialElevation": 5,
"elevationAttractivenessMultiplier": 2
}
}
],
...
}
Most block entity behavior classes can be viewed at the Vintage Story Github here for those looking to learn more about each.
All Block Entity Behaviors
Here is a table containing all classes used by blocks as of version 1.19.8
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 |