Modding:Block Json Properties: Difference between revisions

From Vintage Story Wiki
Line 1,595: Line 1,595:
     </syntaxhighlight>
     </syntaxhighlight>
  </tr>
  </tr>
<tr>
    <td scope="row"><div class="tt" data-tt-id="p_alist_quantityslots" data-tt-parent="p_attributes_contain">quantitySlots</div></td>
    <td>number</td>
    <td>-</td>
    <td>The number of slots a generic container has.</td>
    <td>chest, storagevessel</td>
</tr>
<tr>
    <td scope="row"><div class="tt" data-tt-id="p_alist_requiredunits" data-tt-parent="p_attributes_contain">requiredUnits</div></td>
    <td>number</td>
    <td>-</td>
    <td>The number of units required to fill a tool mold with molten metal.</td>
    <td>toolmold</td>
</tr>
<tr>
    <td scope="row"><div class="tt" data-tt-id="p_alist_retrieveonly" data-tt-parent="p_attributes_contain">retrieveOnly</div></td>
    <td>boolean</td>
    <td>-</td>
    <td>If true, makes it so that a container can only be taken from and cannot be used to store new items.</td>
    <td>lootvessel</td>
</tr>
<tr>
    <td scope="row"><div class="tt" data-tt-id="p_alist_servingcapacity" data-tt-parent="p_attributes_contain">servingCapacity</div></td>
    <td>number</td>
    <td>-</td>
    <td>The number of servings of a meal a block can hold.</td>
    <td>crock, bowl</td>
</tr>
<tr>
    <td scope="row"><div class="tt" data-tt-id="p_alist_shelvable" data-tt-parent="p_attributes_contain">shelvable</div></td>
    <td>boolean</td>
    <td>-</td>
    <td>If true, allows the block to be placed on a shelf.</td>
    <td>crystal-small, seashell</td>
</tr>
<tr>
    <td scope="row"><div class="tt" data-tt-id="p_alist_sitheight" data-tt-parent="p_attributes_contain">sitHeight</div></td>
    <td>number (decimal)</td>
    <td>-</td>
    <td>Used by flower pots to determine how high the incorporated block should be rendered.</td>
    <td>flowerpot, planter</td>
</tr>
<tr>
    <td scope="row"><div class="tt" data-tt-id="p_alist_spoilmultiplier" data-tt-parent="p_attributes_contain">spoilSpeedMulByFoodCat</div></td>
    <td>-</td>
    <td>-</td>
    <td>Used to make food spoil slower or faster when stored in a container.</td>
    <td>storagevessel</td>
</tr>
<tr>
<td scope="row"><div class="tt" data-tt-id="p_spoilspeed_info" data-tt-parent="p_alist_spoilmultiplier" data-invisible="true"></div></td>
<td colspan="4">
The clay storage vessel is a good example of this:
<syntaxhighlight lang="json">
spoilSpeedMulByFoodCat: {
  "normal": {
    "vegetable": 0.75,
    "grain": 0.5
  }
},
</syntaxhighlight>
</tr>
<tr>
    <td scope="row"><div class="tt" data-tt-id="p_alist_storagetype" data-tt-parent="p_attributes_contain">storageType</div></td>
    <td>Number (Storage Flag)</td>
    <td>-</td>
    <td>The storage flag of the container, which can limit what types of items or blocks can be stored within it.</td>
    <td>storagevessel</td>
</tr>
<tr>
    <td scope="row"><div class="tt" data-tt-id="p_alist_storagetype" data-tt-parent="p_attributes_contain">textureMapping</div></td>
    <td>-</td>
    <td>-</td>
    <td>A more complex method of texturing block shapes with multiple content combinations. Used primarily with the pot to texture the food contents.</td>
    <td>pot</td>
</tr>
<tr>
    <td scope="row"><div class="tt" data-tt-id="p_alist_types" data-tt-parent="p_attributes_contain">types</div></td>
    <td>-</td>
    <td>-</td>
    <td>A secondary method of variant categorization used by containers to help with assigning attributes.</td>
    <td>chest</td>
</tr>
<tr>
    <td scope="row"><div class="tt" data-tt-id="p_alist_varaintbygroup" data-tt-parent="p_attributes_contain">variantByGroup</div></td>
    <td>-</td>
    <td>-</td>
    <td>Used by generic containers to group types by a specific variant. "side" is used since it is a common variant of all the types.</td>
    <td>chest</td>
</tr>
<tr>
    <td scope="row"><div class="tt" data-tt-id="p_alist_varaintbygroupinv" data-tt-parent="p_attributes_contain">variantByGroupInventory</div></td>
    <td>-</td>
    <td>-</td>
    <td>A subtype inventory name that can be assigned to types (usually this is "null").</td>
    <td>chest</td>
</tr>
<tr>
  <td scope="row"><div class="tt" data-tt-id="p_alist_waterprops" data-tt-parent="p_attributes_contain">waterTightContainerProps</div></td>
  <td>-</td>
  <td>-</td>
  <td>This contains all the liquid properties of an block, generally determining how it is stored and used with a bucket. '''Keep in mind this is not generally used for blocks, as most liquids that use this property are items, even if they come from a source block'''.</td>
  <td>water</td>
</tr>
<tr>
  <td scope="row"><div class="tt" data-tt-id="p_alist_liquidcontain" data-tt-parent="p_alist_waterprops">containable</div></td>
  <td>boolean</td>
  <td>-</td>
  <td>If true, the liquid can be placed into liquid containers, such as barrels and buckets.</td>
  <td>water</td>
</tr>
<tr>
  <td scope="row"><div class="tt" data-tt-id="p_alist_iperlitre" data-tt-parent="p_alist_waterprops">itemsPerLitre</div></td>
  <td>number (int)</td>
  <td>-</td>
  <td>The number of itemstack items required to make a litre of liquid. Generally this value is 1:1, but concentrated items like honey can be 4:1.</td>
  <td>water</td>
</tr>
<tr>
  <td scope="row"><div class="tt" data-tt-id="p_alist_liqtex" data-tt-parent="p_alist_waterprops">texture</div></td>
  <td>Path to Texture</td>
  <td>-</td>
  <td>A "block" texture given to a liquid when it's rendered in containers or other items.</td>
  <td>waterportion, honeyportion</td>
</tr>
<tr>
  <td scope="row"><div class="tt" data-tt-id="p_alist_spill" data-tt-parent="p_alist_waterprops">allowSpill</div></td>
  <td>boolean</td>
  <td>-</td>
  <td>If true, allows the player to use the Ctr + Right Click function to "spill" the liquid from a container. The whenSpilled property determines what happens if this is true.</td>
  <td>waterportion, limewater</td>
</tr>
<tr>
  <td scope="row"><div class="tt" data-tt-id="p_alist_tindex" data-tt-parent="p_alist_waterprops">tintIndex</div></td>
    <td>integer</td>
    <td>0</td>
    <td>Tints the color of the item if it's ever drawn as a block: '''''0''''' for no tint, '''''1''''' for plant climate tint, '''''2''''' for water climate tint.</td>
    <td>-</td>
  <td>waterportion, limewater</td>
</tr>
<tr>
  <td scope="row"><div class="tt" data-tt-id="p_alist_whenfill" data-tt-parent="p_alist_waterprops">whenFilled</div></td>
  <td>Item or Block Code</td>
  <td>-</td>
  <td>Determines what is stored in a liquid container when interacted with.</td>
  <td>water</td>
</tr>
<tr>
  <td scope="row"><div class="tt" data-tt-id="p_alist_whenspill" data-tt-parent="p_alist_waterprops">whenSpilled</div></td>
  <td>-</td>
  <td>-</td>
  <td>Determines what happens when the "spill" interaction is used. Only works if the allowSpill property is set to true.</td>
  <td>waterportion, limewater</td>
