Skip to content

Commit

Permalink
Make squid inking sound only play when extra mob sounds config is ena…
Browse files Browse the repository at this point in the history
…bled
  • Loading branch information
Roadhog360 committed Aug 26, 2024
1 parent e09c104 commit 19defed
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1693,7 +1693,9 @@ public void livingHurtEvent(LivingHurtEvent event) {
serverWorld.func_147487_a("largesmoke", cx, cy, cz, 5, 0.0, 0.0, 0.0, 0.08);
if (ConfigMixins.newMobSounds) {
float pitch = (r.nextFloat() - r.nextFloat()) * 0.2F + (target.isChild() ? 1.5F : 1.0F);
w.playSoundAtEntity(target, Reference.MCAssetVer + ":entity.squid.squirt", 0.4F, pitch);
if(ConfigMixins.newMobSounds) {
w.playSoundAtEntity(target, Reference.MCAssetVer + ":entity.squid.squirt", 0.4F, pitch);
}
}
if (target.isInWater()) {
PotionEffect activeEff = target.getActivePotionEffect(Potion.blindness);
Expand Down

0 comments on commit 19defed

Please sign in to comment.