Affects Version/s: Snapshot 13w10a, Snapshot 13w10b, Minecraft 1.5.1, Minecraft 1.5.2, Snapshot 13w18c, Snapshot 13w19a, Minecraft 1.7.2, Minecraft 1.7.4, Minecraft 14w08a, Minecraft 14w20b, Minecraft 14w29b, Minecraft 14w30c, Minecraft 14w31a, Minecraft 1.8-pre1, Minecraft 1.8, Minecraft 1.8.1-pre3, Minecraft 1.8.8, Minecraft 15w33c, Minecraft 16w04a, Minecraft 1.9, Minecraft 1.9.1 Pre-Release 1, Minecraft 1.9.1 Pre-Release 2, Minecraft 1.9.1 Pre-Release 3, Minecraft 1.9.4, Minecraft 16w21a, Minecraft 1.11.2, Minecraft 1.12 Pre-Release 6, Minecraft 1.12.1, Minecraft 1.12.2, Minecraft 17w43a, Minecraft 17w43b
Fix Version/s: Minecraft 17w50a
Please look at the screenshots first to understand
When you place three rails like I did and you place at the bifurcation a redstone torch it will not update the rail, BUT when you place it under the rail it works
The following is based on decompiled version of Minecraft 1.9 using MCP 9.24 beta. All method and class names are the names used in the decompiled version.
The reason why this happens is very likely a wrong IBlockState being returned by the method net.minecraft.world.chunk.Chunk.setBlockState(BlockPos, IBlockState). The IBlockState it returns is the one from the block that was replaced. This means the rail is receives a neighbour update with air as source which does not update the rail.
If this method is supposed to returns the old state, then methods like net.minecraft.block.BlockRedstoneTorch.onBlockAdded(World, BlockPos, IBlockState) are not working correctly because they pass themself which means at the end the new state is passed.
Besides that the method net.minecraft.block.BlockRail.onNeighborChangedInternal(World, BlockPos, IBlockState, Block) will still not work correctly. It should test if the new placed block state provides power and if the rail was powered before (it looks like this is currently not tracked).