Refactored item

This commit is contained in:
DaanV2
2022-06-07 20:49:57 +02:00
parent 10417c8ec2
commit bbd36afa70
27 changed files with 105 additions and 103 deletions

View File

@@ -0,0 +1,8 @@
{
"$id": "blockception.minecraft.behavior.1.16.200.items.minecraft:hand_equiped",
"additionalProperties": false,
"required": ["texture"],
"type": "boolean",
"title": "Hand Equipped",
"description": "Is this a hand equipped item."
}

View File

@@ -0,0 +1,9 @@
{
"$id": "blockception.minecraft.behavior.1.16.200.items.minecraft:max_stack_size",
"additionalProperties": false,
"required": ["texture"],
"type": "integer",
"title": "Max Stack Size",
"description": "Maximum stack size.",
"minimum": 0
}

View File

@@ -0,0 +1,8 @@
{
"$id": "blockception.minecraft.behavior.1.16.200.items.minecraft:use_duration",
"additionalProperties": false,
"required": ["texture"],
"type": "integer",
"title": "Use Duration",
"description": "How long to use before item is done being used."
}

View File

@@ -1,89 +0,0 @@
{
"$id": "blockception.minecraft.behavior.1.16.200.items",
"description": "Minecraft items 1.16.200",
"required": ["format_version", "minecraft:item"],
"title": "Item",
"type": "object",
"properties": {
"format_version": {
"title": "Format Version",
"type": "string",
"description": "A version that tells minecraft what type of data format can be expected when reading this file."
},
"minecraft:item": {
"additionalProperties": false,
"required": ["description"],
"type": "object",
"description": "UNDOCUMENTED",
"$comment": "UNDOCUMENTED",
"title": "Item",
"properties": {
"description": {
"additionalProperties": false,
"type": "object",
"title": "Description",
"description": "UNDOCUMENTED",
"$comment": "UNDOCUMENTED",
"properties": {
"identifier": {
"title": "Identifier",
"type": "string",
"description": "The identifier for this item. The name must include a namespace and must not use the Minecraft namespace unless overriding a Vanilla item.",
"$ref": "../../../general/item/identifier.json"
},
"category": {
"type": "string",
"default": "",
"description": "The category for this item. Categories are used to control high level properties of how the item is integrated into the bedrock engine, such as whether it can be used in slash commands.",
"title": "Category",
"examples": ["Nature", "Equipment", "Construction", "Items"]
},
"is_experimental": {
"type": "boolean",
"default": false,
"description": "If this item is experimental, it will only be registered if the world is marked as experimental.",
"title": "Is Experimental"
}
}
},
"components": {
"additionalProperties": { "type": "object" },
"type": "object",
"description": "The components of this item",
"properties": {
"minecraft:armor": { "$ref": "./components/minecraft.armor.json" },
"minecraft:block_placer": { "$ref": "./components/minecraft.block_placer.json" },
"minecraft:cooldown": { "$ref": "./components/minecraft.cooldown.json" },
"minecraft:digger": { "$ref": "./components/minecraft.digger.json" },
"minecraft:display_name": { "$ref": "./components/minecraft.display_name.json" },
"minecraft:durability": { "$ref": "./components/minecraft.durability.json" },
"minecraft:dye_powder": { "$ref": "./components/minecraft.dye_powder.json" },
"minecraft:entity_placer": { "$ref": "./components/minecraft.entity_placer.json" },
"minecraft:food": { "$ref": "./components/minecraft.food.json" },
"minecraft:fuel": { "$ref": "./components/minecraft.fuel.json" },
"minecraft:icon": { "$ref": "./components/minecraft.icon.json" },
"minecraft:knockback_resistance": { "$ref": "./components/minecraft.knockback_resistance.json" },
"minecraft:max_stack_size": { "type": "integer", "title": "Max Stack Size", "description": "Maximum stack size.", "minimum": 0 },
"minecraft:use_duration": {
"type": "integer",
"title": "Use Duration",
"description": "How long to use before item is done being used."
},
"minecraft:on_use": { "$ref": "./components/minecraft.on_use.json" },
"minecraft:on_use_on": { "$ref": "./components/minecraft.on_use_on.json" },
"minecraft:projectile": { "$ref": "./components/minecraft.projectile.json" },
"minecraft:repairable": { "$ref": "./components/minecraft.repairable.json" },
"minecraft:render_offsets": { "$ref": "./components/minecraft.render_offsets.json" },
"minecraft:shooter": { "$ref": "./components/minecraft.shooter.json" },
"minecraft:throwable": { "$ref": "./components/minecraft.throwable.json" },
"minecraft:weapon": { "$ref": "./components/minecraft.weapon.json" },
"minecraft:wearable": { "$ref": "./components/minecraft.wearable.json" },
"minecraft:hand_equipped": { "type": "boolean", "title": "Hand Equipped", "description": "Is this a hand equipped item." }
}
},
"events": { "$ref": "./events.json" }
}
}
}
}

