mirror of
https://github.com/Sollace/Unicopia.git
synced 2025-02-01 11:36:43 +01:00
Fix the firebolt spell
This commit is contained in:
parent
c30eac20c3
commit
e3bd201f0a
2 changed files with 6 additions and 2 deletions
|
@ -61,7 +61,7 @@ public class CatapultSpell extends AbstractSpell implements ProjectileSpell {
|
|||
}
|
||||
|
||||
getTarget(caster, e -> apply(caster, e));
|
||||
return situation == Situation.PROJECTILE;
|
||||
return false;
|
||||
}
|
||||
|
||||
protected void apply(Caster<?> caster, Entity e) {
|
||||
|
|
|
@ -23,11 +23,14 @@ public class FireBoltSpell extends AbstractSpell implements ProjectileSpell {
|
|||
|
||||
@Override
|
||||
public boolean tick(Caster<?> caster, Situation situation) {
|
||||
if (situation == Situation.PROJECTILE) {
|
||||
return true;
|
||||
}
|
||||
|
||||
for (int i = 0; i < getNumberOfBalls(caster); i++) {
|
||||
getType().create(getTraits()).toThrowable().throwProjectile(caster);
|
||||
caster.playSound(SoundEvents.ENTITY_BLAZE_SHOOT, 0.7F, 0.4F / (caster.getWorld().random.nextFloat() * 0.4F + 0.8F));
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -35,6 +38,7 @@ public class FireBoltSpell extends AbstractSpell implements ProjectileSpell {
|
|||
public void configureProjectile(MagicProjectileEntity projectile, Caster<?> caster) {
|
||||
projectile.setItem(Items.FIRE_CHARGE.getDefaultStack());
|
||||
projectile.addThrowDamage(9);
|
||||
projectile.setFireTicks(900000);
|
||||
projectile.setVelocity(projectile.getVelocity().multiply(1.3));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue