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

Feature/only damage piloted #18

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Intybyte
Copy link

Add [#8]

}

MovecraftLocation movecraftLocation = new MovecraftLocation(explosionLocation.getBlockX(), explosionLocation.getBlockY(), explosionLocation.getBlockZ());
boolean explodingOnCraft = CraftManager.getInstance().getCraftsInWorld(explosionLocation.getWorld()).stream().anyMatch(it -> it.getHitBox().contains(movecraftLocation));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an inefficient method to do a check like this, please use the utility functions in WorldGuardUtils or a similar algorithm.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't find any good function there that might help me in my case, maybe there is something useful in MathUtils

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.

2 participants