Modding:Block Classes: Difference between revisions

From Vintage Story Wiki
(Created page with "== Using block classes == Sometimes a block requires additional functionality that can't be accomplished with a JSON. Doing so requires a block to utilize a C# class, which us...")
 
Line 1: Line 1:
== Using block classes ==
== Using block classes ==
Sometimes a block requires additional functionality that can't be accomplished with a JSON. Doing so requires a block to utilize a C# class, which uses the following format in the JSON:
Sometimes a block requires additional functionality that can't be accomplished with a JSON. Doing so requires a block to utilize a C# class, which uses the following format in the JSON:
<syntaxhighlight lang="json">
  behaviors: [{name: "behavior1", properties: {myProperty1: "myValue1", myProperty2: "myValue2"}},{name: "behavior2"}],
</syntaxhighlight>


<code>class: "BlockClass"</code>


Editing Json:block:behaviors (section)
Editing Json:block:behaviors (section)
Line 10: Line 8:
AdvancedSpecial charactersHelpHeading
AdvancedSpecial charactersHelpHeading
FormatInsert
FormatInsert
== All Block Behaviors ==
== All Block Behaviors ==
Here is a table containing all classes used by blocks as of version 1.9.+
Here is a table containing all classes used by blocks as of version 1.9.+
219

edits