Add PreExplodeEvents#1234
Conversation
|
How is this different from this? https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/event/entity/ExplosionPrimeEvent.html |
|
We talked about this on the Discord. This event gets called before any calculation of the radius is happing. If you spawn a creeper with a really big explosion radius and cancel the explosion event, the game still calculates every block that needs to be destroyed, which drops the TPS. You can cancel this event to prevent this |
|
Alright thx. |
|
Do to Billy might not reviewing this, can somebody else do? |
granny
left a comment
There was a problem hiding this comment.
Since the params & everything is almost identical, have you thought about just extending the BlockExplodeEvent event instead of BlockEvent?
|
@SageSphinx63920 any updates? do you need help rebasing the branch? |
This pr add PreXExplodeEvents to cancel an explosion before Minecraft calculates all the changes to prevent lag spikes