Refactoring

This commit is contained in:
DaanV2
2022-06-07 20:42:18 +02:00
parent 4055ed9228
commit 10417c8ec2
66 changed files with 877 additions and 2217 deletions

View File

@@ -0,0 +1,18 @@
{
"$id": "blockception.minecraft.behavior.1.16.200.items.minecraft:armor",
"title": "Armor",
"description": "The armor item component determines the amount of protection you have in your armor item.",
"type": "object",
"additionalProperties": false,
"required": ["protection", "texture_type"],
"properties": {
"protection": { "type": "integer", "description": "How much protection does the armor item have.", "title": "Protection", "minimum": 0 },
"texture_type": {
"type": "string",
"default": "gold",
"description": "Texture Type to apply for the armor. Note that Horse armor is restricted to leather, iron, gold, or diamond.",
"title": "Texture Type",
"enum": ["gold", "none", "leather", "chain", "iron", "diamond", "elytra", "turtle", "netherite"]
}
}
}

View File

@@ -0,0 +1,25 @@
{
"$id": "blockception.minecraft.behavior.1.16.200.items.minecraft:block_placer",
"title": "Block Placer",
"description": "Planter item component. planter items are items that can be planted.",
"type": "object",
"additionalProperties": false,
"required": ["block"],
"definitions": {
"use_on_item": {
"type": "object",
"title": "Allowed Block",
"description": "A block descriptor that allows to be placed",
"properties": { "tags": { "title": "Tags", "description": "Tags", "$ref": "../../../../molang/string.json" } }
}
},
"properties": {
"block": { "type": "string", "description": "Set the placement block name for the planter item.", "title": "Block" },
"use_on": {
"description": "List of block descriptors that contain blocks that this item can be used on. If left empty, all blocks will be allowed.",
"title": "Use On",
"type": "array",
"items": { "$ref": "#/definitions/use_on_item" }
}
}
}

View File

@@ -0,0 +1,16 @@
{
"$id": "blockception.minecraft.behavior.1.16.200.items.minecraft:cooldown",
"title": "Cooldown",
"description": "Cool down time for a component. After you use an item it becomes unusable for the duration specified by the `cool down time` setting in this component.",
"type": "object",
"additionalProperties": false,
"required": ["category", "duration"],
"properties": {
"category": { "type": "string", "description": "The type of cool down for this item.", "title": "Category" },
"duration": {
"description": "The duration of time this item will spend cooling down before becoming usable again.",
"title": "Duration",
"type": "number"
}
}
}

View File

@@ -0,0 +1,51 @@
{
"$id": "blockception.minecraft.behavior.1.16.200.items.minecraft:digger",
"title": "Digger",
"description": "Digger item. Component put on items that dig.",
"type": "object",
"additionalProperties": false,
"required": ["destroy_speeds"],
"properties": {
"use_efficiency": {
"title": "Use Efficiency",
"type": "boolean",
"description": "Toggles if the item will be used efficiently",
"default": false
},
"destroy_speeds": {
"type": "array",
"title": "Destroy Speeds",
"description": "Destroy speed per block.",
"items": {
"title": "Destroy Speed",
"description": "Destroy speed per block.",
"type": "object",
"additionalProperties": false,
"properties": {
"speed": { "title": "Speed", "description": "Speed", "type": "number" },
"on_dig": { "type": "string", "title": "On Dig", "description": "Trigger for when you dig a block that isn't listed in destroy_speeds" },
"block": {
"title": "Block",
"oneOf": [
{ "type": "string", "description": "The block identifier" },
{
"type": "object",
"additionalProperties": false,
"description": "Block descriptor",
"properties": {
"any_tag": {
"type": "array",
"title": "Any Block Tag",
"description": "The block tag",
"items": { "type": "string", "title": "Block Tag" }
}
}
}
]
}
}
}
},
"on_dig": { "type": "string", "title": "On Dig", "description": "Trigger for when you dig a block that isn't listed in destroy_speeds" }
}
}

View File

@@ -0,0 +1,9 @@
{
"$id": "blockception.minecraft.behavior.1.16.200.items.minecraft:display_name",
"title": "Display Name",
"description": "Display Name item component. Display Names display the name of an item.",
"type": "object",
"additionalProperties": false,
"required": ["value"],
"properties": { "value": { "type": "string", "title": "Value", "description": "Set the display name for an item." } }
}

