Problems with rotations of trains
Allnorm opened this issue ยท 8 comments
The bug is shown even on clean assemblies, unpredictable and I can not use the mod because of this. Locomotive for some reason is turned back on corners. Video attached: https://youtu.be/Xh2dh74IQPY Railcraft 9.12.2.0 and 9.12.2.1, but the bug was noticed long ago.
@Lilithvia You mean on 1.12.2?
Also I will move #657 here.
From my observation in 1.7.10, this happens quiet often with trains being loaded only with anchor carts and no players around, which makes remote logistics with RC pretty difficult.
It didn't happen in 1.4.7 version of RC.
For background purposes, Minecraft does not track orientation of minecarts correctly. You can see this by watching Chest Carts go around loops, they will reverse their orientation every other corner. To get around this Railcraft tries to track when a "reversal" happens using some fancy math that inspects the size of the orientation deviation every tick and un-reverses the cart when a reversal is detected. For unknown reasons its not perfect and we don't have direct access to the code that manages orientation.
At one point I spent a fair bit of time on this problem, even going to so far as to inspect the source of other cart mods to see how they handled the problem. I don't know why it doesn't work correctly sometimes and I don't know how to fix it either.
Additionally, the client and server track orientation separately and are only loosely coupled.