Skip to content

Commit

Permalink
Fix hurt sounds
Browse files Browse the repository at this point in the history
  • Loading branch information
asanetargoss committed Aug 9, 2019
1 parent 0ee848e commit b04e918
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/mchorse/metamorph/api/morphs/EntityMorph.java
Original file line number Diff line number Diff line change
Expand Up @@ -782,8 +782,8 @@ public SoundEvent getHurtSound(EntityLivingBase target, DamageSource damageSourc

try
{
Method methodHurtSound = InvokeUtil.getPrivateMethod(entity.getClass(), EntityLivingBase.class, SoundHandler.GET_HURT_SOUND.getName());
SoundEvent hurtSound = (SoundEvent) methodHurtSound.invoke(entity);
Method methodHurtSound = InvokeUtil.getPrivateMethod(entity.getClass(), EntityLivingBase.class, SoundHandler.GET_HURT_SOUND.getName(), DamageSource.class);
SoundEvent hurtSound = (SoundEvent) methodHurtSound.invoke(entity, damageSource);
if (hurtSound == null)
{
hurtSound = SoundHandler.NO_SOUND;
Expand Down

0 comments on commit b04e918

Please sign in to comment.