Modding:Block Entity Behaviors

From Vintage Story Wiki

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.

Otherwise, you can give your block entity behaviors with the following format:

entityBehaviors: [{ name: "BlockEntityBehavior" }]

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.9.+

Class Name Example Blocks Description Github Link
Animatable brake, clutch - Animatable Block Entity Behavior Class
MPAngledGears angledgears - Angled Gears Block Entity Behavior Class
MPAxle axle - Axle Block Entity Behavior Class
MPBase - A generic mechanical power class that's used by most other behaviors. Otherwise this is not generally used in JSONS. Base Block Entity Behavior Class
MPBrake brake - Brake Block Entity Behavior Class
Combinable - - Combinable Entity Behavior Class
MPConsumer quern - Consumer Block Entity Behavior Class
MPToggle toggle - Block Toggle Entity Behavior Class
MPTransmission transmission - Transmission Block Entity Behavior Class
MPWindmillRotor windmillrotor - Windmill Block Entity Behavior Class


Modding
Green Items require C# coding
Basics

Getting Started | Mod Types | Simple Examples | Theme Pack

Asset System | Textures | Items | Recipes | Blocks | Entities | Model Creator | Animation Basics | VTML & Icons | Mod Packaging & Release | Modinfo | Debugging

Advanced

JSON Patching | Advanced JSON Items | The Remapper | Server-Client Considerations | Compatibility with other mods

Setting Up Your Development Environment (General - Windows - Linux)

Advanced Blocks | Advanced Items | Item-Block Interactions | Block Behavior | Block Entities | Particle Effects | World Access | Inventory Handling | Chat Commands | GUIs | Server-Client Networking | Monkey patching (Harmony)

Data Management

Savegame Data Storage | ModConfig File | Chunk Data Storage | Tree Attribute

Worldgen

WorldGen Concepts | Terrain | Ores | Trees | WorldGen API | NatFloat | EvolvingNatFloat | Json Random Generator

Rendering

Shaders and Renderers

Property Overview

Item | Entity | Block | Block Behaviors | Block Classes | Block Entities | Block Entity Behaviors

Workflows & Infrastructure

Modding Efficiency Tips | Mod-engine compatibility | Mod Extensibility | Load Order

Additional Resources

List of server commands | List of client commands | Client startup parameters | Creative Starter Guide | ServerBlockTicking | Bot System | WorldEdit | Cinematic Camera | Adjustable FPS Video Recording

Example Mods | API Docs | GitHub Repository