mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-27 15:17:59 +01:00
Make fire spells explode when hitting an entity
This commit is contained in:
parent
89e8f0dccc
commit
cb50ec544c
1 changed files with 8 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue