From cb50ec544cb0c1693e5147f10184fbca8d9170ce Mon Sep 17 00:00:00 2001 From: Sollace Date: Wed, 14 Sep 2022 11:53:56 +0200 Subject: [PATCH] Make fire spells explode when hitting an entity --- .../unicopia/ability/magic/spell/effect/FireSpell.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/java/com/minelittlepony/unicopia/ability/magic/spell/effect/FireSpell.java b/src/main/java/com/minelittlepony/unicopia/ability/magic/spell/effect/FireSpell.java index 377a0038..6caa93a1 100644 --- a/src/main/java/com/minelittlepony/unicopia/ability/magic/spell/effect/FireSpell.java +++ b/src/main/java/com/minelittlepony/unicopia/ability/magic/spell/effect/FireSpell.java @@ -54,6 +54,13 @@ public class FireSpell extends AbstractAreaEffectSpell implements ProjectileSpel } } + @Override + public void onImpact(MagicProjectileEntity projectile, Entity entity) { + if (!projectile.isClient()) { + projectile.getReferenceWorld().createExplosion(entity, entity.getX(), entity.getY(), entity.getZ(), 2, DestructionType.DESTROY); + } + } + @Override public boolean tick(Caster source, Situation situation) { if (source.isClient()) { @@ -182,4 +189,5 @@ public class FireSpell extends AbstractAreaEffectSpell implements ProjectileSpel Block id = world.getBlockState(pos).getBlock(); return id == Blocks.SAND || id == Blocks.GLASS; } + }