mojira.dev
MC-9

Dropped anvil makes no sound when it breaks

Dropped anvil makes no sound on impact if it breaks

*Desired effect:*
Should make a shattering sound when it meets the ground

What actually happened was...:
No sound at all

Steps to Reproduce:
1. Drop heavily damaged anvil from 14 high


Code analysis by @unknown in this comment

Related issues

Comments

migrated

Not sure if is actually a bug or just something that doesn't happen - however can confirm that I get the behaviour in the description.

Ezekiel

Not technically a bug, more like a feature request.

migrated

Is this still a concern on Minecraft 1.4.4 Pre-Release? If so, please update the version affected.

This ticket is a grey area whether this is intended, or a bug, however, for now please confirm if its still an issue.

migrated

Hey I have an attachment to this if you drop an anvil on a half slab, it will pop out of the ground and possibly turn into a slightly damaged anvil, then slightly to very. However, if you drop a nery damaged anvil high enough so that it will become damaged,it stays as an entity. Yes, I know it's an entity because it lays on the skab as if the slab were a solid block.

migrated

Can you replicate this issue in latest version of the minecraft? If so, can you update the ticket?

migrated

How is this fixed when there is no assignee?

migrated

It's not, it's gonna be.

migrated

So it's just a planned fix?

migrated

Yes.

pizza2004

Can we get a confirmation of whether this happens in 13w10a and an update to the affected versions?

migrated

Confirmed for 08a

migrated

Confirmed in 14w10c

migrated

It appears that this bug (MC-61794) is now preventing this from occuring in 30c.

Sonicwave

Confirmed in 1.8-pre2.

Sonicwave

Confirmed in 1.8-pre3.

Sonicwave

Confirmed in 1.8.

rydian

Confirmed in 1.8.1-pre2.

migrated

Is this still a concern in Minecraft 1.8.1 pre-release 4? If so, be sure to update the "Affects Versions"

rydian

Still an issue in 1.8.1-pre5.

(Also I'm not sure if normal users /can/ upgrade the version list themselves on somebody else's submitted bug report.)

Sonicwave

Unfortunately not, only the reporter or mods can update an issue.

migrated

Still in 1.8.2-pre1

migrated

Remember to add 1.8.3 as an affected version. Hopefully this is fixed before the 1.9 release.

migrated

Confirmed for 1.8.4

migrated

Confirmed for 1.8.6

migrated

Confirmed for Snapshot 15w31a

[Mod] Neko

Confirmed for 15w41a

migrated

Confirmed for 15w44a.

migrated

Confirmed for 15w45a

migrated

Confirmed for 15w46a

migrated

Confirmed for 15w47a

migrated

Confirmed for 15w47b

migrated

Does it work for 15w47c?

migrated

Confirmed for 15w47c

migrated

Confirmed for 15w49a

migrated

confirmed for 15w49b

migrated

Comfirmed for 15w50a

migrated

Confirmed for 15w51a & 15w51b.

migrated

confirmed 16w02a

shufboyardee

Confirmed 16w07a

migrated

Confirmed for 1.9-pre1

migrated

Confirmed for 1.9-pre3

migrated

Confirmed for 1.9-pre4

Asteraoth

Confirmed in 16w15b

Asteraoth

Confirm for 1.9.3 pre-2

Asteraoth

Confirmed for 1.9.4

Asteraoth

Confirmed for 16w20a

migrated

Confirmed for 16w21a.

migrated

Confirmed for 16w21b.

migrated

Confirmed for 1.10-pre1.

migrated

Confirmed for 1.10-pre2.

migrated

Confirmed for 1.10.

migrated

Confirmed for 1.10.1.

migrated

Confirmed for 1.10.2

migrated

Since @unknown hasn't done a code analysis for this bug yet, I guess I'll do it myself. Minecraft 1.10 decompiled with MCP 9.30

The sound is played in net.minecraft.block.BlockAnvil.onEndFalling(World, BlockPos); the issue is that that method is not called if the entity is not set as a block when it lands.

To fix the bug, net.minecraft.block.BlockFalling.onEndFalling(World, BlockPos) could simply be called even if the entity does not set a block when it lands.

net.minecraft.entity.item.EntityFallingBlock.onUpdate()

// This part will be executed when the entity lands on the ground.
                        if (!canSetAsBlock) {
                            if (worldObj.canBlockBePlaced(block, blockpos1, true, EnumFacing.UP, (Entity) null, (ItemStack) null)
                                    && !BlockFalling.canFallThrough(worldObj.getBlockState(blockpos1.down()))
                                    && worldObj.setBlockState(blockpos1, fallTile, 3)) {
                                if (block instanceof BlockFalling) {
                                    // This plays the sound, in the case of an anvil.
                                    ((BlockFalling) block).onEndFalling(worldObj, blockpos1);
                                }
                                ...
                            }
                        } else if (block instanceof BlockFalling) {
                            // Added this elseif clause
                            ((BlockFalling) block).onEndFalling(worldObj, blockpos1);
                        }
FaRo1

It now makes a sound as if it would be used (for combining etc.). But no sound for landing.

migrated

@unknown if you listen better, you hear it's the sound when it breaks on use.

FaRo1

Yes, that contains the usage sound. Is it one sound file together? What I meant is that it shouldn't play the sound of the three metallic hits, but instead the one of a falling anvil. It just sounds like a normal anvil breaking after using it.

migrated

It's one sound.

I too think a different (new) sound would be better, but that's a feature request.

FaRo1

Well, the falling sound is still missing.

migrated

Agnes Larsson

Confirmed

sound

Minecraft 1.4.1, Minecraft 1.4.4, Minecraft 1.4.7, Snapshot 13w02b, Snapshot 13w03a, ..., Minecraft 1.10 Pre-Release 1, Minecraft 1.10 Pre-Release 2, Minecraft 1.10, Minecraft 1.10.1, Minecraft 1.10.2

Minecraft 16w32a

Retrieved