</tr>
<tr>
  <td scope="row"><div class="tt" data-tt-id="p_alist_spillact" data-tt-parent="p_alist_whenspill">action</div></td>
  <td>string</td>
  <td>-</td>
  <td>Code identifier that determines what happens when the liquid is spilled from a container.</td>
  <td>waterportion, limewater</td>
</tr>
<tr>
  <td scope="row"><div class="tt" data-tt-id="p_alist_spillblock" data-tt-parent="p_alist_spillact">PlaceBlock</div></td>
  <td>-</td>
  <td>-</td>
  <td>Places a block at the spilled location.</td>
  <td>waterportion</td>
</tr>
<tr>
  <td scope="row"><div class="tt" data-tt-id="p_alist_spillitem" data-tt-parent="p_alist_spillact">DropContents</div></td>
  <td>-</td>
  <td>-</td>
  <td>Drops an item at the location. If the item is a liquid it will disappear immediately with a "splash" particle effect.</td>
  <td>limeportion</td>
</tr>
<tr>
  <td scope="row"><div class="tt" data-tt-id="p_alist_spillstack" data-tt-parent="p_alist_whenspill">stack</div></td>
  <td>-</td>
  <td>-</td>
  <td>The block or item dropped when spilled. if the "PlaceBlock" action is chosen a block is placed, if "DropContents" is used an item is generated.</td>
  <td>waterportion, limewater</td>
</tr>
<tr>
  <td scope="row"><div class="tt" data-tt-id="p_alist_sfilllevel" data-tt-parent="p_alist_whenspill">stackByFillLevel</div></td>
  <td>-</td>
  <td>-</td>
  <td>Allows for different blocks or items to be placed based on the level of the liquid in the container.</td>
  <td>waterportion, limewater</td>
</tr>
<tr>
<td scope="row"><div class="tt" data-tt-id="p_attributes_info" data-tt-parent="p_alist_waterprops" data-invisible="true"></div></td>
<td colspan="4">


We'll look at an example of how this property is utilized by water block:


<syntaxhighlight lang="json">
waterTightContainerProps: {
  containable: true,
  itemsPerLitre: 1,
  whenFilled: { stack: { type: "item", code: "waterportion" } }
}
</syntaxhighlight>
As we can see, most of the watertight properties are not used by the block, that's because most of them are used by the item equivalent "waterportion".
</tr>


<tr>
<tr>
Line 1,773: Line 1,977:
     <td>Gives some blocks additional rotation properties when placed (currently "22.5degnot45deg" and "22.tdeg" are the only two options).</td>
     <td>Gives some blocks additional rotation properties when placed (currently "22.5degnot45deg" and "22.tdeg" are the only two options).</td>
     <td>chest</td>  
     <td>chest</td>  
