Skip to content

Commit

Permalink
Fix bug in OreVein's for-loop (#912)
Browse files Browse the repository at this point in the history
  • Loading branch information
Muqsit authored and Momothereal committed May 2, 2018
1 parent d0ae1ba commit 5b35bdb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/net/glowstone/generator/objects/OreVein.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public boolean generate(World world, Random random, int sourceX, int sourceY, in
double q = random.nextDouble() * amount / 16.0D;
double radiusH = (Math.sin(i * (float) Math.PI / amount) + 1 * q + 1) / 2.0D;
double radiusV = (Math.sin(i * (float) Math.PI / amount) + 1 * q + 1) / 2.0D;
for (int x = (int) (originX - radiusH); x <= (int) (originX - radiusH); x++) {
for (int x = (int) (originX - radiusH); x <= (int) (originX + radiusH); x++) {

// scale the center of x to the range [-1, 1] within the circle
double squaredNormalizedX = normalizedSquaredCoordinate(originX, radiusH, x);
Expand Down

0 comments on commit 5b35bdb

Please sign in to comment.