behaviorpack.entity.permutations
Severity: warning
Entity permutations have been removed as of Minecraft Bedrock 1.21.20. Using the permutations section in an entity definition will have no effect in current versions.
This warning is triggered when the language server detects a permutations block in a behavior pack entity definition. Permutations were used to conditionally apply component groups based on Molang queries, but this feature has been superseded by entity properties in newer versions.
The following entity definition uses the deprecated permutations feature:
Replace permutations with entity properties and component groups. Entity properties provide a more explicit and performant way to manage entity variants:
{
"format_version": "1.21.20",
"minecraft:entity": {
"description": {
"identifier": "example:my_entity",
"properties": {
"example:is_baby": {
"type": "bool",
"default": false,
"client_sync": true
}
}
},
"component_groups": {
"example:baby": {
"minecraft:scale": { "value": 0.5 }
}
},
"components": {},
"events": {
"example:set_baby": {
"add": { "component_groups": ["example:baby"] },
"set_property": { "example:is_baby": true }
}
}
}
}
{ "format_version": "1.16.0", "minecraft:entity": { "description": { "identifier": "example:my_entity" }, "permutations": [ { "condition": "query.is_baby", "components": { "minecraft:scale": { "value": 0.5 } } } ], "components": {} } }