</tr>
<tr>
    <td scope="row"><div class="tt" data-tt-id="p_alist_sleepefficiency" data-tt-parent="p_attributes_misc">sleepEfficiency</div></td>
    <td>number (decimal)</td>
    <td>-</td>
    <td>Determines how long a player can sleep in a bed, based off a ratio of 12 hours. (ratio = #maxhours/12).</td>
    <td>-</td>
  </tr>
  </tr>
  <tr>
  <tr>

Revision as of 01:06, 8 May 2020

Overview

A complete list of all available properties

Property Type Default Usage Reference
json
Core (no byType available)
code
string required A unique identifier for the block. Any Block

A domain prefix will be added dynamically depending on the location of the file. Every mod and VintageStory itself have a unique prefix.

For example the code stone turns into game:stone.

The code identifier has to be unique inside its domain. In theory there could be equal identifiers with different domain prefixes. Find out more about Domains.

enabled
boolean true If the block will be loaded or not. Can be used to temporarily remove the block. -
variantgroups
array of objects - Allows you define multiple variants of the same item. armor, ore-graded, plank,

The variantgroups property allows you to define multiple variants of this item. All of them will have their unique pattern, which will be added to the item code.

An easy example would be a bowl, which can either be raw or burned:

	variantgroups: [
		{ code:"type", states: ["raw", "burned"] },
	],

Meaning there will be two variants bowl-raw and bowl-burned.


It's also possible to define multiple groups.

	variantgroups: [
		{ code:"state", states: ["closed", "opened"] },
		{ code:"contents", states: ["empty", "cabbage"] },
	],

As a result you will have 2x2 groups, which will be added one after each other: barrel-closed-empty, barrel-closed-cabbage, barrel-opened-empty and barrel-opened-cabbage.


Additionally it is possible to refer to external lists (used for blocks) that are found in the worldproperties folder, such as block/rock, which contains all states of all rock types. This used for gravel, sand and rock. It's a good way to keep everything organized:

	variantgroups: [
		{ loadFromProperties: "block/rock" },
	],

Here is a full list of all groups and their variants (you can also find them in the assets/worldproperties folder): The world properties are stored in the assets/survival/worldproperties folder. They are used to help fill in the variantgroups field. Instead of directly specifying every state in the variant group, the states can be loaded from a world property through the loadFromProperties key. The states from multiple world properties can be added with the loadFromPropertiesCombine key, which takes an array of strings. The states key can still be optionally added to the variant group to specify additional states.

For example, the following creates a variant group named orientation. It contains 5 states. north, east, south, and west are loaded from the abstract/horizontalorientation world property. up is added to the list of states.

	variantgroups: [
		{ code: "orientation", states: ["up"], loadFromProperties: "abstract/horizontalorientation" }
	],

Unwanted variant states can be filtered out with the skipVariants property. Or all states that do not match an expression can be filtered out with the allowedVariants property.

Name States
abstract/alloy -
abstract/coating n, e, s, w, u, d, ud, ns, ew, nd, ed, sd, wd, su, wu, nu, eu, es, sw, nw, ne, nwd, ned, esd, swd, nwu, neu, esu, swu, nsd, ewd, sud, wud, nud, eud, nsu, ewu, nes, esw, nsw, new, newd, nesd, eswd, nswd, eswu, nswu, newu, nesu, nesw, ewud, nsud, neud, esud, swud, nwud, neswd, neswu, newud, nesud, eswud, nswud, neswud
abstract/fertility verylow, low, medium, compost, high
abstract/grasscoverage none, verysparse, sparse, normal
abstract/horizontalorientation north, east, south, west
abstract/rockgroup -
abstract/verticalorientation up, down
block/flower catmint, cornflower, forgetmenot, edelweiss, heather, horsetail, orangemallow, wilddaisy, westerngorse, cowparsley, goldenpoppy, lilyofthevalley, woad, redtopgrass
block/fruit blueberry, cranberry, redcurrant, whitecurrant, blackcurrant, saguaro, pineapple, redapple, pinkapple, yellowapple, cherry, peach, pear, orange, mango, breadfruit, lychee, pomegranate
block/grass -
block/herb basil, chamomile, cilantro, lavender, marjoram, mint, saffron, sage, thyme
block/metal bismuth, bismuthbronze, blackbronze, brass, chromium, copper, cupronickel, electrum, gold, iron, meteoriciron, lead, molybdochalkos, platinum, nickel, silver, stainlesssteel, steel, tin, tinbronze, titanium, uranium, zinc
block/mushroom flyagaric, fieldmushroom, almondmushroom, bitterbolete, blacktrumpet, chanterelle, commonmorel, deathcap, devilstooth, devilbolete, earthball, elfinsaddle, golddropmilkcap, greencrackedrussula, indigomilkcap, jackolantern, kingbolete, lobster, orangeoakbolete, paddystraw, puffball, redwinecap, saffronmilkcap, violetwebcap, witchhat, beardedtooth, chickenofthewoods, dryadsaddle, pinkoyster, tinderhoof, whiteoyster, reishi, funeralbell, deerear, livermushroom, pinkbonnet, shiitake
block/ore-gem-cut diamond, emerald, peridot
block/ore-gem-rough diamond,emerald,olivine_peridot
block/ore-graded nativecopper,limonite,quartz_nativegold,galena,cassiterite,chromite,ilmenite,sphalerite,quartz_nativesilver,galena_nativesilver,bismuthinite,magnetite,hematite,malachite,pentlandite,uranium,wolframite,rhodochrosite
block/ore-nugget nativecopper,limonite,nativegold,galena,cassiterite,chromite,ilmenite,sphalerite,nativesilver,bismuthinite,magnetite,hematite,malachite,pentlandite,uranium,wolframite,rhodochrosite
block/ore-ungraded alum,lapislazuli,corundum,anthracite,borax,cinnabar,lignite,bituminouscoal,sylvite,quartz,olivine,sulfur,fluorite,graphite,kernite,phosphorite
block/painting howl,elk,underwater,prey,forestdawn,fishandtherain,bogfort,castleruin,cow,hunterintheforest,seraph,sleepingwolf,sunkenruin,traveler,oldvillage,lastday,sodhouse
block/rock andesite,chalk,chert,conglomerate,limestone,claystone,granite,sandstone,shale,basalt,peridotite,phyllite,slate,bauxite
block/rockwithdeposit andesite,chalk,chert,conglomerate,limestone,claystone,granite,sandstone,shale,basalt,peridotite,phyllite,slate,obsidian,kimberlite,scoria,tuff,bauxite,halite,suevite,whitemarble,redmarble,greenmarble
block/tallgrass veryshort,short,mediumshort,medium,tall,verytall,eaten
block/toolmetal bismuth,bismuthbronze,blackbronze,brass,copper,gold,iron,meteoriciron,lead,molybdochalkos,silver,steel,tinbronze
block/wood birch,oak,maple,pine,acacia,kapok,baldcypress,larch,redwood,ebony,walnut,purpleheart
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.

Modding
Modding Introduction Getting Started Theme Pack
Content Modding Content Mods Developing a Content Mod Basic Tutorials Intermediate Tutorials Advanced Tutorials Content Mod Concepts
Code Modding Code Mods Setting up your Development Environment
Property Overview ItemEntityEntity BehaviorsBlockBlock BehaviorsBlock ClassesBlock EntitiesBlock Entity BehaviorsCollectible BehaviorsWorld properties
Workflows & Infrastructure Modding Efficiency TipsMod-engine compatibilityMod ExtensibilityVS Engine
Additional Resources Community Resources Modding API Updates Programming Languages List of server commandsList of client commandsClient startup parametersServer startup parameters
Example ModsAPI DocsGitHub Repository



Furthermore there are other ways of combining groups together. So far we covered the default combination mode, which is multiplicative (the total count of variants is the product of all states). There are two other methods, Additive and SelectiveMultiply.

Let's take a look at the additive combination mode used in the flowerpot block:

	variantgroups: [
		{ code: "type", states: ["raw"] },
		{ code: "empty", states: ["empty"], combine: "additive" },
		{ code: "flower", loadFromProperties: "block/flower", combine: "additive" },
		{ code: "mushroom", loadFromProperties: "block/mushroom", combine: "additive" },
		{ code: "sapling", loadFromProperties: "block/wood", combine: "additive" },
	],

The variants are flowerpot-raw, flowerpot-empty, flowerpot-{all flowers}, flowerpot-{all mushrooms} and flowerpot-{all saplings}.

Additive mode could also be called separate, since it defines a variant separate from all the other groups:

	variantgroups: [
		{ code: "something", states: ["same", "different"] },
		{ code: "type", states: ["raw", "baked"] },
		{ code: "empty", states: ["red", "green"], "combine": "additive" },
	],

In this case, the result would be same-raw, same-baked, different-raw, different-baked, red and green

The third combination mode "SelectiveMultiply" which allows you to specify which variant groups you want to combine multiplicatively with. There are many examples of this in the clothing item JSONS, as shown below with the lowerbody asset:

    code: "clothes",	
    variantgroups: [
	{ code: "category",  states: ["lowerbody"] },
	{ code: "lowerbody", combine: "SelectiveMultiply", onVariant: "category", states: [
"aristocrat-leggings", "dirty-linen-trousers", "fine-trousers", "jailor-pants", "lackey-breeches", "merchant-pants", "messenger-trousers", "minstrel-pants", "noble-pants", "prince-breeches", "raindeer-trousers", "raw-hide-trousers", "shepherd-pants", "squire-pants", "steppe-shepherds-trousers", "tattered-peasent-gown", "torn-riding-pants", "warm-woolen-pants", "woolen-leggings", "workmans-gown" 
         ] },
	],

The function onVariant specifies which variant group to selectively combine with, ignoring all other variants without it (in case some are combined additively).

Using this will result items called clothes-lowerbody-aristocrat-leggings, clothes-lowerbody-dirty-linen-trousers, etc.

(any) bytype
key: string; value: object - You can create properties for certain variants of the item.

In order to define properties for specific variants you can add byType to the property name. This allows you to define it depending on the type and always follows the same syntax:

	(property)ByType: {
		"selector": property,
		"selector2": property2,
		...
	}

If the selector matches the name of the variant the given property will be used. Keep in mind that only the first matching one will be used (everything below will be ignored).

A slab for example has two variants (up, down), which have different collision boxes:

	collisionboxByType: {
		"*-down": { x1: 0, y1: 0, z1: 0,   x2: 1, y2: 0.5, z2: 1 },
		"*-up": { x1: 0, y1: 0.5, z1: 0,   x2: 1, y2: 1, z2: 1 }
	},

The char * stands for anything. In this case it ignores the code of the item.

Furthermore this opens up even more possbilities for more advanced selectors like this one for doors: *-north-*-opened-left. This will ignore the second variantgroup. Additionally ByType can also be used for child properties:

	collisionboxnbox: { 
		x1: 0, y1: 0, z1: 0.875, x2: 1, y2: 1, z2: 1,
		rotateYByType: {
			"*-north-*-opened-left": 90,
			"*-north-*-closed-left": 0,
			"*-west-*-opened-left": 180,
			"*-west-*-closed-left": 90,

			"*-east-*-opened-left": 0,
			"*-east-*-closed-left": 270,
			"*-south-*-opened-left": 270,
			"*-south-*-closed-left": 180,

			"*-north-*-opened-right": 270,
			"*-north-*-closed-right": 0,
			"*-west-*-opened-right": 0,
			"*-west-*-closed-right": 90,

			"*-east-*-opened-right": 180,
			"*-east-*-closed-right": 270,
			"*-south-*-opened-right": 90,
			"*-south-*-closed-right": 180
		}
	},

Since Vintagestory v1.8 it is also possible to use the variantgroup as a placeholder:

	variantgroups: [
		{ code: "metal", states: ["copper", "tinbronze", "bismuthbronze", "blackbronze", "gold", "silver", "iron" ] },
	],
	textures: {
		"metal": { base: "block/metal/ingot/{metal}" },
		"wood": { base: "item/tool/material/wood" } 
	},
allowedVariants
array of objects - Used to trim unnecessary items generated by combined variants. crystalizedore-graded, ore-graded, ore-ungraded
skipVariants
array of object - Similar to allowedVariants, but instead skips the creation of listed variants rather than assigning which are allowed. armor
Specific
class
string "block" The block class can add special functionalities for the block. anvil, firepit, quern, skep

It can be used to open guis or adding other extra functionality to the block. A complete tutorial of how to add your own class to the game can be found here. An ongoing list of block classes used in JSONS can also be found here.

entityclass
string - The block entity class is able to tick and to store extra data. Allows for much more advanced properties. anvil, firepit, quern, skep
behaviors
array of object - A behavior adds custom abilities such as falling block. gravel, lantern, log, rock, torch

Behaviors are useful traits as many can be assigned to a single block. If you want to create your own custom behavior you can read Adding Block Behavior. To see all of the current behaviors in the game see All Block Behaviors

entityBehaviors
array of object - An entity behavior adds custom abilities to an entity assigned to a block, such as the mechanical power properties of the windmill. angledgears, axle, brake, clutch, helvehammerbase, toggle, transmission, windmillrotor

Block entity behaviors are expanded capabilities that regular behaviors cannot accomplish. At the moment they are only used for Mechanical Power blocks, but if you're looking to make your own you can look through the existing files at the Vintage Story Github here .

To see all of the current block entity behaviors in the game see All Block Behaviors.

A chest for example uses the BlockEntity to store the inventory. A tutorial of creating your own entityclass can be found here. You can also find every existing block entity and their relevant github links here.

blockmaterial
string - A behavior adds custom abilities such as falling block. gravel

Materials are hardcoded and currently only used to determine mining speed with a specific tool. The following materials are available:

Brick, Ceramic, Cloth, Fire, Glass, Gravel, Ice, Lava, Leaves, Liquid, Mantle, Metal, Other, Plant, Sand, Snow, Soil, Stone, Wood

matterstate
array of object "block" Determines whether the block is in a solid, a liquid, a gas or a plasma state. water

Used for special collision behavior and rendering. Currently used for lava and water, which are liquids (All other blocks default to solid).

Gas and plasma are not yet implemented.

resistance
decimal number 6 How long it takes to break this block in seconds (with a mining speed of 1). leaves, meteorite, sand

Resistance values range from very low with leaves (0.5) to the average of stone (6) to the very high resistance value of meteoric iron deposits (60).

requiredminingtier
integer 0 Minimum required mining tier to get the drop out of the block. ore-graded, rock

The following are examples of the mining tiers required for certian ores in Vintage Story:

Tier Ores
1 galena and rocksalt_sylvite
2 lignite, cassiterite, sphalerite, rocksalt, sulfur and nativecopper
3 bituminouscoal, quartz_nativegold, quartz_nativesilver, lapislazuli, bismuthinite, quartz, magnetite and limonite
4 diamond and emerald
5 chromite, platinum and ilmenite
climbable
boolean false If true, walking against this block will make the player climb (used for ladders). ladder
rainpermeable
boolean false If rain can fall through this block. torch, torchholder
snowcoverage
boolean - Whether snow may rest on top of this block. leavesbranchy

All non-solid blocks can't be covered by snow unless it's defined different:

  • Leaves (also branchy): true,
  • Water with particles, Lakeice: false
collisionbox
object box (0,0,0 -> 1,1,1) Defines a box with which the player collides with. carcass, door, fence, all slabs

A half slab for example, has either a box going from 0,0,0 to 1,0.5,1 or going from 0,0.5,0 to 1,1,1, depending on whether it is a slab is down or up:

	collisionboxByType: {
		"*-down": { x1: 0, y1: 0, z1: 0,   x2: 1, y2: 0.5, z2: 1 },
		"*-up": { x1: 0, y1: 0.5, z1: 0,   x2: 1, y2: 1, z2: 1 }
	},

Collision and selection boxes are most likely equal.

Also, setting the entire property to null will eliminate the collision box entirely.

collisionboxes
array of object - Defines multiple boxes with which the player collides with. all stairs, crate

A crate for example requires multiple collision boxes:

collisionboxesByType: {
  "*-opened": [ 
    { x1: 0, y1: 0, z1: 0, x2: 1, y2: 0.0625, z2: 1 },
    { x1: 0, y1: 0, z1: 0, x2: 1, y2: 1, z2: 0.0625 },
    { x1: 0, y1: 0, z1: 0, x2: 1, y2: 1, z2: 0.0625, rotateY: 90 },
    { x1: 0, y1: 0, z1: 0, x2: 1, y2: 1, z2: 0.0625, rotateY: 180 },
    { x1: 0, y1: 0, z1: 0, x2: 1, y2: 1, z2: 0.0625, rotateY: 270 },
  ]
},
collisionSelectionBoxes
array of object - Simultaneously defines multiple boxes with which the player collides with and can select. all stairs

A crate for example requires multiple collision boxes:

	collisionSelectionBoxesByType: {
		"*-down-*": [
			{ x1: 0, y1: 0.5, z1: 0, x2: 1, y2: 1, z2: 1 },
			{ 
				x1: 0, y1: 0, z1: 0.5, x2: 1, y2: 0.5, z2: 1, 
				rotateYByType: {
					"*-north": 180,
					"*-east": 90,
					"*-south": 0,
					"*-west": 270,
				}
			}			
		],
		"*-up-*": [
			{ x1: 0, y1: 0, z1: 0, x2: 1, y2: 0.5, z2: 1 },
			{ 
				x1: 0, y1: 0.5, z1: 0.5, x2: 1, y2: 1, z2: 1, 
				rotateYByType: {
					"*-north": 180,
					"*-east": 90,
					"*-south": 0,
					"*-west": 270,
				}
			}
		],	
	},
selectionbox
object box (0,0,0 -> 1,1,1) Defines a box which the player's mouse pointer collides with for selection. carcass, door, fence, all slabs

A half slab for example, has either a box going from 0,0,0 to 1,0.5,1 or going from 0,0.5,0 to 1,1,1, depending on whether it is a slab is down or up:

	selectionboxByType: {
		"*-down": { x1: 0, y1: 0, z1: 0,   x2: 1, y2: 0.5, z2: 1 },
		"*-up": { x1: 0, y1: 0.5, z1: 0,   x2: 1, y2: 1, z2: 1 }
	},

Collision and selection boxes are most likely equal.

selectionboxes
array of object - Defines multiple boxes which the player's mouse pointer collides with for selection. carcass, door, fence, all slabs

A crate for example requires multiple selection boxes:

	selectionboxesByType: {
		"*-opened": [ 
			{ x1: 0, y1: 0, z1: 0, x2: 1, y2: 0.0625, z2: 1 },
			{ x1: 0, y1: 0, z1: 0, x2: 1, y2: 1, z2: 0.0625 },
			{ x1: 0, y1: 0, z1: 0, x2: 1, y2: 1, z2: 0.0625, rotateY: 90 },
			{ x1: 0, y1: 0, z1: 0, x2: 1, y2: 1, z2: 0.0625, rotateY: 180 },
			{ x1: 0, y1: 0, z1: 0, x2: 1, y2: 1, z2: 0.0625, rotateY: 270 },
		]
	},
replaceable
integer 0 A value usually between 0-9999 that indicates which blocks may be replaced with others. bigberrybush, tallgrass, water
value effect (blocks)
0 ordinary blocks (stone for example)
5000 Everything equal or above will be washed away by water (such as Fruit).
6000 Everything equal or above wwill replaced when the player tries to place a block (such as Tallgrass).
9000 Lava
9500 Water
9999 Air
fertility
integer 0 Which plants can grow on top of this block. clay, gravel, sand, soil
value effect
0 (rock) nothing can grow.
10 (sand) some tallgrass and small trees can be grow on it.
100 (soil) all grass and trees can grow on it.
lightabsorption
0 ... 32 0 For light blocking blocks. Any value above 32 will completely block all light. full-plain (glass), water
walkspeedmultiplier
decimal number 1.0 Percentage walk-speed when standing on or inside this block. path, spiderweb, stonepath
blocks value
Spiderweb 0.25
Stonepath 1.15
dragmultiplier
decimal number 1.0 Drag multiplier applied to entities standing on it (slipperiness factor). Glacierice, Lakeice
blocks value
Glacierice, Lakeice 0.02
drops
array of object - The items that should drop from breaking this block. crops, skep

Drop itself

If this property does not exist the block will drop itself.


No drop

A firepit for example doesn't drop anything. You can do so if you specify an empty array:

	drops: [],

Special drop

You can also specify a special item/ block. Therefore you need to define an ItemStack, with the given properties:

property default explanation
type block Can either be block or item.
code (required) - The complete code (can also include domain) of the item or block.
lastdrop false If true and the quantity dropped is >=1 any subsequent drop in the list will be ignored.
attributes - Tree Attributes that will be attached to the resulting itemstack.
tool - If specified then given tool is required to break this block.
quantity - (one) Determines the quantity of items which will be dropped.

For example, the drop of a charcoalpile looks like this:

	drops: [
		{ type: "item", code: "charcoal" }
	],

Tallgrass will only drop something if it's mined by a knife:

	drops: [
		{ type: "item", code: "drygrass", tool: "knife"  },
	],

Chance drops

Let's take a look at an example. This is the drop property of rock:

	
	drops: [
		{
			type: "item", 
			code: "stone-{rock}", 
			quantity: { avg: 2.5, var: 0.5 } 
		},
	]

This will drop 2-3 blocks.

avg: Stands for the default drop quantity. If var is 0 or not specified it will always drop the given average.

var: How much the drop rate can vary. Meaning the drop rate can be avg - var at minimum and age + var at maximum.

For more information see NatFloat page.


Multiple Drops

Of course you can also define multiple drops at once. Sapling can drop a sapling and a stick:

	drops: [
		{ 
			type: "block", 
			code: "sapling-{wood}",
			quantity: { avg: 0.02, var: 0 },
		},
		{ 
			type: "item", 
			code: "stick",
			quantity: { avg: 0.02, var: 0 },
		}
	],

Last Drop

In order to add a special drop, which (if dropped) prevents all other drops, you can use the lastDrop property:

dropsByType: {
	"ore-quartz-*": [
		{ type: "item", code: "clearquartz",  quantity: { avg: 0.2, var: 0 }, lastDrop: true },
		{ type: "item", code: "ore-{ore}",  quantity: { avg: 1.25, var: 0 }  }
	],
	"*": [ 
		{ type: "item", code: "ore-{ore}",  quantity: { avg: 1.25, var: 0 }  }
	],
}

Quartz ore will drop with a 20% chance clearquartz, if not it will drop the regular ore. If lastDrop wouldn't be true it could drop both at the same time.

particleproperties
array of object - Particles that should spawn in regular intervals from this block. torch>

The torch is a good example of how to use those particles ...

	particleProperties: [
		{
			hsvaColor: [{ avg: 20, var: 20 }, { avg: 255, var: 50 }, { avg: 255, var: 50 },  { avg: 255, var: 0 }],
			gravityEffect: { avg: 0, var: 0 },
			posOffset: [ { avg: 0, var: 0.1 }, { avg: 0, var: 0 }, { avg: 0, var: 0.1 }],
			velocity: [ { avg: 0, var: 0.025 }, { avg: 0.5, var: 0.1 }, { avg: 0, var: 0.025 }],
			quantity: { avg: 0.015 },
			size: { avg: 0.5, var: 0 },
			sizeEvolve: { transform: "quadratic", factor: -0.7 },
			lifeLength: { avg: 1.5 },
			glowLevel: 64
		},
		{
			hsvaColor: [{ avg: 0, var: 0 }, { avg: 0, var: 0 }, { avg: 40, var: 30 },  { avg: 220, var: 50 }],
			opacityEvolve: { transform: "quadratic", factor: -16 },
			gravityEffect: { avg: 0, var: 0 },
			posOffset: [ { avg: 0, var: 0.1 }, { avg: 0, var: 0 }, { avg: 0, var: 0.1 }],
			velocity: [ { avg: 0, var: 0.025 }, { avg: 0.15, var: 0.1 }, { avg: 0, var: 0.025 }],
			quantity: { avg: 0.05 },
			size: { avg: 0.25, var: 0.05 },
			sizeEvolve: { transform: "linear", factor: 0.5 },
			particleModel: "Quad"
		}
	],

There is also a complete tutorial about particles, which should help you to find out what each property does.

liquidlevel
0 ... 7 0 Value between 0...7 for Liquids to determine the height of the liquid. water
cropprops
object - Information about the block as a crop. all crops
requiredNutrient
Nutrient (N, P, or K) - The primary nutrient this crop uses and consumes from farmland. all crops
nutrientConsumption
number - The percentage value of the nutrient this plant will consume from farmland. This value should be whole, as in 50 = 50% consumption. all crops
grwothStages
number - The number of growth stages this plant will go through before it can be harvested. all crops
totalGrowthDays
Number - The average number of days required for a plant to reach maturity. This value can include decimals, such as 4.5 days. all crops
behaviors (crop)
string - Crops can have additional functionality with special crop behaviors, currently used only by pumpkins. motherplant (pumpkin)
Pumpkin
number - A unique pumpkin behavior utilize only by the pumpkin motherplant block. motherplant (pumpkin)

The most advanced of crops! Pumpkins utilize a special crop behavior allowing the mother plant to generate vines that will eventually produce pumpkin "fruits":

cropProps: {
  behaviors: [{name: "Pumpkin", properties: {vineGrowthStage: 3, vineGrowthQuantity: { dist: "invexp", avg: 2, var: 3  } }}],
  requiredNutrient: "P",
  nutrientConsumption: 30,
  growthStages: 8,
  totalGrowthDays: 3.5,
},

We can see that the special behavior defines how many vines can be produced by one pumpkin motherplant.

inside
The player is inside the block.
sounds
key: string, value: string - The sounds played for this block during step, break, build and walk. anvil, rock, water
walk
An entity walks over it.
inside
The player is inside the block.
break
Breaking the block.
place
Placing the block.
hit
While mining the block.
byTool
Allows different sounds to be made based off the tool that's being used.

We'll use the "rock" block as an example:

sounds: {
  walk: "walk/stone",
  byTool: {
    "Pickaxe": { hit: "block/rock-hit-pickaxe", break: "block/rock-break-pickaxe" }
  }
},


ambient
Played from time to time if the player is close to it.
ambientBlockCount
The max number of blocks allowed to produce ambient sounds.

Here's a few examples of how different blocks have their own sound properties:

Anvil:

    sounds: {
        "place": "block/anvil",
        "break": "block/anvil"
    }

Rails:

    sounds: {
        place": "block/planks",
        "walk": "walk/wood"
    }

Water:

    sounds: {
        place: "block/water",
        inside: "walk/water",
        ambient: "environment/creek"
    },
Common
creativeinventory
key: string, value: string[] - In which creative inventory tabs the block should be visible in. all blocks

There are several tabs to you can add your stuff. Note that general should always be included, since it should contain everything.

  • general
  • terrain
  • flora
  • construction
  • decorative
  • items

Rock adds all of it's variantions to general, terrain and construction:

	creativeinventory: { "general": ["*"], "terrain": ["*"], "construction": ["*"] },

* reprents the variants which will be added. You can specify multiple and separate them with a comma. It follows the same way as the byType property.

A Torch on the other hand only adds the variation up:

	creativeinventory: { "general": ["*-up"], "decorative": ["*-up"] },
maxstacksize
integer 64 Determines the maximum amount you can stack the block in one slot. -
attackpower
decimal number 0.5 The damage the deals when hitting an entity. -
attackrange
decimal number 1.5 The maximum distance you can hit an entity. -
materialdensity
integer 9999 Determines on whether an object floats on liquids or not. hay, planks, lava, water

Water has a density of 1000, meaning everything below or equal will float on water. The same goes for lava which has a density of 5000.

Vintage story uses real world densities for each material (where 1000 = 1 g/cm^3). To give an idea of the current range of densities, gold has a density of 19300, iron's is 7870, and a feather is 20.

liquidselectable
boolean false If the block can select a liquid while holding it in hand. bucket

Used for buckets in order to fill it with water and to place waterlily on top of water.

miningSpeed
key: string, value: decimal number - The mining speed for each material. Not to be confused with resistance, which determines how long it takes to mine the block. -
miningTier
integer 0 Determines which blocks it can break. If the required miningtier is above the defined one there will be no drop from it. -
combustibleprops
object - Information about the blocks burnable states. log, wooden objects
burntemperature
integer - The temperature at which it burns in degrees Celsius. log, wooden objects
burnduration
decimal number - For how long it burns in seconds. log, wooden objects
heatresistance
integer 500 How many degrees celsius it can resists before it ignites (not implemented yet). log, wooden objects
meltingpoint
integer - How many degrees celsius it takes to smelt/transform this into another. Only used when put in a firepit and SmeltedStack is set. ingotmold, toolmold
meltingduration
decimal number - For how many seconds the temperature has to be above the melting point until the item is smelted. ingotmold, toolmold
smokelevel
decimal number 1 How much smoke this item produces when being used as fuel. -
smeltedratio
integer 1 How many ores are required to produce one output stack. -
smeltedstack
object - If set, the block/item is smeltable in a furnace and this is the resulting itemstack once the MeltingPoint has been reached for the supplied duration. ingotmold, toolmold
requirescontainer
boolean true If set to true, the block/item requires a smelting/cooking/baking container such as the Crucible. If false, it can be directly baked/melted without smelting/cooking/baking container. ingotmold, toolmold

This property can be used to define a burning material. Plank for example can get on fire:

    combustibleProps: {
        burnTemperature: 800,
        burnDuration: 12,
    },

Furthermore it can be used to define smelting processes. An example would be an ingotmold which turns into an ingotmold-burned:

    combustiblePropsByType: {
        "ingotmold-raw": {
            meltingPoint: 600,
            meltingDuration: 30,
            smeltedRatio: 1,
            smeltedStack: { type: "block", code: "ingotmold-burned" },
            requiresContainer: false
        }
    },
nutritionprops
object - Information about the blocks nutrients. -
foodcategory
string - Defines the type of food. It can be fruit, vegetable, protein, grain and dairy. -
saturation
decimal number 0 How much saturation it can restore. -
health
decimal number 0 How much health it can restore. -
Attributes
attributes
- - Custom Attributes associated with this item. barrel, chest, pot, skep

Attributes constitute a large number of custom properties that an block can have, many of which are specific to unique blocks that rely on a C# class for additional functionality. If you wish to add your own JSON attributes to an item generally you must also have a class to utilize them.

Values placed here are final and cannot be modified. For example, if you made a new type of block, say one that damages people when they get close you could define them here:

    attributes: {
		"touchDamage": 0.1,
		"sneakAvoidTouchDamage": true,
	},

Here we have made two new attributes called "touchDamage" and "sneakAvoidTouchDamage" and have given them their own static values to be used in code. As is, these cannot do anything without the usage of C# code in a class. Regardless, we can see that this is a convenient way to create extra properties that can easily be used by other blocks that use the same class.

(Container Attributes)

Attributes that define additional container information.

allowHeating
boolean - Used by the pot block to allow it to be heated in either the output or input slot. pot
bowlContents
string null The item code of the contents contained in the bowl, by default this value is null since most bowls will start with nothing inside them. -
canHold
string (blockcode) - What blocks (liquids) a liquid container can hold. bucket
capacityLitres
number - The amount of litres that a liquid container can hold. bucket
closeSound
Path to sound - The sound that plays when a container is opened. chest, storagevessel
contentBlockCode
- - Used by the flowerpot to manually store the block contained in each variant, which drops when the block is broken. flowerpot, planter
contentConfig
- - Used by food troughs to determine the properties of each content type. trough-large, trough-small
code
String - Identifier used for referencing in the JSON. trough-large, trough-small
content
Item or Block code - The item or block placed in the trough. trough-large, trough-small
foodFor
Entity Code - The entity that can interact with (eat) the contents. trough-large, trough-small
quantityPerFillLevel
number - The number of the item or block required to fill a "portion" of the trough. trough-large, trough-small
maxFillLevels
number - The maximum number of portions that the trough can be filled with. trough-large, trough-small
shapesPerFillLevel
Array of Shape Paths - A list of shapes for each level of the trough, with first being empty, the second with one layer etc. trough-large, trough-small
textureCode
Path to texture - The flat texture used for the contents in the trough. trough-large, trough-small

The large trough is a good example of how the contentConfig attribute is used, since it uses two different shape progressions for regular seed and dry grass:

contentConfig: [
  {
    code: "flax",
    content: { type: "item", code: "grain-flax" }, 
    foodFor: ["pig-*", "sheep-*"],
    quantityPerFillLevel: 2,
    maxFillLevels: 8,
    shapesPerFillLevel: ["block/wood/trough/large/grainfill1", "block/wood/trough/large/grainfill1", "block/wood/trough/large/grainfill2", "block/wood/trough/large/grainfill2", "block/wood/trough/large/grainfill3", "block/wood/trough/large/grainfill3", "block/wood/trough/large/grainfill4", "block/wood/trough/large/grainfill4"],
    textureCode: "contents-flax"
  },
  {
    code: "drygrass",
    content: { type: "item", code: "drygrass" }, 
    quantityPerFillLevel: 8,
    maxFillLevels: 8,
    shapesPerFillLevel: ["block/wood/trough/large/hayfill1", "block/wood/trough/large/hayfill1", "block/wood/trough/large/hayfill2", "block/wood/trough/large/hayfill2", "block/wood/trough/large/hayfill3", "block/wood/trough/large/hayfill3", "block/wood/trough/large/hayfill4", "block/wood/trough/large/hayfill4"],
    foodFor: ["pig-*", "sheep-*"]
  }
]
contentItemCode
Item - The id of an item stored in a container. -
contentItem2BlockCode
Item - Items that are converted into blocks when store in this container. bowl
cookingContainerSlots
Number - The number of slots a cooking container has. crucible, pot
defaultTyped
String - Since containers have a unique variant form called "types" this is used to determine what the default type is. chest, storagevessel
dialogTitleLangCode
String - Gives a container tooltip a "title" in the lang file (EG "Chest Contents"). chest, storagevessel
displaycasable
boolean - If true, allows a block to be placed in a display case. crystal-small
eatenBlock
Block Code - Used by meal blocks to determine what block to return to when the meal has been completely eaten. bowl
eatenBlock
Block Code - Used by meal container blocks to determine what block to return to when the meal has been emptied from it. pot
fillHeight
Number - Determines how high to render molten metal in a tool mold. toolmold
fillQuadsByLevel
Array of Coordinates - Can be used to specify quadrants to render within for tool molds that have higher levels (such as the helve hammer or anvil molds). toolmold

We can look at how this is done with the Anvil mold:

"fillHeight": 10,
"fillQuadsByLevel": [
  { x1: 2, z1: 3, x2: 13, z2: 13 },
  { x1: 2, z1: 3, x2: 13, z2: 13 },
  { x1: 2, z1: 3, x2: 13, z2: 13 },
				
  { x1: 4, z1: 6, x2: 11, z2: 10 },
  { x1: 4, z1: 6, x2: 11, z2: 10 },
  { x1: 4, z1: 6, x2: 11, z2: 10 },
  { x1: 4, z1: 6, x2: 11, z2: 10 },
				
  { x1: 4, z1: 5, x2: 14, z2: 11 },
  { x1: 1, z1: 5, x2: 15, z2: 11 },
  { x1: 1, z1: 5, x2: 15, z2: 11 },
],

As we can see, the anvil mold has 10 layers rather than one, and because it has different shapes for each layer we can redefine the space to render the molten metal per level by using two corners defined by x and z coordinates within the block. In the end, this gives a cleaner looking poured metal effect (even though it may be difficult to see what's going on in the mold).

handleCookingContainerInteract
boolean - If true, can be used to take food from a cooking container. crock, pot
handleLiquidContainerInteract
boolean - If true, can be used to hold liquids. crock, pot
inFirePitProps
- - Gives an item additional rendering properties when placed in a fire pit. crucible, pot
transform
- - If the model type shows the item, it can be transformed using this property. crucible, pot
useFirepitModel
- - Tell the firepit which model to use when this item is placed into it. crucible, pot

Here's an example of how the firepit transformation is used by the pot and crucible:

inFirePitProps: {
  transform: { 
    translation: { x: 0, y: 0.125, z: 0 } 
  },
  useFirepitModel: "Wide"
}

If you're familiar with the other transformation code, this is nothing unusual and works on the same principles by changing the scale, position and rotation of the model with respect to the origin of rotation.

At the moment wide is the only model used with container items. The other option spit is used with cooking meat directly on the firepit.

input-face
Side ID - Used to determine what faces of the block can be used as an input for a hopper (set to "null" since it does not have an input face). hopper
inventoryClassName
String - Used to name an inventory during the loading of inventories in the world. Use "chest" for any generic containers. chest, storagevessel
item-flowrate
Number - Used by the chute block to determine how many items move through it per second. chute
liquidcontainer
boolean - If true, allows the block to hold and take liquids. bucket
maxContainerSlotStackSize
Number - Limits the stacksize of items placed into the container. pot
maxHeatableTemp
Number - The highest temperature that the container can be heated. pot, crucible
mealBlockCode
Block Code - Used by meal blocks to determine which variant is used when filled with a meal. bowl
mealContainer
boolean - Allows the block to function as a meal container (can pull from meal blocks like crocks). bowl
openSound
Path to Sound - Determines what sound is played when a container is opened. Generally used in tandem with closeSound. chest, storagevessel
output-face
Direction ID - Used by the chute block to determine which face of the block is used as an output for transferring items. chute
panningDrops
- - If a block can be used for panning (using the BlockPan class), these are its potential drops. pan

You can add all sorts of items using the following format:

	{ type: "item", code: "nugget-nativecopper",  chance: { avg: 0.15, var: 0 }  },
quantitySlots
number - The number of slots a generic container has. chest, storagevessel
requiredUnits
number - The number of units required to fill a tool mold with molten metal. toolmold
retrieveOnly
boolean - If true, makes it so that a container can only be taken from and cannot be used to store new items. lootvessel
servingCapacity
number - The number of servings of a meal a block can hold. crock, bowl
shelvable
boolean - If true, allows the block to be placed on a shelf. crystal-small, seashell
sitHeight
number (decimal) - Used by flower pots to determine how high the incorporated block should be rendered. flowerpot, planter
spoilSpeedMulByFoodCat
- - Used to make food spoil slower or faster when stored in a container. storagevessel

The clay storage vessel is a good example of this:

spoilSpeedMulByFoodCat: {
  "normal": {
    "vegetable": 0.75,
    "grain": 0.5
  }
},
storageType
Number (Storage Flag) - The storage flag of the container, which can limit what types of items or blocks can be stored within it. storagevessel
textureMapping
- - A more complex method of texturing block shapes with multiple content combinations. Used primarily with the pot to texture the food contents. pot
types
- - A secondary method of variant categorization used by containers to help with assigning attributes. chest
variantByGroup
- - Used by generic containers to group types by a specific variant. "side" is used since it is a common variant of all the types. chest
variantByGroupInventory
- - A subtype inventory name that can be assigned to types (usually this is "null"). chest
waterTightContainerProps
- - This contains all the liquid properties of an block, generally determining how it is stored and used with a bucket. Keep in mind this is not generally used for blocks, as most liquids that use this property are items, even if they come from a source block. water
containable
boolean - If true, the liquid can be placed into liquid containers, such as barrels and buckets. water
itemsPerLitre
number (int) - The number of itemstack items required to make a litre of liquid. Generally this value is 1:1, but concentrated items like honey can be 4:1. water
texture
Path to Texture - A "block" texture given to a liquid when it's rendered in containers or other items. waterportion, honeyportion
allowSpill
boolean - If true, allows the player to use the Ctr + Right Click function to "spill" the liquid from a container. The whenSpilled property determines what happens if this is true. waterportion, limewater
tintIndex
integer 0 Tints the color of the item if it's ever drawn as a block: 0 for no tint, 1 for plant climate tint, 2 for water climate tint. - waterportion, limewater
whenFilled
Item or Block Code - Determines what is stored in a liquid container when interacted with. water
whenSpilled
- - Determines what happens when the "spill" interaction is used. Only works if the allowSpill property is set to true. waterportion, limewater
action
string - Code identifier that determines what happens when the liquid is spilled from a container. waterportion, limewater
PlaceBlock
- - Places a block at the spilled location. waterportion
DropContents
- - Drops an item at the location. If the item is a liquid it will disappear immediately with a "splash" particle effect. limeportion
stack
- - The block or item dropped when spilled. if the "PlaceBlock" action is chosen a block is placed, if "DropContents" is used an item is generated. waterportion, limewater
stackByFillLevel
- - Allows for different blocks or items to be placed based on the level of the liquid in the container. waterportion, limewater

We'll look at an example of how this property is utilized by water block:

waterTightContainerProps: {
  containable: true,
  itemsPerLitre: 1,
  whenFilled: { stack: { type: "item", code: "waterportion" } }
}

As we can see, most of the watertight properties are not used by the block, that's because most of them are used by the item equivalent "waterportion".

(Rendering Attributes)

Attributes that define additional rendering information.

(Misc Attributes)

Miscellaneous, unsorted attributes.

allowUnstablePlacement
boolean - If the block has the "unstable" behavior, this allows it to be generated in positions that it can fall from. sand, gravel
beeFeed
boolean - Whether or not the block is a viable source of bee feeding (IE a flower). all crops, bigberrybush, flower, smallberrybush
butterflyFeed
boolean - Whether or not the block will attract butterflies. all crops, bigberrybush, flower, smallberrybush
blastRadius
number - Used by bombs to determine the radius of the blast. oreblastingbomb
blastType
number, 0, 1 or 2 - Used by bombs to determine what type of blocks are broken. oreblastingbomb
  0 = Destroys ores, 1 = Destroys stone, 2 = Damages only entities.
canChisel
boolean - If true, allows the block to be chiseled. rock, all slabs
canFallSideways
- - If true, allows a block to move sideways when it falls. gravel
chiselShapeFromCollisionBox
boolean - If true, uses the collision box as the starting point for chiseling. most stairs, all slabs
convertFrom
block - If a block converts to another block, this is the block that can be converted. carcass
convertTo
block - If a block converts to another block, this is the block that it will turn into. carcass
delayGrowthBelowSunlight
number - Used by the farmland block to delay growth when sunlight is below the given value. farmland
drop
- - Used by the toolMold block to determine what item it drops, not to be confused with the drops property. toolMold
fenceConnect
boolean - Can be used to prevent a solid block from connecting to fences. -
growthBlockLayer
string - Determines what layers of a block will grow grass, currently only uses "l1soilwithgrass", which grows grass on the first layer only. soil
growthLightLevel
- - Used by the soil block to determine what light level is required for it to grow grass on. soil
inGameHours
number - If a block converts to another block, this is the amount of time required for it to convert. carcass
injureRadius
number - Used by bombs to determine the radius that it will cause injury to entities. oreblastingbomb
lossPerLevel
- - Used in combination with delayGrowthBelowSunlight to determine how much growth progression is lost per light level. farmland
mechanicalPower
- - Used by the angled gear block to determine how to render gears in the different orientations. angledgears
noDownVariant
- - When giving a block variants based off the orientation library, this can be used to prevent a "down" variant from being used. -
placeBelowBlockCode
block - Used by the BlockSoilDeposit class to place specific blocks beneath it during world generation. clay, peat
preventsDecay
boolean - If true, prevents nearby leaves from "decaying", IE disappearing. log, soil
rotatableInterval
string - Gives some blocks additional rotation properties when placed (currently "22.5degnot45deg" and "22.tdeg" are the only two options). chest
sleepEfficiency
number (decimal) - Determines how long a player can sleep in a bed, based off a ratio of 12 hours. (ratio = #maxhours/12). -
spreadGrass
boolean - If true, can spread grass to other soil blocks. -
stackable
boolean - Used by berry bushes to determine whether they can be stacked atop each other. -
tallGrassGrowChance
number (decimal) - Used by the soil block to determine how often it will grow tall grass on top of it. clay, peat, soil
temperature
- - Used by liquids to determine the temperature of the core block. lava
tempLossPerMeter
number - How much temperature is lost for a liquid as it moves away from a source block. lava
tickGrowthProbability
number (decimal) - Used by crops to determine how often it will randomly progress its growth stage per tick. all crops
toolTransforms
- - Used to set default transformation on the toolrack, though all tools generally use their own. toolrack
weedBlockCodes
- - Used by the farmland block to determine what "weeds" can grow on it. farmland

We can see here that this property allows tallgrass and horsetails to grow on farmland with varying degrees of likelihood:

	weedBlockCodes: [
		{ code: "tallgrass-veryshort", chance: 1 },
		{ code: "tallgrass-short", chance: 1 },
		{ code: "tallgrass-mediumshort", chance: 1 },
		{ code: "tallgrass-medium", chance: 1 },
		{ code: "flower-horsetail", chance: 0.2 },
	]
Rendering
textures
key: string, value: object The texture definitions for the block as seen in the world, when dropped on the ground or held in the hand. Within a mod, to refer to a texture from the base game, prefix the path with "game:" (i.e. base: "game:path/to/texture")
base


overlays


alternates
The dictionary contains multiple named textures. Different tessellators expect different texture names. Most tessellators accept the special "all" alias to set all textures at once. Default example (glass):
textures: {
		all: { base: "block/glass" },
	}
Using variantgroups (rock):
textures: {
		all: {base: "block/stone/rock/{rock}" },
	}

There are a few aliases that set multiple textures at the same time:

  • all - sets all textures for tessellators that support the alias
  • sides - "west", "east", "north", "south", "up", and "down"
  • horizontals - "west", "east", "north", and "south"
  • verticals - "up" and "down"
  • westeast - "west" and "east"
  • northsouth - "north" and "south"

For example, hay block uses two aliases:

textures: {
		horizontals: { base: "block/hay/{type}-side" },
		verticals: { base: "block/hay/{type}-top" },
	},
There are many options to rotate textures, combine them, and randomize the textures by block location.
texturesinventory
key: string, value: object The texture definitions for the block as seen in the player inventory. Overrides the textures.
shape
object - For the json drawtype, the shape definition of the block as shown in the world, dropped on the ground or held in hand.
base
The path to the shape json file, the base dir is assets/shapes/.
rotatex
float 0 Only 90 degree rotations are possible.
rotatey
float 0 Only 90 degree rotations are possible.
rotatez
float 0 Only 90 degree rotations are possible.
shapeinventory
object - For the json drawtype, the shape definition of the block as shown in the players inventory.
drawtype
string "cube" Determines how the block is tesselated, select JSON for being able to use custom JSON Models. The other values are hardcoded methods of tesselating the block.
blockLayer_1
0
blockLayer_2
1
blockLayer_3
2
blockLayer_4
3
blockLayer_5
4
blockLayer_6
5
blockLayer_7
6
json
7 Will draw a json model.
empty
8 Nothing will be drawn.
cube
9 Draws an ordinary cube.
cross
10
transparent
11
liquid
12
crossandsnowlayer
13
renderpass
string "opaque" Determines how the block will be drawn.
opaque
0 Used for solid blocks with no half transparency.
opaquenocull
1 Used for non-solid single faced blocks, such as tall grass.
transparent
2 Use for solid halftransparent blocks, such as glass
liquid
3 Used for liquids, produces waves.
topsoil
4 Used for grass covered blocks. Allows for a smooth transition from grass to soil, while still allowing climate tinting of grass.
ambientocclusion
boolean true If ambient occlusion will be applied to the block.
tintindex
integer 0 0 for no tint, 1 for plant climate tint, 2 for water climate tint. -
renderflags
0 ... 255 0 8 bits that are sent to the graphics card for each vertex of the blocks shape. The lower 3 bits are currently used for altering the vertexes z-depth to fix a bunch of z-fighting issues. -
facecullmode
string "default" Determines which sides of the blocks should be rendered. -
default
0 Culls faces if they are opaque faces adjacent to opaque faces. -
nevercull
1 Never culls any faces. -
merge
2 Culls all faces that are adjacent to opaque faces and faces adjacent to blocks of the same id (Example usage: Ice blocks). -
collapse
3 Culls all faces that are adjacent to opaque faces and the bottom, east or south faces adjacent to blocks of the same id. This causes to still leave one single face in between instead of 2, eliminating any z-fighting. -
mergematerial
4 Same as Merge but checks for equal material (Example usage: Plain glass and all colored glass blocks). -
collapsematerial
5 Same as Collapse but checks for equal material (Example usage: All leaves blocks). -
liquid
6 Same as CollapseMaterial but also culls faces towards opaque blocks. -
sideopaque
key: string, value: boolean - Determines if given block face is fully opaque. If yes, the opposite face of the adjacent block will not be drawn for efficiency reasons.
all

horizontals

verticals

east

west

up

down

north

south
sideao
key: string, value: boolean - If AmbientOcclusion will be applied for each side.
all

horizontals

verticals

east

west

up

down

north

south
sidesolid
key: string, value: boolean - Determins if given block side is solid. If true, other blocks like torches can be attached to it.
all

horizontals

verticals

east

west

up

down

north

south
randomdrawoffset
boolean false If true then the block will be randomly offseted by 1/3 of a block when placed. flower
randomRotations
boolean false If true then the block will be randomly rotated when placed. flower
lighthsv
byte array with 3 elements. See http://tyron.at/vs/vslightwheel.html for valid values - For light emitting blocks: hue, saturation and brightness value. torch, oillamp, lantern
lightabsorption
0 ... 255 99 For light blocking blocks. Any value above 32 will completely block all light. -
guitransform
object block default Used for scaling, rotation or offseting the block when rendered in guis. -
fphandtransform
object block default Used for scaling, rotation or offseting the block when rendered in the first person mode hand. -
tphandtransform
object block default Used for scaling, rotation or offseting the block when rendered in the third person mode hand. -
groundtransform
object block default Used for scaling, rotation or offseting the rendered as a dropped item on the ground. -
randomizeaxes
string "xyz" Random texture selection - whether or not to use the Y axis during randomization (for multiblock plants). -
xyz
0 -
xz
1 -
vertexFlags
- - Applies special effects to a block, including motion shaders and other fancy renderings. crops, leaves, snow, tallgrass, waterlily
glowLevel
0 ... 255 0 Causes the block to visually glow if Bloom is enabled. Basic glow level for all the blocks model elements. glacerice, lava
blocks value
Glacierice 8
Paperlantern 32
Ember 48
Fire, Firepit, Oillamp, Torch 64
Lava 128
grassWindwave
boolean false If true, applies the grass wind wave effect to block. tallgrass, flower, fern
leavesWindwave
boolean false If true, applies the rustling leaves effect on a block. leaves, leavesbranchy
lowContrast
boolean false If true, applies a low contrast shader to a block. snow
reflective
boolean false If true, applies a reflective shader effect to a block. snow
waterWave
boolean false If true, applies the water wave effect to block. waterlily
waterWave
boolean false If true, applies the water wave effect to block. waterlily
zOffset
boolean number - Used to prevent rendering conflicts when blocks are drawn at a distance (IE z-fighting).


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.

Modding
Modding Introduction Getting Started Theme Pack
Content Modding Content Mods Developing a Content Mod Basic Tutorials Intermediate Tutorials Advanced Tutorials Content Mod Concepts
Code Modding Code Mods Setting up your Development Environment
Property Overview ItemEntityEntity BehaviorsBlockBlock BehaviorsBlock ClassesBlock EntitiesBlock Entity BehaviorsCollectible BehaviorsWorld properties
Workflows & Infrastructure Modding Efficiency TipsMod-engine compatibilityMod ExtensibilityVS Engine
Additional Resources Community Resources Modding API Updates Programming Languages List of server commandsList of client commandsClient startup parametersServer startup parameters
Example ModsAPI DocsGitHub Repository