2

Solved: Boat platforms EXTREMELY laggy

Tim355's Avatar Tim3555/1/22 10:53 am history
2 emeralds 145 6
5/4/2022 1:56 am
Tim355's Avatar Tim355
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 Tim355's Avatar
Tim355
Level 1 : New System
2

Create an account or sign in to comment.

6

1
05/01/2022 11:30 am
Level 33 : Artisan Engineer
WhoAteMyButter
WhoAteMyButter's Avatar
Teleport the boats in more of an increment.
1
05/01/2022 4:58 pm
Level 1 : New System
Tim355
Tim355's Avatar
Yes but I'd like to avoid that if possible. I mean why does teleporting some boats cause so much lag anyway?
2
05/01/2022 6:50 pm
Level 33 : Artisan Engineer
WhoAteMyButter
WhoAteMyButter's Avatar
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.
1
05/02/2022 1:42 am
Level 1 : New System
Tim355
Tim355's Avatar
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.
3
05/02/2022 1:46 am
Level 33 : Artisan Engineer
WhoAteMyButter
WhoAteMyButter's Avatar
Use functions instead of command blocks.
1
05/04/2022 1:56 am
Level 1 : New System
Tim355
Tim355's Avatar
This ended up being my solution, thanks!
Also it's incredible how much faster functions are compared to command blocks!
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome