fix swing sounds
This commit is contained in:
parent
d082d52dd1
commit
c2999e355e
|
@ -1236,8 +1236,8 @@ public abstract class EntityPlayer extends EntityLivingBase implements ICommandS
|
||||||
i = i + EnchantmentHelper.getKnockbackModifier(this);
|
i = i + EnchantmentHelper.getKnockbackModifier(this);
|
||||||
|
|
||||||
if (this.isSprinting() && flag) {
|
if (this.isSprinting() && flag) {
|
||||||
this.worldObj.playSound(this.posX, this.posY, this.posZ, "entity.player.attack.knockback", 1.0F,
|
this.worldObj.playSoundAtEntity(this, "entity.player.attack.knockback", 1.0F,
|
||||||
1.0F, false);
|
1.0F);
|
||||||
++i;
|
++i;
|
||||||
flag1 = true;
|
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,
|
||||||
1.0F, false);
|
1.0F);
|
||||||
this.spawnSweepParticles();
|
this.spawnSweepParticles();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1328,21 +1328,21 @@ public abstract class EntityPlayer extends EntityLivingBase implements ICommandS
|
||||||
}
|
}
|
||||||
|
|
||||||
if (flag2) {
|
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,
|
||||||
1.0F, false);
|
1.0F);
|
||||||
this.onCriticalHit(targetEntity);
|
this.onCriticalHit(targetEntity);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!flag2 && !flag3) {
|
if (!flag2 && !flag3) {
|
||||||
if (flag) {
|
if (flag) {
|
||||||
this.worldObj.playSound(this.posX, this.posY, this.posZ,
|
this.worldObj.playSoundAtEntity(this,
|
||||||
"entity.player.attack.strong", 1.0F,
|
"entity.player.attack.strong", 1.0F,
|
||||||
1.0F, false);
|
1.0F);
|
||||||
} else {
|
} else {
|
||||||
this.worldObj.playSound(this.posX, this.posY, this.posZ,
|
this.worldObj.playSoundAtEntity(this,
|
||||||
"entity.player.attack.weak", 1.0F,
|
"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);
|
this.addExhaustion(0.3F);
|
||||||
} else {
|
} else {
|
||||||
this.worldObj.playSound(this.posX, this.posY, this.posZ, "entity.player.attack.weak", 1.0F,
|
this.worldObj.playSoundAtEntity(this, "entity.player.attack.weak", 1.0F,
|
||||||
1.0F, false);
|
1.0F);
|
||||||
|
|
||||||
if (flag4) {
|
if (flag4) {
|
||||||
targetEntity.extinguish();
|
targetEntity.extinguish();
|
||||||
|
|
Loading…
Reference in New Issue