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

The mutation modifier return value of mutator is wrong #670

Open
Alpaca2s opened this issue Jul 9, 2021 · 0 comments
Open

The mutation modifier return value of mutator is wrong #670

Alpaca2s opened this issue Jul 9, 2021 · 0 comments

Comments

@Alpaca2s
Copy link

Alpaca2s commented Jul 9, 2021


It should be referred to
public float getModifier(EnumBeeModifier modifier, final float currentModifier) {
if (!this.modifiers.containsKey(modifier)) {
return 1.0f;
}
final float mult = this.modifiers.get(modifier)[0];
final float limit = this.modifiers.get(modifier)[1];
if (limit >= 1.0f) {
if (limit <= currentModifier) {
return 1.0f;
}
return Math.min(limit / currentModifier, mult);
} else {
if (limit >= currentModifier) {
return 1.0f;
}
return Math.max(limit / currentModifier, mult);
}
}

@Alpaca2s Alpaca2s changed the title The return value is wrong The mutation modifier return value of mutator is wrong Jul 9, 2021
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

No branches or pull requests

1 participant