No Dialogue Example
This example entity is a cow summoner, that summons 4 cows in a row, every 0.5 seconds. An entity like this doesn’t really need a text-list, so we will create our state without one. The following snippet shows how this is achieved.
Template:
{
"header": {
"output_type": "dev",
"manifest_id": "190bdd50-7266-4991-849a-88df60b8f567",
"default_state": "main"
},
"states": [
{
"name": "main",
"length": 5,
"transitions": {
"2-end": "timer 0.5"
},
"commands": {
"1": "/say Now, I will summon cows!",
"2-end": "/summon cow ~ ~10 ~"
}
}
],
"entity": "default sirlich:my_entity"
}
With Comments:
{
//Header is normal
"header": {
"output_type": "dev",
"manifest_id": "190bdd50-7266-4991-849a-88df60b8f567",
"default_state": "main"
},
"states": [
//This state doesn't contain a "text" list, so it will
//act a bit differently.
{
"name": "main",
//Entities without a 'text' list need a 'length' argument.
//This is used in set-lang to know when the "end" is.
"length": 5,
"transitions": {
//"end" here uses the 'length' variable.
//So this means from state 2-5.
"2-end": "timer 0.5"
},
"commands": {
//Even when we don't include a text list,
//we can still trigger '/say' commands.
"1": "/say Now, I will summon cows!",
//Summon a cow from states 2-5, or 4 times
"2-end": "/summon cow ~ ~10 ~"
}
}
],
"entity": "default sirlich:my_entity"
}