Closed SandwichHorror closed 2 years ago
I’ll probably make them despawn instead.
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();
}
}
}
fixed in 2.3.23
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.