MM Vanilla mob customization not recognized by PaperMC's mob spawning handler, hence overspawning & massive TPS drops...
Closed
MM Vanilla mob customization not recognized by PaperMC's mob spawning handler, hence overspawning & massive TPS drops...
Summary
When using the Vanilla Mobs.yml file modify vanilla mob attributes such as disguises and skills, the amount of mobs that spawn increase drastically causing massive TPS drops and extremely large amounts of entities. I have thoroughly diagnosed the issue and spoke with people on the support Discord about it and they have confirmed that this happens for them when modifying vanilla mobs in MM.
The reason is, as the title says, that when MythicMobs changes attributes to Vanilla mobs, PaperMC does not view them as spawned mob entities, and therefore it continues to spawn more and more mobs until the TPS completely falls. This TPS drop can only be reproduced with a lot of players around 15, however you can easily reproduce this issue with the latest Dev build for MM and the latest 1.16.1 PaperMC version. Simply change all the vanilla mobs and give them disguises and skills and watch 1000s of mobs continue spawning in your world at night. In case you are wondering, I have optimized Papers paper.yml file to reduce mob spawning and only perform ticks on entities within 11 chunks of players. There is no TPS drops or lagg at all when I am not using MM's vanilla mob configuration. Clearly Paper does not recognize MM's vanilla mob customization's.
Specs
I would really appreciate a fix for this issue because the primary reason I purchased MM is to have custom vanilla spawning mobs, without lag. My CPU is an i7 4790k with 32GB of DDR3 RAM running on a SSD with cool temps.
Possible fixes
From a programming point of view, to fix this issue I am assuming that MM needs to force Paper to register all customized vanilla mobs as vanilla mobs, or alternatively you may need to add the option to MM's vanilla mob customization to lower the amount or limit the amount of "Vanilla Mobs" from spawning.
Other info
No server log or timings reports are needed as I have tested the issue and confirmed it on Discord. (Also it is very difficult for me to obtain any debug / timings of the TPS dropping due to over spawning because it requires about 15 players & my player base is dead now. I hope you can understand my delemma)
Here is the paste bin for my current optimized PaperMC conifg, however the issue is still present with just the default Paper.yml file as well. https://pastebin.com/UjG8S4eg
Here is the paste-bin for my Vanilla Mobs.yml file, however it does not matter what type of customization you do here, as long as MythicMobs changes ANY attribute of a vanilla spawning mob, paper will not recognize it and hence spawn far too many: https://pastebin.com/GZTJrQ3F
My MythicMobs config is default, no changes there.
Final Note Please let me know if there will be some sort of ETA for this fix, only because I need to know if I need to find an alternative or not. And just as a side not, I am very happy to purchase the MM premium + subscription if that is required to get this issue solved, it is very important to me.
Thanks in advanced for your hard work.
assigned to @ashijin
Ohh, so I wasn't the only one still having this issue. It has been better in the later snapshot builds of MM, but yeah. It's not as crippling as it could be (even on a shotty 16gb hosted setup), in fact, it's actually not really noticeable until you setup a caves world, but I digress.
It does become noticeable once about 22 players at different locations, or if 6 players are online at medium sized bee farms, larger to massive bee farms, tps starts to drop dramatically, to about 13 for a large setup, and 11- for a massive setup. A few of these could cause people to time out of the server they're connected to.
TPS is 17.4 in the screenshot below, while each "cell" contains about 6 to 10 bees. https://puu.sh/GlFIP/5a02118651.png
Not sure if this helps but, it might be able to find the root cause of the issues. =)
Thanks for that, yeh I am pretty confident that the issue is due to the fact that PaperMC does not recognize the vanilla mobs it spawns once MM has made changes to them, which causes over spawning, and therefore my TPS drops to about 7 with only 10 players on (it's just a normal survival world with custom vanilla mobs with MM). Do you experience over spawning when using MM vanilla mob customization?
added Verified Issue label
added Being Worked On label and removed Verified Issue label
added Verified Issue label and removed Being Worked On label
added Being Worked On label
changed milestone to %4.10.X
Thanks I will try it now, out of curiosity is there a change log so I can see what actually changed? I just want to know if you tried to make paper recognize the mobs or if not, how you did it. Thanks
EDIT: Sorry just found the change log, I see you made it obey the spawn settings in bukkit.yml, I will test it now.
Edited by Liam PriceLooks like the issue is still there, when not using MythicMobs vanilla changes there are bout 600 entities in the world with me testing it, and with MM Vanilla mobs enabled it goes up to 1000 entities. You can tell just from flying around that there are still far more mobs spawning compared to when MM vanilla mobs isnt being used. Let me know if theres anything else I can try. Thanks
I also get the following console spam from MM when using vanilla mob customization which never happened in the past: https://pastebin.com/XZeD6avC
I deleted all the files in my MM plugin folder and I still get these issues. Thanks
So, on build 3439, I noticed that Mob spawning is forced to obey bukkit's spawning conditions, however, by using that version, this happens.
Can you expand on your timings report so we can actually see whats going on in MM? Also upload a debug report for MM itself. When I use the latest build nothing seems to have changed at all besides a bit of console spam as I stated before. For me the vanilla mob spawning is just as bad as before which I don't understand why.
Is this related ?
marked #70 (closed) as a duplicate of this issue
I think the tick loss is still there
https://timings.aikar.co/?id=983cd4bb037a4f1ea29ad944ff2cf634#timings
https://spark.lucko.me/#vHAgYn7Mad (I know i have 81% of sleepfortick)
I seem to have the same or a very simular issue, on Paper-"47740f67c" (MC: 1.16.2)
I'm swapping to spigot to see if I get the same issues then.
Timings: https://timings.aikar.co/?id=1d4b0298f07449e98eefca241aac0943
I noticed 1.10 was released, have any changes been made in regards to vanilla spawning @ashijin ? Thanks
Tried it on latest paper as well, just to have a go at it: https://timings.aikar.co/?id=9e8ff8d8cb4646ccb876c842877af934
Still massive lag spikes from MythicMobs::Event: i.l.x.m.u.e.f.s.EventListener (CreatureSpawnEvent)
(testing with no random spawn files at all in MM)
Edited by Esronnchanged milestone to %4.11.X
removed Verified Issue label
@ashijin did a short 20 min test on our live server:
https://timings.aikar.co/?id=70b85fef54014cd38641c7e642a36f2d
#3461 seems to be doing well, I'll get another timings report over more hours later today.
mentioned in issue #131 (closed)
what is your
count-all-mobs-for-spawning:
set to in paper.yml? im wondering if paper is forcing the vanilla spawns because it's not counting the MM mobs toward the limits.Edited by Eutherin