Rosewood-Development / RoseStacker

A next-generation stacker plugin for Spigot and Paper servers
Other
137 stars 35 forks source link

Enable or disable stacking based on TPS hysteresis #99

Open quiquelhappy opened 6 months ago

quiquelhappy commented 6 months ago

I tested using Stress, using /stress test=entity amount=5000 duration=120 range=10

This is a pretty basic PR, I didn't want to add too many options so I wouldn't over-complicate it. Right now the TPS check runs every 30 seconds using runTaskAsynchronously from the StackManager class. Maybe it would be nice to add the option so the end user can also check the frequency. For now I guess it gets the job done.

The feature is disabled by default, kicking in at 16TPS, and disabling measures after 18TPS is reached.

I added the disabled status using isEntityStackingTemporarilyDisabled, so I didn't have to modify every single class.

quiquelhappy commented 4 months ago

any chance this could be reviewed?

quiquelhappy commented 1 month ago

I currently dont have the time to make the changes mentioned, but if someone can look into this, it would make for a very good feature <3