mojira.dev
MC-295866

The /setblock and /fill commands no longer update redstone power in some situations

Expected Behavior:

In versions before 1.21.5, replacing a redstone torch using /fill or /setblock would update the power to the block above it so that it would no longer be powered. Flipping between /setblock ~ ~ ~ redstone_torch and /setblock ~ ~ ~ air should update the power of the block above the torch.

Observed Behavior:

In attachment 1, I show a normal setup with three redstone torches, all sending power to redstone lamps. This behavior is normal, and does not change depending on if you place the torches manually or with commands.

In attachment 2, I show the result of replacing the redstone torches with:

/fill -4 56 -7 0 56 -7 minecraft:air replace

As you can see, the sandstone block which was above the third torch remains powered, which would only be expected if I had used the new “strict” handling. The same happens when using /setblock.

This isn’t limited to just replacing the torches with air; in attachment 3, I replaced the torches with stone to the same effect.

The block remains powered after manually updating it as well, as demonstrated in attachment 4, and continues to send power to adjacent blocks, even though it has no power source of its own. The only way I could get the block’s redstone power to update was by either destroying the block, or manually powering and then un-powering it. Using the “destroy” handling while using /fill or /setblock to break the redstone torch will also work to update the block’s power, though this leaves no option that breaks the torch and updates the block to be unpowered without a redstone torch item entity being dropped.

I believe this is accidental behavior as a result of some sort of oversight during the addition of the “strict” handling. It turns doing /setblock ~ ~ ~ redstone_torch and /setblock ~ ~ ~ air into a sort of latch instead of a switch.

Linked issues

Attachments

Comments 1

The same happens in situations where I have a pressure plate or button activate a mechanism in an adventure map, but I want the pressure plate or button get deleted upon activation with a setblock command. The pressure plate gets powered, which deletes itself, and the block it was on remains powered. This is the first update where this type of simple mechanism is semi-broken and much harder to automatically reset

LordDrewpicus

(Unassigned)

1399113

Confirmed

Expansion A

Important

Commands

1.21.5

25w15a

Retrieved