View File

@@ -0,0 +1,26 @@
{
"$id": "blockception.minecraft.behavior.1.16.200.items.minecraft:durability",
"title": "Durability",
"description": "Durability item component: how much damage can this item take before breaking.",
"type": "object",
"additionalProperties": false,
"required": ["damage_chance"],
"properties": {
"damage_chance": {
"type": "object",
"title": "Damange Chance",
"description": "Damange chance",
"additionalProperties": false,
"required": ["min", "max"],
"properties": {
"min": { "title": "Min", "type": "integer", "description": "The minimum" },
"max": { "title": "Max", "type": "integer", "description": "The minimum" }
}
},
"max_durability": {
"title": "Maximum Durability",
"description": "Maximum durability is the amount of damage that this item can take before breaking.",
"type": "number"
}
}
}

View File

@@ -0,0 +1,33 @@
{
"$id": "blockception.minecraft.behavior.1.16.200.items.minecraft:dye_powder",
"title": "Dye Powder",
"description": "Dye powder, there are 16 kinds of dye.",
"type": "object",
"additionalProperties": false,
"required": ["color"],
"properties": {
"color": {
"type": "string",
"title": "Color",
"description": "Defines what color the dye is.",
"enum": [
"black",
"red",
"green",
"brown",
"blue",
"purple",
"cyan",
"silver",
"gray",
"pink",
"lime",
"yellow",
"lightblue",
"magenta",
"orange",
"white"
]
}
}
}

View File

@@ -0,0 +1,23 @@
{
"$id": "blockception.minecraft.behavior.1.16.200.items.minecraft:entity_placer",
"title": "Entity Placer",
"description": "Entity placer item component. You can specifiy allowed blocks that the item is restricted to.",
"type": "object",
"additionalProperties": false,
"required": ["entity"],
"properties": {
"entity": { "type": "string", "title": "Entity", "description": "The entity to be placed in the world." },
"dispense_on": {
"type": "array",
"title": "Dispense On",
"description": "List of block descriptors that contain blocks that this item can be dispensed on. If left empty, all blocks will be allowed.",
"items": { "title": "Dispense On", "description": "UNDOCUMENTED", "$comment": "UNDOCUMENTED" }
},
"use_on": {
"type": "array",
"title": "Use On",
"description": "List of block descriptors that contain blocks that this item can be used on. If left empty, all blocks will be allowed.",
"items": { "title": "Use On", "description": "UNDOCUMENTED", "$comment": "UNDOCUMENTED" }
}
}
}

View File

@@ -0,0 +1,37 @@
{
"$id": "blockception.minecraft.behavior.1.16.200.items.minecraft:food",
"title": "Food",
"description": "When an item has a food component, it becomes edible to the player.",
"type": "object",
"additionalProperties": false,
"properties": {
"can_always_eat": {
"title": "Can Always Eat",
"description": "If true you can always eat this item (even when not hungry), defaults to false.",
"type": "boolean",
"default": false
},
"nutrition": { "title": "Nutrition", "description": "How much nutrition does this food item give the player when eaten.", "type": "number" },
"on_consume": {
"title": "On Consume",
"description": "UNDOCUMENTED",
"$comment": "UNDOCUMENTED",
"type": "object",
"additionalProperties": false,
"properties": {
"event": { "type": "string", "title": "Event", "description": "UNDOCUMENTED", "$comment": "UNDOCUMENTED" },
"target": { "type": "string", "title": "Target", "description": "UNDOCUMENTED", "$comment": "UNDOCUMENTED", "enum": ["self"] }
}
},
"saturation_modifier": {
"title": "Saturation Modifier",
"description": "Saturation Modifier is used in this formula: (nutrition * saturation_modifier * 2) when appling the saturation buff. Which happens when you eat the item.",
"type": "number"
},
"using_converts_to": {
"title": "Using Converts To",
"description": "When used, convert the *this* item to the one specified by `using_converts_to`.",
"type": "string"
}
}
}

View File

@@ -0,0 +1,9 @@
{
"$id": "blockception.minecraft.behavior.1.16.200.items.minecraft:fuel",
"title": "Fuel",
"description": "Fuel component. Allows this item to be used as fuel in a furnace to `cook` other items.",
"type": "object",
"additionalProperties": false,
"required": ["duration"],
"properties": { "duration": { "type": "number", "title": "Duration", "description": "How long in seconds will this fuel cook items for." } }
}

