EngineHub / WorldGuard

🛡️ Protect your Minecraft server and lets players claim areas
https://enginehub.org/worldguard/
Other
812 stars 528 forks source link

Special handling for Windcharges #2085

Closed Brokkonaut closed 1 week ago

Brokkonaut commented 1 month ago

WindCharges cause explosions but they never break blocks. So I removed the call of BlockBreakEvent for them and call UseBlockEvents instead, because wind charges may "use" blocks and added a separate flag.

I tried to use the UseBlockEvent as bulk event but then it will always check the same material for all locations, so that did not work. Thats why I use separate events for every block

Joo200 commented 1 week ago

I changed some more code of your MR and added it directly to the mc-1.21 feature branch.

We have some inconsistency in WorldGuard for the internal events when multiple blocks are affected. I changed that so we can handle the explosion with a single UseBlockEvent.

Thanks for the contribution.