2

Solved: Boat platforms EXTREMELY laggy

Tim_M 5/1/22 10:53 am history
602
5/4/2022 1:56 am
Hello. For my map I created moving platforms using boats. I won't go into detail but basically there are armor stands with special names and boats will move between them. To make the boats smoothly move I teleport the boats towards their target little by little every tick. However just having like 20 boats or so causes the server TPS to drop to 14! (Even when 0 players online)

Is there any way to make this less laggy?
-Thanks Tim
Posted by
Tim_M
Level 1 : New System
2

  Have something to say?

JoinSign in

6

WhoAteMyButter
05/01/2022 11:30 am
Level 43 : Master System
Teleport the boats in more of an increment.
1
Tim_M
05/01/2022 4:58 pm
Level 1 : New System
Yes but I'd like to avoid that if possible. I mean why does teleporting some boats cause so much lag anyway?
1
WhoAteMyButter
05/01/2022 6:50 pm
Level 43 : Master System
Because you're teleporting 20 boats to an armor stand every tick. Maybe your PC just isn't able to handle it. Maybe you should run a debug profiling to see if something else is causing the lag.
2
Tim_M
05/02/2022 1:42 am
Level 1 : New System
Actually the problem is most likely not my PC, since the server is running on a dedicated system. Here are specs: CPU: AMD Epyc 7351P, 4GB Memory.

Also I already checked timings and 129% of the tick are scheduled blocks (which I believe are always active repeating command blocks), and if I disable only the boat thing then it drops significantly.
1
WhoAteMyButter
05/02/2022 1:46 am
Level 43 : Master System
Use functions instead of command blocks.
3
Tim_M
05/04/2022 1:56 am
Level 1 : New System
This ended up being my solution, thanks!
Also it's incredible how much faster functions are compared to command blocks!
1

Welcome