VolmitSoftware / React

Smart Server Performance
https://volmit.com
GNU General Public License v3.0
95 stars 52 forks source link

Combined entity restriction for culling #443

Closed fyrmftw closed 5 years ago

fyrmftw commented 6 years ago

Hello,

I was just wondering if it was possible to cull entities all together by chunk and not separate if that makes sense. Example below,

image

All my cull entities are stricted to 30 each, thought it would make sure all entities are restricted to 30 a chunk, but it only restricted 30 of each of them, like minecarts, boats, mobs etc, and having over 30+ entities in each chunk and having around 150+ entities in one chunk.

I dont know if theres already an option to enable this or if it's intentional because of performance but would love to know, thank you <3

cyberpwnn commented 6 years ago
- '@Restrict Pig = 15'
- '@Restrict Cow = 15'
- '@Restrict Sheep = 15'
- '@Restrict Chicken = 15'

This would allow 15 of EACH per chunk. Meaning in total you could have 60 entities comprised of pigs, cows, sheep, and chicken.


- '@Restrict Pig,Cow,Sheep,Chicken = 15'

This would allow up to 15 pigs, up to 15 cows, up to 15 sheep and up to 15 chicken, HOWEVER, all of them combined cannot exceed 15. So you could have 15 cows, but adding even 1 pig would cause it to cull 1 cow. Since this is a "group" their combined total cannot exceed 15 in a chunk. Also, it works with proportions too, so if there is 10 cows and 8 pigs, (total 18) react needs to remove 3 entities. It would prefer to remove 2 cows and only 1 pig to keep the density ratio proper.

fyrmftw commented 6 years ago

Oh alright, and what about like hostile mobs, minecarts and stuff, since on our current server, we struggle a bit with entities and have a cap of 30 entities of all types in each chunk. Is there no way of putting a limit to all entities in a chunk like last react or is it not possible?

Thank you

cyberpwnn commented 6 years ago

Hmmm, well, you could make a large comma separated list of all types (lol) ill see about adding something for this,