This commit is contained in:
DaanV2
2021-10-11 19:10:26 +02:00
parent 8c58926f4a
commit 87a9df91ee
4 changed files with 14 additions and 24 deletions

View File

@@ -8,17 +8,8 @@
"properties": { "properties": {
"damage": { "damage": {
"title": "Damage", "title": "Damage",
"oneOf": [ "$ref": "../types/range_number_type.json",
{ "description": "Range of the random amount of damage the melee attack deals. A negative value can heal the entity instead of hurting it."
"type": "integer",
"default": 1,
"description": "Amount of damage the melee attack deals. A negative value can heal the entity instead of hurting it."
},
{
"$ref": "../types/range_number_type.json",
"description": "Range of the random amount of damage the melee attack deals. A negative value can heal the entity instead of hurting it."
}
]
}, },
"effect_name": { "effect_name": {
"type": "string", "type": "string",
@@ -33,5 +24,5 @@
"title": "Effect Duration" "title": "Effect Duration"
} }
}, },
"examples": [{ "damage": 0 }, { "damage": 0, "effect_name": "example", "effect_duration": 1 }] "examples": [{ "damage": 1 }, { "damage": 1, "effect_name": "example", "effect_duration": 1 }]
} }

View File

@@ -4,7 +4,14 @@
"type": "object", "type": "object",
"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": [], "required": ["value"],
"defaultSnippets": [
{
"label": "Variant",
"description": "New variant",
"body": { "value": "$1" }
}
],
"properties": { "properties": {
"value": { "value": {
"type": "integer", "type": "integer",
@@ -13,9 +20,5 @@
"title": "Value" "title": "Value"
} }
}, },
"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

@@ -13,9 +13,5 @@
"title": "Drag Factor" "title": "Drag Factor"
} }
}, },
"examples": [ "examples": [{ "drag_factor": 0.8 }]
{
"drag_factor": 0.8
}
]
} }

View File

@@ -2,7 +2,7 @@
"$id": "blockception.minecraft.behavior.entities.type.range_number_type", "$id": "blockception.minecraft.behavior.entities.type.range_number_type",
"title": "Range [A, B]", "title": "Range [A, B]",
"description": "A described range", "description": "A described range",
"examples": [[0.0, 1.0]], "examples": [1, 2, 3, [0.0, 1.0]],
"items": [ "items": [
{ "type": "number", "title": "A", "description": "The first value of the range" }, { "type": "number", "title": "A", "description": "The first value of the range" },
{ "type": "number", "title": "B", "description": "The second value of the range" } { "type": "number", "title": "B", "description": "The second value of the range" }