Skip to content

Commit

Permalink
fix raycast position getting mutated when clipping fluid shape
Browse files Browse the repository at this point in the history
closes #312

(cherry picked from commit 33df36f)
  • Loading branch information
deirn committed Jan 22, 2025
1 parent fd5f9b1 commit 060a0d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/mcp/mobius/waila/gui/hud/RayCaster.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public static void cast(Level world, Entity camera, Vec3 origin, Vec3 direction,

if (fluidState.isSource()) {
var fluidShape = fluidState.getShape(world, pos);
var fluidHit = fluidShape.clip(origin, max, pos);
var fluidHit = fluidShape.clip(origin, max, pos.immutable());

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

0 comments on commit 060a0d3

Please sign in to comment.