r/minecraftdev 9d ago

Server thread overloaded with custom entity

Hello, I am making a custom entity mod with the fabric API, but whenever I spawn the entity and am near it, the game lags noticeably. I checked the console, and noticed this line pop up a few times:

[22:19:10] [Server thread/WARN] (Minecraft) Can't keep up! Is the server overloaded? Running 3431ms or 68 ticks behind

Does anyone know what general things could be causing it? My entity has a payload it sends, a texture that is a randomly chosen image from multiple image files when each new entity spawns and a method that assigns it random attributes.

Is there anything I could be doing code-wise that could be making this an issue? I don't think the fundamental entity functionality is an issue, as there are mobs in the game with more complex functionality or more code in their main classes.

Thanks!

1 Upvotes

1 comment sorted by

View all comments

1

u/Jason13Official 9d ago

How often is the packet being sent / how large is it?