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 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> aku, final Level bjw) {
        super(aku, bjw);
    }
    
    @Override
    protected SoundEvent getAmbientSound() {
        super.getAmbientSound();
        return SoundEvents.DONKEY_AMBIENT;
    }
    
    @Override
    protected SoundEvent getDeathSound() {
        super.getDeathSound();
        return SoundEvents.DONKEY_DEATH;
    }
    
    @Override
    protected SoundEvent getHurtSound(final DamageSource ajz) {
        super.getHurtSound(ajz);
        return SoundEvents.DONKEY_HURT;
    }
    
    @Override
    public boolean canMate(final Animal atc) {
        return atc != this && (atc instanceof Donkey || atc instanceof Horse) && this.canParent() && ((AbstractHorse)atc).canParent();
    }
    
    @Override
    public AgableMob getBreedOffspring(final AgableMob ako) {
        final EntityType<? extends AbstractHorse> aku3 = (ako instanceof Horse) ? EntityType.MULE : EntityType.DONKEY;
        final AbstractHorse aue4 = (AbstractHorse)aku3.create(this.level);
        this.setOffspringAttributes(ako, aue4);
        return aue4;
    }
}
