The Bug
The Block of Raw Copper uses the stone sounds instead of the copper sounds despite being a copper block
How to reproduce
Place a Block of Raw Copper
❌ The sound played upon placing the block is a stone sound
Expected results
A copper sound, rather than a stone sound, would be played upon placing a block of raw copper.
Code analysis
Code analysis by @unknown provided in this comment.
Linked issues
relates to 1
Attachments
Comments 17
I can confirm this behavior in 1.18 Release Candidate 1.
Here's a code analysis along with a potential fix regarding this issue. The following is based on a decompiled version of Minecraft 1.17.1 using MCP-Reborn.
Code Analysis:
net.minecraft.world.level.block.Blocks.java
public class Blocks {
...
public static final Block RAW_COPPER_BLOCK = register("raw_copper_block", new Block(BlockBehaviour.Properties.of(Material.STONE, MaterialColor.COLOR_ORANGE).requiresCorrectToolForDrops().strength(5.0F, 6.0F)));
...
If we look at the above class, we can see that raw copper blocks do not contain the method sound(SoundType.COPPER)
which is used for determining whether a block should produce copper sounds.
Potential Fix:
Simply adding the sound(SoundType.COPPER)
method within this line of code should resolve this problem. The correct line of code within its class should look something like the following:
net.minecraft.world.level.block.Blocks.java
public class Blocks {
...
public static final Block RAW_COPPER_BLOCK = register("raw_copper_block", new Block(BlockBehaviour.Properties.of(Material.STONE, MaterialColor.COLOR_ORANGE).requiresCorrectToolForDrops().strength(5.0F, 6.0F).sound(SoundType.COPPER)));
...
Can confirm.