From 06eda62df00c9a2f80580e19ec41bbf3390c29b8 Mon Sep 17 00:00:00 2001 From: Luke Bemish Date: Sat, 23 Dec 2023 03:14:09 +0000 Subject: [PATCH] Hail can't go through leaves --- .../lukebemish/tempest/impl/data/world/WeatherChunkData.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common/src/main/java/dev/lukebemish/tempest/impl/data/world/WeatherChunkData.java b/common/src/main/java/dev/lukebemish/tempest/impl/data/world/WeatherChunkData.java index 037a559..36286e0 100644 --- a/common/src/main/java/dev/lukebemish/tempest/impl/data/world/WeatherChunkData.java +++ b/common/src/main/java/dev/lukebemish/tempest/impl/data/world/WeatherChunkData.java @@ -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;