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 aus) {
        super(aus);
    }
    
    @Override
    public boolean isSitting() {
        return true;
    }
    
    @Override
    public float onHurt(final DamageSource ajz, final float float2) {
        if (ajz.getDirectEntity() instanceof AbstractArrow) {
            ajz.getDirectEntity().setSecondsOnFire(1);
            return 0.0f;
        }
        return super.onHurt(ajz, float2);
    }
}
