mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 09:47:38 +00:00
Replaced hardcoded values of Pi with Math.PI
This commit is contained in:
parent
4c1d0bc9a6
commit
bdd3bc26af
@ -97,9 +97,9 @@ public class CavesGen extends GenBase {
|
|||||||
|
|
||||||
if (!isLargeCave && angle == j && paramdouble1 > 1.0F && maxAngle > 0) {
|
if (!isLargeCave && angle == j && paramdouble1 > 1.0F && maxAngle > 0) {
|
||||||
generateCaveNode(ThreadLocalRandom.current().nextLong(), chunkPos, chunk, x, y, z, ThreadLocalRandom
|
generateCaveNode(ThreadLocalRandom.current().nextLong(), chunkPos, chunk, x, y, z, ThreadLocalRandom
|
||||||
.current().nextDouble() * 0.5F + 0.5F, paramdouble2 - 1.570796F, paramdouble3 / 3.0F, angle, maxAngle, 1.0D);
|
.current().nextDouble() * 0.5F + 0.5F, paramdouble2 - (Math.PI/2), paramdouble3 / 3.0F, angle, maxAngle, 1.0D);
|
||||||
generateCaveNode(ThreadLocalRandom.current().nextLong(), chunkPos, chunk, x, y, z, ThreadLocalRandom
|
generateCaveNode(ThreadLocalRandom.current().nextLong(), chunkPos, chunk, x, y, z, ThreadLocalRandom
|
||||||
.current().nextDouble() * 0.5F + 0.5F, paramdouble2 + 1.570796F, paramdouble3 / 3.0F, angle, maxAngle, 1.0D);
|
.current().nextDouble() * 0.5F + 0.5F, paramdouble2 + (Math.PI/2), paramdouble3 / 3.0F, angle, maxAngle, 1.0D);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!isLargeCave && ThreadLocalRandom.current().nextInt(4) == 0) {
|
if (!isLargeCave && ThreadLocalRandom.current().nextInt(4) == 0) {
|
||||||
@ -273,7 +273,7 @@ public class CavesGen extends GenBase {
|
|||||||
}
|
}
|
||||||
while (count > 0) {
|
while (count > 0) {
|
||||||
count--;
|
count--;
|
||||||
double f1 = ThreadLocalRandom.current().nextDouble() * 3.141593F * 2.0F;
|
double f1 = ThreadLocalRandom.current().nextDouble() * Math.PI * 2.0F;
|
||||||
double f2 = (ThreadLocalRandom.current().nextDouble() - 0.5F) * 2.0F / 8.0F;
|
double f2 = (ThreadLocalRandom.current().nextDouble() - 0.5F) * 2.0F / 8.0F;
|
||||||
double f3 = ThreadLocalRandom.current().nextDouble() * 2.0F + ThreadLocalRandom
|
double f3 = ThreadLocalRandom.current().nextDouble() * 2.0F + ThreadLocalRandom
|
||||||
.current().nextDouble();
|
.current().nextDouble();
|
||||||
|
Loading…
Reference in New Issue
Block a user