package net.minecraft.world.entity.animal.horse;

import net.minecraft.world.entity.AgableMob;
import net.minecraft.world.entity.animal.Animal;
import net.minecraft.world.damagesource.DamageSource;
import javax.annotation.Nullable;
import net.minecraft.sounds.SoundEvents;
import net.minecraft.sounds.SoundEvent;
import net.minecraft.world.level.Level;
import net.minecraft.world.entity.EntityType;

public class Donkey extends AbstractChestedHorse {
    public Donkey(final EntityType<? extends Donkey> aoq, final Level bqb) {
        super(aoq, bqb);
    }
    
    @Override
    protected SoundEvent getAmbientSound() {
        super.getAmbientSound();
        return SoundEvents.DONKEY_AMBIENT;
    }
    
    @Override
    protected SoundEvent getAngrySound() {
        super.getAngrySound();
        return SoundEvents.DONKEY_ANGRY;
    }
    
    @Override
    protected SoundEvent getDeathSound() {
        super.getDeathSound();
        return SoundEvents.DONKEY_DEATH;
    }
    
    @Nullable
    @Override
    protected SoundEvent getEatingSound() {
        return SoundEvents.DONKEY_EAT;
    }
    
    @Override
    protected SoundEvent getHurtSound(final DamageSource anw) {
        super.getHurtSound(anw);
        return SoundEvents.DONKEY_HURT;
    }
    
    @Override
    public boolean canMate(final Animal ayk) {
        return ayk != this && (ayk instanceof Donkey || ayk instanceof Horse) && this.canParent() && ((AbstractHorse)ayk).canParent();
    }
    
    @Override
    public AgableMob getBreedOffspring(final AgableMob aok) {
        final EntityType<? extends AbstractHorse> aoq3 = (aok instanceof Horse) ? EntityType.MULE : EntityType.DONKEY;
        final AbstractHorse azm4 = (AbstractHorse)aoq3.create(this.level);
        this.setOffspringAttributes(aok, azm4);
        return azm4;
    }
}
