Class WorldInteraction
- Namespace
- Vintagestory.API.Client
- Assembly
- VintagestoryAPI.dll
A world interaction for the object. This is used to prompt the player about what a certain object can do. Open in GitHub
[DocumentAsJson]
[JsonObject(MemberSerialization.OptIn)]
public class WorldInteraction
- Inheritance
-
WorldInteraction
Fields
ActionLangCode (Required)
The text to show, will be used in the form of Lang.Get(ActionLangCode);
[JsonProperty]
public string ActionLangCode
Field Value
MouseButton (Recommended) (Default: Left)
What mouse button should be used for this interaction?
[JsonProperty]
public EnumMouseButton MouseButton
Field Value
HotKeyCode (Optional)
Does it require a mouse modifier key to perform this action (e.g. "shift" or "ctrl")
[JsonProperty]
public string HotKeyCode
Field Value
HotKeyCodes (Optional) (Default: None)
Does it require pressing multiple keys to perform this action (if set then HotkeyCode is ignored)
[JsonProperty]
public string[] HotKeyCodes { get; set; }
Field Value
- string[]
ItemStacks (Optional) (Default: None)
Does the player need to hold a certain items/blocks in hands? (e.g. a knife). You can define an array of item stacks here and the game will loop through them in a 1 second interval. This property is loaded from the entitytypes and blocktype json files and then resolved.
[JsonProperty("ItemStacks")]
public JsonItemStack[] JsonItemStacks