View File

@@ -0,0 +1,22 @@
{
"$id": "blockception.minecraft.behavior.1.16.200.items.minecraft:icon",
"title": "Icon",
"description": "The icon item componenent determines the icon to represent the item in the UI and elsewhere.",
"type": "object",
"additionalProperties": false,
"required": ["texture"],
"properties": {
"frame": {
"type": "string",
"title": "Frame",
"description": "An index or expression for which frame of the icon to display. Default resolves to 0.",
"default": 0
},
"legacy_id": { "type": "string", "title": "Texture", "description": "Legacy texture id for older item icons." },
"texture": {
"type": "string",
"title": "Texture",
"description": "The key from the resource_pack/textures/item_texture.json `texture_data` object associated with the texture file Example: blaze_powder."
}
}
}

View File

@@ -0,0 +1,15 @@
{
"$id": "blockception.minecraft.behavior.1.16.200.items.minecraft:knockback_resistance",
"title": "Knockback Resistance",
"description": "Knockback Resistance Item. Component put on items that provide knockback resistance.",
"type": "object",
"additionalProperties": false,
"required": ["protection"],
"properties": {
"protection": {
"title": "Protection",
"description": "Amount of knockback resistance provided with the total maximum protection being 1.0",
"type": "number"
}
}
}

View File

@@ -0,0 +1,20 @@
{
"$id": "blockception.minecraft.behavior.1.16.200.items.minecraft:on_use",
"title": "On Use",
"description": "The on_use item component allows you to receive an event when the item is used.",
"type": "object",
"additionalProperties": false,
"required": ["on_use"],
"properties": {
"on_use": {
"title": "On Use",
"description": "Event trigger for when the item is used.",
"type": "object",
"additionalProperties": false,
"properties": {
"event": { "type": "string", "title": "Event", "description": "UNDOCUMENTED", "$comment": "UNDOCUMENTED" },
"target": { "type": "string", "title": "Target", "description": "UNDOCUMENTED", "$comment": "UNDOCUMENTED", "enum": ["self"] }
}
}
}
}

View File

@@ -0,0 +1,20 @@
{
"$id": "blockception.minecraft.behavior.1.16.200.items.minecraft:",
"title": "On Use On",
"description": "The on_use_on item component allows you to receive an event when the item is used on a block in the world.",
"type": "object",
"additionalProperties": false,
"required": ["on_use_on"],
"properties": {
"on_use": {
"title": "On Use",
"description": "Event trigger for when the item is used.",
"type": "object",
"additionalProperties": false,
"properties": {
"event": { "type": "string", "title": "Event", "description": "UNDOCUMENTED", "$comment": "UNDOCUMENTED" },
"target": { "type": "string", "title": "Target", "description": "UNDOCUMENTED", "$comment": "UNDOCUMENTED", "enum": ["block"] }
}
}
}
}

View File

@@ -0,0 +1,16 @@
{
"$id": "blockception.minecraft.behavior.1.16.200.items.minecraft:projectile",
"title": "Projectile",
"description": "Projectile item component. projectile items shoot out, like an arrow.",
"type": "object",
"additionalProperties": false,
"required": ["projectile_entity"],
"properties": {
"minimum_critical_power": {
"type": "number",
"title": "Minimum Critical Power",
"description": "How long you must charge a projectile for it to critically hit."
},
"projectile_entity": { "title": "Projectile Entity", "description": "The entity to be fired as a projectile.", "type": "string" }
}
}

View File

