mojira.dev
MC-6897

Weighted pressure plates make wood sounds when placing and destroying

The Bug

Weighted pressure plates made out of metal make the wood sounds for breaking and placing. This occurs in both survival and creative mode.

Expected Result

It would make the metal noises for placing and breaking the block.

Observed Result

It made the wood noise for placing and breaking the block.

How to Reproduce

1. Place Weighted pressure plates to hear the wood place sound occur.

2. Destroy Weighted pressure plates to hear the wood break sound occur.

Code analysis

Code analysis by @unknown in this comment.

Linked issues

MC-12366 Weighted pressureplate issue Resolved MC-18485 Iron and Gold weight pressure pads make wood noises Resolved MC-21902 Wrong Sounds Resolved MC-25274 Weighted Pressure Plates Have The Wood Template Of Sound Effects Resolved MC-25470 gold/iron pressure plates make wood sound when breaking Resolved

Attachments

Comments 31

Confirmed.

Is this still a concern in the latest Minecraft version 14w08a? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.

Yes, still in 14w10c.

Confirmed for 14w34d

Confirmed for 1.8.

21 more comments

I can confirm this behavior in 1.18 Release Candidate 3.

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 LIGHT_WEIGHTED_PRESSURE_PLATE = register("light_weighted_pressure_plate", new WeightedPressurePlateBlock(15, BlockBehaviour.Properties.of(Material.METAL, MaterialColor.GOLD).requiresCorrectToolForDrops().noCollission().strength(0.5F).sound(SoundType.WOOD)));

   public static final Block HEAVY_WEIGHTED_PRESSURE_PLATE = register("heavy_weighted_pressure_plate", new WeightedPressurePlateBlock(150, BlockBehaviour.Properties.of(Material.METAL).requiresCorrectToolForDrops().noCollission().strength(0.5F).sound(SoundType.WOOD)));
   ...

If we look at the above class, we can see that light and heavy weighted pressure plates utilize the .sound(SoundType.WOOD) method which is used for determining whether a block should produce wood sounds.

Potential Fix:

Simply replacing the .sound(SoundType.WOOD) method with .sound(SoundType.METAL) within these lines of code should resolve this problem, as light and heavy weighted pressure plates are predominantly constructed of metal. The correct lines of code within their class should look something like the following:

net.minecraft.world.level.block.Blocks.java

public class Blocks {
   ...
   public static final Block LIGHT_WEIGHTED_PRESSURE_PLATE = register("light_weighted_pressure_plate", new WeightedPressurePlateBlock(15, BlockBehaviour.Properties.of(Material.METAL, MaterialColor.GOLD).requiresCorrectToolForDrops().noCollission().strength(0.5F).sound(SoundType.METAL)));

   public static final Block HEAVY_WEIGHTED_PRESSURE_PLATE = register("heavy_weighted_pressure_plate", new WeightedPressurePlateBlock(150, BlockBehaviour.Properties.of(Material.METAL).requiresCorrectToolForDrops().noCollission().strength(0.5F).sound(SoundType.METAL)));
   ...
Austin Dean Koke

Can confirm in 22w20a.

This was fixed in 22w42a.

Why is this "Won't Fix?" Is it really that hard to change the sound effects?

Read the comment before yours.

user-4cf05

Makzevu

(Unassigned)

Confirmed

Low

Parity, Sound

heavy_weighted_pressure_plate, incorrect-block-sound, light_weighted_pressure_plate, vanilla-parity, weighted-pressure-plate

Snapshot 13w01b, Snapshot 13w02a, Minecraft 1.5, Snapshot 13w11a, Minecraft 1.5.1, ..., 1.17.1, 21w39a, 1.18 Release Candidate 3, 1.18, 1.18.1

Retrieved