RedstoneWireBlock has the private boolean attribute "wiresGivePower". Blocks contains a static reference to RedstoneWireBlock. This means that multiple dimensions running on different threads share the same "wiresGivePower" boolean which can cause the code to enter an infinite loop.
Using thread local variables is an ugly hack but the goal of this mod isn't to clean up Mojang's code. It is to make as few modifications as necessary to maintain parity with vanilla.
RedstoneWireBlock has the private boolean attribute "wiresGivePower". Blocks contains a static reference to RedstoneWireBlock. This means that multiple dimensions running on different threads share the same "wiresGivePower" boolean which can cause the code to enter an infinite loop.
Using thread local variables is an ugly hack but the goal of this mod isn't to clean up Mojang's code. It is to make as few modifications as necessary to maintain parity with vanilla.