Draw Bridge

Draw Bridge

445k Downloads

[1.12.2] Race condition result in infinite loop (very rare, but happens)

HyCraftHD opened this issue ยท 0 comments

commented

The usage of parallelStream result in off thread execution of certain checks in the minecraft world. This should never be done in an other thread than the main minecraft thread. Fix by using stream() instead of parallelStream().

Used here:

final boolean newPoweredState = drawBridges.parallelStream().anyMatch(drawBridge -> world.isBlockPowered(drawBridge.pos)) | newPowered;

drawBridges.parallelStream().forEach(drawBridge -> drawBridge.updatePoweredState(newPoweredState));

getNeighbors(callerTileEntity.pos).parallelStream().forEach(neighbor -> {