Json:block:behavior: Difference between revisions

From Vintage Story Wiki
no edit summary
No edit summary
No edit summary
Line 4: Line 4:
* Painting
* Painting
* Toolrack
* Toolrack
Requires <code>abstract/horizontalorientation</code> as the last variantgroup:
Requires <code>abstract/horizontalorientation</code>:
<syntaxhighlight lang="json">
<syntaxhighlight lang="json">
variantgroups: [
variantgroups: [
Line 23: Line 23:
* Windmillrotor
* Windmillrotor
* Bellows
* Bellows
Requires <code>abstract/horizontalorientation</code> as the last variantgroup:
Requires <code>abstract/horizontalorientation</code>:
<syntaxhighlight lang="json">
<syntaxhighlight lang="json">
variantgroups: [
variantgroups: [
Line 37: Line 37:
* Large carpet
* Large carpet
* Chimney
* Chimney
Requires "ns" and "we" states as the last variantgroup:
Requires "ns" and "we" states:
<syntaxhighlight lang="json">
<syntaxhighlight lang="json">
variantgroups: [
variantgroups: [
Line 47: Line 47:


Block can be rotated in two different directions. Used for:
Block can be rotated in two different directions. Used for:
* Wood Log
* Wood log
* Pillar
* Pillar
* Axle
* Axle
Requires "ud", "ns" and "we" states as the last variantgroup:
Requires "ud", "ns" and "we" states:
<syntaxhighlight lang="json">
<syntaxhighlight lang="json">
variantgroups: [
variantgroups: [
Line 58: Line 58:


== Slab ==
== Slab ==
Block can be either placed on the top or the bottom half of a block. Used for:
* All kinds of slabs
Requires "down" and "up" states:
<syntaxhighlight lang="json">
variantgroups: [
{ code: "part", states: ["down", "up"] }
],
</syntaxhighlight>


== HorizontalUpDownOrientable ==
== HorizontalUpDownOrientable ==
Used for:
* angledgearbox
Requires <code>abstract/verticalorientation</code> and <code>abstract/horizontalorientation</code>:
<syntaxhighlight lang="json">
variantgroups: [
{ loadFromProperties: "abstract/verticalorientation" },
{ loadFromProperties: "abstract/horizontalorientation" }
],
</syntaxhighlight>


== FiniteSpreadingLiquid ==
== FiniteSpreadingLiquid ==
Make a block flow as liquid. Used for:
* Water
* Lava
Requires all heights as states:
<syntaxhighlight lang="json">
variantgroups: [
{ code: "height", states: ["1", "2", "3", "4", "5", "6", "7"] },
],
</syntaxhighlight>


== OmniAttachable ==
== OmniAttachable ==
Can be attached on any direction. Used for:
* Lantern
Example use:
<syntaxhighlight lang="json">
variantgroups: [
{ code:"position", states: ["up", "down"], combine: "additive" },
{ code:"wall", loadFromProperties: "abstract/horizontalorientation" }
],
</syntaxhighlight>


== Unplaceable ==
== Unplaceable ==
Block cannot be placed. Used for:
* Peatbrick


== Unstable ==
== Unstable ==
Block can only be placed on a solid block and destroyed once the ground is removed. Used for:
* Ore blasting bomb
* Small carpet
* Path
* Turnip
* Spelt
* Soybean
* Rye
* Rice
* Parsnip
* Onion
* Flax
* Carrot


== Harvestable ==
== Harvestable ==


== NoParticles ==
Similar to Unstable, with the only difference that it can be stacked on top of each other. Used for:
* Small berry bush
* Saguaro cactus
* Big berry bush


== Container ==
== Falling ==


== Ignitable ==
Similar to Unstable, but instead of destorying the block, it will fall down. Used for:
 
* Tool mold
== Falling ==
* Loot vessel
* Ingot mold
* Flower pot
* Crucible
* Sand
* Gravel
* Anvil


== DropIfFloating ==
== DropIfFloating ==


== CanIgnite ==
The block will fall down, if it is completely surrounded by air. Used for:
* Rock
Confirmedusers, editor, Administrators
886

edits