Skip to content

Commit e16c4ce

Browse files
committed
fix raycast position getting mutated when clipping fluid shape
closes #312 (cherry picked from commit 33df36f)
1 parent 3f48908 commit e16c4ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/mcp/mobius/waila/gui/hud/RayCaster.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public static void cast(Level world, Entity camera, Vec3 origin, Vec3 direction,
4444

4545
if (fluidState.isSource()) {
4646
var fluidShape = fluidState.getShape(world, pos);
47-
var fluidHit = fluidShape.clip(origin, max, pos);
47+
var fluidHit = fluidShape.clip(origin, max, pos.immutable());
4848

4949
if (fluidHit != null) {
5050
results.accept(fluidHit, origin.distanceToSqr(fluidHit.getLocation()));

0 commit comments

Comments
 (0)