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

Revision as of 21:07, 30 April 2020

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:

class: "BlockClass"

Editing Json:block:behaviors (section) Jump to navigationJump to search AdvancedSpecial charactersHelpHeading FormatInsert

All Block Behaviors

Here is a table containing all classes used by blocks as of version 1.9.+

Behavior Name Example Blocks Description
Block most regular blocks A standard block class that almost all blocks utilize or inherit.
BlockAnvil anvil Used by the anvil Anvil Class
BlockBamboo bamboo - Bamboo Class
BlockBarrel barrel - Barrel Class
BlockBed bed - Bed Class
BlockBeehive wildbeehive - Wild Beehive Class
BlockBerryBush smallberrybush, largeberrybush - Berry Bush Class
BlockBloomery bloomerybase - Bloomery Class
BlockBomb oreblastingbomb - Bomb Class
BlockBowl bowl - Bowl Class
BlockBucket bucket - Bucket Class
BlockBunchOCandles bunchocandles - Candle Class
BlockCactus saguarocactus - Cactus Class
BlockCanvas canvas - Canvas Class
BlockChandelier chandelier - Chandelier Class
BlockCharcoalPit oreblastingbomb - Bomb Class
BlockChisel chiseledblock - Chiseled Class
BlockClayForm clayform - Clay Form Class
BlockChisel chiseledblock - Bomb Class
BlockCookedContainer pot, crucible A container that has finished smelting or cooking its contents and is ready to be poured, taken from etc. Cooked Container Class
BlockCookingContainer pot, crucible A container that has not finished smelting or cooking its contents (if any) Cooking Container Class
BlockCrock crock - Crock Class
BlockCrystal crystallargecluster, crystalsmall - Crystal Class
BlockDisplayCase displaycase - Display Case Class
BlockDoor door, irondoor - Door Class
BlockEchoChamber echochamber - Echo Chamber Class
BlockFarmland farmland - Farmland Class
BlockFence fence, ironfence Used to change the shape based off of nearby attachable surfaces. Requires shape variants for every horizontal orientation. Fence Class
BlockFenceGate fencegate - Fence Gate Class
BlockFirepit firepit - Firepit Class
BlockFirewoodPile firewoodpile - Firewood Pile Class
BlockFlowerPot flowerpot, planter - Flower Pot Class
BlockForge forge - Forge Class
BlockFullCoating saltpeter Used to make a block which coats all flat surfaces when placed. Requires shape variants for every possible orientation. Full Coating Class
BlockGenericTypedContainer chest, storagevessel, stationarybasket - Generic Container Class
BlockGlowworms glowworms - Glowworms Class
BlockHopper hopper - Hopper Class
BlockIngotMold ingotmold - Ingot Mold Class
BlockIngotPile ingotpile - Ingot Pile Class
BlockKnappingSurface knappingsurface - Knapping Surface Class
BlockLabeledChest chest-labeled - Labeled Chest Class
BlockLantern lantern - Lantern Class
BlockLava lava - Lava Class
BlockLayered snow A generic class that can be layered. Requires a variant for each height. Layered Block Class
BlockLayeredSlowDig charcoalpile A version of the layered class that is much slower to dig. Layered Block Class (slow dig)
Icon Sign.png

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.