Files
minecraft-bedrock-json-schemas/source/behavior/blocks/format/minecraft.block.json

169 lines
6.9 KiB
JSON
Raw Normal View History

2022-06-07 21:37:57 +02:00
{
"$schema": "http://json-schema.org/draft-07/schema",
2022-06-07 21:39:02 +02:00
"$id": "blockception.minecraft.behavior.blocks",
2022-06-07 21:37:57 +02:00
"title": "Block Definitions",
2022-07-22 19:41:04 +02:00
"description": "A custom block definition.",
2022-06-07 21:37:57 +02:00
"type": "object",
"additionalProperties": false,
"required": ["description", "components"],
"definitions": {
"components_ref": {
"type": "object",
"title": "Component",
2022-07-22 19:41:04 +02:00
"description": "UNDOCUMENTED.",
2022-06-07 21:37:57 +02:00
"$comment": "UNDOCUMENTED",
"additionalProperties": false,
"properties": {
//Components
"minecraft:collision_box": { "$ref": "./components/collision_box.json" },
"minecraft:crafting_table": { "$ref": "./components/crafting_table.json" },
"minecraft:destructible_by_explosion": { "$ref": "./components/destructible_by_explosion.json" },
"minecraft:destructible_by_mining": { "$ref": "./components/destructible_by_mining.json" },
2022-06-07 21:37:57 +02:00
"minecraft:display_name": { "$ref": "./components/display_name.json" },
"minecraft:flammable": { "$ref": "./components/flammable.json" },
"minecraft:friction": { "$ref": "./components/friction.json" },
"minecraft:geometry": { "$ref": "./components/geometry.json" },
"minecraft:light_dampening": { "$ref": "./components/light_dampening.json" },
"minecraft:light_emission": { "$ref": "./components/light_emission.json" },
2022-06-07 21:37:57 +02:00
"minecraft:loot": { "$ref": "./components/loot.json" },
"minecraft:map_color": { "$ref": "./components/map_color.json" },
"minecraft:material_instances": { "$ref": "./components/material_instances.json" },
"minecraft:placement_filter": { "$ref": "./components/placement_filter.json" },
"minecraft:selection_box": { "$ref": "./components/selection_box.json" },
"minecraft:transformation": { "$ref": "./components/transformation.json" },
//Triggers
"minecraft:on_fall_on": { "$ref": "./triggers/on_fall_on.json" },
"minecraft:on_interact": { "$ref": "./triggers/on_interact.json" },
"minecraft:on_placed": { "$ref": "./triggers/on_placed.json" },
"minecraft:on_player_destroyed": { "$ref": "./triggers/on_player_destroyed.json" },
"minecraft:on_player_placing": { "$ref": "./triggers/on_player_placing.json" },
"minecraft:on_step_off": { "$ref": "./triggers/on_step_off.json" },
"minecraft:on_step_on": { "$ref": "./triggers/on_step_on.json" },
"minecraft:queued_ticking": { "$ref": "./triggers/queued_ticking.json" },
"minecraft:random_ticking": { "$ref": "./triggers/random_ticking.json" }
2022-06-07 21:37:57 +02:00
}
},
"traits_ref": {
"type": "object",
"title": "Trait",
"description": "A shortcut for creators to use Vanilla block states without needing to define and manage a series of events or triggers on custom blocks",
"additionalProperties": false,
"properties": {
"minecraft:placement_position": { "$ref": "./traits/placement_position.json" },
"minecraft:placement_direction": { "$ref": "./traits/placement_direction.json" }
}
2022-06-07 21:37:57 +02:00
}
},
"properties": {
"description": {
"title": "Block Description",
2022-07-22 19:41:04 +02:00
"description": "The description for this block.",
2022-06-07 21:37:57 +02:00
"type": "object",
"additionalProperties": false,
"required": ["identifier"],
"properties": {
2022-10-10 19:34:01 +02:00
"menu_category": {
"title": "Menu Category",
"$comment": "UNDOCUMENTED",
2022-12-01 09:27:52 +00:00
"description": "The category this block will be placed in the menu.",
2022-10-10 19:34:01 +02:00
"type": "object",
"default": "misc",
"additionalProperties": false,
"required": ["category"],
"properties": {
"category": {
"$ref": "../../../general/vanilla/creative_category.json"
2022-10-10 19:34:01 +02:00
},
"group": {
"$ref": "../../../general/vanilla/item_group.json"
2022-11-02 08:16:09 +01:00
},
"is_hidden_in_commands": {
"title": "Is Hidden In Commands",
"$comment": "UNDOCUMENTED",
"description": "If true, this item will not be shown in the /give command autocomplete list.",
"type": "boolean"
2022-10-10 19:34:01 +02:00
}
}
},
2022-06-07 21:37:57 +02:00
"identifier": {
"type": "string",
"description": "The identifier for this block. The name must include a namespace and must not use the Minecraft namespace unless overriding a Vanilla block.",
"title": "Identifier",
"$ref": "../../../general/block/identifier.json"
},
"is_experimental": {
"type": "boolean",
"default": false,
"description": "If this block is experimental, it will only be registered if the world is marked as experimantal.",
"title": "Is Experimental"
},
"register_to_creative_menu": {
"type": "boolean",
"default": false,
"description": "Whether or not to register this block to the creative inventory menu.",
"title": "Register To Creative Menu"
},
2023-11-09 19:05:40 +01:00
"states": {
"title": "States",
"description": "[HOLIDAY EXPERIMENTAL] UNDOCUMENTED.",
2022-06-07 21:37:57 +02:00
"$comment": "UNDOCUMENTED",
"propertyNames": { "pattern": "^([a-zA-Z0-9_]+:[a-zA-Z0-9_\\-]+)$" },
"type": "object",
"additionalProperties": {
2023-11-09 19:05:40 +01:00
"title": "State",
"description": "A block property. The name should be specified as `<namespace>:<block property>`",
2022-06-07 21:37:57 +02:00
"oneOf": [
{
"type": "array",
"items": {
"title": "Property Value",
2022-07-22 19:41:04 +02:00
"description": "The value of this property.",
2022-06-07 21:37:57 +02:00
"anyOf": [{ "type": "boolean" }, { "type": "number" }, { "type": "integer" }, { "type": "string" }]
}
},
{ "type": "object" }
]
}
},
"traits": {
"type": "object",
"title": "Trait",
"$ref": "#/definitions/traits_ref"
2022-06-07 21:37:57 +02:00
}
}
},
"events": { "$ref": "./events.json" },
"components": {
"type": "object",
"title": "Component",
"$ref": "#/definitions/components_ref"
},
"permutations": {
"type": "array",
"title": "Permutations",
2022-07-22 19:41:04 +02:00
"description": "UNDOCUMENTED.",
2022-06-07 21:37:57 +02:00
"$comment": "UNDOCUMENTED",
"items": {
"title": "Permutation",
2022-07-22 19:41:04 +02:00
"description": "UNDOCUMENTED.",
2022-06-07 21:37:57 +02:00
"$comment": "UNDOCUMENTED",
"type": "object",
"additionalProperties": false,
"properties": {
"condition": {
"title": "Condition",
"description": "A Molang expression that evaluates to true or false to determine if this permutation should be used. For permutation conditions you are limited to using one Molang query: \"query.block_property()\"",
2022-06-07 21:37:57 +02:00
"$ref": "../../../molang/string.json"
},
"components": {
"type": "object",
"title": "Component",
"$ref": "#/definitions/components_ref"
}
}
}
}
}
}