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

Fix #1081 and improve OptimizedExplosion readability #1828

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

lntricate1
Copy link
Contributor

  • Moved the check for equal position into the if statement above, to only run when new entities are fetched (optimization)
  • Added the condition of being onGround to that check, to fix OptimizedTNT breaks TNT pushing other TNT #1081
  • Renamed some variables in doExplosionA to be more readable
  • Removed an unnecessary import for java.util.Collections

@altrisi
Copy link
Collaborator

altrisi commented Jan 18, 2024

Seems to work testing it on top of 23w44a, though there's conflicts now and I have near zero familiarity with this part of the codebase.

Sorry for the long delay!

@altrisi altrisi requested a review from gnembon January 18, 2024 18:12
@lntricate1
Copy link
Contributor Author

Hello, I've realized this has an edge case where the behavior is non-vanilla (if an entity moves between 2 explosions happening, this code uses the cached values instead of recalculating for the new position). I'll try to fix it within a few days, please don't merge yet!

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.

OptimizedTNT breaks TNT pushing other TNT
2 participants