Stop ghasts flying away
This commit is contained in:
parent
6a2cfcc0bf
commit
b8d2bb9167
@ -203,6 +203,12 @@ class MobDefense extends SectionChallenge
|
||||
}
|
||||
|
||||
Location location = _ghast.getLocation().add(0, 0.5, 0);
|
||||
|
||||
if (UtilMath.offset2dSquared(location, _ghastSpawn) > 25)
|
||||
{
|
||||
_ghast.teleport(_ghastSpawn);
|
||||
}
|
||||
|
||||
Fireball fireball = _ghast.launchProjectile(LargeFireball.class);
|
||||
fireball.setBounce(false);
|
||||
|
||||
@ -211,8 +217,6 @@ class MobDefense extends SectionChallenge
|
||||
eFireball.dirX = direction.getX();
|
||||
eFireball.dirY = direction.getY() - 0.005;
|
||||
eFireball.dirZ = direction.getZ();
|
||||
|
||||
UtilEnt.CreatureMoveFast(_ghast, _ghastSpawn, 1);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
Loading…
Reference in New Issue
Block a user