Files
minecraft-bedrock-json-schemas/source/behavior/features/features/minecraft.single_block_feature.json
Xterionix c9449c75d6 Updated for 1.21.70 along with other improvements (#337)
* Update vscode-settings.json

* - Updated map color

* - Added replaceable block component

* - Effect durations can be set to infinite now

* - Added support for entity sound variants

* - Fix description for renders_when_invisible entity component

* - Added is_collidable component

* - Updated entity_sensor

* - Added body_rotation_axis_aligned

* - Updated projectile > on_hit

* - Set min and max for collision_box

* - Added locator field to sounds in animation controllers and animations

* - Added new event response

* - Removed peak_factor from mountain_parameters component

* - Added isotropic field to material_instances

* - Added tint field to material_instances

* - Added input_air_controlled entity component

* - Added use_beta_features property to entity.json

* - Added missing match_tool property

* - Added use_home_position_restriction to float_wander goal

* - Added deferred client biome components

* - Added dry_foliage_color client biome component

* - Added destruction_particles

* - Marked biome tinting as experimental

* - Fix property_inheritance under breedable

* - Fix inconsistency with scatter feature

* - Update rideable description

* - Allowed event.add/remove to be strings

* - Added missing property in move_around_target behavior

* - Made features accept block references

* - Allowed repairable to use item descriptors

* - Fix typo
2025-03-03 08:44:05 +01:00

121 lines
6.7 KiB
JSON

{
"title": "Single Block Feature",
"description": "`minecraft:single_block_feature` places a single block in the world. The `may_place_on` and `may_replace` fields are allowlists which specify where the block can be placed. If these fields are omitted, the block can be placed anywhere. The block's internal survivability and placement rules can optionally be enforced with the `enforce_survivability_rules` and `enforce_placement_rules` fields. These rules are specified per-block and are typically designed to produce high quality gameplay or natural behavior. However, enabling this enforcement may make it harder to debug placement failures.\n Succeeds if: The block is successfully placed in the world.\n Fails if: The block fails to be placed.",
"type": "object",
"additionalProperties": false,
"required": [ "description", "places_block", "enforce_placement_rules", "enforce_survivability_rules" ],
"definitions": {
"block_side": {
"oneOf": [
{ "title": "Block", "description": "Reference to the block it may attach to.", "type": "string", "$ref": "../../../general/block/reference.json" },
{ "type": "array", "items": { "title": "Block", "description": "Reference to the block it may attach to.", "type": "string", "$ref": "../../../general/block/reference.json" } }
]
}
},
"properties": {
"description": {
"$ref": "../types/description.json"
},
"places_block": {
"anyOf": [
{
"title": "Places Block",
"description": "Reference to the block to be placed.",
"type": "string",
"$ref": "../../../general/block/reference.json"
},
{
"title": "Places Block",
"description": " Collection of weighted block references that will be placed.",
"type": "array",
"minItems": 1,
"items": {
"title": "Block",
"description": "Reference to the block to be placed.",
"type": "array",
"items": [
{ "title": "Block", "description": "Reference to the block to be placed.", "$ref": "../../../general/block/reference.json" },
{
"title": "Weight",
"description": "Random weight of this block. A higher number will increase the probability of this block to be picked during placement.",
"type": "number"
}
]
}
}
]
},
"enforce_placement_rules": {
"title": "Enforce Placement Rules",
"description": "If true, enforce the block's canPlace check.",
"type": "boolean"
},
"enforce_survivability_rules": {
"title": "Enforce Survivability Rules",
"description": "If true, enforce the block's canSurvive check.",
"type": "boolean"
},
"randomize_rotation": {
"title": "Randomize Rotation",
"description": "If true, randomizes the block's cardinal orientation.",
"type": "boolean"
},
"may_attach_to": {
"title": "May Attach To",
"description": "The list of valid block and block faces the given block may attach to when being placed.",
"type": "object",
"additionalProperties": false,
"properties": {
"min_sides_must_attach": {
"title": "Minimum Sides Must Attach",
"description": "Minimum number of sides that must be attached when being placed.",
"minimum": 1,
"maximum": 4
},
"auto_rotate": {
"title": "Auto Rotate",
"description": "Automatically rotate the block to attach sensibly.",
"type": "boolean"
},
"top": { "title": "Top", "description": "UNDOCUMENTED.", "$comment": "UNDOCUMENTED", "$ref": "#/definitions/block_side" },
"bottom": { "title": "Bottom", "description": "UNDOCUMENTED.", "$comment": "UNDOCUMENTED", "$ref": "#/definitions/block_side" },
"north": { "title": "North", "description": "UNDOCUMENTED.", "$comment": "UNDOCUMENTED", "$ref": "#/definitions/block_side" },
"south": { "title": "South", "description": "UNDOCUMENTED.", "$comment": "UNDOCUMENTED", "$ref": "#/definitions/block_side" },
"east": { "title": "East", "description": "UNDOCUMENTED.", "$comment": "UNDOCUMENTED", "$ref": "#/definitions/block_side" },
"west": { "title": "West", "description": "UNDOCUMENTED.", "$comment": "UNDOCUMENTED", "$ref": "#/definitions/block_side" },
"all": { "title": "All", "description": "UNDOCUMENTED.", "$comment": "UNDOCUMENTED", "$ref": "#/definitions/block_side" },
"sides": { "title": "Sides", "description": "UNDOCUMENTED.", "$comment": "UNDOCUMENTED", "$ref": "#/definitions/block_side" },
"diagonal": { "title": "Diagonal", "description": "UNDOCUMENTED.", "$comment": "UNDOCUMENTED", "$ref": "#/definitions/block_side" }
}
},
"may_not_attach_to": {
"title": "May Not Attach To",
"description": "Denylist which specifies where the block can't be placed.",
"type": "object",
"additionalProperties": false,
"properties": {
"top": { "title": "Top", "description": "UNDOCUMENTED.", "$comment": "UNDOCUMENTED", "$ref": "#/definitions/block_side" },
"bottom": { "title": "Bottom", "description": "UNDOCUMENTED.", "$comment": "UNDOCUMENTED", "$ref": "#/definitions/block_side" },
"north": { "title": "North", "description": "UNDOCUMENTED.", "$comment": "UNDOCUMENTED", "$ref": "#/definitions/block_side" },
"south": { "title": "South", "description": "UNDOCUMENTED.", "$comment": "UNDOCUMENTED", "$ref": "#/definitions/block_side" },
"east": { "title": "East", "description": "UNDOCUMENTED.", "$comment": "UNDOCUMENTED", "$ref": "#/definitions/block_side" },
"west": { "title": "West", "description": "UNDOCUMENTED.", "$comment": "UNDOCUMENTED", "$ref": "#/definitions/block_side" },
"all": { "title": "All", "description": "UNDOCUMENTED.", "$comment": "UNDOCUMENTED", "$ref": "#/definitions/block_side" },
"sides": { "title": "Sides", "description": "UNDOCUMENTED.", "$comment": "UNDOCUMENTED", "$ref": "#/definitions/block_side" },
"diagonal": { "title": "Diagonal", "description": "UNDOCUMENTED.", "$comment": "UNDOCUMENTED", "$ref": "#/definitions/block_side" }
}
},
"may_replace": {
"title": "May Replace",
"description": "A list of blocks that may be replaced during placement. Omit this field to allow any block to be replaced.",
"type": "array",
"items": {
"title": "Block",
"description": "A block that may be replaced during placement. Omit this field to allow any block to be replaced.",
"type": "string",
"$ref": "../../../general/block/reference.json"
}
}
}
}