2
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
Is there any way to make this less laggy?
-Thanks Tim
Create an account or sign in to comment.
6
Teleport the boats in more of an increment.
Yes but I'd like to avoid that if possible. I mean why does teleporting some boats cause so much lag anyway?
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.
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.
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.
Use functions instead of command blocks.
This ended up being my solution, thanks!
Also it's incredible how much faster functions are compared to command blocks!
Also it's incredible how much faster functions are compared to command blocks!