Skip to content

Commit

Permalink
Hail can't go through leaves
Browse files Browse the repository at this point in the history
  • Loading branch information
lukebemish committed Dec 23, 2023
1 parent e5d430b commit 06eda62
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,9 @@ private boolean meltAndFreeze(ServerLevel level, int x, int z) {

if (isHailing(temp, precip, thunder)) {
if (level.random.nextFloat() < 0.4 * precip) {
if (tryHailBreak(level, waterySurface.above())) {
tryHailBreak(level, waterySurface);
BlockPos hailSurface = level.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING, level.getBlockRandomPos(x, 0, z, 15)).below();
if (tryHailBreak(level, hailSurface.above())) {
tryHailBreak(level, hailSurface);
}
}
repeat = level.random.nextFloat() < precip;
Expand Down

0 comments on commit 06eda62

Please sign in to comment.