Class EntityBehaviorFloatUpWhenStuck
- Namespace
- Vintagestory.GameContent
- Assembly
- VSEssentials.dll
Makes entity float way up to the surface if it is stuck in blocks. Requires shape element named "Center" to work correctly.
Uses the "floatupwhenstuck" code Open in GitHub
[DocumentAsJson]
public class EntityBehaviorFloatUpWhenStuck : EntityBehavior
- Inheritance
-
EntityBehaviorFloatUpWhenStuck
Examples
"behaviors": [
{
"code": "floatupwhenstuck",
"onlyWhenDead": true,
"pushVelocityMul": 0.5
},
],
Fields
onlyWhenDead (Optional) (Default: false)
Whether entity is required to be dead to make it float up
[DocumentAsJson("Optional", "false", false)]
private bool onlyWhenDead
Field Value
pushVelocityMul (Optional) (Default: 1)
A multiplier for how fast an entity should be pushed out of a block
[DocumentAsJson("Optional", "1", false)]
private float pushVelocityMul