mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-15 20:23:53 -07:00
Changing the blockList on explosions now correctly updates which blocks are changed
This commit is contained in:
@@ -194,6 +194,15 @@ public class Explosion {
|
|||||||
|
|
||||||
EntityExplodeEvent event = new EntityExplodeEvent(explode, location, blockList);
|
EntityExplodeEvent event = new EntityExplodeEvent(explode, location, blockList);
|
||||||
this.world.getServer().getPluginManager().callEvent(event);
|
this.world.getServer().getPluginManager().callEvent(event);
|
||||||
|
|
||||||
|
arraylist.clear();
|
||||||
|
blocks.clear();
|
||||||
|
|
||||||
|
for (org.bukkit.block.Block block : event.blockList()) {
|
||||||
|
ChunkCoordinates coords = new ChunkCoordinates(block.getX(), block.getY(), block.getZ());
|
||||||
|
arraylist.add(coords);
|
||||||
|
blocks.add(coords);
|
||||||
|
}
|
||||||
|
|
||||||
if (event.isCancelled()) {
|
if (event.isCancelled()) {
|
||||||
this.wasCanceled = true;
|
this.wasCanceled = true;
|
||||||
|
Reference in New Issue
Block a user