-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
Enable or disable stacking based on MSPT hysteresis #290
base: 5.10
Are you sure you want to change the base?
Conversation
src/main/java/uk/antiperson/stackmob/mspt/SparkMsptProvider.java
Outdated
Show resolved
Hide resolved
src/main/java/uk/antiperson/stackmob/mspt/SparkMsptProvider.java
Outdated
Show resolved
Hide resolved
I applied all the mentioned changes. Thanks for the quick review. |
I've been testing this for a week so far on my server (https://minecraft-mp.com/server/323715/stats/) and I haven't seen any issues. The stacking does make a positive effect on the server with the current setup. |
@@ -19,6 +19,23 @@ public MergeTask(StackMob sm) { | |||
} | |||
|
|||
private void checkEntity(StackEntity original, boolean checkHasMoved, double checkHasMovedDistance) { | |||
if(original.getEntityConfig().isMsptReactiveEnabled()){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it likely that this would need to be enabled/disabled on a per entity type basis? Because at the moment this is doing the check for each entity, when it could just be checked once at the beginning of the task.
This pull request introduces a feature that enables stacking only when the server is under heavy load. When the server load decreases (due to hysteresis effects, meaning it has improved its initial threshold), stacking will be automatically disabled.
Key Points:
Additional Changes: