Cleanup damage source a bit (#12106)

This commit is contained in:
Lulu13022002
2025-02-16 20:14:00 +01:00
committed by GitHub
parent 608f004a2c
commit 7bee99714a
31 changed files with 135 additions and 215 deletions

View File

@@ -175,7 +175,7 @@
+ this.yield = event.getYield();
+ } else {
+ org.bukkit.block.Block block = location.getBlock();
+ org.bukkit.block.BlockState blockState = (this.damageSource.getDirectBlockState() != null) ? this.damageSource.getDirectBlockState() : block.getState();
+ org.bukkit.block.BlockState blockState = (this.damageSource.causingBlockSnapshot() != null) ? this.damageSource.causingBlockSnapshot() : block.getState();
+ BlockExplodeEvent event = CraftEventFactory.callBlockExplodeEvent(block, blockState, blockList, this.yield, this.getBlockInteraction());
+ this.wasCanceled = event.isCancelled();
+ bukkitBlocks = event.blockList();