From 3a0685ae5976a3be32199828b3fb830c41713fed Mon Sep 17 00:00:00 2001 From: Sollace Date: Tue, 2 Apr 2019 21:03:56 +0200 Subject: [PATCH] Fixed butterflies not being totally silent --- .../unicopia/entity/EntityButterfly.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/main/java/com/minelittlepony/unicopia/entity/EntityButterfly.java b/src/main/java/com/minelittlepony/unicopia/entity/EntityButterfly.java index 1c0fcae4..30c43121 100644 --- a/src/main/java/com/minelittlepony/unicopia/entity/EntityButterfly.java +++ b/src/main/java/com/minelittlepony/unicopia/entity/EntityButterfly.java @@ -2,6 +2,8 @@ package com.minelittlepony.unicopia.entity; import java.util.Random; +import javax.annotation.Nullable; + import com.minelittlepony.unicopia.Unicopia; import net.minecraft.block.state.IBlockState; @@ -13,7 +15,9 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.network.datasync.DataParameter; import net.minecraft.network.datasync.DataSerializers; import net.minecraft.network.datasync.EntityDataManager; +import net.minecraft.util.DamageSource; import net.minecraft.util.ResourceLocation; +import net.minecraft.util.SoundEvent; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.MathHelper; import net.minecraft.world.World; @@ -40,6 +44,18 @@ public class EntityButterfly extends EntityAmbientCreature { setResting(true); } + @Nullable + @Override + protected SoundEvent getHurtSound(DamageSource damageSourceIn) { + return null; + } + + @Nullable + @Override + protected SoundEvent getDeathSound() { + return null; + } + @Override protected void applyEntityAttributes() { super.applyEntityAttributes();