Open
Conversation
TylerS1066
requested changes
Aug 26, 2024
src/main/java/net/countercraft/movecraft/worldguard/listener/ExplosionListener.java
Show resolved
Hide resolved
| } | ||
|
|
||
| MovecraftLocation movecraftLocation = new MovecraftLocation(explosionLocation.getBlockX(), explosionLocation.getBlockY(), explosionLocation.getBlockZ()); | ||
| boolean explodingOnCraft = CraftManager.getInstance().getCraftsInWorld(explosionLocation.getWorld()).stream().anyMatch(it -> it.getHitBox().contains(movecraftLocation)); |
Contributor
There was a problem hiding this comment.
This is an inefficient method to do a check like this, please use the utility functions in WorldGuardUtils or a similar algorithm.
Author
There was a problem hiding this comment.
Can't find any good function there that might help me in my case, maybe there is something useful in MathUtils
|
Wow I did not realize that you actually made this before I did, but BlockBurnEvent won't do anything in your case unless I'm wrong. BlockIgniteEvent is what prevents the blocks from burning. BlockBurnEvent only happens when the block breaks from the fire. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add [#8]