mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-23 21:38:00 +01:00
Fixed catapult spell constantly refiring when cast using the regular cast spell ability instead of shoot spell
This commit is contained in:
parent
f3d251c1d0
commit
a8e5c50e9b
3 changed files with 4 additions and 3 deletions
|
@ -59,7 +59,8 @@ public class CatapultSpell extends AbstractSpell implements ProjectileDelegate.B
|
||||||
}
|
}
|
||||||
|
|
||||||
getTypeAndTraits().create().toThrowable().throwProjectile(caster);
|
getTypeAndTraits().create().toThrowable().throwProjectile(caster);
|
||||||
return false;
|
setDead();
|
||||||
|
return isDead();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void apply(Caster<?> caster, Entity e) {
|
protected void apply(Caster<?> caster, Entity e) {
|
||||||
|
|
|
@ -23,7 +23,7 @@ public class ChillingBreathSpell extends AbstractSpell implements HomingSpell {
|
||||||
if (!source.subtractEnergyCost(90)) {
|
if (!source.subtractEnergyCost(90)) {
|
||||||
setDead();
|
setDead();
|
||||||
}
|
}
|
||||||
return false;
|
return !isDead();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -170,7 +170,7 @@ public class MagicProjectileEntity extends ThrownItemEntity implements Caster<Ma
|
||||||
@Override
|
@Override
|
||||||
public void tick() {
|
public void tick() {
|
||||||
if (!world.isClient() && !homingTarget.isPresent(world)) {
|
if (!world.isClient() && !homingTarget.isPresent(world)) {
|
||||||
if (getVelocity().length() < 0.01) {
|
if (getVelocity().length() < 0.1 || age > 90) {
|
||||||
discard();
|
discard();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue