Skip to content

fix mob spawning - #140

Open
kalibrieren wants to merge 9 commits into
Wind-Development:masterfrom
kalibrieren:master
Open

fix mob spawning#140
kalibrieren wants to merge 9 commits into
Wind-Development:masterfrom
kalibrieren:master

Conversation

@kalibrieren

Copy link
Copy Markdown
Contributor

couldn't even find this patch on Taco's repo, wtf is this?

@kalibrieren

kalibrieren commented Jul 23, 2026

Copy link
Copy Markdown
Contributor Author

changing SpawnerCreature#getEntityCount to using Spigot's original way of doing it has a significant performance impact with the server lagging more

@windcolor-dev

Copy link
Copy Markdown
Member

Can you elaborate a bit more? Isn't it vanilla behavior to use the whole world instead of just loaded chunks?

I believe this was a backported paper patch, I believe PandaSpigot also has it. https://github.com/hpfxd/PandaSpigot/blob/master/patches/server/0072-Fix-Bugs-with-Spigot-Mob-Spawn-Logic.patch

@kalibrieren

kalibrieren commented Jul 23, 2026

Copy link
Copy Markdown
Contributor Author

Can you elaborate a bit more? Isn't it vanilla behavior to use the whole world instead of just loaded chunks?

I believe this was a backported paper patch, I believe PandaSpigot also has it. https://github.com/hpfxd/PandaSpigot/blob/master/patches/server/0072-Fix-Bugs-with-Spigot-Mob-Spawn-Logic.patch

I believe using the whole world isn't very useful for multiplayer servers. Spigot probably used only loaded chunks because of that.
I noticed monster spawning to be way less (basically none) in my Spigot - and I think WindSpigot is affected here aswell because of this patch.

@windcolor-dev

Copy link
Copy Markdown
Member

Can you elaborate a bit more? Isn't it vanilla behavior to use the whole world instead of just loaded chunks?
I believe this was a backported paper patch, I believe PandaSpigot also has it. https://github.com/hpfxd/PandaSpigot/blob/master/patches/server/0072-Fix-Bugs-with-Spigot-Mob-Spawn-Logic.patch

I believe using the whole world isn't very useful for multiplayer servers. Spigot probably used only loaded chunks because of that. I noticed monster spawning to be way less (basically none) in my Spigot - and I think WindSpigot is affected here aswell because of this patch.

I see. Maybe it would be best to make this configurable? So we don't break vanilla expectations

@kalibrieren

Copy link
Copy Markdown
Contributor Author

Can you elaborate a bit more? Isn't it vanilla behavior to use the whole world instead of just loaded chunks?
I believe this was a backported paper patch, I believe PandaSpigot also has it. https://github.com/hpfxd/PandaSpigot/blob/master/patches/server/0072-Fix-Bugs-with-Spigot-Mob-Spawn-Logic.patch

I believe using the whole world isn't very useful for multiplayer servers. Spigot probably used only loaded chunks because of that. I noticed monster spawning to be way less (basically none) in my Spigot - and I think WindSpigot is affected here aswell because of this patch.

I see. Maybe it would be best to make this configurable? So we don't break vanilla expectations

I guess, but best to search for a performance improvement before that.

@kalibrieren

Copy link
Copy Markdown
Contributor Author

We forgot 17x17 at moblimit, this fixes it. Also renamed TacoSpigot -> PandaSpigot as the patch is easier to locate there (Taco's is non-existent?)

@windcolor-dev

Copy link
Copy Markdown
Member

Have you tested mob spawning to work as expected with these fixes?

@kalibrieren

Copy link
Copy Markdown
Contributor Author

Have you tested mob spawning to work as expected with these fixes?

No, but should work better with this fix as we forgot 17x17 at moblimit.

@windcolor-dev

Copy link
Copy Markdown
Member

Can you elaborate a bit more? Isn't it vanilla behavior to use the whole world instead of just loaded chunks?
I believe this was a backported paper patch, I believe PandaSpigot also has it. https://github.com/hpfxd/PandaSpigot/blob/master/patches/server/0072-Fix-Bugs-with-Spigot-Mob-Spawn-Logic.patch

I believe using the whole world isn't very useful for multiplayer servers. Spigot probably used only loaded chunks because of that. I noticed monster spawning to be way less (basically none) in my Spigot - and I think WindSpigot is affected here aswell because of this patch.

I see. Maybe it would be best to make this configurable? So we don't break vanilla expectations

I guess, but best to search for a performance improvement before that.

Could you test it out a bit? I don't use mob spawning much on my servers, so I'm unfamiliar with the issue, I think you would have a better idea of whether it's fixed or not.

@kalibrieren

kalibrieren commented Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

Can you elaborate a bit more? Isn't it vanilla behavior to use the whole world instead of just loaded chunks?
I believe this was a backported paper patch, I believe PandaSpigot also has it. https://github.com/hpfxd/PandaSpigot/blob/master/patches/server/0072-Fix-Bugs-with-Spigot-Mob-Spawn-Logic.patch

I believe using the whole world isn't very useful for multiplayer servers. Spigot probably used only loaded chunks because of that. I noticed monster spawning to be way less (basically none) in my Spigot - and I think WindSpigot is affected here aswell because of this patch.

I see. Maybe it would be best to make this configurable? So we don't break vanilla expectations

I guess, but best to search for a performance improvement before that.

Could you test it out a bit? I don't use mob spawning much on my servers, so I'm unfamiliar with the issue, I think you would have a better idea of whether it's fixed or not.

Can't really test it now aswell, but I can also do another PR that removes the tick limiters which cleans up the config a bunch and just makes the code a bit simpler - tick limiters can also block spawning and there's a negligible performance impact - tick limiters were removed in FalchusSpigot aswell.

@windcolor-dev

Copy link
Copy Markdown
Member

Sounds good. Thanks again for all your contributions, they've been really helpful

@kalibrieren

Copy link
Copy Markdown
Contributor Author

Sounds good. Thanks again for all your contributions, they've been really helpful

#143

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants