HellsBells improvements #358
@ -43,8 +43,8 @@ public class HellsBells {
|
|||||||
|
|
||||||
public static final Random random = new Random();
|
public static final Random random = new Random();
|
||||||
|
|
||||||
private final int xLength = Config.RedExtendRegion.getMaxX() - Config.RedExtendRegion.getMinX();
|
private final int xLength = Config.BlueExtendRegion.getSizeX();
|
||||||
private final int zLength = Config.RedExtendRegion.getMaxZ() - Config.RedExtendRegion.getMinZ();
|
private final int zLength = Config.BlueExtendRegion.getSizeZ();
|
||||||
private State current = State.PRE;
|
private State current = State.PRE;
|
||||||
private int currentDrops = 0;
|
private int currentDrops = 0;
|
||||||
private HellsBellsCountdown currentCountdown;
|
private HellsBellsCountdown currentCountdown;
|
||||||
@ -113,7 +113,7 @@ public class HellsBells {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private int getStart(int regionSize, int length) {
|
private int getStart(int regionSize, int length) {
|
||||||
double randomNumber = (random.nextDouble() - random.nextDouble()) / 2 + 0.5;
|
double randomNumber = (Math.max(Math.min(random.nextGaussian(), -2), 2) + 2) / 4;
|
||||||
Bukkit.getLogger().log(Level.INFO, "Calculated Start: " + (int) (randomNumber * (regionSize - length)));
|
Bukkit.getLogger().log(Level.INFO, "Calculated Start: " + (int) (randomNumber * (regionSize - length)));
|
||||||
return Math.max(Math.min((int) (randomNumber * (regionSize - length)), regionSize - length), 0);
|
return Math.max(Math.min((int) (randomNumber * (regionSize - length)), regionSize - length), 0);
|
||||||
}
|
}
|
||||||
@ -126,6 +126,8 @@ public class HellsBells {
|
|||||||
new StateDependent(Winconditions.HELLS_BELLS, FightState.Running) {
|
new StateDependent(Winconditions.HELLS_BELLS, FightState.Running) {
|
||||||
@Override
|
@Override
|
||||||
public void enable() {
|
public void enable() {
|
||||||
|
current = State.PRE;
|
||||||
|
currentDrops = 0;
|
||||||
startCountdown();
|
startCountdown();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren