bergerhealer / TrainCarts

Minecarts redefined
MIT License
205 stars 63 forks source link

"Failed to perform physics" when passing through spawner sign #470

Closed 5AveLocal closed 1 year ago

5AveLocal commented 1 year ago

Info

Please provide the following information:


Bug

Description

When I ride a train of a certain length (I used 40m), on a long, diagonal piece of track (45 degree), which in the bottom lies a sign which writes [train:right] spawn 20m (train spawner generating 20 minecarts, is unpowered), the whole train will bug out and attempt to stop (you feel the speed of the train go down to 0 and then return to normal), and the console outputs [Train_Carts] Failed to perform physics on train.

Expected behaviour

Ignore the sign as the [train:right] spawn 20m was not powered at all

Actual behaviour

Stopping the train for a tick or so then the train runs at the same speed as before

Steps to reproduce

  1. Build a diagonal piece of track (e.g. 20 blocks, 45 degree)
  2. Put a [train:right] spawn 20m sign at the bottom of the track
  3. Spawn a train with certain length (probably > 1)
  4. Ride on the piece of rail
  5. Error is produced in the console

Error in console consoleerror

Basic setup 2023-03-02_13 06 22

bergerkiller commented 1 year ago

Why dont you post the actual error??

5AveLocal commented 1 year ago

Why dont you post the actual error??

I have updated the description above with the error and a basic setup that you can follow

bergerkiller commented 1 year ago

Thank you, I'll look at it after work today. If I had to guess, I think it's because of that one sign post that is rotated 45 degrees. Try placing it aligned at 90 degrees and see if that changes anything.

5AveLocal commented 1 year ago

Thank you, I'll look at it after work today. If I had to guess, I think it's because of that one sign post that is rotated 45 degrees. Try placing it aligned at 90 degrees and see if that changes anything.

Placing it at 90 degrees (N, S, E, W) does not produce the same bug but placing it at 45 degrees (NE, NW, SE, SW) produces the same bug

bergerkiller commented 1 year ago

This should fix it. https://ci.mg-dev.eu/job/TrainCarts/1330/

But do check, as I dont feel it should error at 45 degrees still. If it does I need to fix something more/else

bergerkiller commented 1 year ago

I don't think it's fixed yet, it just doesnt handle :right stuff combined with 45 degrees very well. Needs a little more work

bergerkiller commented 1 year ago

https://ci.mg-dev.eu/job/TrainCarts/1331/ this works for me ingame

5AveLocal commented 1 year ago

https://ci.mg-dev.eu/job/TrainCarts/1331/ this works for me ingame

Bug seems to be fixed for now using this build Thanks! Please make sure to include the fix in future releases though

bergerkiller commented 1 year ago

Anything built by ci.mg-dev.eu eventually ends in a release, so no worries