View File

@@ -0,0 +1,71 @@
{
"$id": "blockception.minecraft.behavior.items",
"additionalProperties": false,
"required": ["description"],
"type": "object",
"description": "UNDOCUMENTED",
"$comment": "UNDOCUMENTED",
"title": "Item",
"properties": {
"description": {
"additionalProperties": false,
"type": "object",
"title": "Description",
"description": "UNDOCUMENTED",
"$comment": "UNDOCUMENTED",
"properties": {
"identifier": {
"title": "Identifier",
"type": "string",
"description": "The identifier for this item. The name must include a namespace and must not use the Minecraft namespace unless overriding a Vanilla item.",
"$ref": "../../../general/item/identifier.json"
},
"category": {
"type": "string",
"default": "",
"description": "The category for this item. Categories are used to control high level properties of how the item is integrated into the bedrock engine, such as whether it can be used in slash commands.",
"title": "Category",
"examples": ["Nature", "Equipment", "Construction", "Items"]
},
"is_experimental": {
"type": "boolean",
"default": false,
"description": "If this item is experimental, it will only be registered if the world is marked as experimental.",
"title": "Is Experimental"
}
}
},
"components": {
"additionalProperties": { "type": "object" },
"type": "object",
"description": "The components of this item",
"properties": {
"minecraft:armor": { "$ref": "./components/armor.json" },
"minecraft:block_placer": { "$ref": "./components/block_placer.json" },
"minecraft:cooldown": { "$ref": "./components/cooldown.json" },
"minecraft:digger": { "$ref": "./components/digger.json" },
"minecraft:display_name": { "$ref": "./components/display_name.json" },
"minecraft:durability": { "$ref": "./components/durability.json" },
"minecraft:dye_powder": { "$ref": "./components/dye_powder.json" },
"minecraft:entity_placer": { "$ref": "./components/entity_placer.json" },
"minecraft:food": { "$ref": "./components/food.json" },
"minecraft:fuel": { "$ref": "./components/fuel.json" },
"minecraft:hand_equipped": { "$ref": "./components/hand_equipped.json" },
"minecraft:icon": { "$ref": "./components/icon.json" },
"minecraft:knockback_resistance": { "$ref": "./components/knockback_resistance.json" },
"minecraft:max_stack_size": { "$ref": "./components/max_stack_size.json" },
"minecraft:on_use_on": { "$ref": "./components/on_use_on.json" },
"minecraft:on_use": { "$ref": "./components/on_use.json" },
"minecraft:projectile": { "$ref": "./components/projectile.json" },
"minecraft:render_offsets": { "$ref": "./components/render_offsets.json" },
"minecraft:repairable": { "$ref": "./components/repairable.json" },
"minecraft:shooter": { "$ref": "./components/shooter.json" },
"minecraft:throwable": { "$ref": "./components/throwable.json" },
"minecraft:use_duration": { "$ref": "./components/use_duration.json" },
"minecraft:weapon": { "$ref": "./components/weapon.json" },
"minecraft:wearable": { "$ref": "./components/wearable.json" }
}
},
"events": { "$ref": "./events.json" }
}
}

View File

@@ -1,16 +1,11 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "blockception.minecraft.behavior.items",
"examples": [{ "format_version": "1.16.200", "minecraft:item": { "description": { "identifier": "namespace:item" }, "components": {} } }],
"allOf": [
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.10" } } }, "then": { "$ref": "./1.10.0/items.json" } },
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.10.0" } } }, "then": { "$ref": "./1.10.0/items.json" } },
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.14" } } }, "then": { "$ref": "./1.14.0/items.json" } },
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.14.0" } } }, "then": { "$ref": "./1.14.0/items.json" } },
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.16" } } }, "then": { "$ref": "./1.16.0/items.json" } },
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.16.0" } } }, "then": { "$ref": "./1.16.0/items.json" } },
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.16.100" } } }, "then": { "$ref": "./1.16.100/items.json" } },
{ "if": { "properties": { "format_version": { "type": "string", "const": "1.16.200" } } }, "then": { "$ref": "./1.16.200/items.json" } },
{ "properties": { "format_version": { "$ref": "../../general/format_version.json" } } }
]
"$id": "blockception.minecraft.behavior.1.16.200.items",
"description": "Minecraft items 1.16.200",
"required": ["format_version", "minecraft:item"],
"title": "Item",
"type": "object",
"properties": {
"format_version": { "$ref": "../../general/format_version.json" },
"minecraft:item": { "$ref": "./format/minecraft.item.json" }
}
}