RootInteraction
Documentation for the RootInteraction asset type.
Location
Item/RootInteractions
Use in Your Files
Add this to your JSON files for IDE autocompletion and validation:
"$schema": "https://hytaledb.ginco.gg/schemas/RootInteraction.schema.json" Schema
Interactions array
The list of interactions that will be run when starting a chain with this root interaction. Interactions in this list will be run in sequence.
Cooldown unknown
Cooldowns are used to prevent an interaction from running repeatedly too quickly. During a cooldown attempting to run an interaction with the same cooldown id will fail.
A set of rules that control when this root interaction can run or what interactions this root being active prevents.
Settings objectnull
Per a gamemode settings.
Controls the amount of time this root interaction can remain in the click queue before being discarded.
Requires the user to click again before running another root interaction of the same type.
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "RootInteraction.json",
"title": "RootInteraction",
"description": "A RootInteraction serves as an entry point into a set of Interactions.\n\nIn order to start an interaction chain a RootInteraction is required.\nA basic RootInteraction can simply contain a reference to single interaction within Interactions field which will be the entire chain. More complex cases can configure the other fields.\n\nMost fields configured here apply to all Interactions contained the root and any Interactions they contain as well. Systems that look at tags for interactions may also check the root interaction as well reducing the need to duplicate them on all nested interactions.",
"type": "object",
"allOf": [
{
"$ref": "base.schema.json"
}
],
"properties": {
"Interactions": {
"type": "array",
"description": "The list of interactions that will be run when starting a chain with this root interaction. Interactions in this list will be run in sequence.",
"items": {
"anyOf": [
{
"type": "string",
"title": "Reference to Interaction"
},
{
"$ref": "Interaction.json#"
}
]
},
"minItems": 1
},
"Cooldown": {
"description": "Cooldowns are used to prevent an interaction from running repeatedly too quickly.\n\nDuring a cooldown attempting to run an interaction with the same cooldown id will fail.",
"anyOf": [
{
"$ref": "common.schema.json#/$defs/InteractionCooldown"
},
{
"type": "null"
}
]
},
"Rules": {
"description": "A set of rules that control when this root interaction can run or what interactions this root being active prevents.",
"default": {
"Blocking": []
},
"$ref": "common.schema.json#/$defs/InteractionRules"
},
"Settings": {
"type": [
"object",
"null"
],
"title": "Map of GameMode",
"description": "Per a gamemode settings.",
"properties": {
"Adventure": {
"$ref": "common.schema.json#/$defs/RootInteractionSettings"
},
"Creative": {
"$ref": "common.schema.json#/$defs/RootInteractionSettings"
}
},
"additionalProperties": {
"$ref": "common.schema.json#/$defs/RootInteractionSettings"
},
"propertyNames": {
"enum": [
"Adventure",
"Creative"
]
}
},
"ClickQueuingTimeout": {
"description": "Controls the amount of time this root interaction can remain in the click queue before being discarded.",
"$ref": "base.schema.json#/$defs/NullableNumberOrSpecial"
},
"RequireNewClick": {
"type": "boolean",
"description": "Requires the user to click again before running another root interaction of the same type.",
"default": false
}
}
}