Alternate Current

Alternate Current is a Fabric mod for 1.14, 1.15, 1.16, 1.17 version along with 1.8.9 via Legacy Fabric.

The mod expands on Redstone dust and block updates.

Short Answer:

An efficient and non-locational redstone dust implementation

Alternate Current is an efficient and non-locational redstone dust implementation. It can reduce mspt up to 20x compared to vanilla, and the block update order is non-locational and largely non-directional, making it much more intuitive to work with!

DISCLAIMER

As this mod is still in beta, more testing needs to be done to improve performance and vanilla parity. Features

Alternate Current is an efficient and non-locational redstone dust implementation. With the mod you will see up to 30 times fewer block updates caused by redstone dust, and working with redstone dust will be less cumbersome, due to locationality no longer being an issue.

What Does It Actually Do?

In vanilla, redstone dust updates recursively. When a wire block is updated, it updates its power level and then updates the blocks around it. This is especially problematic with grids of redstone dust. It causes wire blocks to update their power level multiple times. This has serious performance detriments as these wire blocks will check for power multiple times and also emit countless unnecessary block updates. Furthermore, wire blocks emit block updates in an order that is dependent on the location of the wire. This makes redstone dust tedious to work with as it creates a chance your contraption does not work in other locations, and it is hard to figure out whether a contraption is locational.

This mod's implementation of redstone dust aims to fix all of these issues. It manages to do the following:

Each wire block checks for power only once.

Each wire block updates its power level only once.

Each wire block emits block updates only once.

Block updates are emitted in a predictable (though directional) order.

It achieves this by considering the power levels of the whole grid of wire blocks at once, rather than each wire in isolation. When a wire block receives a block update, all the wires it is connected to are collected into a "network". A breadth first search is done through this network to find wires that are receiving power from outside the network (power from non-wire components, mostly). The power levels of the grid are then updated in rings radiating outward from these wires. Block updates are emitted after all the power levels have been adjusted, in reverse order of the power level changes.