Modding:Block Classes

From Vintage Story Wiki

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"

A majority of all block classes can be viewed here in the Vintage Story Github for those looking to learn more about how each works.

Additionally, mechanical blocks classes are stored here.

All Block Classes

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

Class Name Example Blocks Description Github Link
Block most regular blocks A standard block class that almost all blocks utilize or inherit. Block Class
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
BlockBigBerryBush 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
BlockChisel chiseledblock - Chiseled Class
BlockClayForm clayform - Clay Form Class
BlockCookedContainer pot A container that has finished cooking its contents and is ready to be taken from etc. Cooked Container Class
BlockCookingContainer pot A container that has not finished 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)
BlockLeaves leaves, leavesbranchy - Leaves Class
BlockLocustNest cage (locustnest) - Locust Nest Class
BlockLog log Only contains code for OnPickBlock method. Lava Class
BlockLooseGears loosegears - Loose Gears Class
BlockLooseOres looseores - Loose Ores Class
BlockLooseStones loosestones - Loose Stones Class
BlockLootVessel lootvessel - Loot Vessel Class
BlockLupine flower-lupine - Lupine Flower Class
BlockMeal bowl-meal Gives a block the ability to store meal data. Meal Class
BlockMetalPartPile partpile, partpile-wall - Part Pile Class
BlockMetalSpikes metalspikes (locustnest) - Metal Spikes Class
BlockMeteorite meteorite - Meteorite Class
BlockMushroom mushroom - Mushroom Class
BlockOre ore-graded, ore-ungraded - Ore Class
BlockPan pan - Pan Class
BlockPeatbrick peatbrick - Peat Brick Class
BlockPeatPile peatpile - Peat Pile Class
BlockPlaceOnDrop meteorite - Place on Drop Class
BlockPlant flower, frostedtallgrass, herb, plaintreesapling, tallfern, tallgrass - Plant Class
BlockPlatePile platepile - Plate Pile Class
BlockPlankPile plankpile - Plank Pile Class
BlockQuern quern - Quern Class
BlockRails rails - Rails Class
BlockReeds reeds-free, reeds-water - Meteorite Class
BlockRequireSolidGround barrelcactus - Requires Solid Ground Class
BlockReeds reeds-free, reeds-water - Meteorite Class
BlockSeaweed seaweed - Seaweed Class
BlockShelf shelf - Shelf Class
BlockSign sign - Sign Class
BlockSignPost signpost - Sign Post Class
BlockSimpleCoating linen, sheet (metal), wool Allows a thin, flat block to be placed on a single side of a surface. Requires directional variants for each orientation. Simple Coating Class
BlockSkep skep - Skep Class
BlockSmeltedContainer crucible - Smelted Container Class
BlockSmeltingContainer crucible - Smelting Container Class
BlockSnow snow - Snow Class
BlockSoil soil - Soil Class
BlockSoilDeposit clay, peat Used to generate a soil type and then generate soil beneath it to prevent gaps formation. Soil Deposit Class
BlockSpawner meta - Entity Spawner Class
BlockStairs All stairs Allows stair blocks to be placed in different orientations. Requires variants for each orientation. Stairs Class
BlockStalagSection stalagsection - Stalag Section Class
BlockStaticTranslocator statictranslocator - Static Translocator Class
BlockTeleporter teleporterbase - Teleporter Class
BlockThermalDifference - - Thermal Difference Class
BlockToolMold toolmold - Tool Mold Class
BlockTorch torch - Torch Class
BlockTorchHolder torchholder - Torchholder Class
BlockTrough trough-small - Trough Class
BlockTroughDoubleBlock trough-large - Double Block Trough Class
BlockVines wildvine - Vine Class
BlockWater water - Water Class
BlockWaterflowing water - Flowing Water Class
BlockWaterLily waterlily - Water Lily Class
BlockWaterPlant water - Water Plant Class
BlockWaterfall water - Waterfall Class
BlockWateringCan wateringcan - Wateringcan Class
BlockWithGrassOverlay - - Grass Overlay Class

Mechanical Power Block Classes

This table contains all the blocks relevant to mechanical power.

Class Name Example Blocks Description Github Link
BlockAngledGears angledgears - Angled Gears Class
BlockAxle axle - Axle Class
BlockBrake brake - Brake Class
BlockClutch clutch - Clutch Class
BlockHelveHammer helvehammerbase - Helve Hammer Class
BlockToggle toggle - Toggle Class
BlockTransmission transmission - Transmission Class
BlockWindmillRotor windmillrotor Controls the placement of the rotor and determines what happens when the player tries to add sails to it. Windmill Rotor Class
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.