Skip to content

Commit

Permalink
Fix anvil sound when landing on several blocks. (#827)
Browse files Browse the repository at this point in the history
  • Loading branch information
hugokerstens authored and aramperes committed Feb 4, 2018
1 parent c5eca6c commit 85499e5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main/java/net/glowstone/entity/objects/GlowFallingBlock.java
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,6 @@ protected void pulsePhysics() {
remove();
} else {
placeFallingBlock();
if (material == Material.ANVIL) {
ThreadLocalRandom random = ThreadLocalRandom.current();
world.playSound(location, Sound.BLOCK_ANVIL_FALL, 4, (1.0F
+ (random.nextFloat() - random.nextFloat()) * 0.2F) * 0.7F);
}
remove();
}
}
Expand All @@ -169,6 +164,11 @@ private void placeFallingBlock() {
}
}
}
if (material == Material.ANVIL) {
ThreadLocalRandom random = ThreadLocalRandom.current();
world.playSound(location, Sound.BLOCK_ANVIL_FALL, 4, (1.0F
+ (random.nextFloat() - random.nextFloat()) * 0.2F) * 0.7F);
}
}


Expand Down

0 comments on commit 85499e5

Please sign in to comment.