diff --git a/src/main/java/net/minecraft/entity/player/EntityPlayer.java b/src/main/java/net/minecraft/entity/player/EntityPlayer.java index 1a7278e..eeafc6d 100644 --- a/src/main/java/net/minecraft/entity/player/EntityPlayer.java +++ b/src/main/java/net/minecraft/entity/player/EntityPlayer.java @@ -1236,8 +1236,8 @@ public abstract class EntityPlayer extends EntityLivingBase implements ICommandS i = i + EnchantmentHelper.getKnockbackModifier(this); if (this.isSprinting() && flag) { - this.worldObj.playSound(this.posX, this.posY, this.posZ, "entity.player.attack.knockback", 1.0F, - 1.0F, false); + this.worldObj.playSoundAtEntity(this, "entity.player.attack.knockback", 1.0F, + 1.0F); ++i; flag1 = true; } @@ -1312,9 +1312,9 @@ public abstract class EntityPlayer extends EntityLivingBase implements ICommandS } } - this.worldObj.playSound(this.posX, this.posY, this.posZ, "entity.player.attack.sweep", + this.worldObj.playSoundAtEntity(this, "entity.player.attack.sweep", 1.0F, - 1.0F, false); + 1.0F); this.spawnSweepParticles(); } @@ -1328,21 +1328,21 @@ public abstract class EntityPlayer extends EntityLivingBase implements ICommandS } if (flag2) { - this.worldObj.playSound(this.posX, this.posY, this.posZ, "entity.player.attack.crit", + this.worldObj.playSoundAtEntity(this, "entity.player.attack.crit", 1.0F, - 1.0F, false); + 1.0F); this.onCriticalHit(targetEntity); } if (!flag2 && !flag3) { if (flag) { - this.worldObj.playSound(this.posX, this.posY, this.posZ, + this.worldObj.playSoundAtEntity(this, "entity.player.attack.strong", 1.0F, - 1.0F, false); + 1.0F); } else { - this.worldObj.playSound(this.posX, this.posY, this.posZ, + this.worldObj.playSoundAtEntity(this, "entity.player.attack.weak", 1.0F, - 1.0F, false); + 1.0F); } } @@ -1422,8 +1422,8 @@ public abstract class EntityPlayer extends EntityLivingBase implements ICommandS this.addExhaustion(0.3F); } else { - this.worldObj.playSound(this.posX, this.posY, this.posZ, "entity.player.attack.weak", 1.0F, - 1.0F, false); + this.worldObj.playSoundAtEntity(this, "entity.player.attack.weak", 1.0F, + 1.0F); if (flag4) { targetEntity.extinguish();