Traincraft

Traincraft

1M Downloads

Traincraft-4.4.0_015 unusable in current state

Tsoccerguy3 opened this issue ยท 16 comments

commented

Trains randomly fly apart while linking , using them , not using them . what else can i say .
here is a test map to play with https://onedrive.live.com/?id=77B5E138E468EDE3%212016&cid=77B5E138E468EDE3 , if anyone wants to share any success in linking , using and keeping a train together longer than a game shut down .

My kids have been testing this mod for more than a year now . I had set up a script to pull , compile and move the jar to the minecraft mods directory for testing each day . They say its not playable in its current state . If there is some set up that you are using to make the mod playable can you share with the rest of us.

commented

So just to get this right:

Under which circumstances do you experience this?

I've downloaded the map, linked the train, used it, shutdown Minecraft, came back to the world and everything was fine.

commented

1 situation , linking models of different heights , like tankers with flat cars . Experimentation will reveal some interesting behavior . some car formations don't play well with each other . Run the train , stop and park the train , then exit minecraft and start minecraft back up again to find all the cars side ways . I will try these random tests on Linux mint to see if windows 10 has any thing to do with this behavior .

Maybe the mod acts different in a client vs server situation ? these are tests that may be of interest .
If anyone wants to put up this test map on a server , to do testing that may help as well.

commented

The model height doesn't affect everything.
If anything it might be related to either linking distance based on length, or an issue with TPS lag during the linking process causing them to fly off from accumulated velocity changes.
Additionally, this issue shouldn't be new either, maybe worsened by time/fattness, but not new.

What are the jvm arguments you use for the server? That might explain some other things.

commented

Here is a newly created non-running train from random cars . Close Minecraft . Start up Minecraft again , then go into map .Then train is all crunched together.
Windows 10x64 , Java 8 b172 , running SP client with and without internal LAN.
Building from commit fac3663

newly_created
newly_created2

commented

If a train is running and you or the train leaves the line of sight , it can crunch or break apart and the cars just fly off into the distance . same can happen if you log off and on or visit the nether and come back .

running train

commented

Here is a train breaking apart and cars flying off down the track on login to map

trainbreakapart

commented

Still testing and have not found a way for linking to last

commented

Tested commit 0de4e3d . this fix did not work . when you log on you can see all the cars slowly creep together until the overlap occurs . There is a steam train on the map above that has remained together for more than a year . Its NBT data is different than the new trains .
steamtrain

Is entity position being saved and reconstructed correctly . ? IE.. x,y,z and N.E.W.S. direction of entity .
In the situation of unloaded chucks or shutting down, store data for reconstruction on world load or chunk load .

commented

That's very strange as all trains and rollingstock are constructed of the same exact NBT data.

Additionally though if they are "slowly creeping together until the overlap occurs" that means their positions are correct, otherwise they would spawn in each other, or even straight to 0.
Which confirms it's not an NBT issue at all, but instead it's likely going to be an issue with the linking calculation's method of distancing them from each other, or it's an issue with getting the distance value properly.

commented

Last year , when the kids started playing with the mod , I had cherry-picked a few commits that seemed to work , example , the steam train on the test map that has not moved . If you open that test map in NBT explorer you can compare the data , or open the map in MCedit and hover the cursor over a entity and press Alt key to see NBT data . That test map above allows to test Traincraft features very quickly in Single player .

commented

I will take some video's using Windows Gamebar feature and post to my OneDrive directory listed above .
Take a look at the video I just posted

commented

If it really is an NBT bug, then the NBT data of it would show the difference between current and that quite clearly.
So I guess send that our way and we might have a more defined answer.

commented

Solved . Traincraft is evolving very quickly .Compiling and using test builds will eventually corrupt the NBT data and Block ID's on the map you are using . Even going from one stable build to another you risk corruption , even if it's minor . The linking problems and chunk loading problems will go away once you create a new map . This is confirmed and this issue is closed .
One issue that's not related , is trains in opposite directions , passing each other on a corner can steal cars from one another and pull the train apart . 2 blocks between rails is to close and on turns it's more like only 1 block between . I put up a new test track on my OneDrive above called "Traincraft New World" .
I've done tests like traveling far away , going to the nether and coming back .Logging off and back on . As long as the trains stay away from each other , including turns and merging tracks by more than 2 blocks , trains will be fine . Bounding boxes , that might intersect each other might be finely tuned .

Thanks Eternal .

commented

It might be crash related, i know test builds are prone to instability and crashes can corrupt NBT data in any active chunks to small degrees.
I'll see into the linking thing, it shouldn't keep searching if it's already attached.....

commented

I put up a new NBT cleaned and fixed map , up on my OneDrive . It's the same map but was purged of all Mod Data . Reconstructed the rails and created 3 moving Diesel trains with random stock and 1 stationary Steam train . Saved map with Trains running . Please test new map for TC mod stability .

Note : maintain 2 blocks space between trains and 3 blocks on turns .

commented

I believe I have found the code thats been related to the linkage errors.
Apparently often times it fails to generate an internal ID for trains and stock, so instead im using the entity ID system, its not exactly foolproof like a UUID system, but should stop most of the related linking/loading issues if I'm right..
aa4d728