Modding:Adding Block Behavior: Difference between revisions

From Vintage Story Wiki
Line 154: Line 154:


== Adding another block ==
== Adding another block ==
Let's create another block using this behavior, but this time we will configure some additional properties ...
<syntaxhighlight lang="json">
behaviors: [
{
name: "Moving",
properties: {
"distance": 2,
"pull": true
}
}
],
</syntaxhighlight>
The block will now be pushed two blocks instead of one and the player can pull it by sneaking and right clicking.


== Testing ==
== Testing ==