From 4f78936716d6218a1cdc0d6469047e31ba23a003 Mon Sep 17 00:00:00 2001 From: Andreas Troelsen Date: Fri, 28 Apr 2023 20:42:25 +0200 Subject: [PATCH] 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 --- changelog.md | 1 + .../garbagemule/MobArena/waves/ability/core/ObsidianBomb.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index a83b0c2..10d94de 100644 --- a/changelog.md +++ b/changelog.md @@ -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 diff --git a/src/main/java/com/garbagemule/MobArena/waves/ability/core/ObsidianBomb.java b/src/main/java/com/garbagemule/MobArena/waves/ability/core/ObsidianBomb.java index a2a4150..e22db01 100644 --- a/src/main/java/com/garbagemule/MobArena/waves/ability/core/ObsidianBomb.java +++ b/src/main/java/com/garbagemule/MobArena/waves/ability/core/ObsidianBomb.java @@ -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); }