package net.minecraft.world.entity.boss.enderdragon.phases;

import net.minecraft.world.entity.projectile.AbstractArrow;
import net.minecraft.world.damagesource.DamageSource;
import net.minecraft.world.entity.boss.enderdragon.EnderDragon;

public abstract class AbstractDragonSittingPhase extends AbstractDragonPhaseInstance {
    public AbstractDragonSittingPhase(final EnderDragon bac) {
        super(bac);
    }
    
    @Override
    public boolean isSitting() {
        return true;
    }
    
    @Override
    public float onHurt(final DamageSource anw, final float float2) {
        if (anw.getDirectEntity() instanceof AbstractArrow) {
            anw.getDirectEntity().setSecondsOnFire(1);
            return 0.0f;
        }
        return super.onHurt(anw, float2);
    }
}
