[Bug]: Cave Enderman potentially causing high TPS
Brother-Blue opened this issue ยท 6 comments
Bug Description
I've been investigating this on my ATM9 server, and have opened a ticket there as well in case it is something with their pack configurations.
AllTheMods/ATM-9#1148
As I mentioned in that issue, cave enderman seem to be contributing a good chunk to TPS issues, even if it's just me on the server and in a dimension without any caves.
Currently experiencing this on ATM9 v0.2.33 and has been that way since v0.2.28. I'm not certain about the mod version but I can find this out later today.
How to Reproduce?
- Spin up an ATM9 server
- Run the spark profiler, I gave mine a 2 minute timeout
Expected Behavior
No response
Version
Mod Loader Version
Mod Loader
Forge
Logs or additional context
No response
Code of Conduct
- I have searched the issue tracker and confirmed that the issue has not been reported
- I have checked the FAQ (if one is present) and my issue is not listed
- I have verified that I am using the latest version of the mod
- I have verified that I have installed all the required dependencies for the mod
- I have verified that I do not have Optifine installed. We will close issues if we detect Optifine is in your pack. We cannot fix Optifine issues. Please do not report issues with Optifine present.
I've had lag due to significant numbers of mushroom endermen due to them spawning in a modded fungal cave biome with many mushrooms and dirt blocks, where they can easily pick up a block. (I was on version 1.0.2 of the mod, before the spawns were lowered, and had over 250 mushroom endermen). Since endermen that are holding a block don't despawn and don't count towards the mob cap, they can accumulate significantly over time. In addition, they teleported away (and accumulated near the surface), which I think let more of them spawn even with the spawn cost/spawn potential mechanic.
Given that Cave Endermen can pick up blocks in the "#minecraft:base_stone_overworld" tag, ie almost all blocks inside caves, maybe they have a similar issue? Alternatively, the issue may be that the Enderman AI tries to do something for all nearby blocks that it can pick up, which in this case could be a lot of blocks.
Either way I would suggest trying to remove "#minecraft:base_stone_overworld" from the endermanoverhaul/tags/blocks/cave_enderman_holdable.json
tag (maybe via datapack) and see if it helps performance.
Im suffering the same, my server was running fine but after some weeks it became very laggy, and spak gave me this
"net.minecraft.server.level.ServerLevel$$Lambda$37553.0x0000000804781038.accept()47.76%
net.minecraft.server.level.ServerLevel.tickNonPassenger()47.76%
tech.alexnijjar.endermanoverhaul.common.entities.CaveEnderman.tick()14.95%"
Cave enderman seems to take 15% of the ticks
I'm also experiencing this.
The reason why neruina is working hard is because of cave enderman as shown in the screenshot (neruina is a mod to take care of ticking entities to kill them if needed) and then it shows the enderman overhaul as the second thread.
I've seen theres a new version 1.0.4 of enderman overhaul, which says to reduce spawns of cave endermans, I will try it and see if this helps.
Interesting. The cave enderman doesn't do anything special compared to all the other enderman. The only additional thing it does is check if it's under the sun every 10 ticks, but that shouldn't cost much at all. And BaseEnderman.tick() is just the normal enderman tick, so nothing is happening there. I'm wondering if it's just a quantity issue. I've had a report that the cave enderman are spawning a lot, so there may just be a lot of them in your world. I'm going to reduce their spawns in the next update. Let me know if that fixes it. Thanks.