The minecraft:redstone_producer component can be used across permutations to deactivate and activate emission. This parallels Vanilla blocks such as buttons, levers, and pressure plates. Unfortunately, when the component is not explicitly defined, changes to permutations may lock emission to be active until the world/chunks are reloaded.
Workaround possible
It’s possible to avoid this bug by explicitly declaring the component with 0 power emission:
"minecraft:redstone_producer": {"power": 0, "strongly_powered_face": "down"}
Note that — as of this report — strongly_powered_face is required due to MCPE-234635.
Demonstration
The following video shows this bug in action. A single block is shown with 2 permutations; the obsidian-textured permutation has redstone emission, while the glowstone-textured permutation has no explicitly defined emission.
Observe that the adjacent Vanilla redstone lamps are still powered even after switching back to the permutation that should have no emission. The situation is corrected on world reload.
The following shows an alternative block with explicitly defined zero emission on the obsidian-textured permutation:
The bug is not present in this situation. This specific circumstance was likely fixed with Preview 1.21.130.24/Release 1.21.130 (MCPE-229570).
Reproduction
This bug can be reproduced with the following block definition:
{
"format_version": "1.26.0",
"minecraft:block": {
"description": {
"identifier": "bug_redstone:custom_block_with_implicit_zero_emission",
"states": {
"bug_redstone:activated": [false, true]
}
},
"components": {
"minecraft:geometry": "minecraft:geometry.full_block",
"minecraft:material_instances": {
"*": {"texture": "obsidian"}
}
},
"permutations": [
{
"condition": "q.block_state('bug_redstone:activated')",
"components": {
"minecraft:material_instances": {
"*": {"texture": "glowstone"}
},
"minecraft:redstone_producer": {
"power": 15,
"strongly_powered_face": "down"
}
}
}
]
}
}This example is taken from the behavior pack in the following world attached for convenience:
This world can be opened (in Minecraft Preview) for inspection or unzipped to access the code associated with such. Also included is a demonstration of the correct behavior (shown above) involving explicit redeclaration of the minecraft:redstone_producer component.
Linked issues
relates to 1
Attachments
Comments 0
No comments.