Added more examples

This commit is contained in:
DaanV2
2021-10-11 20:07:41 +02:00
parent 1e25f784bd
commit b225a155a4
7 changed files with 40 additions and 26 deletions

View File

@@ -9,10 +9,5 @@
"entity_type": { "type": "string", "description": "The entity type that will be riding this entity", "title": "Entity Type" }, "entity_type": { "type": "string", "description": "The entity type that will be riding this entity", "title": "Entity Type" },
"spawn_event": { "type": "string", "description": "The spawn event that will be used when the riding entity is created", "title": "Spawn Event" } "spawn_event": { "type": "string", "description": "The spawn event that will be used when the riding entity is created", "title": "Spawn Event" }
}, },
"examples": [ "examples": [{ "entity_type": "minecraft:rabbit" }, { "entity_type": "minecraft:rabbit", "spawn_event": "self:example" }]
{
"entity_type": "example",
"spawn_event": "example"
}
]
} }

View File

@@ -4,6 +4,24 @@
"description": "Defines what events to call when this entity is damaged by specific entities or items.", "description": "Defines what events to call when this entity is damaged by specific entities or items.",
"type": "object", "type": "object",
"additionalProperties": false, "additionalProperties": false,
"examples": [
{
"triggers": [
{
"cause": "all",
"deals_damage": false
}
]
},
{
"triggers": [
{
"on_damage": { "filters": { "test": "has_damage", "subject": "self", "value": "fatal" } },
"deals_damage": false
}
]
}
],
"definitions": { "definitions": {
"trigger": { "trigger": {
"properties": { "properties": {

View File

@@ -4,6 +4,17 @@
"description": "Creates a trigger based on environment conditions.", "description": "Creates a trigger based on environment conditions.",
"type": "object", "type": "object",
"additionalProperties": false, "additionalProperties": false,
"examples": [
{
"triggers": [
{
"event": "self:example",
"target": "self",
"filters": { "test": "has_tag", "value": "example" }
}
]
}
],
"definitions": { "definitions": {
"trigger": { "trigger": {
"$ref": "../types/trigger.json" "$ref": "../types/trigger.json"

View File

@@ -13,9 +13,5 @@
} }
}, },
"additionalProperties": false, "additionalProperties": false,
"examples": [ "examples": [{ "value": 0 }, { "value": 1 }, { "value": 2 }, { "value": 3 }, { "value": 4 }, { "value": 5 }, { "value": 6 }, { "value": 7 }, { "value": 8 }, { "value": 9 }]
{
"value": 0
}
]
} }

View File

@@ -18,19 +18,24 @@
"title": "Trust Event" "title": "Trust Event"
}, },
"trust_items": { "trust_items": {
"title": "Trust Items",
"type": "array", "type": "array",
"description": "The list of items that can be used to get the entity to trust players", "description": "The list of items that can be used to get the entity to trust players",
"items": { "items": {
"$ref": "../../../../general/item/identifier.json", "$ref": "../../../../general/item/identifier.json",
"title": "Trust Item" "title": "Trust Item"
}, }
"title": "Trust Items"
} }
}, },
"examples": [ "examples": [
{ {
"probability": 1, "probability": 1,
"trust_items": [] "trust_event": "self:trust"
},
{
"probability": 1,
"trust_items": [],
"trust_event": "self:trust"
} }
] ]
} }

View File

@@ -5,13 +5,6 @@
"title": "Variant", "title": "Variant",
"description": "Used to differentiate the component group of a variant of an entity from others (e.g. ocelot, villager) Parameters", "description": "Used to differentiate the component group of a variant of an entity from others (e.g. ocelot, villager) Parameters",
"required": ["value"], "required": ["value"],
"defaultSnippets": [
{
"label": "Variant",
"description": "New variant",
"body": { "value": "$1" }
}
],
"properties": { "properties": {
"value": { "value": {
"type": "integer", "type": "integer",

View File

@@ -13,9 +13,5 @@
"title": "Value" "title": "Value"
} }
}, },
"examples": [ "examples": [{ "value": 1 }]
{
"value": 1
}
]
} }