Simple Parts Pack for Flan's Mod

Simple Parts Pack for Flan's Mod

903k Downloads

Teleportation of vehicles often hangs the server or glitches the client / Bad "stupid distance in a frame" handling

catalyticenzyme opened this issue ยท 0 comments

commented

Describe the bug
When you try to teleport an occupied, running vehicle by hundreds or thousands of blocks, the server cancels it and sometimes erases your vehicle. The server also hangs quite badly, and even after it recovers your client may be glitched out.

This is a compatibility issue with any mods that induce teleportation in normal gameplay (I discovered this bug while trying to drive a vehicle through a Stargate).

To Reproduce
Steps to reproduce the behaviour with only Flan's Mod, but requiring commands:

  1. Get a vehicle (I've tried it with motorcycles and jeeps).
  2. Get in the vehicle and start it up so it's moving a little bit and making engine noises.
  3. Try to /tp @e[r=1] ~-56000 256 ~.
  4. Bug Your client-side vision will become as if you are in unloaded chunks, before you snap back to where your vehicle was and get kicked out of it (the vehicle may or may not disappear, depending on its type). The console will be spammed with Seat was made to move a stupid distance in a frame, cancelling over and over again every frame forever until you kill the vehicle.
  5. Kill the vehicle and replace it.
  6. Try to (assuming you're not near this location already; if you are, go back to world spawn) /tp @e[r=1] 29000000 256 29000000.
  7. Bug The console will spam several times Seat was made to move a stupid distance in a frame, cancelling before the server hangs for an amount of time I have never seen through to the end (at least several minutes).

Steps to reproduce a variant of the behavior using AUNIS's Stargates (in which I am sure the bug does not live, as they transport minecarts and boats just fine):

  1. Build or find two Stargates that are very far apart (tens of thousands or more blocks); I recommend using the Mysterious Page to get a random Stargate.
  2. Get a vehicle (I've tried it with motorcycles and jeeps).
  3. Dial out from one of your Stargates to the other.
  4. Try to drive the vehicle into the event horizon.
  5. Bug: Your client will glitch out and you will appear to fall into the void. The singleplayer server console will complain about Player was made to move stupid distance in a frame, cancelling, followed many seconds later by Seat was made to move stupid distance in a frame, cancelling and Can't keep up! Did the system time change, or is the server overloaded? skipping several hundred ticks.
  6. Exit and rejoin.
  7. Bug: You will have made it through to the destination Stargate, but your vehicle will have entirely disappeared, nowhere to be found at either Stargate.

Expected behaviour
When /tping my vehicle, I expected it to simply teleport to the destination and I could continue driving it.
When driving my vehicle into a Stargate, I expected to be able to drive it out the other side, like I can with a boat.

Versions (please complete the following information)

  • Forge: 14.23.5.2855
  • Flan's Mod: 5.10.0