Skip to content

Commit

Permalink
Pass a modified ray trace result that contains the correct position t…
Browse files Browse the repository at this point in the history
…o Blasting AOE highlighted blocks (#8240)
  • Loading branch information
alegian authored Nov 13, 2024
1 parent 3fea841 commit bcf3e14
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/mekanism/client/render/RenderTickHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,8 @@ public void onBlockHover(RenderHighlightEvent.Block event) {
Lazy<VertexConsumer> lineConsumer = Lazy.of(() -> renderer.getBuffer(RenderType.lines()));
for (Entry<BlockPos, BlockState> block : blocks.entrySet()) {
BlockPos blastingTarget = block.getKey();
if (!pos.equals(blastingTarget) && !ClientHooks.onDrawHighlight(levelRenderer, info, rayTraceResult, event.getDeltaTracker(), matrix, renderer)) {
// simulate ray tracing results for all block positions
if (!pos.equals(blastingTarget) && !ClientHooks.onDrawHighlight(levelRenderer, info, rayTraceResult.withPosition(blastingTarget), event.getDeltaTracker(), matrix, renderer)) {
levelRenderer.renderHitOutline(matrix, lineConsumer.get(), player, renderView.x, renderView.y, renderView.z, blastingTarget, block.getValue());
}
}
Expand Down

0 comments on commit bcf3e14

Please sign in to comment.