|
return Math.min(mult * currentModifier, 15f); |
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); |
|
} |
|
} |