Table of Contents

Class EntityBehaviorMilkable

Namespace
Vintagestory.GameContent
Assembly
VSSurvivalMod.dll

Makes entity produce milk and so that it can be milked with liquid container. Requires the use of the EntityBehaviorMultiply, Vintagestory.GameContent.EntityBehaviorEmotionStates and Vintagestory.GameContent.EntityBehaviorTaskAI entity behaviors.
Uses the "milkable" code Open in GitHub

[DocumentAsJson]
public class EntityBehaviorMilkable : EntityBehavior
Inheritance
EntityBehaviorMilkable

Examples

"behaviors": [
 {
     "code": "milkable",
     "liquidStack": { "type": "item", "code": "milkportion" },
     "lactatingDaysAfterBirth": 21,
     "yieldLitres": 10
 },
],

Fields

lactatingDaysAfterBirth (Optional) (Default: 21)

How many in-game days since birth of a child type should pass to start lactation

[DocumentAsJson("Optional", "21", false)]
private float lactatingDaysAfterBirth

Field Value

float

liquidStack (Optional) (Default: milkportion)

The liquid itemstack to produce when this entity is milked

[DocumentAsJson("Optional", "milkportion", false)]
private JsonItemStack liquidJsonStack

Field Value

JsonItemStack

yieldLitres (Optional) (Default: 10)

Determines how many liters of milk are harvested per milking the creature

[DocumentAsJson("Optional", "10", false)]
private float yieldLitres

Field Value

float