Leash range is capped.

dev
sigonasr2 9 years ago
parent ba133db087
commit 6f018ff69d
  1. BIN
      TwosideKeeper.jar
  2. 10
      src/sig/plugin/TwosideKeeper/EliteMonster.java
  3. 2
      src/sig/plugin/TwosideKeeper/MonsterController.java

Binary file not shown.

@ -193,6 +193,16 @@ public class EliteMonster {
}
}
if (!storingenergy) {
if (l.getLocation().distanceSquared(m.getLocation())>4096) {
//Lose the target.
targetlist.remove(l);
if (targetlist.size()>0) {
m.setTarget(ChooseRandomTarget());
} else {
m.setTarget(null);
resetToSpawn();
}
} else
if (l.getLocation().distanceSquared(m.getLocation())>100 && !leaping) {
l.getWorld().playSound(l.getLocation(), Sound.ENTITY_CAT_HISS, 1.0f, 1.0f);
chasing=true;

@ -142,7 +142,7 @@ public class MonsterController {
}
private static boolean meetsConditionsToBeElite(LivingEntity ent) {
if (Math.random()<=TwosideKeeper.ELITE_MONSTER_CHANCE && TwosideKeeper.LAST_ELITE_SPAWN+(72000*24)<TwosideKeeper.getServerTickTime() &&
if (Math.random()<=TwosideKeeper.ELITE_MONSTER_CHANCE && TwosideKeeper.LAST_ELITE_SPAWN+(72000*4)<TwosideKeeper.getServerTickTime() &&
((ent instanceof Zombie) || ((ent instanceof Skeleton) && ((Skeleton)ent).getSkeletonType()==SkeletonType.WITHER))
&& ent.getWorld().equals(Bukkit.getWorld("world"))) {
TwosideKeeper.log("Trying for an elite monster.", 4);

Loading…
Cancel
Save