Modding:Block Json Properties
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 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 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: Additionally it is possible to refer to external lists (used for blocks) that are found in the worldproperties folder, such as variantgroups: [
{ loadFromProperties: "block/rock" },
],
Here is a full list of all groups and their variants (you can also find them in the For example, the following creates a variant group named orientation. It contains 5 states. variantgroups: [
{ code: "orientation", states: ["up"], loadFromProperties: "abstract/horizontalorientation" }
],
Unwanted variant states can be filtered out with the
Wondering where some links have gone?
Furthermore there are other ways of combining groups together. So far we covered the default combination mode, which is Let's take a look at the 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
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 The third combination mode 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 Using this will result items called |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
(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 Furthermore this opens up even more possbilities for more advanced selectors like this one for doors:
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 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
blockmaterial |
string | - | A behavior adds custom abilities such as falling block. | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Soil Gravel Sand Wood Leaves Stone Liquid Snow Ice Metal Mantle Plant Glass Ceramic Cloth Lava Brick Fire Other
|
Materials are hardcoded and currently only used to determine mining speed with a specific tool. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
matterstate |
array of object | "block" | Determines whether the block is in a solid, a liquid, a gas or a plasma state. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
solid liquid gas plasma |
Used for special collision behavior and rendering. Currently used for: Liquid:
Gas/Plasma: none added yet |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
resistance |
decimal number | 6 | How long it takes to break this block in seconds (with a mining speed of 1). | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Same examples of resistance's values used in VintageStory:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
requiredminingtier |
integer | 0 | Minimum required mining tier to get the drop out of the block. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
climbable |
boolean | false | If true, walking against this block will make the player climb (used for ladders). | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
rainpermeable |
boolean | false | If rain can fall through this block. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
snowcoverage |
boolean | - | Whether snow may rest on top of this block. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
All none solid blocks can't be covered by snow unless it's defined different:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
collisionbox |
object | box (0,0,0 -> 1,1,1) | Defines a box with which the player collides with. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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 |
carcass | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
collisionboxes |
array of object | - | Defines multiple boxes with which the player collides with. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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 },
]
},
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
selectionbox |
object | box (0,0,0 -> 1,1,1) | Defines a box which the player's mouse pointer collides with for selection. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
fertility |
integer | 0 | Which plants can grow on top of this block. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
glowLevel |
0 ... 255 | 0 | Causes the block to visually glow if Bloom is enabled. Basic glow level for all the blocks model elements. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
lightabsorption |
0 ... 32 | 0 | For light blocking blocks. Any value above 32 will completely block all light. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
walkspeedmultiplier |
decimal number | 1.0 | Percentage walk-speed when standing on or inside this block. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
dragmultiplier |
decimal number | 1.0 | Drag multiplier applied to entities standing on it (slipperiness factor). | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
drops |
array of object | - | The items that should drop from breaking this block. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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:
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 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. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
cropprops |
object | - | Information about the block as a crop. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
sounds |
key: string, value: string | - | The sounds played for this block during step, break, build and walk. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ambient |
Played from time to time if the player is close to it. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There are several tabs to you can add your stuff. Note that general should always be included, since it should contain everything.
Rock adds all of it's variantions to general, terrain and construction: creativeinventory: { "general": ["*"], "terrain": ["*"], "construction": ["*"] },
A Torch on the other hand only adds the variation 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. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
liquidselectable |
boolean | false | If the block can select a liquid while holding it in hand. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
attributes |
key: string, value: object | - | Custom Attributes associated with this block. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Extra attributes added to a block. Those are final and cannot be modified. It's a good way to keep things organized and and modifiable. The oreblastingbomb for example has attributes, which define its radius and type. These can be used by behaviors and blockentities: attributes: {
"blastRadius": 4,
"blastType": 0,
},
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
combustibleprops |
object | - | Information about the blocks burnable states. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
burntemperature |
integer | - | The temperature at which it burns in degrees Celsius. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
burnduration |
decimal number | - | For how long it burns in seconds. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
heatresistance |
integer | 500 | How many degrees celsius it can resists before it ignites (not implemented yet). | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
meltingpoint |
integer | - | How many degrees celsius it takes to smelt/transform this into another. Only used when put in a stove and SmeltedStack is set. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
meltingduration |
decimal number | - | For how many seconds the temperature has to be above the melting point until the item is smelted. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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" },
}
textures: {
all: {base: "block/stone/rock/{rock}" },
}
There are a few aliases that set multiple textures at the same time:
For example, hay block uses two aliases: textures: {
horizontals: { base: "block/hay/{type}-side" },
verticals: { base: "block/hay/{type}-top" },
},
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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 |
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 | Item • Entity • Block • Block Behaviors • Block Classes • Block Entities • Block Entity Behaviors • World properties |
Workflows & Infrastructure | Modding Efficiency Tips • Mod-engine compatibility • Mod Extensibility • VS Engine |
Additional Resources | Community Resources • Modding API Updates • Programming Languages • List of server commands • List of client commands • Client startup parameters • Server startup parameters Example Mods • API Docs • GitHub Repository |