Modding:Item Json Properties
This page was last verified for Vintage Story version 1.19.
Overview
This is a mostly-complete list of available properties for items. To see an exhaustive list of properties, check out the ItemType and CollectibleType GitHub pages. Any value immediately underneath a [JsonProperty]
label can be used within an itemtype file.
Definitions:
Key - The name of the property, which should be used as it appears in the column.
Value - A component of a property.
Array - A list of objects or values that can be referenced in code.
String - A sequence of characters that can be used as an identifier in code. Essentially a word that can be referenced and assigned to something. Generally does not use numbers.
Boolean - A true or false value, essentially "on" or "off".
Int - An integer, or whole number. Cannot use decimal values.
Float - A decimal, specifically one that does not exceed more than 1 significant digit
Object - This is a bit more complex, but essentially objects are the items, blocks and entities that can be interacted with. In most cases, when an "object" type appears it means you must use a specific item variant code, which follows the "itemcode-variant_1-variant_2-variant_n" style of naming.
Property | Type | Default | Usage | Reference | |
---|---|---|---|---|---|
json |
|||||
Core (no byType available) | |||||
code |
string | required | A unique identifier for the item. | All Items | |
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 item will be loaded or not. Can be used to temporarily remove the item. | - | |
variantgroups |
array of objects | - | Allows you define multiple variants of the same item. | armor, ore-graded, plank, | |
(any) bytype |
key: string; value: object | - | Allows different property values to be specified based on the variant code. | ||
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 | "item" | The class an item should use if it has additional C# functionalities that can't be accomplished with JSONS. | axe-metal, hoe, spear | |
It can be used to open guis or adding other extra functionality to the item. A complete tutorial of how to add your own class to the game can be found here. |
|||||
behaviors |
array of object | - | A behavior adds custom abilities such as ground storable. | ingot, axe | |
To see all of the current behaviors in the game see All Collectible Behaviors. |
|||||
durability |
integer | 0 | The maximum uses of the item. Items that reach 0 uses disappear. NOTE: The actual current durability of the item is stored as a treeAttribute, this is only a max value. | pickaxe | |
damagedby |
array of string | - | From which damage sources does the item takes durability damage. | pickaxe | |
blockbreaking |
0 | Mining a block. | pickaxe | ||
attacking |
1 | Hitting an entity. | sword | ||
fire |
2 | Currently not used. | - | ||
tool |
string | - | Classifies the item as the given tool, which gives it the ability to harvest resources from certain blocks. | axe-metal, pickaxe, knife, scythe, shovel | |
Knife |
0 | Can harvest items from grass. | knife, scythe | ||
Pickaxe |
1 | Can mine rock and other stone materials | pickaxe | ||
Axe |
2 | Can chop down trees and other wood materials. | axe-metal, axe-stone | ||
Sword |
3 | No special abilities yet. | sword | ||
Shovel |
4 | Can dig soil, gravel and sand quickly. | shovel | ||
Hammer |
5 | No special abilities yet. | hammer | ||
Mallet |
6 | No special abilities yet. | - | ||
Spear |
7 | No special abilities yet. | spear | ||
Bow |
8 | No special abilities yet. | bow | ||
Sickle |
9 | No special abilities yet. | - | ||
Hoe |
10 | No special abilities yet. | hoe | ||
Saw |
11 | No special abilities yet. | saw | ||
Attributes | |||||
attributes |
- | - | Custom Attributes associated with this item. | armor, ingot | |
Attributes constitute a large number of custom properties that an item can have, many of which are specific to unique items 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 weapon, say a mace that had additional weapon properties you could define them here: attributes: {
"armorDamage": 10,
"stunChance": 0.1,
},
Here we have made two new attributes called "armorDamage" and "stunChance" 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 be manipulated using variant combinations if desired. | |||||
(Container Attributes) |
Attributes that change how items interact with containers. | ||||
barrelMovetoLiquidSlot |
boolean | - | If set to true, converts an item placed into a barrel to a "liquid" state that can be used for barrel recipes (EX: how salt is used to cure meat). | salt | |
crockable |
boolean | - | If set to true, can be placed into a crock from another container (Keep in mind that doing so also turns the item into a meal, which cannot be undone). | pickledvegetable | |
displaycaseable |
boolean | - | If set to true, allows an item to be placed into a display case. | ingot, ore-graded, ore-ungraded, stone | |
forgable |
boolean | - | A bit of a misnomer, this indicates that an item can be placed into and heated in a forge, not that it can or can't be forged on an anvil. | ironbloom | |
inContainerTexture |
Path to texture | - | Pathway to the texture shown when an item is placed into a barrel. This can include a liquid or solids. | waterportion, salt | |
inFirePitProps |
- | - | Gives an item additional rendering properties when placed in a fire pit. | redmeat, poultry | |
transform |
- | - | If the model type shows the item, it can be transformed using this property. | redmeat, poultry | |
useFirepitModel |
- | - | Tell the firepit which model to use when this item is placed into it. | redmeat, poultry | |
Here's an example of how the firepit transformation is used by the different meat items: inFirePitProps: {
transform: {
scale: 0.85,
origin: { x: 0.5, y: 0.0625, z: 0.5 },
translation: { x: -0.03125, y: 0.0625, z: 0.046875 },
rotation: { x: 0, y: 0, z: 90 }
},
useFirepitModel: "Spit"
},
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 | |||||
shelvable |
boolean | - | If true, allows the item to be placed on shelves. | redmeat, stone | |
rackable |
boolean | - | If true, allows the item to be placed on a tool rack. To look right the item also requires additional transformations using the toolrackTransform property (see rendering section). | pickaxe, scythe, sword | |
waterTightContainerProps |
- | - | This contains all the liquid properties of an item, generally determining how it is stored and used with a bucket. | waterportion, limewaterportion | |
containable |
boolean | - | If true, the liquid can be placed into liquid containers, such as barrels and buckets. | waterportion, limewaterportion | |
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. | waterportion, honeyportion | |
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 |
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 item: waterTightContainerProps: {
containable: true,
itemsPerLitre: 1,
texture: { base: "block/liquid/waterportion" },
tintIndex: 2,
whenSpilled: {
action: "PlaceBlock",
stack: { type: "block", code: "water-still-3" },
stackByFillLevel: {
"10": { type: "block", code: "water-still-7" }
}
}
}
Most is self explanatory, but we can see that it has a some unique features, such as allowing a player to generate a water block when the "fill level" of the container used to spill the fluid. We can also see that the texture for it has a tintIndex of 2, which heightens the blue coloration of the water texture while in a bucket. | |||||
(Equipment Attributes) |
Attributes primarily used with equipment and armor. | ||||
attachShape |
Path to Shape | - | Assigns a shape to a bag to be shown on the player when worn in a bag slot. | backpack | |
backpack |
- | - | Gives an item bag properties, allowing it to be placed in the bag slot to increase inventory space. | backpack | |
quantitySlots |
number | - | How many additional slots the bag provides. | backpack | |
storageFlags |
number (storage flag ID) | - | Limits what type of item can be placed into the bag by assigning it a storage flag. (Need a list of storage flags) | miningbag | |
slotBgColor |
Color value (HEX) | - | Changes the background color of the additional slots provided by the bag. Requires a HEX color code, which you can find with any generic color picker | miningbag | |
clothescategory |
string | - | Assigns a wearable item to a specific inventory slot. There are 15 slots in total, including 3 armor slots and 12 decorative clothing slots. | armor, upperbody, lowerbody | |
Armor slots: armorhead, armorbody, armorlegs. Clothing slots: head, face, neck emblem, upperbodyover, upperbody, shoulder, arm, hand, lowerbody, waist, foot. |
|||||
defaultProtLoss |
- | - | Defines the default protection loss for incoming damage that is of a higher tier than the armor. Requires the usage of perTierRelativeProtectionLoss and perTierFlatDamageReductionLoss properties. | armor | |
disableElements |
Shape Element | - | Allows shape elements to be disabled to make better looking armor, for example removing the Seraph's ponytail with helmets. | armor (plate helmet) | |
footStepSound |
path to ogg file | - | What sound to play while the player is wearing this item. | armor | |
inCharactercreationDialog |
boolean | - | If set to true, will allow the player to select the wearable item during the character creation sequence. | Lowerbody, Upperbody | |
protectionModifiers |
- | - | Assigns protection values to an armor piece. | armor | |
protectionTier |
number | - | The value contested against the tier of incoming damage. If the damage tier is higher the effectiveness of the armor is reduced, potentially to zero if the difference is high enough. | armor | |
highDamageTierResistant |
boolean | false | If set to true this armor will reduce the protection loss of higher damage tiers by half when looping through the protection loss sequence of the damage calculation. | armor | |
flatDamageReduction |
number, decimal | - | This is the amount of damage that is initially subtracted before relative protection is applied. | armor | |
relativeProtection |
number, decimal | - | After the damage is subtracted by the flat reduction the remaining damage is reduced by a percent amount equal to this value. | armor | |
perTierFlatDamageReductionLoss |
array of numbers | - | Determines how much flat damage reduction is lost by a damage tier higher than the armor tier. Each relative difference can be customized individually. | armor | |
perTierRelativeProtectionLoss |
array of numbers | - | Determines how much relative protection is lost by a damage tier higher than the armor tier. The first value is used for high damage resistant armor, the second is for all other armors. | armor | |
The system for how these values are used is a bit complex, but here's essentially how it works: The tier of incoming damage is not just a contest of values, but is actually looped through multiple times depending on the tier value to reduce the effectiveness of an armor. For example, tier 4 damage will loop four times and reduces the armor effectiveness each loop, while tier 1 damage will loop only once. The looped value starts as 1 and as the value increases up to the damage tier it is compared to the tier of the armor. If this increasing value is greater than the armor tier the second second value is used in the perTier function, otherwise the first value is used. Additionally, if the armor has the highDamageTierResistant property set to true then every loop which is higher than the armor will have it's armor reduction halved. Lets look at an example of this using an armor with the following stats: protectionModifiers {
protectionTier: 2,
flatDamageReduction: 1.0,
relativeProtection: 0.80,
perTierFlatDamageReductionLoss: [0.03, 0.15],
perTierRelativeProtectionLoss: [0.1, 0.2],
highDamageTierResistant = true
},
Now lets loop through the protection values and see what the overall loss is. The damage tier is 4, so we start with 1 and end with 4: Round 1: Damage tier = 1, armor tier = 2 - Damage tier is below the armor tier in the loop, so we use the first values (0.03 and 0.1) Round 2: Damage Tier = 2, armor tier = 2 - Damage tier is still not higher in the loop, so once again we use the first values (0.03 and 0.1) Round 3: Damage Tier = 3, armor tier = 2
- At last the damage tier is higher than the armor tier in the loop so we use the second values (0.15 and 0.2), but we also have the Round 4: Damage tier = 4, armor tier = 2 - Same as before, resulting in (0.075 and 0.1). Finally, we add up the results of each to determine the total loss of protection: (0.21 and 0.4), which causes a 21% loss to our damage reduction and 0.4 loss to our flat damage reduction. This leaves our original protection values at 59% and 0.6, a significant loss in armor performance! If the damage was of a lower tier, such as 1, only the first round would be used, which would result in a much lower protection loss of 3% and 0.1 damage in total. |
|||||
statModifiers |
- | - | Gives an armor piece a modifier to certain stats. Generally these values are debuffs, but if the values were reversed they could be used as buffs for magical armor. | armor | |
healingeffectiveness |
number, decimal | - | Player healing rate (percent) modification. | armor | |
hungerrate |
number, decimal | - | Player hunger rate (percent) modification. | armor | |
rangedWeaponsAcc |
number, decimal | - | Player ranged weapon accuracy (percent) modification. | armor | |
rangedWeaponsSpeed |
number, decimal | - | Player ranged weapon draw speed (percent) modification. | armor | |
walkSpeed |
number, decimal | - | Player movement speed (percent) modification. | armor | |
wearableAttachment |
boolean | - | Designates the item as a wearable object. | armor | |
(Handbook Attributes) |
Attributes that give an item additional handbook details. | ||||
exclude |
boolean | - | If true, removes the item from the handbook. Can be used with the "ByType" functionality to remove large amounts of variants. | burnedbrick | |
excludeFromList |
- | - | (Needs more info). | - | |
include |
boolean | - | Allows the toggling of the handbook entry. | burnedbrick | |
extraSections |
- | - | Adds a section to the handbook for this item. The title and text properties are actually code identifiers that must be filled out in the lang file of a mod, just as one would for an item or block name. | ||
text |
string (text id) | - | The textbox name that will show up in the lang file. | ||
title |
string (title id) | - | The title name that will show up in the lang file. | ||
groupBy |
- | - | Groups variants into a single handbook page, rather than making multiples. | - | |
groupedName |
- | - | Gives a name to the group of variants within the handbook (must be filled out in the lang file). | - | |
The plumb and square is a good example of how a handbook section is added to the game: handbook: {
include: true,
extraSections: [
{ title: "plumbandsquare-handbook-help-title", text: "plumbandsquare-handbook-help-text" }
]
}
| |||||
(Misc Attributes) |
Uncategorized attributes used in various items. | ||||
breakChanceOnImpact |
value, decimal | - | Determines how often a projectile will break when shot. Flint arrow = 0.5 (50%, iron arrow = 0.20 (20%). | arrow | |
codePrefixes |
array | - | Creates a list of block prefixes a tool can interact with using special features (such as how a scythe cuts large swathes of grass). | scythe | |
currency |
- | - | Allows an item to be traded as a universal currency. | gear (rusty) | |
value |
value | - | Assigns a value to the currency, a rusty gear is valued at 1. | gear (rusty) | |
damage |
value | - | The ranged damage of a thrown weapon (such as a spear). | spear | |
dissolveInWater |
boolean | false | If true, will make an item disappear when dropped into a water block. | flour, lime, salt | |
firepitConstructable |
boolean | false | If true, allows an item to be used to construct a firepit. | firewood, bamboostakes | |
fertilizerProps |
n: value, p: value, k: value | - | Sets the item as a fertilizer and assigns it nitrogen(N), phosphorous(P) and potassium(K) values. | bonemeal, potash | |
As an example, we can make a "universal fertilizer" that contributes a decent amount to each element: fertilizerProps: {n: 20, p: 20, k: 20},
| |||||
grindingProps |
- | - | Gives the item a grinding recipe in a quern. | ore-ungraded | |
type |
object | - | Type of stack produced, either a block or item . |
ore-ungraded | |
code |
string | - | Name of the item or block produced by the recipe. | ore-ungraded | |
stacksize |
number | - | The amount of the output produced after grinding. | ore-ungraded | |
health |
health: value | - | If the item is a poultice, this is the amount it will heal (requires ItemPoultice class). | poultice | |
isPlayableDisc |
boolean | false | If true, will be playable on the echo chamber block. Requires a track to be set using the musicTrack property. |
resonancearchive | |
knappable |
boolean | false | Allows an item to be "knapped" into primitive toolheads. | flint, stone | |
microBlockChiseling |
boolean | false | If true, will allow the item to be used for microblock chiseling.
NOTE: Microblock chiseling must also be active in the world settings. |
chisel | |
metalUnits |
number | - | Assigns the units of metal the item contributes when it is smelted.
NOTE: An item must be smeltable for this property to be of any use, make sure to check the combustableProps section for more info. |
resonancearchive | |
musicTrack |
path to ogg file | - | Assigns a path to the ogg file of the music track associated with an item that can be played on the echo chamber block. Will only function if the isPlayableDisc property is set to true. |
resonancearchive | |
nutritionPropsWhenInMeal |
- | - | Changes the nutrition of a food item when it is cooked into a meal, otherwise the default nutrition property is used. | egg, vegetable | |
satiety |
number | - | Numerical value of saturation added. | egg, vegetable | |
foodcategory |
string | - | Category it adds to in the meal: Dairy(unused), Fruit, Grain, Protein and Vegetable | egg, vegetable | |
pigment |
- | - | Allows an item to be used as a pigment for coloring. | resonancearchive | |
name |
string | - | Assigns a name to the color of the pigment. | charcoal | |
color |
red:value, green: value, blue: value | - | The RGB values of the pigment, which can be found using any generic color picker. | charcoal | |
As an example, let's say you wanted to make a valuable purple pigment from the shell of a rare rock snail: "pigment": {
"name": "Tyrian Purple",
"color": {
"red": 102,
"green": 2,
"blue": 60
}
},
Here we can see that the pigment will be named "Tyrian Purple", and is made with the three RGB values (found from a Wikipedia article in this case). | |||||
reinforcementStrength |
number | - | Allows an item to be used by the plumb and square tool to reinforce a block. A higher value indicates more times a block must be broken before it's removed. Example: Igneous stones = 50, Iron Ingot = 400 | stone, ingot | |
spearEntityCode |
Entity | - | Assigns an spear entity to be made when a spear is thrown. | spear | |
workableTemperature |
number | - | The temperature required for an item (an ingot) to be worked on an anvil. A value of 0 means it can be worked cold without heating. | ingot | |
Common | |||||
storageFlags |
number (storage flag ID) | - | Determines the kinds of storage types the item can be put into. These values also determine what type of items can fit into specialized inventory bags. | arrow, armor, upperbody, ore-graded | |
The following are the current existing storage flags (some are unused or reserved) 1 - general 2 - backpack 4 - mining 8 - jewelcrafting 16 - alchemy 32 - agriculture 64 - currency 128 - clothes 256 - offhand 512 - arrows/ammo 1024, 2048, ... (doubling) - Reserved for mods | |||||
creativeinventory |
key: string, value: string[] | - | In which creative inventory tabs the item should be visible in. | Any Item | |
There are several to which you can add content from your mod. Note that general should always be included, since it should contain everything.
Rock adds all of it's variations to general, terrain and construction: creativeinventory: { "general": ["*"], "terrain": ["*"], "construction": ["*"] },
However, sometimes you may only want to show a single variant of your block or item (such as one that has multiple directional variants). In this case, you can set a specific variant to show up, once again using similar syntax to the variant code. For example, a Torch only adds the variation creativeinventory: { "general": ["*-up"], "decorative": ["*-up"] },
|
|||||
maxstacksize |
integer | 64 | Determines the maximum amount you can stack the item in one slot. | hide, nugget | |
attackpower |
decimal number | 0.5 | The damage the item deals when hitting an entity. | sword, spear | |
attackrange |
decimal number | 1.5 | The maximum distance you can hit an entity with the item. | sword, spear | |
materialdensity |
integer | 9999 | Determines on whether an object floats on liquids or not. | ingot | |
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 item 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 block material. | pickaxe, shovel | |
Materials types are hard-coded into blocks, and include the following types: soil, gravel, sand, wood, leaves, stone, liquid, snow, ice, metal, mantle, plant, glass, ceramic, cloth, lava, brick, fire, other An item is not limited to a single material that it can mine, so if you wanted to make a tool (such as a mattock) that could mine many materials you could do the following: miningspeed: {
"dirt": 5,
"gravel": 4,
"ice": 7,
"metal": 3,
"sand": 4,
"snow": 3,
"stone": 6,
}
|
|||||
miningtier |
integer | 0 | Determines which tier of blocks the item can break. If the block tier is above the one defined here nothing will be dropped from it when broken. Also determines the damage tier of a weapon, which is contested against armor tiers. | pickaxe, sword | |
combustibleprops |
object | - | Information about the items burnable states. | redmeat, plank, ore-ungraded | |
burntemperature |
integer | - | The temperature at which it burns in degrees celsius. | redmeat, plank, ore-ungraded | |
burnduration |
decimal number | - | For how long it burns in seconds. | plank, ore-ungraded | |
heatresistance |
integer | 500 | How many degrees celsius it can resists before it ignites (not implemented yet). | redmeat, plank, ore-ungraded | |
meltingpoint |
integer | - | How many degrees celsius it takes to smelt/transform this into another. Only used when put in a stove and Melted is set. | redmeat, plank, ore-ungraded | |
meltingduration |
decimal number | - | For how many seconds the temperature has to be above the melting point until the item is smelted. | redmeat, plank, ore-ungraded | |
smokelevel |
decimal number | 1 | How much smoke this item produces when being used as fuel. | plank, ore-ungraded | |
smeltedratio |
integer | 1 | How many items are required to produce one output stack. | nugget, ore-graded | |
smeltedstack |
object | - | If set, the block/item is smeltable and this is the resulting itemstack once the MeltingPoint has been reached for the supplied duration. | nugget, ore-graded | |
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. | nugget, ore-graded, lime | |
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 | - | Defines the nutritional qualities of an item. | fruit, grain, vegetable, redmeat | |
foodcategory |
string | - | Defines the type of food. It can be fruit, vegetable, protein, grain and dairy. | fruit, grain, vegetable, redmeat | |
saturation |
decimal number | 0 | How much saturation it can restore. | fruit, grain, vegetable, redmeat | |
health |
decimal number | 0 | How much health it can restore. | - | |
transitionableProps |
- | - | Can be used to transition an item to another item or block. | redmeat, hide | |
type |
- | - | The type of transition method to utilize. | redmeat, hide | |
Cure |
string | - | Will "cure" an item by showing percent progress until cured. | hide | |
Perish |
string | - | Will gradually reduce the saturation of a food item once it's fresh period has passed, eventually converting into the product item (usually rot). | hide | |
freshHours |
number (hours) | - | An optional "fresh" period that must pass before the transition time starts. With food, this is the period of time that saturation is not affected. | bread, vegetable, redmeat | |
transitionHours |
number (hours) | - | Number of hours before the item transitions into a different item. | redmeat, hide | |
transitionedStack |
object (item or block) | - | The item or block that the item will transition into. | redmeat, hide | |
transitionRatio |
number | - | The quantity of the item that will be consumed after the transition period. | redmeat, hide | |
Here we'll show an example of a custom food item that transitions into rot: transitionableProps: [{
type: "Perish",
freshHours: { avg: 240 },
transitionHours: { avg: 48 },
transitionedStack { type: "item", code: "game:rot", quantity: 2 },
transitionRatio: 1
}]
We can see that it will take on average 10 days before the food begins to spoil, after which it will degrade over 2 days before turning into 2 rot. | |||||
Rendering | |||||
texture |
string | required | The texture definition for the item held in hand or dropped on the ground. | Any Item | |
textures |
string | - | Used to define the textures of a shape the item uses, rather than the singular item texture it pulls from. This is useful for items that use a shape and have visually distinct variants that you want to control in the item JSON. | ingot, redmeat | |
A very simple example is how the ingot item uses the metal variants to change the texture of the shape it uses. Where "metal" is the texture defined in the ingot shape JSON, and is overrode here in the item JSON: textures: {
"metal": { base: "block/metal/ingot/{metal}" },
},
| |||||
shape |
CompositeShape | - | The items shape. If left empty the item will instead use the texture assigned to it and turn it into a shape by default. | flint, stone | |
voxelizeTexture |
boolean | - | Tells an item to render it's texture as a shape rather than utilizing the assigned shape | redmeat (vintage) | |
alternatives |
array of shapes | - | Can be used to give an item alternative shapes based off of different states. | bow | |
shape: {
base: "item/tool/bow/{type}",
alternates: [
{ base: "item/tool/bow/{type}-charge1" },
{ base: "item/tool/bow/{type}-charge2" },
{ base: "item/tool/bow/{type}-charge3" }
]
},
In this example taken from the bow we can see that it will use alternative shapes when the bow is in different "charged" states. | |||||
guiTransform |
object | item default | Used for scaling, rotation or offsetting the item when rendered in guis. | Any Item | |
fphandtransform |
object | item default | Used for scaling, rotation or offsetting the item when rendered in the first person mode hand. | Any Item | |
tphandtransform |
object | item default | Used for scaling, rotation or offsetting the item when rendered in the third person mode hand. | Any Item | |
groundtransform |
object | item default | Used for scaling, rotation or offsetting the rendered as a dropped item on the ground. | Any Item | |
toolrackTransform |
string | - | If the item can be placed on a toolrack (using the rackable property) this will transform its position while on the toolrack. | Axe, Hoe, Scythe, Sword | |
glowLevel |
number | 0 | Gives the item a light value that it produces when held and dropped on the ground. | gear (temporal) | |
heldTpUseAnimation |
string | - | The animation played when an item is used with a right-click function. | hoe | |
heldTpHitAnimation |
string | - | The animation played when swinging the item with the left-click mouse button. | axe, hoe, sword | |
heldTpIdleAnimation |
string | - | Gives the item a unique animation when being idly held by the player. | strawdummy | |
The following are available animations used by items in the game: axe, breaktool, hoe, holdbothhandslarge, holdunderarm, knap, scythe, shears, shoveldig, smithing, spearhit, swordhit, twohandplaceblock, water. |
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 • Entity Behaviors • Block • Block Behaviors • Block Classes • Block Entities • Block Entity Behaviors • Collectible 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 |