Rough Mobs Revamped

Rough Mobs Revamped

2M Downloads

[Bug]Hostile Bats Path to Unknown Destination Without Boss Monster

SandwichHorror opened this issue · 3 comments

commented

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.

commented

I’ll probably make them despawn instead.

commented

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();
	        }
        }
    }
commented

fixed in 2.3.23