Class BlockBehaviorHorizontalAttachable
- Namespace
- Vintagestory.GameContent
- Assembly
- VSSurvivalMod.dll
Forces a block to only allow placement on the side of another block. Requires use of the "horizontalorientation" variant group. Uses the code "HorizontalAttachable".
[DocumentAsJson]
public class BlockBehaviorHorizontalAttachable : BlockBehavior
- Inheritance
-
BlockBehaviorHorizontalAttachable
Examples
"behaviors": [
{
"name": "HorizontalAttachable",
"properties": {
"handleDrops": false,
"attachmentAreas": {
"north": {
"x1": 7,
"y1": 0,
"z1": 15,
"x2": 8,
"y2": 6,
"z2": 15,
"rotateY": 180
},
"east": {
...
},
"south": {
...
},
"west": {
...
}
}
}
}
]
"variantgroups": [
{
"code": "side",
"loadFromProperties": "abstract/horizontalorientation"
}
]
Fields
attachmentAreas (Optional) (Default: None)
A list of cuboids for each face which define where the object should be attached for each.
[DocumentAsJson("Optional", "None", false)]
private Dictionary<string, Cuboidi> attachmentAreas
Field Value
dropBlock (Optional) (Default: None)
A custom block to drop when this block is mined, if handleDrops is set.
[DocumentAsJson("Optional", "None", false)]
private string dropBlock
Field Value
dropBlockFace (Optional) (Default: north)
The 'face' variant to drop when this block is mined, if handleDrops is set and dropBlock is not set.
[DocumentAsJson("Optional", "north", false)]
private string dropBlockFace
Field Value
handleDrops (Optional) (Default: False)
Should the drops be handled by this behavior? If true, then uses values from dropBlockFace or dropBlock.
[DocumentAsJson("Optional", "False", false)]
private bool handleDrops