Add item_descriptor and use it in acceptable places (#115)

* Add item_descriptor and use it in acceptable places

* Rename descriptor

* Fix refs

* Fix refs

* Add descriptor to 3 more components
This commit is contained in:
Piotr Brzozowski
2022-10-01 19:34:08 +02:00
committed by GitHub
parent 393e7191dd
commit dcd9877aa7
15 changed files with 74 additions and 30 deletions

View File

@@ -37,7 +37,7 @@
"type": "array",
"title": "Target Blocks",
"description": "List of block types this mob avoids.",
"items": { "title": "Block ID", "$ref": "../../../../general/block/identifier.json" }
"items": { "title": "Block ID", "$ref": "../../../../general/item/descriptor.json" }
},
"avoid_block_sound": {
"type": "string",

View File

@@ -16,7 +16,7 @@
"type": "string",
"description": "List of items that this mob likes.",
"title": "Properties",
"$ref": "../../../../general/item/identifier.json"
"$ref": "../../../../general/item/descriptor.json"
},
"title": "Properties"
},

View File

@@ -14,7 +14,7 @@
"title": "Items",
"description": "The list of items that can be used to charge the held item. This list is required and must have at least one item in it.",
"items": {
"type": "string",
"$ref": "../../../../general/item/descriptor.json",
"description": "Items names to be used.",
"title": "Item ID"
}

View File

@@ -20,7 +20,7 @@
"type": "array",
"description": "Blocks that the mob can't jump to.",
"items": {
"$ref": "../../../../general/block/identifier.json"
"$ref": "../../../../general/item/descriptor.json"
}
},
"max_velocity": {
@@ -46,7 +46,7 @@
"type": "array",
"description": "Blocks that the mob prefers jumping to.",
"items": {
"$ref": "../../../../general/block/identifier.json"
"$ref": "../../../../general/item/descriptor.json"
}
},
"preferred_blocks_chance": {

View File

@@ -17,7 +17,7 @@
},
"egg_type": {
"title": "Egg Type",
"type": "string",
"$ref": "../../../../general/item/descriptor.json",
"default": "minecraft:turtle_egg",
"description": "[EXPERIMENTAL] Block type for the egg to lay. If this is a turtle egg, the number of eggs in the block is randomly set."
},
@@ -60,6 +60,7 @@
"title": "Target Blocks",
"type": "array",
"default": ["minecraft:sand"],
"items": { "title": "Block ID", "$ref": "../../../../general/item/descriptor.json" },
"description": "[EXPERIMENTAL] Blocks that the mob can lay its eggs on top of."
},
"target_materials_above_block": {

View File

@@ -53,7 +53,7 @@
"type": "string",
"default": "nearest",
"description": "Kind of block to find fitting the specification. Valid values are \"random\" and \"nearest\".",
"enum": ["random","nearest"]
"enum": ["random", "nearest"]
},
"target_offset": {
"title": "Target Offset",
@@ -71,8 +71,7 @@
"title": "Target Blocks",
"description": "Block types to move to.",
"items": {
"$ref": "../../../../general/block/identifier.json",
"type": "string"
"$ref": "../../../../general/item/descriptor.json"
}
},
"target_block_filters": {

View File

@@ -31,7 +31,7 @@
"type": "array",
"items": {
"title": "Excluded Item",
"$ref": "../../../../general/item/identifier.json"
"$ref": "../../../../general/item/descriptor.json"
}
},
"goal_radius": {

View File

@@ -16,7 +16,7 @@
"type": "string",
"title": "Block Id",
"description": "A block identifier.",
"$ref": "../../../../general/block/identifier.json"
"$ref": "../../../../general/item/descriptor.json"
}
},
"eat_delay": {

View File

@@ -16,12 +16,12 @@
{
"type": "array",
"items": {
"$ref": "../../../../general/item/identifier.json",
"$ref": "../../../../general/item/descriptor.json",
"title": "Item"
}
},
{
"$ref": "../../../../general/item/identifier.json"
"$ref": "../../../../general/item/descriptor.json"
}
]
},

View File

@@ -30,7 +30,7 @@
"title": "Items",
"description": "List of items this mob is tempted by.",
"items": {
"$ref": "../../../../general/item/identifier.json"
"$ref": "../../../../general/item/descriptor.json"
}
},
"sound_interval": {

View File

@@ -33,21 +33,22 @@
{
"type": "array",
"items": {
"$ref": "../../../../general/item/identifier.json"
}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {
"growth": {
"type": "number"
},
"item": {
"oneOf": [
{
"$ref": "../../../../general/item/identifier.json"
},
{
"type": "object",
"properties": {
"growth": {
"type": "number"
},
"item": {
"$ref": "../../../../general/item/identifier.json"
}
}
}
}
]
}
},
{

View File

@@ -17,7 +17,7 @@
"description": "The list of items that can be used to bribe the entity.",
"items": {
"description": "An item that can be used to bribe the entity.",
"$ref": "../../../../general/item/identifier.json",
"$ref": "../../../../general/item/descriptor.json",
"title": "Bribe Items"
},
"title": "Bribe Items"

View File

@@ -27,7 +27,7 @@
"items": {
"type": "string",
"description": "A item name.",
"$ref": "../../../../general/item/identifier.json",
"$ref": "../../../../general/item/descriptor.json",
"title": "Accepted Items"
}
},

View File

@@ -23,7 +23,7 @@
"description": "The list of items that can be given to the entity to place in their inventory.",
"items": {
"description": "An items that can be given to the entity to place in their inventory.",
"$ref": "../../../../general/item/identifier.json",
"$ref": "../../../../general/item/descriptor.json",
"title": "Properties"
}
},