Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bots don't generate chunks or spawn mobs around them #26

Open
Frogperson opened this issue Feb 25, 2018 · 5 comments
Open

Bots don't generate chunks or spawn mobs around them #26

Frogperson opened this issue Feb 25, 2018 · 5 comments
Labels
question Issuer has a question about this project

Comments

@Frogperson
Copy link

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.

@games647 games647 added the question Issuer has a question about this project label Feb 25, 2018
@games647 games647 changed the title Bots aren't fully loaded in? Bots have no gravity Feb 25, 2018
@games647 games647 changed the title Bots have no gravity Bots have no gravity and knockback Feb 25, 2018
@games647
Copy link
Owner

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).

@Frogperson
Copy link
Author

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

@games647
Copy link
Owner

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

@Frogperson
Copy link
Author

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
Copy link
Author

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 Frogperson changed the title Bots have no gravity and knockback Bots don't generate chunks or spawn mobs around them Feb 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Issuer has a question about this project
Projects
None yet
Development

No branches or pull requests

2 participants