Use boss entity as source for obsidian bomb.

Makes the boss entity the source of the obsidian bomb explosion, which
then makes the damage event listener handle the explosion damage as if
the boss is the damager, which means the `monster-infight` flag should
be respected.

Fixes #759
This commit is contained in:
Andreas Troelsen 2023-04-28 20:42:25 +02:00
parent 2eb1761e76
commit 4f78936716
2 changed files with 2 additions and 1 deletions

View File

@ -13,6 +13,7 @@ These changes will (most likely) be included in the next version.
## [Unreleased]
### Fixed
- Explosion damage caused by Exploding Sheep now correctly counts as monster damage. This means that the explosions only affect other mobs if the per-arena setting `monster-infight` is set to `true`.
- Explosion damage caused by the boss ability `obsidian-bomb` now correctly counts as monster damage. This means that the explosions only affect other mobs if the per-arena setting `monster-infight` is set to `true`.
## [0.107] - 2022-07-30
### Added

View File

@ -55,7 +55,7 @@ public class ObsidianBomb implements Ability
return;
world.getBlockAt(loc).setType(Material.AIR);
world.createExplosion(loc, 3F);
world.createExplosion(loc, 3F, false, true, boss.getEntity());
}
}, FUSE);
}