Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blasting Highlight Event Visual Bug? #8240

Open
wants to merge 2 commits into
base: 1.21.x
Choose a base branch
from

Conversation

alegian
Copy link

@alegian alegian commented Sep 28, 2024

This is my first time trying to contribute something to someone else's repo, please be kind.

Problem

I was looking at the RenderHighlightEvent code for the AoE blasting, and I noticed that you are calling recursive RenderHighlightEvents for each block affected, so that they may have a chance to cancel themselves.

However, when creating those recursive events, you pass the original rayTraceResult as parameter. I believe this means that instead of simulating one event for each block in the AoE, you actually simulate the origin-block's event many times over.

Changes proposed in this pull request:

Create a seperate BlockHitResult for each blastingTarget blockPos. For its parameters, I essentially cloned the original BlockHitResult, changing only the blockPos. So for example if the original block was 'hit' at the top left, every AoE block is going to simulate a top left hit aswell.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant