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:
@@ -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",
|
||||
|
||||
@@ -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"
|
||||
},
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
|
||||
@@ -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": {
|
||||
|
||||
@@ -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": {
|
||||
|
||||
@@ -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": {
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
"type": "array",
|
||||
"items": {
|
||||
"title": "Excluded Item",
|
||||
"$ref": "../../../../general/item/identifier.json"
|
||||
"$ref": "../../../../general/item/descriptor.json"
|
||||
}
|
||||
},
|
||||
"goal_radius": {
|
||||
|
||||
@@ -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": {
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@@ -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": {
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
"items": {
|
||||
"type": "string",
|
||||
"description": "A item name.",
|
||||
"$ref": "../../../../general/item/identifier.json",
|
||||
"$ref": "../../../../general/item/descriptor.json",
|
||||
"title": "Accepted Items"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
},
|
||||
|
||||
43
source/general/item/descriptor.json
Normal file
43
source/general/item/descriptor.json
Normal file
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"$id": "blockception.minecraft.item.descriptor",
|
||||
"oneOf": [
|
||||
{
|
||||
"$ref": "./identifier.json"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/object_item_descriptor"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"item": {
|
||||
"oneOf": [
|
||||
{
|
||||
"$ref": "./identifier.json"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/object_item_descriptor"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"definitions": {
|
||||
"object_item_descriptor": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"tags": {
|
||||
"type": "string",
|
||||
"description": "[UNDOCUMENTED] A Molang expression ran against item or block to match.",
|
||||
"examples": ["query.any_tag('minecraft:is_tool')"]
|
||||
},
|
||||
"item_tag": {
|
||||
"type": "string",
|
||||
"description": "[UNDOCUMENTED] A tag to lookup item or block by.",
|
||||
"examples": ["minecraft:is_tool"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user