mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-17 02:45:17 +00:00
Fixed floating point bug if productionModifier is negative
This commit is contained in:
1 parent
22ff1f569a
commit
7ffee78d26
1 file changed
+3
@@ -551,6 +551,9 @@ public class Bee extends IndividualLiving implements IBee {
|
||||
}
|
||||
|
||||
public static float getFinalChance(float chance, float beeSpeed, float productionModifier, float t) {
|
||||
if (productionModifier < 0) {
|
||||
return 0;
|
||||
}
|
||||
chance *= 100f;
|
||||
return (float) (2.8 * Math.pow(chance, 0.52)
|
||||
* Math.pow((productionModifier + t), 0.52)
|
||||
|
||||
Reference in new issue
Block a user