4

I have been playing on a single world for the last 3 years and the world has became more and more laggier as I build farms, redstone machines, structures around spawn. Now I can't even get 40 FPS in that world but the other worlds that have less structures are fine (I can get 100-120 FPS). How can I find the entities or blocks that cause most lag so I can remove them?

  • This question is for StackOverflow. Off-topic. – improbable Mar 29 at 16:25
  • 4
    I don't think so. It is not a technical question. I am just asking is there an easy way to find out what mobs or entities are causing the issue. Maybe there is an ingame debug feature which I can use. – Tamer Y. Mar 29 at 18:07
  • 2
    SO is for programming questions. This would never fit in there. – dly Mar 30 at 8:17
1

First off, diagnosing the lag. There are two main factors, client-side rendering - framerate drop, frames per second, "FPS", marked in yellow on the screenshot below (debug screen, press F3), and server-side lag (even in single-player, your game just launches a local server) - time it takes to calculate a game tick, milliseconds per tick, MSPT, marked in red. Additionally, primary source of both forms of lag is excessive number of entities, the entry 'E:' marked in magenta, displaying entities within view range of the player, and a total present in the loaded chunks.

enter image description here

By turning around and observing the first number of the E entry you can see when an area with an excess of entities enters your field of view. Move to a different place, repeat the procedure and you can triangulate the location with too many entities. It may be an animal farm, it may be a water stream out of one of your farms, with a fault where items accumulate, it may be underperforming collection system, or it may be a room lined with hundreds of item frames, a mob farm disabled by turning its kill system instead of lighting or otherwise spawn-proofing the spawn floors, or a massive kelp farm in operation, producing thousands of kelp pieces by breaking the kelp plants.

Other than that, lots of transparent blocks - including chests, mixed layers of glass (as opposed to solid chunk of glass), a big block of leaves, slime blocks and similar can cause FPS drop. Again, you can triangulate the culprit by turning and observing what enters your view when your framerate drops. Additionally, lots of particles can cause framerate drop - a large number of campfires, bubble columns, or other sources of particles can cause that.

Reducing server lag (mspt) is trickier, as besides entities there are other sources of this sort of lag. The primary culprits beyond accumulation of entities are a lot of fast-pulsing redstone dust, and minecarts with hoppers, although a large number of regular hoppers, chests, frequently toggled light sources that effectively change lighting of their surroundings (e.g. redstone torches in otherwise unlit contraptions) and many other problems a bit too numerous and situational to list.

| improve this answer | |
1

The chunks around spawn are always loaded which means that any redstone machines you've built in those chunks are always running.

My suggestion is to create a copy of the world, go into creative and remove all the redstone machines from the spawn area. This will tell you if the lag was caused by your redstone machines.

| improve this answer | |
1

A possible problem is that there are too many blocks being rendered at once, making Minecraft lag. Try checking if all your machines are off and the amount of mobs on your screen (100 or more would cause a problem). There could be too many things happening at once. I encountered this problem once when my cousin spawned too many withers — the horror!

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.