Carpet

Carpet

2M Downloads

WANTED: Redstone Repeater/Comparator priority bug fix

Minepig opened this issue ยท 0 comments

commented

In Minecraft 1.7.10 and below, the tile tick priorities of Repeater are following:

  • [-3] if pointing into a Repeater/Comparator with a different direction;
  • [-2] if lit;
  • [-1] for the rests.

And the tile tick priorities of Comparator are following:

  • [-1] if pointing into a Repeater/Comparator with a different direction;
  • [0] for the rests.

The priority of a Repeater/Comparator is increased when it is pointing into another Repeater/Comparator with a different direction. I personally call it "Priority Upgrade".

But after updating to Minecraft 1.8, the requirement of the "Priority Upgrade" is changed to:

  • if pointing into a Repeater/Comparator, which does not have a OPPOSITE direction.

This cause a problem: when a chain of 1-tick repeater is connected to a 4gt clock (2gt on, 2gt off), the last repeater stays powered.

This issue still exists in 1.15 snapshots, and is reported to Mojang multiple times. Maybe Mojang just don't consider it is a bug.
(Methodzz even talked about this in "Dissecting Minecraft", as a feature)
Bug report link: https://bugs.mojang.com/browse/MC-54711

Some times this is quite annoying. So it will be good if this issue is fixed in carpet mod. With a separated setting, just like other bug fix features.

This issue seems to relate to following code in RedstoneDiodeBlock class (base class of Repeater/Comparator):
public boolean isFacingTowardsRepeater(IBlockReader worldIn, BlockPos pos, BlockState state) {
Direction direction = ((Direction)state.get(HORIZONTAL_FACING)).getOpposite();
BlockState blockstate = worldIn.getBlockState(pos.offset(direction));
return (isDiode(blockstate) && blockstate.get(HORIZONTAL_FACING) != direction);
}
(code from 1.14.4 forge)
If this method returns true, the Repeater/Comparator will perform a "Priority Upgrade"