Support single values for item components (#268)
This commit is contained in:
@@ -1,12 +1,25 @@
|
|||||||
{
|
{
|
||||||
"$id": "blockception.minecraft.behavior.items.minecraft:allow_off_hand",
|
"$id": "blockception.minecraft.behavior.items.minecraft:allow_off_hand",
|
||||||
"additionalProperties": false,
|
|
||||||
"type": "object",
|
|
||||||
"title": "Allow Off Hand",
|
"title": "Allow Off Hand",
|
||||||
"description": "The allow off hand component determines whether the item can be placed in the off hand slot of the inventory.",
|
"description": "The allow off hand component determines whether the item can be placed in the off hand slot of the inventory.",
|
||||||
"required": ["value"],
|
"default": false,
|
||||||
"properties": { "value": { "type": "boolean", "title": "Value", "description": "Whether the item can be placed in the off hand slot" } },
|
"examples": [true, { "value": true }],
|
||||||
"examples": [
|
"oneOf": [
|
||||||
{ "value": true }
|
{
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": ["value"],
|
||||||
|
"properties": {
|
||||||
|
"value": {
|
||||||
|
"title": "Value",
|
||||||
|
"description": "Whether the item can be placed in the off hand slot",
|
||||||
|
"type": "boolean",
|
||||||
|
"default": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,25 @@
|
|||||||
{
|
{
|
||||||
"$id": "blockception.minecraft.behavior.items.minecraft:can_destroy_in_creative",
|
"$id": "blockception.minecraft.behavior.items.minecraft:can_destroy_in_creative",
|
||||||
"additionalProperties": false,
|
|
||||||
"type": "object",
|
|
||||||
"title": "Can Destroy In Creative",
|
"title": "Can Destroy In Creative",
|
||||||
"description": "The can destroy in creative component determines if the item will break blocks in creative when swinging.",
|
"description": "The can destroy in creative component determines if the item will break blocks in creative when swinging.",
|
||||||
"required": ["value"],
|
"default": true,
|
||||||
"properties": { "value": { "type": "boolean", "title": "Value", "description": "Whether the item can destroy blocks while in creative" } },
|
"examples": [false, { "value": false }],
|
||||||
"examples": [
|
"oneOf": [
|
||||||
{ "value": false }
|
{
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": ["value"],
|
||||||
|
"properties": {
|
||||||
|
"value": {
|
||||||
|
"title": "Value",
|
||||||
|
"description": "Whether the item can destroy blocks while in creative",
|
||||||
|
"type": "boolean",
|
||||||
|
"default": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,11 +2,10 @@
|
|||||||
"$id": "blockception.minecraft.behavior.items.minecraft:display_name",
|
"$id": "blockception.minecraft.behavior.items.minecraft:display_name",
|
||||||
"title": "Display Name",
|
"title": "Display Name",
|
||||||
"description": "Display Name item component. Display Names display the name of an item.",
|
"description": "Display Name item component. Display Names display the name of an item.",
|
||||||
|
"$comment": "Does not currently support single value parsing.",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"additionalProperties": false,
|
"additionalProperties": false,
|
||||||
"required": ["value"],
|
"required": ["value"],
|
||||||
"properties": { "value": { "type": "string", "title": "Value", "description": "Set the display name for an item." } },
|
"properties": { "value": { "type": "string", "title": "Value", "description": "Set the display name for an item." } },
|
||||||
"examples": [
|
"examples": [{ "value": "secret_weapon" }]
|
||||||
{ "value": "secret_weapon"}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,25 @@
|
|||||||
{
|
{
|
||||||
"$id": "blockception.minecraft.behavior.items.minecraft:foil",
|
"$id": "blockception.minecraft.behavior.items.minecraft:foil",
|
||||||
"additionalProperties": false,
|
|
||||||
"type": "object",
|
|
||||||
"title": "Glint",
|
"title": "Glint",
|
||||||
"description": "The glint component determines whether the item has the enchanted glint render effect on it",
|
"description": "The glint component determines whether the item has the enchanted glint render effect on it",
|
||||||
"required": ["value"],
|
"default": false,
|
||||||
"properties": { "value": { "type": "boolean", "title": "Value", "description": "Whether the item has the glint effect." } },
|
"examples": [true, { "value": true }],
|
||||||
"examples": [
|
"oneOf": [
|
||||||
{ "value": true }
|
{
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": ["value"],
|
||||||
|
"properties": {
|
||||||
|
"value": {
|
||||||
|
"title": "Value",
|
||||||
|
"description": "Whether the item has the glint effect.",
|
||||||
|
"type": "boolean",
|
||||||
|
"default": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,25 @@
|
|||||||
{
|
{
|
||||||
"$id": "blockception.minecraft.behavior.items.minecraft:hand_equipped",
|
"$id": "blockception.minecraft.behavior.items.minecraft:hand_equipped",
|
||||||
"additionalProperties": false,
|
|
||||||
"type": "object",
|
|
||||||
"title": "Hand Equipped",
|
"title": "Hand Equipped",
|
||||||
"description": "This component determines if an item is rendered like a tool while in hand.",
|
"description": "This component determines if an item is rendered like a tool while in hand.",
|
||||||
"required": ["value"],
|
"default": false,
|
||||||
"properties": { "value": { "type": "boolean", "title": "Value", "description": "If the item is rendered like a tool while in hand." } },
|
"examples": [true, { "value": true }],
|
||||||
"examples": [
|
"oneOf": [
|
||||||
{ "value": true }
|
{
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": ["value"],
|
||||||
|
"properties": {
|
||||||
|
"value": {
|
||||||
|
"title": "Value",
|
||||||
|
"description": "If the item is rendered like a tool while in hand.",
|
||||||
|
"type": "boolean",
|
||||||
|
"default": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,19 +1,28 @@
|
|||||||
{
|
{
|
||||||
"$id": "blockception.minecraft.behavior.items.minecraft:hover_text_color",
|
"$id": "blockception.minecraft.behavior.items.minecraft:hover_text_color",
|
||||||
"additionalProperties": false,
|
|
||||||
"type": "object",
|
|
||||||
"title": "Hover Text Color",
|
"title": "Hover Text Color",
|
||||||
"description": "The hover text color component determines the color of the item name when hovering over it.",
|
"description": "The hover text color component determines the color of the item name when hovering over it.",
|
||||||
"required": ["value"],
|
"examples": ["light_blue", { "value": "light_blue" }],
|
||||||
"properties": {
|
"definitions": {
|
||||||
"value": {
|
"color": {
|
||||||
"description": "The color of the item's hover text.",
|
"enum": ["black", "blue", "brown", "cyan", "gray", "green", "light_blue", "light_green", "magenta", "orange", "pink", "purple", "red", "silver", "white", "yellow"]
|
||||||
"type": "string",
|
}
|
||||||
"enum": ["black", "blue", "brown", "cyan", "gray", "green", "light_blue", "light_green", "magenta", "orange", "pink", "purple", "red", "silver", "white", "yellow"],
|
},
|
||||||
"title": "Value"
|
"oneOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/definitions/color"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": ["value"],
|
||||||
|
"properties": {
|
||||||
|
"value": {
|
||||||
|
"title": "Value",
|
||||||
|
"description": "The color of the item's hover text.",
|
||||||
|
"$ref": "#/definitions/color"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"examples": [
|
|
||||||
{ "value": "light_blue" }
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,26 +2,31 @@
|
|||||||
"$id": "blockception.minecraft.behavior.items.minecraft:icon",
|
"$id": "blockception.minecraft.behavior.items.minecraft:icon",
|
||||||
"title": "Icon",
|
"title": "Icon",
|
||||||
"description": "The icon item componenent determines the icon to represent the item in the UI and elsewhere.",
|
"description": "The icon item componenent determines the icon to represent the item in the UI and elsewhere.",
|
||||||
"type": "object",
|
"examples": ["stick", { "textures": { "default": "stick" } }],
|
||||||
"additionalProperties": true,
|
"oneOf": [
|
||||||
"required": ["textures"],
|
{
|
||||||
"properties": {
|
"type": "string"
|
||||||
"textures": {
|
},
|
||||||
"title": "Textures",
|
{
|
||||||
"description": "Contains key-value pairs of textures used by the item",
|
"type": "object",
|
||||||
"type": "object",
|
|
||||||
"additionalProperties": true,
|
"additionalProperties": true,
|
||||||
"required": ["default"],
|
"required": ["textures"],
|
||||||
"properties": {
|
"properties": {
|
||||||
"default": {
|
"textures": {
|
||||||
"type": "string",
|
"title": "Textures",
|
||||||
"title": "Default Texture",
|
"description": "Contains key-value pairs of textures used by the item",
|
||||||
"description": "The key from the resource_pack/textures/item_texture.json `texture_data` object associated with the texture file Example: blaze_powder."
|
"type": "object",
|
||||||
|
"additionalProperties": true,
|
||||||
|
"required": ["default"],
|
||||||
|
"properties": {
|
||||||
|
"default": {
|
||||||
|
"type": "string",
|
||||||
|
"title": "Default Texture",
|
||||||
|
"description": "The key from the resource_pack/textures/item_texture.json `texture_data` object associated with the texture file Example: blaze_powder."
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"examples": [
|
|
||||||
{"textures": {"default": "stick"}}
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,25 @@
|
|||||||
{
|
{
|
||||||
"$id": "blockception.minecraft.behavior.items.minecraft:liquid_clipped",
|
"$id": "blockception.minecraft.behavior.items.minecraft:liquid_clipped",
|
||||||
"additionalProperties": false,
|
|
||||||
"type": "object",
|
|
||||||
"title": "Liquid Clipped",
|
"title": "Liquid Clipped",
|
||||||
"description": "The liquid clipped component determines whether the item interacts with liquid blocks on use.",
|
"description": "The liquid clipped component determines whether the item interacts with liquid blocks on use.",
|
||||||
"required": ["value"],
|
"default": false,
|
||||||
"properties": { "value": { "type": "boolean", "title": "Value", "description": "Whether the item interacts with liquid blocks on use." } },
|
"examples": [true, { "value": true }],
|
||||||
"examples": [
|
"oneOf": [
|
||||||
{ "value": true }
|
{
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"additionalProperties": false,
|
||||||
|
"type": "object",
|
||||||
|
"required": ["value"],
|
||||||
|
"properties": {
|
||||||
|
"value": {
|
||||||
|
"title": "Value",
|
||||||
|
"description": "Whether the item interacts with liquid blocks on use.",
|
||||||
|
"type": "boolean",
|
||||||
|
"default": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,29 @@
|
|||||||
{
|
{
|
||||||
"$id": "blockception.minecraft.behavior.items.minecraft:max_stack_size",
|
"$id": "blockception.minecraft.behavior.items.minecraft:max_stack_size",
|
||||||
"additionalProperties": false,
|
|
||||||
"type": "object",
|
|
||||||
"title": "Max Stack Size",
|
"title": "Max Stack Size",
|
||||||
"description": "The max stack size component determines how many of the item can be stacked together.",
|
"description": "The max stack size component determines how many of the item can be stacked together.",
|
||||||
"required": ["value"],
|
"default": 64,
|
||||||
"properties": { "value": { "type": "number", "title": "Value", "description": "How many of the item that can be stacked.", "default": 64, "minimum": 1 } },
|
"examples": [1, { "value": 1 }],
|
||||||
"examples": [
|
"oneOf": [
|
||||||
{ "value": 1 }
|
{
|
||||||
|
"type": "number",
|
||||||
|
"minimum": 1,
|
||||||
|
"maximum": 64
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": ["value"],
|
||||||
|
"properties": {
|
||||||
|
"value": {
|
||||||
|
"title": "Value",
|
||||||
|
"description": "How many of the item that can be stacked.",
|
||||||
|
"type": "number",
|
||||||
|
"default": 64,
|
||||||
|
"minimum": 1,
|
||||||
|
"maximum": 64
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,11 +2,24 @@
|
|||||||
"$id": "blockception.minecraft.behavior.items.minecraft:should_despawn",
|
"$id": "blockception.minecraft.behavior.items.minecraft:should_despawn",
|
||||||
"title": "Should Despawn",
|
"title": "Should Despawn",
|
||||||
"description": "Should despawn component determines if the item should eventually despawn while floating in the world",
|
"description": "Should despawn component determines if the item should eventually despawn while floating in the world",
|
||||||
"additionalProperties": false,
|
"default": true,
|
||||||
"type": "object",
|
"examples": [false, { "value": false }],
|
||||||
"required": ["value"],
|
"oneOf": [
|
||||||
"properties": { "value": { "type": "boolean", "title": "Value", "description": "Whether the item should eventually despawn while floating in the world" } },
|
{
|
||||||
"examples": [
|
"type": "boolean"
|
||||||
{ "value": false }
|
},
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": ["value"],
|
||||||
|
"properties": {
|
||||||
|
"value": {
|
||||||
|
"title": "Value",
|
||||||
|
"description": "Whether the item should eventually despawn while floating in the world",
|
||||||
|
"type": "boolean",
|
||||||
|
"default": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,11 +2,24 @@
|
|||||||
"$id": "blockception.minecraft.behavior.items.minecraft:stacked_by_data",
|
"$id": "blockception.minecraft.behavior.items.minecraft:stacked_by_data",
|
||||||
"title": "Stacked By Data",
|
"title": "Stacked By Data",
|
||||||
"description": "The stacked by data component determines if the same item with different aux values can stack.",
|
"description": "The stacked by data component determines if the same item with different aux values can stack.",
|
||||||
"additionalProperties": false,
|
"default": false,
|
||||||
"type": "object",
|
"examples": [true, { "value": true }],
|
||||||
"required": ["value"],
|
"oneOf": [
|
||||||
"properties": { "value": { "type": "boolean", "title": "Value", "description": "Also defines whether the item actors can merge while floating in the world." } },
|
{
|
||||||
"examples": [
|
"type": "boolean"
|
||||||
{ "value": true }
|
},
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": ["value"],
|
||||||
|
"properties": {
|
||||||
|
"value": {
|
||||||
|
"title": "Value",
|
||||||
|
"description": "Also defines whether the item actors can merge while floating in the world.",
|
||||||
|
"type": "boolean",
|
||||||
|
"default": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,21 +1,25 @@
|
|||||||
{
|
{
|
||||||
"$id": "blockception.minecraft.behavior.items.minecraft:use_animation",
|
"$id": "blockception.minecraft.behavior.items.minecraft:use_animation",
|
||||||
"additionalProperties": false,
|
"title": "Use Animation",
|
||||||
"required": [ "value" ],
|
"description": "This component determines which animation plays when using the item.",
|
||||||
"type": "object",
|
"definitions": {
|
||||||
"title": "Use Animation",
|
"animation": {
|
||||||
"description": "This component determines which animation plays when using the item.",
|
"enum": ["bow", "brush", "camera", "crossbow", "drink", "eat", "none", "spear", "spyglass"]
|
||||||
"properties": {
|
|
||||||
"value": {
|
|
||||||
"title": "Value",
|
|
||||||
"description": "Which animation to play when using the item.",
|
|
||||||
"enum": [
|
|
||||||
"bow",
|
|
||||||
"eat",
|
|
||||||
"crossbow",
|
|
||||||
"drink",
|
|
||||||
"camera"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"oneOf": [
|
||||||
|
{ "$ref": "#/definitions/animation" },
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": ["value"],
|
||||||
|
"properties": {
|
||||||
|
"value": {
|
||||||
|
"title": "Value",
|
||||||
|
"description": "Which animation to play when using the item.",
|
||||||
|
"$ref": "#/definitions/animation"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user