Add sounds for the fairy

This commit is contained in:
Sollace 2021-12-27 13:04:50 +02:00
parent b7e119a57b
commit 135c8933fd

View file

@ -28,6 +28,8 @@ import net.minecraft.entity.mob.PathAwareEntity;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.nbt.NbtCompound; import net.minecraft.nbt.NbtCompound;
import net.minecraft.nbt.NbtHelper; import net.minecraft.nbt.NbtHelper;
import net.minecraft.sound.SoundEvent;
import net.minecraft.sound.SoundEvents;
import net.minecraft.util.ActionResult; import net.minecraft.util.ActionResult;
import net.minecraft.util.Hand; import net.minecraft.util.Hand;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
@ -75,6 +77,18 @@ public class FairyEntity extends PathAwareEntity implements LightEmittingEntity,
goalSelector.add(7, new WanderAroundGoal(this, 1)); goalSelector.add(7, new WanderAroundGoal(this, 1));
} }
@Override
@Nullable
protected SoundEvent getHurtSound(DamageSource source) {
return SoundEvents.ENTITY_BAT_HURT;
}
@Override
@Nullable
protected SoundEvent getDeathSound() {
return SoundEvents.ENTITY_BAT_DEATH;
}
@Override @Override
public int getLightLevel() { public int getLightLevel() {
return 15; return 15;