Skip to content

Commit

Permalink
improv: tweaked values
Browse files Browse the repository at this point in the history
  • Loading branch information
Zepalesque committed Jun 2, 2024
1 parent 7dbaa49 commit 56ec7ea
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ public int foliageHeight(RandomSource rand, int pHeight, TreeConfiguration confi
@Override
protected boolean shouldSkipLocation(RandomSource rand, int x, int y, int z, int radius, boolean large) {
if (y == 0) {
// If the y offset is 0, only skip the location if it is on the corners, AND a boolean check succeeds
return x + z >= radius * 2 && rand.nextBoolean();
// If the y offset is 0, only skip the location if it is on the corners, but do so 75% of the time
return x + z >= radius * 2 && rand.nextFloat() < 0.75F;
} else if (y == -1) {
// If the y offset is -1, skip the corners always, and skip stuff outside a diamond shape 75% of the time
boolean diamond = x + z <= radius;
Expand Down

0 comments on commit 56ec7ea

Please sign in to comment.