@@ -0,0 +1,68 @@
{
"$id": "blockception.minecraft.behavior.1.16.200.items.minecraft:render_offsets",
"title": "Render Offsets",
"description": "Render offsets component: optional values can be given to offset the way the item is rendered.",
"type": "object",
"additionalProperties": false,
"definitions": {
"offset_spec": {
"type": "object",
"title": "Offset",
"description": "UNDOCUMENTED",
"$comment": "UNDOCUMENTED",
"additionalProperties": false,
"properties": {
"first_person": {
"title": "First Person",
"description": "UNDOCUMENTED",
"$comment": "UNDOCUMENTED",
"$ref": "#/definitions/mode"
},
"thrid_person": {
"title": "Thrid Person",
"description": "UNDOCUMENTED",
"$comment": "UNDOCUMENTED",
"$ref": "#/definitions/mode"
}
}
},
"mode": {
"type": "object",
"title": "Mode",
"description": "UNDOCUMENTED",
"$comment": "UNDOCUMENTED",
"additionalProperties": false,
"properties": {
"position": {
"title": "Position",
"description": "The position transformation",
"$ref": "#/definitions/vec3"
},
"rotation": {
"title": "Rotation",
"description": "The rotation transformation",
"$ref": "#/definitions/vec3"
},
"scale": {
"title": "Scale",
"description": "The scale transformation",
"$ref": "#/definitions/vec3"
}
}
},
"vec3": {
"type": "array",
"title": "Vector",
"description": "X Y Z",
"items": [
{ "title": "X", "description": "The X tranformation", "type": "number" },
{ "title": "Y", "description": "The Y tranformation", "type": "number" },
{ "title": "Z", "description": "The Z tranformation", "type": "number" }
]
}
},
"properties": {
"main_hand": { "title": "Main Hand", "description": "Right hand transform data.", "type": "string" },
"off_hand": { "title": "Off Hand", "description": "Left hand transform data.", "type": "string" }
}
}

View File

@@ -0,0 +1,37 @@
{
"$id": "blockception.minecraft.behavior.1.16.200.items.minecraft:repairable",
"title": "Repairable",
"description": "Repairable item component: how much damage can this item repair, what items can repair it.",
"type": "object",
"additionalProperties": false,
"properties": {
"on_repaired": { "title": "On Repaired", "description": "Event that is called when this item has been repaired.", "type": "object" },
"repair_items": {
"title": "Repair Items",
"description": "Repair item entries.",
"type": "array",
"items": {
"type": "object",
"title": "Repar Item",
"description": "UNDOCUMENTED",
"$comment": "UNDOCUMENTED",
"additionalProperties": false,
"properties": {
"items": {
"title": "Items",
"description": "UNDOCUMENTED",
"$comment": "UNDOCUMENTED",
"type": "array",
"items": { "type": "string", "title": "Item", "description": "UNDOCUMENTED", "$comment": "UNDOCUMENTED" }
},
"repair_amount": {
"title": "Repair Amount",
"description": "UNDOCUMENTED",
"$comment": "UNDOCUMENTED",
"$ref": "../../../../molang/number.json"
}
}
}
}
}
}

View File

@@ -0,0 +1,42 @@
{
"$id": "blockception.minecraft.behavior.1.16.200.items.minecraft:shooter",
"title": "Shooter",
"description": "Shooter Item Component.",
"type": "object",
"additionalProperties": false,
"properties": {
"ammunition": {
"title": "Ammunition",
"description": "Ammunition",
"type": "array",
"items": {
"type": "object",
"title": "Ammunition",
"description": "UNDOCUMENTED",
"$comment": "UNDOCUMENTED",
"additionalProperties": false,
"properties": {
"item": { "title": "Item", "description": "UNDOCUMENTED", "$comment": "UNDOCUMENTED", "type": "string" },
"use_offhand": { "title": "Use Offhand", "description": "UNDOCUMENTED", "$comment": "UNDOCUMENTED", "type": "boolean" },
"search_inventory": { "title": "Search Inventory", "description": "UNDOCUMENTED", "$comment": "UNDOCUMENTED", "type": "boolean" },
"use_in_creative": { "title": "Use In Creative", "description": "UNDOCUMENTED", "$comment": "UNDOCUMENTED", "type": "boolean" }
}
}
},
"charge_on_draw": { "title": "Charge On Draw", "description": "Charge on draw? Default is set to false.", "default": false, "type": "boolean" },
"launch_power_scale": {
"title": "Launch Power Scale",
"description": "Launch power scale. Default is set to 1.0.",
"default": 1.0,
"type": "number"
},
"max_draw_duration": { "title": "Maximum Draw Duration", "description": "Draw Duration. Default is set to 0.", "default": 0, "type": "number" },
"max_launch_power": { "title": "Maximum Launch Power", "description": "Launch power. Default is set to 1.0.", "default": 0, "type": "number" },
"scale_power_by_draw_duration": {
"title": "Scale Power By Draw Duration",
"description": "Scale power by draw duration? Default is set to false.",
"default": false,
"type": "boolean"
}
}
}

