The following code snippet is provided as an example in the block.html documentation page of the Vanilla Behavior Pack 1.16.200 example.
"minecraft:block": {
"description": {
"identifier": "test:on_interact_change_state_block",
"properties": {
"minecraft:direction": {
}
}
},
"components": {
"minecraft:on_interact": {
"event": "test_event"
}
},
"events": {
"test_event": {
"set_block_property": {
"minecraft:direction": "1"
}
}
}
}
Attempting to implement this into a custom block results in the following error:
16:13:24[Blocks][inform]-block_definitions | C:/Users/user/AppData/Local/Packages/Microsoft.MinecraftUWP_8wekyb3d8bbwe/LocalState/games/com.mojang/development_behavior_packs/ppc_behavior | blocks/personal_pc.json | ppc:personal_pc | components | minecraft:on_player_placing | {
"event" : "ppc:pc_set_direction"
}
16:13:24[Blocks][error]-block_definitions | C:/Users/user/AppData/Local/Packages/Microsoft.MinecraftUWP_8wekyb3d8bbwe/LocalState/games/com.mojang/development_behavior_packs/ppc_behavior | blocks/personal_pc.json | ppc:personal_pc | components | minecraft:on_player_placing | child 'minecraft:on_player_placing' not valid here.
16:13:25[Recipes][error]-recipes/personal_pc.json | ppc:personal_pc | The Item: ppc:personal_pc is missing, cant make the recipe
16:13:25[Recipes][error]-recipes/personal_pc.json | ppc:personal_pc | Recipe result malformed
Removing the "minecraft:on_player_placing" section from the definition results in the following error:
16:19:28[Blocks][inform]-block_definitions | C:/Users/user/AppData/Local/Packages/Microsoft.MinecraftUWP_8wekyb3d8bbwe/LocalState/games/com.mojang/development_behavior_packs/ppc_behavior | blocks/personal_pc.json | ppc:personal_pc | events | ppc:pc_set_direction | set_block_property | {
"minecraft:direction" : "1"
}
16:19:28[Blocks][error]-block_definitions | C:/Users/user/AppData/Local/Packages/Microsoft.MinecraftUWP_8wekyb3d8bbwe/LocalState/games/com.mojang/development_behavior_packs/ppc_behavior | blocks/personal_pc.json | ppc:personal_pc | events | ppc:pc_set_direction | set_block_property | child 'set_block_property' not valid here.
"blocks/personal_pc.json" attached.
Attachments
Comments 3
Cleaning up old tickets: This ticket had been set to 'Awaiting Response', but has not received a response from the reporter (~3 months+) so is being closed as Incomplete. If you feel this is still a valid issue then please comment, or create a new ticket following the Issue Guidelines which includes steps to reproduce the problem.
Quick Links:
📓 Issue Guidelines – 💬 Mojang Support – 📧 Suggestions – 📖 Minecraft Wiki
Is this still an issue in the latest version (1.17.10)? If so, can you please add it to the affected versions (or mention it if you are not the reporter).
This ticket will automatically reopen when you reply.