lagginess of dirt/grass

  • Please make sure you are posting in the correct place. Server ads go here and modpack bugs go here

hotblack desiato

New Member
Jul 29, 2019
373
0
0
since most players are aware that stuff like flowing water (hello nether pumps) or xycrafts quarz blocks (they are growing and glowing) cause some serverload, I want to ask: how is grass?

grass blocks check, if adjactant blocks are dirt or grass and the lightlevel too. taking in account, that every player loads 9 chunks in every direction, that makes a ton of grass blocks looking around if they are supposed to be grass blocks or if they should "infect" other dirtblocks.

same applies for leave blocks (I think about EBXLs biomes with really large trees) they need to check if they are supposed to be alive or if they should decay.

so, did that 2 blocks receive some sort of optimization or do they still consume a lot of calculation speed... or is my assumption just plain wrong...
 

Bomb Bloke

New Member
Jul 29, 2019
612
0
0
Blocks have a flag that determines if they're "active" or not. If inactive, the checks aren't done. The idea is that if something changes that necessitates those checks they become active again.

Say you use shears / silk touch / a chainsaw to harvest some leaf blocks, and place them. They won't decay. This is because leaf blocks you place are set as inactive, so the game doesn't bother checking them each tick to see if they should go away.

But if you plant a tree next to them and then harvest that, if it was close enough they'll all be flagged as active by your actions and start disappearing.

This is why having loads of flowing water around you doesn't cause anywhere near as much lag as having that water actually spread.

Anyway, presumably it's the same deal for dirt: Each bit placed marks the grass blocks around it as active. Once they run out of places to spread they'd go inactive again.
 

ratchet freak

Well-Known Member
Nov 11, 2012
1,198
243
79
those check only happen on random block updates, which happen for 3 random blocks in each chunk each tick

see the MC wiki for more info

the lag from water comes from block updates, each time the flow changes the neighbouring blocks all get a onNeighborChanged call which can be expensive
 

Bomb Bloke

New Member
Jul 29, 2019
612
0
0
You're thinking of client stutter, where the client can't maintain a decent frame rate because the processor's overloading (eg the GPU can't keep up with all the polygons and particles it's being asked to draw).

Lag can be caused by liquids actually moving around the environment, as that information has to be transmitted from the server. Water is a worse offender then lava because it updates more blocks much much faster.
 

connerity1

New Member
Jul 29, 2019
29
0
0
Just uninstall vanilla it's not much use anyway and getting rid of it gives a huge performance boost
Why would having vanilla mc installed interfere with your FTB performance in any way?
They're completely independent from each other, FTB downloads its own minecraft version into the FTB directory and uses that one.
 

Mjw

New Member
Jul 29, 2019
390
0
0
Why would having vanilla mc installed interfere with your FTB performance in any way?
They're completely independent from each other, FTB downloads its own minecraft version into the FTB directory and uses that one.
i was joking....
 
  • Like
Reactions: Pokefenn

hotblack desiato

New Member
Jul 29, 2019
373
0
0
the answers helped a lot. I wasn't aware that the system allows just 3 updates per chunk per tick. I thought that they were all checking their situation all the time (which would be a massive performance problem).