LambdaAttack icon indicating copy to clipboard operation
LambdaAttack copied to clipboard

Bots don't generate chunks or spawn mobs around them

Open Frogperson opened this issue 6 years ago • 5 comments

I'm trying to use this tool to stress test my server to see how many players I can support but it seems minecraft is only half loading them in. What I mean by that is the players are indeed there and they load chunks, but they do not seem to generate new chunks or spawn hostile mobs around them. They also ignore gravity and knockback from taking damage but that part doesn't really matter as much. The no gravity part reminds me of when a player who has terrible ping first joins.

Frogperson avatar Feb 25 '18 03:02 Frogperson

Gravity and knockback is implemented client side. The client handles how the position changes downwards. This project is very simple and therefore doesn't implement things like gravity it just ignores it. Nevertheless chunk generation and spawning mobs is implemented server side. How do you verified it and do you waited long amount of time (Mobs for example do not spawn instantly).

games647 avatar Feb 25 '18 08:02 games647

Yeah that's what I was guessing about the gravity, and that's fine, it's not really needed for stress testing for the most part.

The chunk generation part isn't actually verified but I'm pretty sure about it because I had about 100 bots join a server on my computer and I did a spread players command /spread players ~ ~ 400 8000 false @a, and there was pretty much 0 server lag. The world was not pregenned beforehand by the way.

And I can tell mobs aren't spawning because hundreds (or thousands on a vanilla server vs spigot, I checked both) all spawn around me. The way the mob cap works is it takes the total amount of chunks loaded on a server and plugs that into an equation to get the cap of how many mobs can spawn. Since I'm getting so many spawning around me that means that the server recognizes the chunks are loaded so it's increasing the cap, but only trying to spawn the mobs around real players.

If you'd like to join my test server some time for me to show you if be happy to send you the ip

Frogperson avatar Feb 25 '18 14:02 Frogperson

As far as I know Chunk loading is processed async nowadays. This way it doesn't affect the main thread performance at all.

games647 avatar Feb 25 '18 15:02 games647

I supposed I could load up dynmap to see if chunks are getting generated, but the mob spawning thing is definitely still an issue. I'll test that in a little bit and report what I find here

Frogperson avatar Feb 25 '18 16:02 Frogperson

I just tested with Dynmap and it looks like my theory is correct, the server is not generating chunks for any of the bots https://i.imgur.com/WiseOkU.png

Frogperson avatar Feb 25 '18 16:02 Frogperson