Silent's Gems

Silent's Gems

9M Downloads

Massive lagspikes from Chaoshandler

Darkere opened this issue · 4 comments

commented

Versions

  • Silent's Gems: SilentLib-1.15.2-4.6.0+48.jar
  • Silent Lib: SilentLib-1.15.2-4.6.0+48.jar
  • Forge: forge-30.0.43
  • Modpack: Randomly Added Mods v1.9

We've updated our server and added silent gems in the update. We are getting some massive lag spikes.

I've run some profiling that excludes ticks that are finished before 1 second passes and this is the result: https://sparkprofiler.github.io/#jkKxYA5iVq

commented

I was able to fix this by disabling Chaos Slime spawning in 1.14, hope that helps and narrows down the issue

commented
commented
commented

I think I found out what causes the lagspikes.
Here:

int posY = world.getChunk(posX, posZ).getTopBlockY(Heightmap.Type.WORLD_SURFACE, posX, posZ) + 1;

you are calling world#getChunk with a BlockPos, but getChunk expects a ChunkPos. This causes the server to load a chunk far away, wich causes the lagspikes.
A solution would be to use world.getChunkAt(new BlockPos(posX, 0, posZ)) to get the right chunk.