Class BlockBehaviorOmniRotatable
- Namespace
- Vintagestory.ServerMods
- Assembly
- VSSurvivalMod.dll
Allows complex rotation of a block depending on placement angle. Also has behavior of placing the block in the crafting grid to set a 'slab placement mode'. Requires the "rot" variant with the 6 directional states. Uses the "OmniRotatable" code.
[DocumentAsJson]
public class BlockBehaviorOmniRotatable : BlockBehavior
- Inheritance
-
BlockBehaviorOmniRotatable
Examples
"behaviors": [
{
"name": "OmniRotatable",
"properties": {
"rotateSides": true,
"facing": "block"
}
}
]
"variantgroups": [
{
"code": "rot",
"states": [ "north", "east", "south", "west", "up", "down" ]
}
]
Fields
dropChance (Optional) (Default: 1)
The chance that this block will drop its drops. Values over 1 will have no effect.
[DocumentAsJson("Optional", "1", false)]
private float dropChance
Field Value
facing (Optional) (Default: player)
Determines where to angle the block against. Set to "player" for placement based on the players angle. Set to "block" for placement based on the block side.
[DocumentAsJson("Optional", "player", false)]
private string facing
Field Value
rotateSides (Optional) (Default: False)
If a slab placement mode has not been set, should the block be automatically rotated?
[DocumentAsJson("Optional", "False", false)]
private bool rotateSides