Hexal

Hexal

5M Downloads

[1.19.2-fabric] The slipway keep summoning wisps infinitely

vakus opened this issue ยท 3 comments

commented

Me and few of my friends have been playing own modpack with this mod, and we noticed a huge amount of entities which were killing the server, every now and then we ran /kill @e[type=!player] command and we were getting around 53 thousands entities killed. We sometimes ran into chunks which would just straight out crash out server.

Today I have investigated the cause of this and found that underneath one of the players base there was a slipway, which kept summoning wisps, which have not been emulated themselves, which as result would never die. As a side effect when my friend was logging in onto the server, the server would out right shutdown.

I have initially tracked down which chunk was causing the crashing, and then have investigated which exact position was causing the crashes by progressively narrowing down /kill @e[x=2096,dx=16,z=560,dz=16,y=-64,y=255] command until I have found that at x2109 y28-30, z576 there was 53 thousands entities. I found out what the entity was by using /say @e[x=2109,z=576,y=28,dy=4] which has returned a big chunk of text just saying wandering wisp.

image

We have been able to temporarily restore the world to usable state by running /kill @e[type=hexal:wisp/wandering] however this appears to be recurring issue.
image

since I had a singleplayer copy I have reduced chunk simulation to as low as possible, which was 5 and found that if I was 5 chunks away from the slipway, it was still summoning wisps, however those would never die.

I had a small look at the code, and looks like this potentially would cause infinite spawning of wisps.

if (tick >= nextSpawnTick) {
nextSpawnTick = tick + random.nextGaussian(SPAWN_INTERVAL_MU.toDouble(), SPAWN_INTERVAL_SIG.toDouble()).toLong()
val colouriser = getRandomColouriser()
val wisp = WanderingWisp(level!!, Vec3.atCenterOf(pos))
wisp.setColouriser(colouriser)
level!!.addFreshEntity(wisp)
sync()
}

My suggestion would be to add a check of how many wisps are already around the Slipway, and don't allow spawning more wisps if at the threshold.

screenshot of trying to say all entities within the location provided, warning fairly big photo

image

commented

Should be fixed now, stop spawning if there's more than 20 wisps within 32 blocks of the slipway.

commented

also, thank you for the very detailed issue report!

commented

no worries, I was trying to provide enough information to resolve this, I seen plenty of bug reports before where it was hard to tell what is causing the issues and as result they could not be resolved. Thanks for the quick fix and update, hopefully this will resolve the issue for us. Thanks again