mirror of
https://gitlab.com/phoenix-dvpmt/mmoitems.git
synced 2024-12-22 04:37:42 +01:00
fixed doubledata random
This commit is contained in:
parent
faaf58b62b
commit
c8d1e5f323
@ -1,7 +1,6 @@
|
||||
package net.Indyuce.mmoitems.stat.type;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import org.apache.commons.lang.Validate;
|
||||
import org.bukkit.ChatColor;
|
||||
@ -159,7 +158,7 @@ public class DoubleStat extends ItemStat implements Upgradable {
|
||||
public class DoubleData extends StatData {
|
||||
private double min, max;
|
||||
private boolean hasMax;
|
||||
|
||||
|
||||
public DoubleData() {
|
||||
}
|
||||
|
||||
@ -221,7 +220,7 @@ public class DoubleStat extends ItemStat implements Upgradable {
|
||||
}
|
||||
|
||||
public double generateNewValue() {
|
||||
return hasMax ? min + new Random().nextDouble() * (max - min) : min;
|
||||
return hasMax ? min + random.nextDouble() * (max - min) : min;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user