View File

@@ -0,0 +1,45 @@
{
"$id": "blockception.minecraft.behavior.1.16.200.items.minecraft:",
"title": "Throwable",
"description": "Throwable item component. Throwable items, such as a snowball.",
"type": "object",
"additionalProperties": false,
"properties": {
"do_swing_animation": {
"title": "Do Swing Animation",
"description": "Whether the item should use the swing animation when thrown. Default is set to false.",
"default": false,
"type": "boolean"
},
"launch_power_scale": {
"title": "Launch Power Scale",
"description": "The scale at which the power of the throw increases. Default is set to 1.0.",
"default": 1.0,
"type": "number"
},
"max_draw_duration": {
"title": "Maximum Draw Duration",
"description": "The maximum duration to draw a throwable item. Default is set to 0.0.",
"default": 0,
"type": "number"
},
"min_draw_duration": {
"title": "Minimum Draw Duration",
"description": "The minimum duration to draw a throwable item. Default is set to 0.0.",
"default": 0,
"type": "number"
},
"max_launch_power": {
"title": "Maximum Launch Power",
"description": "The maximum power to launch the throwable item. Default is set to 1.0.",
"default": 1.0,
"type": "number"
},
"scale_power_by_draw_duration": {
"title": "Scale Power By Draw Duration",
"description": "Whether or not the power of the throw increases with duration charged. Default is set to false.",
"default": false,
"type": "boolean"
}
}
}

View File

@@ -0,0 +1,33 @@
{
"$id": "blockception.minecraft.behavior.1.16.200.items.minecraft:weapon",
"title": "Weapon",
"description": "Weapon Item Component. Added to every weapon item such as axe, sword, trident, bow, crossbow.",
"type": "object",
"additionalProperties": false,
"properties": {
"on_hit_block": {
"title": "On Hit Block",
"description": "Trigger for letting you know when this item is used to hit a block",
"type": "object",
"additionalProperties": false,
"event": { "type": "string", "title": "Event", "description": "UNDOCUMENTED", "$comment": "UNDOCUMENTED" },
"target": { "type": "string", "title": "Target", "description": "UNDOCUMENTED", "$comment": "UNDOCUMENTED", "enum": ["self"] }
},
"on_hurt_entity": {
"title": "On Hurt Entity",
"description": "Trigger for letting you know when this item is used to hurt another mob",
"type": "object",
"additionalProperties": false,
"event": { "type": "string", "title": "Event", "description": "UNDOCUMENTED", "$comment": "UNDOCUMENTED" },
"target": { "type": "string", "title": "Target", "description": "UNDOCUMENTED", "$comment": "UNDOCUMENTED", "enum": ["self", "holder"] }
},
"on_not_hurt_entity": {
"title": "On Not Hurt Entity",
"description": "Trigger for letting you know when this item hit another actor, but didn't do damage",
"type": "object",
"additionalProperties": false,
"event": { "type": "string", "title": "Event", "description": "UNDOCUMENTED", "$comment": "UNDOCUMENTED" },
"target": { "type": "string", "title": "Target", "description": "UNDOCUMENTED", "$comment": "UNDOCUMENTED", "enum": ["self"] }
}
}
}

View File

@@ -0,0 +1,31 @@
{
"$id": "blockception.minecraft.behavior.1.16.200.items.minecraft:wearable",
"title": "Wearable",
"description": "Wearable item component.",
"type": "object",
"additionalProperties": false,
"properties": {
"dispensable": { "title": "Dispensable", "description": "UNDOCUMENTED", "$comment": "UNDOCUMENTED", "type": "boolean" },
"slot": {
"title": "Slot",
"description": "equipment_slot: slot.weapon.mainhand, slot.weapon.offhand, slot.armor.head, slot.armor.chest, slot.armor.legs, slot.armor.feet, slot.hotbar, slot.inventory, slot.enderchest, slot.saddle, slot.armor, slot.chest",
"type": "string",
"enum": [
"slot.weapon.mainhand",
"none",
"slot.weapon.offhand",
"slot.armor.head",
"slot.armor.chest",
"slot.armor.legs",
"slot.armor.feet",
"slot.hotbar",
"slot.inventory",
"slot.enderchest",
"slot.saddle",
"slot.armor",
"slot.chest",
"slot.equippable"
]
}
}
}