SteamWar/FightSystem
Archiviert
13
1

HellsBells improvements #358

Zusammengeführt
Lixfel hat 2 Commits von hbFixes nach master 2022-07-24 21:53:37 +02:00 zusammengeführt

Datei anzeigen

@ -43,8 +43,8 @@ public class HellsBells {
public static final Random random = new Random();
private final int xLength = Config.RedExtendRegion.getMaxX() - Config.RedExtendRegion.getMinX();
private final int zLength = Config.RedExtendRegion.getMaxZ() - Config.RedExtendRegion.getMinZ();
private final int xLength = Config.BlueExtendRegion.getSizeX();
private final int zLength = Config.BlueExtendRegion.getSizeZ();
private State current = State.PRE;
private int currentDrops = 0;
private HellsBellsCountdown currentCountdown;
@ -113,7 +113,7 @@ public class HellsBells {
}
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)));
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) {
@Override
public void enable() {
current = State.PRE;
currentDrops = 0;
startCountdown();
}