Json:block:behavior: Difference between revisions

From Vintage Story Wiki
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

Revision as of 10:05, 17 August 2017

HorizontalAttachable

Block can only be attached horizontally. Used for:

  • Painting
  • Toolrack

Requires abstract/horizontalorientation:

	variantgroups: [
		{ code:"painting", loadFromProperties: "block/painting" },
		{ code:"side", loadFromProperties: "abstract/horizontalorientation" }
	],

HorizontalOrientable

Block can be rotated horizontally. Used for:

  • Workbench
  • Ladder
  • Echochamber
  • Chest
  • stove
  • Altar
  • Windmillrotor
  • Bellows

Requires abstract/horizontalorientation:

	variantgroups: [
		{ code:"side", loadFromProperties: "abstract/horizontalorientation" }
	],

NWOrientable

Block can be rotated in two different directions. Used for:

  • Path
  • Bookshelves
  • Large carpet
  • Chimney

Requires "ns" and "we" states:

	variantgroups: [
		{ code:"orientation", states: ["ns", "we"] },
	],

Pillar

Block can be rotated in two different directions. Used for:

  • Wood log
  • Pillar
  • Axle

Requires "ud", "ns" and "we" states:

	variantgroups: [
		{ code:"orientation", states: ["ud", "ns", "we"] },
	],

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:

	variantgroups: [
		{ code: "part", states: ["down", "up"] }
	],

HorizontalUpDownOrientable

Used for:

  • angledgearbox

Requires abstract/verticalorientation and abstract/horizontalorientation:

	variantgroups: [
		{ loadFromProperties: "abstract/verticalorientation" },
		{ loadFromProperties: "abstract/horizontalorientation" }
	],

FiniteSpreadingLiquid

Make a block flow as liquid. Used for:

  • Water
  • Lava

Requires all heights as states:

	variantgroups: [
		{ code: "height", states: ["1", "2", "3", "4", "5", "6", "7"] },
	],

OmniAttachable

Can be attached on any direction. Used for:

  • Lantern

Example use:

	variantgroups: [
		{ code:"position", states: ["up", "down"], combine: "additive" },
		{ code:"wall", loadFromProperties: "abstract/horizontalorientation" }
	],

Unplaceable

Block cannot be placed. Used for:

  • Peatbrick

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

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

Falling

Similar to Unstable, but instead of destorying the block, it will fall down. Used for:

  • Tool mold
  • Loot vessel
  • Ingot mold
  • Flower pot
  • Crucible
  • Sand
  • Gravel
  • Anvil

DropIfFloating

The block will fall down, if it is completely surrounded by air. Used for:

  • Rock