![Rough Mobs Revamped](https://media.forgecdn.net/avatars/thumbnails/247/41/256/256/637161034679470158.png)
[Bug]Hostile Bats Path to Unknown Destination Without Boss Monster
SandwichHorror opened this issue · 3 comments
When there is no boss monster nearby, the hostile bats fly in a straight line along the ground rather than wander. I suspect it might be to [0,0] because their code is telling them to seek out fellow bats or the zombie boss, and they lack the UUID or whatever they need of their master entity.
If a hostile bat has somehow lost its master, it should just wander about like a normal bat and aggro to any valid players within its range.
Actually...upon inspecting my code. The bats should despawn when the boss dies:
@Override
public void onDeath(DamageSource cause) {
super.onDeath(cause);
// Max out batSwarmTick so no more bats can spawn
batSwarmTick = BATSWARM_DELAY;
// Kill all bat minions when boss dies
if (!batMinions.isEmpty() ) {
for (EntityHostileBat bat : batMinions) {
bat.setDead();
}
}
}