Modding:Block Json Properties: Difference between revisions
CreativeMD (talk | contribs) No edit summary |
CreativeMD (talk | contribs) No edit summary |
||
Line 7: | Line 7: | ||
<th width='300' align='left'>Property</th> | <th width='300' align='left'>Property</th> | ||
<th width='200' align='left'>Type</th> | <th width='200' align='left'>Type</th> | ||
<th width=' | <th width='120' align='left'>Default</th> | ||
<th align='left'>Usage</th> | <th align='left'>Usage</th> | ||
</tr> | </tr> | ||
Line 128: | Line 128: | ||
<td scope="row"><div class="tt" data-tt-id="p_class_info" data-tt-parent="p_class" data-invisible="true"></div></td> | <td scope="row"><div class="tt" data-tt-id="p_class_info" data-tt-parent="p_class" data-invisible="true"></div></td> | ||
<td colspan="3"> | <td colspan="3"> | ||
A complete tutorial of | A complete tutorial of how to create your own class can be found [[Advanced Blocks|here]]. | ||
</td> | </td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td scope="row"><div class="tt" data-tt-id=" | <td scope="row"><div class="tt" data-tt-id="p_entityclass" data-tt-parent="root">EntityClass</div></td> | ||
<td> | <td>string</td> | ||
<td> | <td>-</td> | ||
<td> | <td>The block entity class is able to tick and to store extra data.</td> | ||
</tr> | |||
<tr> | |||
<td scope="row"><div class="tt" data-tt-id="p_entityclass_info" data-tt-parent="p_entityclass" data-invisible="true"></div></td> | |||
<td colspan="3"> | |||
A complete tutorial of creating your own entityclass can be found [[Block Entity|here]]. | |||
</td> | |||
</tr> | |||
<tr> | |||
<td scope="row"><div class="tt" data-tt-id="p_behaviors" data-tt-parent="root">Behaviors</div></td> | |||
<td>array of object</td> | |||
<td>-</td> | |||
<td>A behavior adds custom abilities such as falling block..</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td scope="row"><div class="tt" data-tt-id=" | <td scope="row"><div class="tt" data-tt-id="p_behaviors_info" data-tt-parent="p_behaviors" data-invisible="true"></div></td> | ||
<td | <td colspan="3"> | ||
Here is an overview of all exisiting behaviors, if you want to create your own custom behavior you can read [[Adding Block Behavior]]. | |||
{{:json:block:behavior}} | |||
</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td scope="row"><div class="tt" data-tt-id="p_blockmaterial" data-tt-parent="root"> | <td scope="row"><div class="tt" data-tt-id="p_blockmaterial" data-tt-parent="root">BlockMaterial</div></td> | ||
<td>string</td> | <td>string</td> | ||
<td></td> | <td>-</td> | ||
<td> | <td>A behavior adds custom abilities such as falling block.</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td scope="row"><div class="tt" data-tt-id="p_blockmaterial_info" data-tt-parent="p_blockmaterial" data-invisible="true"></div></td> | <td scope="row"><div class="tt" data-tt-id="p_blockmaterial_info" data-tt-parent="p_blockmaterial" data-invisible="true"></div></td> | ||
<td colspan="3">{{:json:block:material}}</td> | <td colspan="3"> | ||
Currently only used for mining speed for tools. | |||
{{:json:block:material}} | |||
</td> | |||
</tr> | |||
<tr> | |||
<td scope="row"><div class="tt" data-tt-id="p_matterstate" data-tt-parent="root">MatterState</div></td> | |||
<td>array of object</td> | |||
<td>"block"</td> | |||
<td>Determines whether the block is in a '''''solid''''', a '''''liquid''''', a '''''gas''''' or a '''''plasma''''' state.</td> | |||
</tr> | |||
<tr> | |||
<td scope="row"><div class="tt" data-tt-id="p_matterstate_info" data-tt-parent="p_matterstate" data-invisible="true"></div></td> | |||
<td colspan="3"> | |||
Used for special collision behavior and rendering. Currently used for: | |||
Liquid: | |||
*Lava | |||
*Water | |||
*Water with particles | |||
Gas/Plasma: | |||
none added yet | |||
</td> | |||
</tr> | |||
<tr> | |||
<td scope="row"><div class="tt" data-tt-id="p_resistance" data-tt-parent="root">Resistance</div></td> | |||
<td>decimal number</td> | |||
<td>6</td> | |||
<td>How long it takes to break this block in seconds (with a mining speed of 1).</td> | |||
</tr> | |||
<tr> | |||
<td scope="row"><div class="tt" data-tt-id="p_resistance_info" data-tt-parent="p_resistance" data-invisible="true"></div></td> | |||
<td colspan="3"> | |||
Same examples of resistance's values used in VintageStory: | |||
*leaves: 0.5 | |||
*wool: 1 | |||
*bowl: 1.5 | |||
*obsidian: 2 | |||
*plank: 3.5 | |||
*log: 4.5 | |||
*rock: 6 | |||
</td> | |||
</tr> | |||
<tr> | |||
<td scope="row"><div class="tt" data-tt-id="p_requiredminingtier" data-tt-parent="root">RequiredMiningTier</div></td> | |||
<td>integer</td> | |||
<td>0</td> | |||
<td>Minimum required mining tier to get the drop out of the block.</td> | |||
</tr> | |||
<tr> | |||
<td scope="row"><div class="tt" data-tt-id="p_requiredminingtier_info" data-tt-parent="p_requiredminingtier" data-invisible="true"></div></td> | |||
<td colspan="3"> | |||
<table class="wikitable"> | |||
<tr style="background-color: grey;"> | |||
<th style="background-color: grey;">Tier</th> | |||
<th style="background-color: grey;">Ores</th> | |||
</tr> | |||
<tr> | |||
<td>'''1'''</td> | |||
<td>'''''gelena''''' and '''''rocksalt_sylvite'''''</td> | |||
</tr> | |||
<tr> | |||
<td>'''2'''</td> | |||
<td>'''''lignite''''', '''''cassiterite''''', '''''sphalerite''''', '''''rocksalt''''', '''''sulfur''''' and '''''nativecopper'''''</td> | |||
</tr> | |||
<tr> | |||
<td>'''3'''</td> | |||
<td>'''''bituminouscoal''''', '''''quartz_nativegold''''', '''''quartz_nativesilver''''', '''''lapislazuli''''', '''''bismuthinite''''', '''''quartz''''', '''''magnetite''''' and '''''limonite'''''</td> | |||
</tr> | |||
<tr> | |||
<td>'''4'''</td> | |||
<td>'''''diamond''''' and '''''emerald'''''</td> | |||
</tr> | |||
<tr> | |||
<td>'''5'''</td> | |||
<td>'''''chromite''''', '''''platinum''''' and '''''ilmenite'''''</td> | |||
</tr> | |||
</table> | |||
</td> | |||
</tr> | |||
<tr> | |||
<td scope="row"><div class="tt" data-tt-id="p_climbable" data-tt-parent="root">Climbable</div></td> | |||
<td>boolean</td> | |||
<td>false</td> | |||
<td>If true, walking against this block will make the player climb (used for ladders).</td> | |||
</tr> | |||
<tr> | |||
<td scope="row"><div class="tt" data-tt-id="p_rainpermeable" data-tt-parent="root">RainPermeable</div></td> | |||
<td>boolean</td> | |||
<td>false</td> | |||
<td>If rain can fall through this block.</td> | |||
</tr> | |||
<tr> | |||
<td scope="row"><div class="tt" data-tt-id="p_snowcoverage" data-tt-parent="root">SnowCoverage</div></td> | |||
<td>boolean</td> | |||
<td>-</td> | |||
<td>Whether snow may rest on top of this block.</td> | |||
</tr> | |||
<tr> | |||
<td scope="row"><div class="tt" data-tt-id="p_snowcoverage_info" data-tt-parent="p_snowcoverage" data-invisible="true"></div></td> | |||
<td colspan="3"> | |||
All none solid blocks can't be covered by snow unless it's defined different: | |||
*Leaves (also branchy): true, | |||
*Water with particles, Lakeice: false | |||
</td> | |||
</tr> | |||
<tr> | |||
<td scope="row"><div class="tt" data-tt-id="p_collisionbox" data-tt-parent="root">CollisionBox</div></td> | |||
<td>object</td> | |||
<td>box (0,0,0 -> 1,1,1)</td> | |||
<td>Defines a box with which the player collides with.</td> | |||
</tr> | |||
<tr> | |||
<td scope="row"><div class="tt" data-tt-id="p_collisionbox_info" data-tt-parent="p_collisionbox" data-invisible="true"></div></td> | |||
<td colspan="3"> | |||
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: | |||
<syntaxhighlight lang="json"> | |||
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 } | |||
}, | |||
</syntaxhighlight> | |||
Collision and selection boxes are most likely equal. | |||
</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td scope="row"><div class="tt" data-tt-id=" | <td scope="row"><div class="tt" data-tt-id="p_collisionboxes" data-tt-parent="root">CollisionBoxes</div></td> | ||
<td></td> | <td>array of object</td> | ||
<td></td> | <td>-</td> | ||
<td> | <td>Defines multiple boxes with which the player collides with.</td> | ||
</tr> | |||
<tr> | |||
<td scope="row"><div class="tt" data-tt-id="p_collisionboxes_info" data-tt-parent="p_collisionboxes" data-invisible="true"></div></td> | |||
<td colspan="3"> | |||
A crate for example requires multiple collision boxes: | |||
<syntaxhighlight lang="json"> | |||
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 }, | |||
] | |||
}, | |||
</syntaxhighlight> | |||
</td> | |||
</tr> | |||
<tr> | |||
<td scope="row"><div class="tt" data-tt-id="p_selectionbox" data-tt-parent="root">SelectionBox</div></td> | |||
<td>object</td> | |||
<td>box (0,0,0 -> 1,1,1)</td> | |||
<td>Defines a box which the player's mouse pointer collides with for selection.</td> | |||
</tr> | |||
<tr> | |||
<td scope="row"><div class="tt" data-tt-id="p_selectionbox_info" data-tt-parent="p_selectionbox" data-invisible="true"></div></td> | |||
<td colspan="3"> | |||
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: | |||
<syntaxhighlight lang="json"> | |||
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 } | |||
}, | |||
</syntaxhighlight> | |||
Collision and selection boxes are most likely equal. | |||
</td> | |||
</tr> | |||
<tr> | |||
<td scope="row"><div class="tt" data-tt-id="p_selectionboxes" data-tt-parent="root">SelectionBoxes</div></td> | |||
<td>array of object</td> | |||
<td>-</td> | |||
<td>Defines multiple boxes which the player's mouse pointer collides with for selection.</td> | |||
</tr> | |||
<tr> | |||
<td scope="row"><div class="tt" data-tt-id="p_selectionboxes_info" data-tt-parent="p_selectionboxes" data-invisible="true"></div></td> | |||
<td colspan="3"> | |||
A crate for example requires multiple selection boxes: | |||
<syntaxhighlight lang="json"> | |||
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 }, | |||
] | |||
}, | |||
</syntaxhighlight> | |||
</td> | |||
</tr> | |||
<tr> | |||
<td scope="row"><div class="tt" data-tt-id="p_replaceable" data-tt-parent="root">Replaceable</div></td> | |||
<td>integer</td> | |||
<td>0</td> | |||
<td>A value usually between 0-9999 that indicates which blocks may be replaced with others.</td> | |||
</tr> | |||
<tr> | |||
<td scope="row"><div class="tt" data-tt-id="p_replaceable_info" data-tt-parent="p_replaceable" data-invisible="true"></div></td> | |||
<td colspan="3"> | |||
<table class="wikitable"> | |||
<tr style="background-color: grey;"> | |||
<th style="background-color: grey;">Value</th> | |||
<th style="background-color: grey;">Effect (Blocks)</th> | |||
</tr> | |||
<tr> | |||
<td>'''0'''</td> | |||
<td>'''''ordinary blocks''''' (stone for example)</td> | |||
</tr> | |||
<tr> | |||
<td>'''5000'''</td> | |||
<td>Everything equal or above will be washed away by water (such as '''''Fruit''''').</td> | |||
</tr> | |||
<tr> | |||
<td>'''6000'''</td> | |||
<td>Everything equal or above wwill replaced when the player tries to place a block (such as '''''Tallgrass''''').</td> | |||
</tr> | |||
<tr> | |||
<td>'''9000'''</td> | |||
<td>'''''Lava'''''</td> | |||
</tr> | |||
<tr> | |||
<td>'''9500'''</td> | |||
<td>'''''Water'''''</td> | |||
</tr> | |||
<tr> | |||
<td>'''9999'''</td> | |||
<td>'''''Air'''''</td> | |||
</tr> | |||
</table> | |||
</td> | |||
</tr> | |||
<tr> | |||
<td scope="row"><div class="tt" data-tt-id="p_fertility" data-tt-parent="root">Fertility</div></td> | |||
<td>integer</td> | |||
<td>0</td> | |||
<td>Which plants can grow on top of this block.</td> | |||
</tr> | |||
<tr> | |||
<td scope="row"><div class="tt" data-tt-id="p_fertility_info" data-tt-parent="p_fertility" data-invisible="true"></div></td> | |||
<td colspan="3"> | |||
<table class="wikitable"> | |||
<tr style="background-color: grey;"> | |||
<th style="background-color: grey;">Value</th> | |||
<th style="background-color: grey;">Effect</th> | |||
</tr> | |||
<tr> | |||
<td>'''0'''</td> | |||
<td>''nothing can grow.''</td> | |||
</tr> | |||
<tr> | |||
<td>'''10'''</td> | |||
<td>''some tallgrass and small trees can be grow on it.''</td> | |||
</tr> | |||
<tr> | |||
<td>'''100'''</td> | |||
<td>''all grass and trees can grow on it.''</td> | |||
</tr> | |||
</table> | |||
</td> | |||
</tr> | |||
<tr> | |||
<td scope="row"><div class="tt" data-tt-id="p_maxstacksize" data-tt-parent="root">maxstacksize</div></td> | |||
<td>number</td> | |||
<td>64</td> | |||
<td>Determines the maximum amount you can stack the block in one slot.</td> | |||
</tr> | </tr> | ||
<tr> | <tr> |
Revision as of 11:47, 26 September 2017
Overview
An incomplete list of all available properties
Property | Type | Default | Usage | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
json |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Core (no byType available) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Code |
string | required | A unique identifier for the block. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
A domain prefix will be added dynamically depending on the location of the file. Every mod and the VintageStory itself have a unique prefix.
For example the code |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Enabled |
boolean | true | If the block will be loaded or not. Can be used to temporarily remove the block. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
VariantGroups |
array of object | - | Allows you define multiple variants of the same block. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The variantgroups property allows you to define multiple variants of this block. All of them will have their unique code, which will added to the 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 blocks 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 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?
Futhermore there are two ways of combining together groups. So far we covered the default combination mode, which is Let's take a look at a different example (flowerpot), which uses 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 Things might get clearer if we look at another example: 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 |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Specific | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Class |
string | "block" | The block class can add special functionalities for the block. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
A complete tutorial of how to create your own class can be found here. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
EntityClass |
string | - | The block entity class is able to tick and to store extra data. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
A complete tutorial of creating your own entityclass can be found here. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Behaviors |
array of object | - | A behavior adds custom abilities such as falling block.. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Here is an overview of all exisiting behaviors, if you want to create your own custom behavior you can read Adding Block Behavior. Adding behaviors to your blockBlock behaviors are an array of objects with properties attached to your block. They are added through the {
...
code: "exampleblock",
...
behaviors: [{name: "behavior1", properties: {myProperty1: "myValue1", myProperty2: "myValue2"}},{name: "behavior2"}],
...
}
All Block BehaviorsHere is a table containing all properties of the base game as of 1.18.14.
Wondering where some links have gone?
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
BlockMaterial |
string | - | A behavior adds custom abilities such as falling block. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Currently only used for mining speed for tools. Json:block:material |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
MatterState |
array of object | "block" | Determines whether the block is in a solid, a liquid, a gas or a plasma state. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
maxstacksize |
number | 64 | Determines the maximum amount you can stack the block in one slot. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
creativeinventory |
arrays | In which creative inventory tabs the block should be visible in. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Rendering | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
renderpass |
string (of enum) | 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. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
shape |
shape | 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 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
rotateY |
float | 0 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
rotateZ |
float | 0 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
shapeinventory |
shape | For the json drawtype, the shape definition of the block as shown in the players inventory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
base |
The path to the shape json file, the base dir is assets/shapes/. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
rotateX |
float | 0 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
rotateY |
float | 0 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
rotateZ |
float | 0 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ambientocclusion |
boolean | true | If ambient occlusion will be applied to the block. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
drawtype |
string (of enum) | 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. Check Drawtypes for a full list. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
textures |
key: direction, value: texture | The texture definitions for the block as seen in the world, when dropped on the ground or held in the hand. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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: direction, value: texture | The texture definitions for the block as seen in the player inventory. Overrides the textures definition if set. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
sideopaque |
key: direction, value: boolean | true | 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 east west up down north south
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
sidesolid |
key: direction, value: boolean | true | Determins if given block side is solid. If true, other blocks like torches can be attached to it | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
all east west up down north south
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Sound | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
sounds |
key: string, value: string | The sounds to be played when a player interacts with this block. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
place |
player/build | Sound to played when placing this block. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
walk |
walk/default | Sound to played when walking on this block. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
break |
player/destruct | Sound to played when breaking this block. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
hit |
- | Currently unused. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
inside |
- | Sound to played when moving inside block (only works for blocks that have no collisionbox, naturally). |