### Theme Configuration Example Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Client.ConfigItem.html This snippet demonstrates how to get and apply a theme setting from local storage, defaulting to the system's preferred color scheme. ```javascript const theme = localStorage.getItem('theme') || 'auto' document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme) ``` -------------------------------- ### Start Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Client.ILoadedSound.html Starts the sound. ```csharp void Start() ``` -------------------------------- ### GetStartPos Method Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Common.BlockSchematic.html Gets the starting position of the schematic. ```csharp public virtual BlockPos GetStartPos(BlockPos pos, EnumOrigin origin) ``` -------------------------------- ### TransitionableProperties Examples Source: https://github.com/anegostudios/vsapi/blob/master/docs/json-docs/jsondocs/Vintagestory.API.Common.TransitionableProperties.html Examples of how TransitionableProperties can be configured in JSON. ```json "transitionablePropsByType": { "*-long-raw": [ { "type": "Dry", "freshHours": { "avg": 0 }, "transitionHours": { "avg": 168 }, "transitionedStack": { "type": "item", "code": "bowstave-long-dry" }, "transitionRatio": 1 } ] }, "transitionableProps": [ { "type": "Perish", "freshHours": { "avg": 120 }, "transitionHours": { "avg": 24 }, "transitionedStack": { "type": "item", "code": "rot" }, "transitionRatio": 0.5 } ] ``` -------------------------------- ### TryGet Method Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Common.IAssetManager.html Retrieves an asset from a given path within the assets folder. Returns null when the asset does not exist. Remember to use lower case paths. Mods must not call TryGet to get assets before the AssetsLoaded stage in a ModSystem - do not load assets in the Start() method! (Or if you absolutely have to load assets in Start(), use IAssetManager.Get(), but it will throw an exception for anything except a base asset.) ```csharp IAsset TryGet(AssetLocation Location, bool loadAsset = true) ``` -------------------------------- ### GetModSystem Method (string) Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Common.IModLoader.html Gets a loaded mod system with the specified full name, that is the namespace and class name, for example "Vintagestory.ServerMods.Core" for the survival mod. Returns null if no mod with that name was found. ```csharp ModSystem GetModSystem(string fullName) ``` -------------------------------- ### StartsWithFast Method (3 parameters) Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Util.StringUtil.html Checks if a string starts with a specified prefix, starting from a given offset. ```csharp public static bool StartsWithFast(this string value, string reference, int offset) ``` -------------------------------- ### EntityBehaviorDespawn Example Source: https://github.com/anegostudios/vsapi/blob/master/docs/json-docs/jsondocs/Vintagestory.GameContent.EntityBehaviorDespawn.html Example configuration for the despawn behavior. ```json "behaviors": [ { "code": "despawn", "minPlayerDistance": 16, "belowLightLevel": 8, "minSeconds": 300, "afterDays": 14 } ], ``` -------------------------------- ### EntityBehaviorBoss Configuration Example Source: https://github.com/anegostudios/vsapi/blob/master/docs/json-docs/jsondocs/Vintagestory.GameContent.EntityBehaviorBoss.html Example of how to configure the EntityBehaviorBoss in JSON. ```json "behaviors": [ { "code": "boss", "bossHpBarRange": 30, "musicTrack": "theresonancearchives-eidolon" } ] ``` -------------------------------- ### Example Usage Source: https://github.com/anegostudios/vsapi/blob/master/docs/json-docs/jsondocs/Vintagestory.GameContent.BlockBehaviorSneakPlacing.html This example shows how to enable the SneakPlacing behavior for a block in the game's JSON configuration. ```json "behaviors": [ { "name": "SneakPlacing" } ] ``` -------------------------------- ### Start Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.MathTools.Cuboidd.html Gets the start Vec3d point of the cuboid. ```csharp public Vec3d Start { get; } ``` -------------------------------- ### FastStartsWith Method Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Util.StringUtil.html Checks if a string starts with a specified prefix, with an option to specify the length to compare. ```csharp public static bool FastStartsWith(string value, string reference, int len) ``` -------------------------------- ### Start Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.MathTools.Cuboidf.html Gets the starting corner of the cuboid as a Vec3f. ```csharp public Vec3f Start { get; } ``` -------------------------------- ### StartPriority Property Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Client.RainMusicTrack.html Gets the start priority of the track. Higher start priority tracks will allow lower priority ones to continue playing. ```csharp public float StartPriority { get; } ``` -------------------------------- ### SetupContext Method Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Client.CairoFont.html Sets up the context. Must be executed in the main thread, as it is not thread safe. ```csharp public void SetupContext(Context ctx) ``` -------------------------------- ### Start Method Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Common.ModSystem.html The Start method is called on both server and client after all mods have received a call to StartPre(), but before Blocks/Items/Entities/Recipes etc are loaded. ```csharp public virtual void Start(ICoreAPI api) ``` -------------------------------- ### Startd Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.MathTools.Cuboidf.html Gets the starting corner of the cuboid as a Vec3d. ```csharp public Vec3d Startd { get; } ``` -------------------------------- ### EntityBehaviorHideWaterSurface Configuration Example Source: https://github.com/anegostudios/vsapi/blob/master/docs/json-docs/jsondocs/Vintagestory.GameContent.EntityBehaviorHideWaterSurface.html Example of how to configure the 'hidewatersurface' behavior in JSON. ```json "behaviors": [ { "code": "hidewatersurface", "hideWaterElement": "ORIGIN/hideWater/*" }, ] ``` -------------------------------- ### StartPre Method Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Common.ModSystem.html Called during initial mod loading, before any mod receives the call to Start(). ```csharp public virtual void StartPre(ICoreAPI api) ``` -------------------------------- ### Example Usage Source: https://github.com/anegostudios/vsapi/blob/master/docs/json-docs/jsondocs/Vintagestory.GameContent.EntityBehaviorControlledPhysics.html Example of how to configure the controlledphysics behavior in a JSON file. ```json "behaviors": [ { "code": "controlledphysics" "stepHeight": 1.1251 } ] ``` -------------------------------- ### Rectanglei Y1 Property Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.MathTools.Rectanglei.html Gets the starting Y-coordinate of the rectangle. Equivalent to Y. ```csharp public int Y1 { get; } ``` -------------------------------- ### WithExamples Method Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Common.IChatCommand.html Define one ore more examples on how this command can be executed. ```csharp IChatCommand WithExamples(params string[] examaples) ``` -------------------------------- ### PreInitialize Method Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Common.Entities.IProjectile.html Sets initial rotation if needed. Should be called each time entity is spawned before it spawned. ```csharp void PreInitialize() ``` -------------------------------- ### Rectanglei X1 Property Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.MathTools.Rectanglei.html Gets the starting X-coordinate of the rectangle. Equivalent to X. ```csharp public int X1 { get; } ``` -------------------------------- ### Initialize Method Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Client.EventMusicTrack.html Initializes the music track with necessary managers and APIs. ```csharp public override void Initialize(IAssetManager assetManager, ICoreClientAPI capi, IMusicEngine musicEngine) ``` -------------------------------- ### GetPositions Method (with BlockPos) Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.Datastructures.NaturalShape.html Gets a list of BlockPos positions starting from a given BlockPos. ```csharp public List GetPositions(BlockPos start) ``` -------------------------------- ### TryStart Method Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Common.ThreadExtensions.html Starts the specified thread if it is not already running. ```csharp public static void TryStart(this Thread t) ``` -------------------------------- ### GetPrefixAndCreatureName(string) Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Common.Entities.Entity.html Gets the translated prefix and creature name, for example, 'a goat'. Defaults to the current language if languageCode is null. ```csharp public virtual string GetPrefixAndCreatureName(string languageCode = null) ``` -------------------------------- ### Initialize Method Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Common.EntityBehaviorPassivePhysics.html Initializes the entity. If your code modifies the supplied attributes (not recommended!), then your changes will apply to all entities of the same type. ```csharp public override void Initialize(EntityProperties properties, JsonObject attributes) ``` -------------------------------- ### Id Property Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Common.CraftingRecipeIngredient.html Is used to reference recipe ingredient in the recipe, for example to specify where to copy attributes from. If not specified will be set to the index of this ingredient in the array (starting from 1), or key of this ingredient in the object. ```csharp [DocumentAsJson("Optional", "None", false)] public string Id { get; set; } ``` -------------------------------- ### Initialize Method Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Client.CaveMusicTrack.html Initializes the music track. ```csharp public void Initialize(IAssetManager assetManager, ICoreClientAPI capi, IMusicEngine musicEngine) ``` -------------------------------- ### Wearable Slots Example Source: https://github.com/anegostudios/vsapi/blob/master/docs/json-docs/jsondocs/Vintagestory.GameContent.WearableSlotConfig.html Example of how wearable slots can be configured in JSON. ```json "wearableSlots": [ { "code": "head", "forCategoryCodes": [ "bridle" ], "attachmentPointCode": "HeadAP" }, { "code": "face", "forCategoryCodes": [ "face" ], "attachmentPointCode": "FaceAP" }, { "code": "neck", "forCategoryCodes": [ "lantern" ], "attachmentPointCode": "NeckAP" }, ... ] ``` -------------------------------- ### StartTrack Method Overload 2 Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Client.ICoreClientAPI.html Starts playing a music track from an asset location. Allows specifying priority, sound type, and a callback. The track is not started immediately if onLoaded is provided. ```csharp MusicTrack StartTrack(AssetLocation soundLocation, float priority, EnumSoundType soundType, Action onLoaded = null) ``` -------------------------------- ### Begin Method Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Common.ICachingBlockAccessor.html Starts an operation. No parameters. ```csharp void Begin() ``` -------------------------------- ### BlockBehaviorMyceliumHost Example Source: https://github.com/anegostudios/vsapi/blob/master/docs/json-docs/jsondocs/Vintagestory.GameContent.BlockBehaviorMyceliumHost.html Example of how to use the MyceliumHost behavior in a block's JSON definition. ```json "behaviors": [ { "name": "MyceliumHost" } ] ``` -------------------------------- ### GetSyntaxWithExplanation Method Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Common.ArgumentParserBase.html Gets the syntax with a custom explanation. ```csharp public virtual string GetSyntaxWithExplanation(string indent) ``` -------------------------------- ### Example Source: https://github.com/anegostudios/vsapi/blob/master/docs/json-docs/jsondocs/Vintagestory.GameContent.EntityBehaviorRepulseAgents.html This is an example of how to use the repulseagents behavior. ```json "behaviors": [ { "code": "repulseagents", "movable": false } ] ``` -------------------------------- ### RainDrip Behavior Example Source: https://github.com/anegostudios/vsapi/blob/master/docs/json-docs/jsondocs/Vintagestory.GameContent.BlockBehaviorRainDrip.html Example of how to apply the RainDrip behavior to a block in JSON configuration. ```json "behaviors": [ { "name": "RainDrip" } ] ``` -------------------------------- ### StartClientSide Method Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Common.ModSystem.html Full start to the mod on the client side. In multiplayer games, server assets have not yet been received. ```csharp public virtual void StartClientSide(ICoreClientAPI api) ``` -------------------------------- ### BlockBehaviorHarvestable Example Source: https://github.com/anegostudios/vsapi/blob/master/docs/json-docs/jsondocs/Vintagestory.GameContent.BlockBehaviorHarvestable.html Example configuration for the BlockBehaviorHarvestable. ```json "behaviorsByType": { "*-ripe": [ { "name": "Harvestable", "properties": { "harvestTime": 0.6, "harvestedStack": { "type": "item", "code": "fruit-{type}", "quantity": { "avg": 4.4 } }, "harvestedBlockCode": "bigberrybush-{type}-empty", "exchangeBlock": true } } ] } ... "attributes": { "forageStatAffected": true } ``` -------------------------------- ### EntityBehaviorMortallyWoundable Example Source: https://github.com/anegostudios/vsapi/blob/master/docs/json-docs/jsondocs/Vintagestory.GameContent.EntityBehaviorMortallyWoundable.html Example of how to configure the EntityBehaviorMortallyWoundable in JSON. ```json "behaviors": [ { "code": "mortallywoundable", "whenBelowHealth": 6 }, ], ``` -------------------------------- ### EntityBehaviorHealth Example Source: https://github.com/anegostudios/vsapi/blob/master/docs/json-docs/jsondocs/Vintagestory.GameContent.EntityBehaviorHealth.html Example of how to configure the EntityBehaviorHealth in JSON. ```json "behaviors": [ { "code": "health", "currenthealth": 15.0, "maxhealth": 15.0 }, ], ... "attributes": { "minGenerationToAllowHealing": 1 } ``` -------------------------------- ### FromTreeAttributes Method Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Common.DummyInventory.html Called when the game is loaded or loaded from server. ```csharp public override void FromTreeAttributes(ITreeAttribute tree) ``` -------------------------------- ### EntityBehaviorSelectionBoxes Example Source: https://github.com/anegostudios/vsapi/blob/master/docs/json-docs/jsondocs/Vintagestory.GameContent.EntityBehaviorSelectionBoxes.html Example of how to define selection boxes in the entity's JSON configuration. ```json "behaviors": [ { "code": "selectionboxes", "selectionBoxes": ["HeadAP", "FaceAP", "NeckAP", "MidAP", "MidUnderAP", "RearAP", "RearSideAP", "RFrontAP", "LFrontAP", "TempGear1AP", "TempGear2AP", "TempGear3AP"] }, ], ``` -------------------------------- ### StartTrack Method Overload 1 Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Client.ICoreClientAPI.html Starts playing a music track. Allows specifying a callback for when the sound is loaded and whether to play immediately. ```csharp void StartTrack(MusicTrack track, EnumSoundType soundType, Action onLoaded = null, bool playnow = true) ``` -------------------------------- ### AnimationMetaData Example Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Common.AnimationMetaData.html This is an example of how AnimationMetaData can be structured in JSON. ```json "animations": [ { "code": "hurt", "animation": "hurt", "animationSpeed": 2.2, "weight": 10, "blendMode": "AddAverage" }, { "code": "die", "animation": "death", "animationSpeed": 1.25, "weight": 10, "blendMode": "Average", "triggeredBy": { "onControls": [ "dead" ] } }, { "code": "idle", "animation": "idle", "blendMode": "AddAverage", "easeOutSpeed": 4, "triggeredBy": { "defaultAnim": true } }, { "code": "walk", "animation": "walk", "weight": 5 } ] ``` -------------------------------- ### AssetsFinalize Method Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Common.ModSystem.html Called on the server for final asset setup steps after Block.OnLoaded() methods have been called. ```csharp public virtual void AssetsFinalize(ICoreAPI api) ``` -------------------------------- ### StartServerSide Method Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Common.ModSystem.html Full start to the mod on the server side. Code that adds or updates behaviors or attributes should ideally run before this. ```csharp public virtual void StartServerSide(ICoreServerAPI api) ``` -------------------------------- ### Get Method Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Config.ITranslationService.html Gets a translation for a given key. ```csharp string Get(string key, params object[] args) ``` -------------------------------- ### Get Method Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Client.ISettingsClass-1.html Gets the setting with the provided key. ```csharp T Get(string key, T defaultValue = default) ``` -------------------------------- ### BeginChildElements Method (with bounds) Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Client.GuiComposer.html Starts a set of child elements within the GUI composer, specifying their bounds. ```csharp public GuiComposer BeginChildElements(ElementBounds bounds) ``` -------------------------------- ### ItemType Example Source: https://github.com/anegostudios/vsapi/blob/master/docs/json-docs/jsondocs/Vintagestory.ServerMods.NoObf.ItemType.html An example of an ItemType JSON configuration. ```json { "code": "strawdummy", "class": "ItemStrawDummy", "shape": { "base": "entity/land/strawdummy" }, "creativeinventory": { ... }, "heldTpIdleAnimation": "holdunderarm", "maxstacksize": 1, "combustibleProps": { ... }, "guiTransform": { ... }, "fpHandTransform": { ... }, "tpHandTransform": { ... } } ``` -------------------------------- ### BeginChildElements Method (no bounds) Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Client.GuiComposer.html Starts a set of child elements within the GUI composer. ```csharp public GuiComposer BeginChildElements() ``` -------------------------------- ### EntityBehaviorRideableAccessories Example Source: https://github.com/anegostudios/vsapi/blob/master/docs/json-docs/jsondocs/Vintagestory.GameContent.EntityBehaviorRideableAccessories.html This is an example of how to configure the 'rideableaccessories' behavior in JSON. ```json "behaviors": [ { "code": "rideableaccessories", "wearableSlots": [ { "code": "head", "forCategoryCodes": ["bridle"], "attachmentPointCode": "HeadAP" }, { "code": "face", "forCategoryCodes": ["face"], "attachmentPointCode": "FaceAP" }, { "code": "neck", "forCategoryCodes": ["lantern"], "attachmentPointCode": "NeckAP" }, { "code": "middleback", "forCategoryCodes": ["saddle"], "attachmentPointCode": "MidAP" }, { "code": "middlebackunder", "forCategoryCodes": ["blanket"], "attachmentPointCode": "MidUnderAP" }, { "code": "lowerback", "forCategoryCodes": ["bedroll", "pillion"], "attachmentPointCode": "RearAP" }, { "code": "lowerbackside", "forCategoryCodes": ["sidebags"], "attachmentPointCode": "RearSideAP" }, { "code": "frontrightside", "forCategoryCodes": ["utilities", "pot", "weaponfalx", "weapon1m", "bowshort", "bowlong"], "attachmentPointCode": "RFrontAP" }, { "code": "frontleftside", "forCategoryCodes": ["utilities", "pot", "weaponfalx", "weapon1m", "bowshort", "bowlong"], "attachmentPointCode": "LFrontAP" }, { "code": "gearleft", "forCategoryCodes": ["gear"], "attachmentPointCode": "TempGear1AP" }, { "code": "gearback", "forCategoryCodes": ["gear"], "attachmentPointCode": "TempGear2AP" }, { "code": "gearright", "forCategoryCodes": ["gear"], "attachmentPointCode": "TempGear3AP" } ] } ] ``` -------------------------------- ### EntityBehaviorMilkable Configuration Example Source: https://github.com/anegostudios/vsapi/blob/master/docs/json-docs/jsondocs/Vintagestory.GameContent.EntityBehaviorMilkable.html Example of how to configure the EntityBehaviorMilkable in JSON. ```json "behaviors": [ { "code": "milkable", "liquidStack": { "type": "item", "code": "milkportion" }, "lactatingDaysAfterBirth": 21, "yieldLitres": 10 }, ] ``` -------------------------------- ### Initialize Method Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Client.MusicTrack.html Initializes the music track with asset manager, client API, and music engine. ```csharp public virtual void Initialize(IAssetManager assetManager, ICoreClientAPI capi, IMusicEngine musicEngine) ``` -------------------------------- ### PostRender Method Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Client.GuiComposer.html Fires the PostRender event. ```csharp public void PostRender(float deltaTime) ``` -------------------------------- ### EntityBehaviorNameTag Configuration Example Source: https://github.com/anegostudios/vsapi/blob/master/docs/json-docs/jsondocs/Vintagestory.GameContent.EntityBehaviorNameTag.html Example of how to configure the EntityBehaviorNameTag in JSON. ```json "behaviors": [ { "code": "nametag", "showtagonlywhentargeted": true, "selectFromRandomName": ["Yern", "Gild", "Hans", "Hector", "McCrae", "Yoskolo", "Grit", "Bounder"] }, ] ``` -------------------------------- ### ClayFormingRecipe Example Source: https://github.com/anegostudios/vsapi/blob/master/docs/json-docs/jsondocs/Vintagestory.GameContent.ClayFormingRecipe.html An example JSON structure for a ClayFormingRecipe. ```json { "ingredient": { "type": "item", "code": "clay-*", "name": "type", "allowedVariants": [ "blue", "fire", "red" ] }, "pattern": [ [ "#####", "#####", "#####", "#####", "#####" ], [ "#####", "#___#", "#___#", "#___#", "#####" ] ], "name": "Bowl", "output": { "type": "block", "code": "bowl-raw" } } ``` -------------------------------- ### StartAnimationBase Method (string configCode) Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Common.PlayerAnimationManager.html Starts the base animation using a configuration code. ```csharp public bool StartAnimationBase(string configCode) ``` -------------------------------- ### EntityBehaviorBodyTemperature Example Source: https://github.com/anegostudios/vsapi/blob/master/docs/json-docs/jsondocs/Vintagestory.GameContent.EntityBehaviorBodyTemperature.html Example configuration for the EntityBehaviorBodyTemperature behavior in VintageStory. ```json "behaviors": [ { "code": "bodytemperature", "defaultBodyTemperature": 37 } ] ``` -------------------------------- ### StartsWithFast Method (2 parameters) Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Util.StringUtil.html Checks if a string starts with a specified prefix. ```csharp public static bool StartsWithFast(this string value, string reference) ``` -------------------------------- ### InitialiseSearch Method Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Config.TranslationService.html Compiles regexes to optimize the performance of the first actual wildcard search. ```csharp public void InitialiseSearch() ``` -------------------------------- ### CookingRecipeIngredient Example Source: https://github.com/anegostudios/vsapi/blob/master/docs/json-docs/jsondocs/Vintagestory.GameContent.CookingRecipeIngredient.html An example of a CookingRecipeIngredient JSON object. ```json { "code": "water", "validStacks": [ { "type": "item", "code": "waterportion", "shapeElement": "bowl/water" } ], "minQuantity": 1, "maxQuantity": 1, "portionSizeLitres": 1 } ``` -------------------------------- ### BlockBehaviorReparable Example Source: https://github.com/anegostudios/vsapi/blob/master/docs/json-docs/jsondocs/Vintagestory.GameContent.BlockBehaviorReparable.html Example of how to add the Reparable behavior to a block. ```json "behaviors": [ { "name": "Reparable" } ] ``` -------------------------------- ### Render Method Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Client.GuiComposer.html Fires the render event. ```csharp public void Render(float deltaTime) ``` -------------------------------- ### BlockBehaviorUnstable Example Source: https://github.com/anegostudios/vsapi/blob/master/docs/json-docs/jsondocs/Vintagestory.GameContent.BlockBehaviorUnstable.html Example of how to configure the 'Unstable' behavior in a block's JSON properties, specifying which faces it can attach to. ```json "behaviors": [ { "name": "Unstable", "properties": { "attachedToFaces": [ "up" ] } } ] ``` -------------------------------- ### BlockBehaviorDecor Example Source: https://github.com/anegostudios/vsapi/blob/master/docs/json-docs/jsondocs/Vintagestory.GameContent.BlockBehaviorDecor.html Example of how to use the BlockBehaviorDecor in a JSON definition. ```json "behaviors": [ { "name": "Decor", "properties": { "sides": [ "north", "east", "south", "west", "up", "down" ], "notFullFace": true, "thickness": 0.0 } } ], ``` -------------------------------- ### DidOpen Method Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Common.IInventoryNetworkUtil.html Opens a target inventory, passing it to the player. ```csharp object DidOpen(IPlayer player) ``` -------------------------------- ### WithExplanation Method Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Common.ArgumentParserBase.html Sets an optional description or example for the argument. ```csharp public virtual ArgumentParserBase WithExplanation(string desc) ``` -------------------------------- ### Item Ingredient Example Source: https://github.com/anegostudios/vsapi/blob/master/docs/json-docs/jsondocs/Vintagestory.GameContent.BarrelRecipeIngredient.html Example of an item ingredient for a BarrelRecipe. ```json { "type": "item", "code": "strongtanninportion", "litres": 2, "consumeLitres": 2 } ``` -------------------------------- ### InitServerMT Method Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Common.Entities.PhysicsBehaviorBase.html Initializes the server-side multi-threading for physics. ```csharp public static void InitServerMT(ICoreServerAPI sapi) ``` -------------------------------- ### BEBehaviorFirepitAmbient Example Source: https://github.com/anegostudios/vsapi/blob/master/docs/json-docs/jsondocs/Vintagestory.GameContent.BEBehaviorFirepitAmbient.html Example of how to define the FirepitAmbient behavior in JSON. ```json "entityBehaviors": [ { "name": "FirepitAmbient" } ], ``` -------------------------------- ### BEBehaviorAnimatable Example Source: https://github.com/anegostudios/vsapi/blob/master/docs/json-docs/jsondocs/Vintagestory.GameContent.BEBehaviorAnimatable.html Example of how to define the Animatable behavior in JSON. ```json "entityBehaviors": [ { "name": "Animatable" } ], ``` -------------------------------- ### PathStartsWith(string) Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Common.AssetLocation.html Checks if the asset path starts with a given partial path. ```csharp public bool PathStartsWith(string partialPath) ``` -------------------------------- ### Example 2 Source: https://github.com/anegostudios/vsapi/blob/master/docs/json-docs/jsondocs/Vintagestory.API.MathTools.NatFloat.html Example of quantity with default distribution. ```json "quantity": { "avg": 4, "var": 2 } ``` -------------------------------- ### EntityBehaviorMultiply Configuration Example Source: https://github.com/anegostudios/vsapi/blob/master/docs/json-docs/jsondocs/Vintagestory.GameContent.EntityBehaviorMultiply.html This JSON snippet shows how to configure the 'multiply' behavior for an entity, including spawn codes, requirements, and breeding parameters. ```json { "code": "multiply", "enabledByType": { "-female": true, "*": false }, "spawnEntityCodes": [{ "code": "sheep-{type}-baby-male" }, { "code": "sheep-{type}-baby-female" }], "requiresNearbyEntityCode": "sheep-bighorn-adult-male", "requiresNearbyEntityRange": 10, "spawnQuantityMin": 1, "spawnQuantityMax": 1, "pregnancyDays": 20, "multiplyCooldownDaysMin": 4, "multiplyCooldownDaysMax": 11, "portionsEatenForMultiply": 10 } ``` -------------------------------- ### Example 1 Source: https://github.com/anegostudios/vsapi/blob/master/docs/json-docs/jsondocs/Vintagestory.API.MathTools.NatFloat.html Example of quantity with 'strongerinvexp' distribution. ```json "quantity": { "dist": "strongerinvexp", "avg": 6, "var": 4 } ``` -------------------------------- ### TryLoadAsset Method Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Common.IAssetOrigin.html Attempts to load the asset. Returns false if it fails. ```csharp bool TryLoadAsset(IAsset asset) ``` -------------------------------- ### StartAnimation Method (string configCode) Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Common.PlayerAnimationManager.html Starts a new animation defined in the entity config file. If not defined, it won't play. Use StartAnimation(AnimationMetaData animdata) to use animation metadata directly. ```csharp public override bool StartAnimation(string configCode) ``` -------------------------------- ### GridRecipe Example Source: https://github.com/anegostudios/vsapi/blob/master/docs/json-docs/jsondocs/Vintagestory.API.Common.GridRecipe.html Example of a GridRecipe JSON object. ```json { "ingredientPattern": "GS,S_", "ingredients": { "G": { "type": "item", "code": "drygrass" }, "S": { "type": "item", "code": "stick" } }, "width": 2, "height": 2, "output": { "type": "item", "code": "firestarter" } } ``` -------------------------------- ### OnBlockTexturesLoaded Method Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Client.GuiDialog.html Makes this gui pop up once a pre-set given key combination is set. ```csharp public virtual void OnBlockTexturesLoaded() ``` -------------------------------- ### Variant Group Example Source: https://github.com/anegostudios/vsapi/blob/master/docs/json-docs/jsondocs/Vintagestory.ServerMods.BlockBehaviorOmniRotatable.html Example of a variant group for directional states. ```json "variantgroups": [ { "code": "rot", "states": [ "north", "east", "south", "west", "up", "down" ] } ] ``` -------------------------------- ### Initialize Method Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Client.IColorPresets.html Method signature for Initialize, allowing mods to insert their configured color keys and values into the presets. ```csharp void Initialize(IAsset asset) ``` -------------------------------- ### Crop Properties Example Source: https://github.com/anegostudios/vsapi/blob/master/docs/json-docs/jsondocs/Vintagestory.ServerMods.NoObf.BlockCropPropertiesType.html An example of how crop properties can be defined in JSON. ```json "cropProps": { "requiredNutrient": "K", "nutrientConsumption": 40, "growthStages": 7, "totalGrowthMonths": 1.2, "coldDamageBelow": -10, "damageGrowthStuntMul": 0.75, "coldDamageRipeMul": 0.5, "heatDamageAbove": 32 } ``` -------------------------------- ### Crop Behavior Example Source: https://github.com/anegostudios/vsapi/blob/master/docs/json-docs/jsondocs/Vintagestory.ServerMods.NoObf.CropBehaviorType.html Example of how to define crop behaviors in JSON. ```json "cropProps": { "behaviors": [ { "name": "Pumpkin", "properties": { "vineGrowthStage": 3, "vineGrowthQuantity": { "dist": "invexp", "avg": 2, "var": 3 } } } ], ... ``` -------------------------------- ### StoreModConfig (Generic) Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Common.ICoreAPICommon.html Stores a config file in a prepared modconfig folder. You only need to provide a unique filename. For T just make a class with all fields public - this is your configuration class. Be sure to set useful default values for your settings Be aware that these configs are not synchronized between client and server. Each side will store their own copy of the configuration. If these configs affect gameplay, you will likely need to synchronize it via network packet ```csharp void StoreModConfig(T jsonSerializeableData, string filename) where T : class ``` -------------------------------- ### OmniRotatable Behavior Example Source: https://github.com/anegostudios/vsapi/blob/master/docs/json-docs/jsondocs/Vintagestory.ServerMods.BlockBehaviorOmniRotatable.html Example of how to configure the OmniRotatable behavior in JSON. ```json "behaviors": [ { "name": "OmniRotatable", "properties": { "rotateSides": true, "facing": "block" } } ] ``` -------------------------------- ### CreateEmpty Method Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Client.GuiComposer.html Creates an empty GuiComposer. ```csharp public static GuiComposer CreateEmpty(ICoreClientAPI api) ``` -------------------------------- ### MetalAlloyIngredient Example Source: https://github.com/anegostudios/vsapi/blob/master/docs/json-docs/jsondocs/Vintagestory.GameContent.MetalAlloyIngredient.html An example of how a MetalAlloyIngredient might be defined in JSON. ```json { "type": "item", "code": "ingot-copper", "minratio": 0.5, "maxratio": 0.7 } ``` -------------------------------- ### GetBestSuitedSlot Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Common.IInventory.html Returns the best suited slot to hold the item from the source slot. Attached is also a weight, indicating how well the item is suited for it. If no suitable slot was found, the weight will be 0 and the slot will be null. A higher weight means the slot is better suited to hold the item. This method does not check if the player is actually allowed to access or modify this inventory. Weight will be 1 for a default slot that is empty Weight will be 2 for a default slot that can take one or more items from the source slot Weight could be 10 for an empty armor slot and the source slot contains an armor itemtack ```C# WeightedSlot GetBestSuitedSlot(ItemSlot sourceSlot, ItemStackMoveOperation op = null, List skipSlots = null) ``` -------------------------------- ### Server Entity Configuration Example Source: https://github.com/anegostudios/vsapi/blob/master/docs/json-docs/jsondocs/Vintagestory.ServerMods.NoObf.ServerEntityConfig.html This JSON snippet demonstrates how to configure server-side behaviors for an entity, including passive physics and despawn settings. ```json "server": { "behaviors": [ { "code": "passivephysics", "groundDragFactor": 1, "airDragFactor": 0.25, "gravityFactor": 0.75 }, { "code": "despawn", "minSeconds": 600 } ] }, ``` -------------------------------- ### EntityBehaviorHunger Example Source: https://github.com/anegostudios/vsapi/blob/master/docs/json-docs/jsondocs/Vintagestory.GameContent.EntityBehaviorHunger.html Example of how to add the hunger behavior to an entity in JSON. ```json "behaviors": [ { "code": "hunger", "currentsaturation": 1500.0, "maxsaturation": 1500.0 }, ], ``` -------------------------------- ### Example Usage Source: https://github.com/anegostudios/vsapi/blob/master/docs/json-docs/jsondocs/Vintagestory.GameContent.EntityBehaviorIdleAnimations.html This is an example of how to configure the 'idleanimations' behavior in a JSON file. ```json "behaviors": [ { "code": "idleanimations" }, ], ``` -------------------------------- ### GetSkillItemGrid Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Client.GuiComposerHelpers.html Fetches the skill item grid by name ```csharp public static GuiElementSkillItemGrid GetSkillItemGrid(this GuiComposer composer, string key) ``` -------------------------------- ### GetConfigList Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Client.GuiComposerHelpers.html Gets the config list by name. ```csharp public static GuiElementConfigList GetConfigList(this GuiComposer composer, string key) ``` -------------------------------- ### OnKeyUp Method Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Client.GuiComposer.html Fires the OnKeyUp events for the GUI. ```csharp public void OnKeyUp(KeyEvent args) ``` -------------------------------- ### AssetLocation Constructor (string) Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Common.AssetLocation.html Create a new AssetLocation from a single string (e.g. when parsing an AssetLocation in a JSON file). If no domain is prefixed, the default 'game' domain is used. This ensures the domain and path in the created AssetLocation are lowercase (as the input string could have any case) ```csharp public AssetLocation(string domainAndPath) ``` -------------------------------- ### EntityBehaviorBreathe Example Source: https://github.com/anegostudios/vsapi/blob/master/docs/json-docs/jsondocs/Vintagestory.GameContent.EntityBehaviorBreathe.html Example of how to use the 'breathe' behavior in entity JSON. ```json "behaviors": [ { "code": "breathe", "maxoxygen": 40000, "currentoxygen": 40000 }, ] ``` -------------------------------- ### Init Method Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Common.Entities.PhysicsBehaviorBase.html Initializes the physics behavior. ```csharp public void Init() ``` -------------------------------- ### Cooking Recipe Example Source: https://github.com/anegostudios/vsapi/blob/master/docs/json-docs/jsondocs/Vintagestory.GameContent.CookingRecipe.html An example of a cooking recipe for jam. ```json { "code": "jam", "perishableProps": { "freshHours": { "avg": 1080 }, "transitionHours": { "avg": 180 }, "transitionRatio": 1, "transitionedStack": { "type": "item", "code": "rot" } }, "shape": { "base": "block/food/meal/jam" }, "ingredients": [ { "code": "honey", "validStacks": [ { "type": "item", "code": "honeyportion", "shapeElement": "bowl/honey", "cookedStack": { "type": "item", "code": "jamhoneyportion" } } ], "minQuantity": 2, "maxQuantity": 2, "portionSizeLitres": 0.2 }, { "code": "fruit", "validStacks": [ { "type": "item", "code": "fruit-*", "shapeElement": "bowl/fruit" } ], "minQuantity": 2, "maxQuantity": 2 } ] } ``` -------------------------------- ### EntityBehaviorAntlerGrowth Example Source: https://github.com/anegostudios/vsapi/blob/master/docs/json-docs/jsondocs/Vintagestory.GameContent.EntityBehaviorAntlerGrowth.html Example configuration for the 'antlergrowth' behavior in Vintage Story. ```json "behaviors": [ { "code": "antlergrowth", "variants": ["01", "02", "03", "04", "05", "06", "07", "08"], "beginGrowMonth": 7, "growDurationMonths": 6.5, "grownDurationMonths": 2, "shedDurationMonths": 0.5, "noItemDrop": false }, ] ``` -------------------------------- ### Initialize Method Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Common.CropBehavior.html Initializes the crop with additional properties. ```csharp public virtual void Initialize(JsonObject properties) ``` -------------------------------- ### RopeTieable Behavior Example Source: https://github.com/anegostudios/vsapi/blob/master/docs/json-docs/jsondocs/Vintagestory.GameContent.BlockBehaviorRopeTieable.html Example of how to apply the RopeTieable behavior in JSON. ```json "behaviors": [ { "name": "RopeTieable" } ], ``` -------------------------------- ### BeginSubs Method Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Common.CommandAbbr.IChatCommandExt.html Alias for BeginSubCommands. Creates multiple new sub-commands. ```csharp public static IChatCommand BeginSubs(this IChatCommand cmd, params string[] name) ``` -------------------------------- ### Multiblock Behavior Example Source: https://github.com/anegostudios/vsapi/blob/master/docs/json-docs/jsondocs/Vintagestory.GameContent.BlockBehaviorMultiblock.html Example of how to configure the Multiblock behavior in JSON. ```json "behaviors": [ { "name": "Multiblock", "properties": { "sizex": 1, "sizey": 3, "sizez": 1, "cposition": { "x": 0, "y": 0, "z": 0 } } } ], ``` -------------------------------- ### DummyInventory Constructor Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Common.DummyInventory.html Initializes a new instance of the DummyInventory class. ```csharp public DummyInventory(ICoreAPI api, int quantitySlots = 1) ``` -------------------------------- ### JonasBoilerDoor Behavior Example Source: https://github.com/anegostudios/vsapi/blob/master/docs/json-docs/jsondocs/Vintagestory.GameContent.BlockBehaviorJonasBoilerDoor.html Example of how to add the JonasBoilerDoor behavior to a block. ```json "behaviors": [ { "name": "JonasBoilerDoor" } ] ``` -------------------------------- ### BeginColumn Method Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Server.IWorldGenBlockAccessor.html BeginColumn method signature. ```csharp void BeginColumn() ``` -------------------------------- ### BlockBehaviorDropNotSnowCovered Example Source: https://github.com/anegostudios/vsapi/blob/master/docs/json-docs/jsondocs/Vintagestory.GameContent.BlockBehaviorDropNotSnowCovered.html This is an example of how to use the BlockBehaviorDropNotSnowCovered behavior in a JSON configuration. ```json "behaviors": [ { "name": "DropNotSnowCovered" } ], ``` -------------------------------- ### BeginSub Method Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Common.CommandAbbr.IChatCommandExt.html Alias for BeginSubCommand. Creates a new sub-command. ```csharp public static IChatCommand BeginSub(this IChatCommand cmd, string name) ``` -------------------------------- ### TrapDoor Behavior Example Source: https://github.com/anegostudios/vsapi/blob/master/docs/json-docs/jsondocs/Vintagestory.GameContent.BEBehaviorTrapDoor.html Example of how to define the TrapDoor behavior in JSON. ```json "entityBehaviors": [ { "name": "TrapDoor" } ], ... "behaviors": [ { "name": "TrapDoor" } ], ``` -------------------------------- ### OnMouseUp Method Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Client.GuiComposer.html Fires the OnMouseUp events. ```csharp public void OnMouseUp(MouseEvent mouse) ``` -------------------------------- ### Barrel Recipe Example Source: https://github.com/anegostudios/vsapi/blob/master/docs/json-docs/jsondocs/Vintagestory.GameContent.BarrelRecipe.html Example of a barrel recipe for composting. ```json { "code": "compost", "sealHours": 480, "ingredients": [ { "type": "item", "code": "rot", "litres": 64 } ], "output": { "type": "item", "code": "compost", "stackSize": 16 } } ``` -------------------------------- ### Example Usage Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Common.HeldSounds.html Example of how to define held sounds in a JSON configuration. ```json "heldSoundsbyType": { "*-lit-*": { "idle": "held/torch-idle", "equip": "held/torch-equip", "unequip": "held/torch-unequip", "attack": "held/torch-attack" } }, ``` -------------------------------- ### BlockSounds JSON Example Source: https://github.com/anegostudios/vsapi/blob/master/docs/json-docs/jsondocs/Vintagestory.API.Common.BlockSounds.html An example of how BlockSounds can be defined in a JSON file, specifying sounds for placing, breaking, hitting, and walking. ```json "sounds": { "place": "block/dirt", "break": "block/dirt", "hit": "block/dirt", "walk": "walk/grass" } ``` -------------------------------- ### GetContainer Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Client.GuiComposerHelpers.html Gets the container by key ```csharp public static GuiElementContainer GetContainer(this GuiComposer composer, string key) ``` -------------------------------- ### Grinding Properties Example Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Common.GrindingProperties.html Example of how to define grinding properties in JSON. ```json "grindingProps": { "groundStack": { "type": "item", "code": "bonemeal" } }, ``` -------------------------------- ### Passive Physics Behavior Example Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Common.EntityBehaviorPassivePhysics.html Example configuration for the passive physics behavior. ```json "behaviors": [ { "code": "passivephysics" "groundDragFactor": 1, "airDragFactor": 0.25, "gravityFactor": 0.75 } ] ``` -------------------------------- ### CompositeShape JSON Examples Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Common.CompositeShape.html Examples of how CompositeShape can be defined in JSON format. ```json "shape": { "base": "block/basic/cube" } ``` ```json "shapeInventory": { "base": "block/plant/bamboo/{color}/{part}-1", "overlays": [ { "base": "block/plant/bamboo/{color}/{part}lod0-1" } ] } ``` -------------------------------- ### LateInitialize Method Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Common.InventoryBase.html Allows for late initialization of an InventoryBase, which can be necessary during chunk loading. The inventoryID and api can be set to null initially. ```csharp public virtual void LateInitialize(string inventoryID, ICoreAPI api) ``` -------------------------------- ### Crushing Properties Example Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Common.CrushingProperties.html Example of how crushing properties can be defined in JSON. ```json "crushingPropsByType": { "ore-poor-ilmenite-*": { "crushedStack": { "type": "item", "code": "crushed-ilmenite" }, "quantity": { "avg": 1 }, "hardnessTier": 4 }, "ore-poor-cassiterite-*": { "crushedStack": { "type": "item", "code": "crushed-cassiterite" }, "quantity": { "avg": ".33" }, "hardnessTier": 1 } } ``` -------------------------------- ### OnRenderGUI Method Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Client.GuiDialog.html This runs when the dialogue is ready to render all of the components. ```csharp public virtual void OnRenderGUI(float deltaTime) ``` -------------------------------- ### Cooking Example Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Common.CombustibleProperties.html Example of how to configure combustible properties for cooking an item. ```json "combustiblePropsByType": { "bushmeat-raw": { "meltingPoint": 150, "meltingDuration": 30, "smeltedRatio": 1, "smeltingType": "cook", "smeltedStack": { "type": "item", "code": "bushmeat-cooked" }, "requiresContainer": false } }, ``` -------------------------------- ### ShortDomain() Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Common.AssetLocation.html Returns a shortened version of the domain. ```csharp public string ShortDomain() ``` -------------------------------- ### LoadAsset Method Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Common.IAssetOrigin.html Loads the asset into memory. ```csharp void LoadAsset(IAsset asset) ``` -------------------------------- ### InitialiseSearch Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Config.Lang.html Initializes the search functionality for translations. ```csharp public static void InitialiseSearch() ``` -------------------------------- ### Example 2: Behavior with properties Source: https://github.com/anegostudios/vsapi/blob/master/docs/json-docs/jsondocs/Vintagestory.ServerMods.NoObf.CollectibleBehaviorType.html An example of adding a behavior with specific properties. ```json "behaviors": [ { "name": "UnstableFalling", "properties": { "fallSound": null, "dustIntensity": 0 } } ] ``` -------------------------------- ### OnKeyPress Method Source: https://github.com/anegostudios/vsapi/blob/master/docs/api/Vintagestory.API.Client.GuiComposer.html Fires the OnKeyPress event for the GUI. ```csharp public void OnKeyPress(KeyEvent args) ```