Mojira Archive
MC-9194

A Comparator can lock a Repeater, but the Repeater doesn't look like it is locked

Update

As of the 1.13 snapshots, the repeater will appear locked until the other side is updated. See the newly attached screenshot – the repeater appeared locked until the packed ice was placed. Removing the ice leaves the repeater visually unlocked.

The bug

When powering a repeater from the side by a comparator it can lock the repeater (similar to repeater locking with repeaters). But it doesn't show the texture of a locked repeater.

The problem is actually with the comparator, not the repeater. Until you toggle the comparator, it won't recognize that it is supposed to be locking the repeater. If you place a comparator, then toggle it, then place the repeater, it will already appear locked. The comparator also has to be powered for the toggle to work.

Code analysis

Based on 1.11.2 decompiled using MCP 9.35 rc1

The problem is that the power level of a comparator is determined by the comparator tile entity client side as well, but this tile entity is not updated unless the player right clicks the comparator.
This can cause the opposite of the bug described here as well when the tile entity was updated and stores client side a power level, but the power source was removed afterwards. Replacing it then with the powered=true state (without actually powering it) causes it to display the repeater as locked while it is not actually locked server-side.