Fix HellsBells distribution
Dieser Commit ist enthalten in:
Ursprung
e5d7c5c702
Commit
f7bf4dd0eb
@ -79,8 +79,8 @@ public class HellsBells {
|
||||
|
||||
AtomicInteger length = new AtomicInteger(10 + random.nextInt(direction.getLength(zLength, xLength) - 10));
|
||||
int width = 5 + random.nextInt(5);
|
||||
int xOffset = getWidthStart(direction.getLength(xLength, zLength), direction.getLength(length.get(), width));
|
||||
int zOffset = getLengthStart(direction.getLength(zLength, xLength), direction.getLength(width, length.get()));
|
||||
int xOffset = getStart(direction.getLength(xLength, zLength), direction.getLength(length.get(), width));
|
||||
int zOffset = getStart(direction.getLength(zLength, xLength), direction.getLength(width, length.get()));
|
||||
int yOffset = getHeightStart();
|
||||
|
||||
Point redStart;
|
||||
@ -112,12 +112,9 @@ public class HellsBells {
|
||||
}, 0L, 4L);
|
||||
}
|
||||
|
||||
private int getLengthStart(int regionSize, int length) {
|
||||
return random.nextInt(regionSize - length);
|
||||
}
|
||||
|
||||
private int getWidthStart(int regionSize, int length) {
|
||||
return random.nextInt(regionSize - length);
|
||||
private int getStart(int regionSize, int length) {
|
||||
double randomNumber = (random.nextDouble() - random.nextDouble()) / 2 + 0.5;
|
||||
return (int) (randomNumber * (regionSize - length));
|
||||
}
|
||||
|
||||
private int getHeightStart() {
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren