mojira.dev
MC-72634

Lily Pad placement noise inconsistent

The bug

Lily pads only make the correct placement sound when right-clicking water. When right-clicking a block adjacent to water, it makes the grass placement sound.

Code analysis

Code analysis by @unknown can be found in this comment.

Related issues

Attachments

Comments

migrated
[media]
wobst.michael

Not able to reproduce. Placed around 200 Lily pads right now with no issue.

Cultist_O

This occurs when you place a lily pad against a block rather than against water (so Itay was probably encountering it intermittently as unknowingly clicked the shore's or adjacent lily pad's hitbox rather than the water's)

Please reopen

Cultist_O

Still present in 16w21b
Is it useful for me to comment like this for every snapshot (after appropriate testing) or is that obnoxious?

Also perhaps the description and/or title should be updated to be more useful.
I Propose:
Lily Pad placement noise inconsistent

Lily pads only make the correct placement sound when right clicking water. When right clicking a block adjacent to water, it makes the grass placement sound

kumasasa

@unknown: Set you as reporter of this ticket, edit appropriately.

marcono1234

Please link to this comment in the description

The following is based on a decompiled version of Minecraft 1.10 using MCP 9.30.

The reason for this is that right clicking with a lily on the side of a lilypad calls the method net.minecraft.item.ItemBlock.onItemUse(ItemStack, EntityPlayer, World, BlockPos, EnumHand, EnumFacing, float, float, float) which uses the placement sound of the sound type of the block, which is PLANT, whereas right clicking on water counts as using the item and calls net.minecraft.item.ItemLilyPad.onItemRightClick(ItemStack, World, EntityPlayer, EnumHand) which uses the correct placement sound.

This could be fixed by using a sound type for the lilypad which is based on the plant sound type but uses the lilypad's placement sound.

migrated

Please do not mark unreleased versions as affected.
You don't have access to them yet.

Cultist_O

17w18b HAS been released, and is affected

Cultist_O

This bug appears to be fixed (or inconsiquenital) in 17w48a, in that lily pads can no longer be placed against blocks. (You must now be looking at the water's surface.)

This new behaviour persists in 17w49a

wobst.michael

As already mentioned by @unknown, this appears to be fixed as of 17w48a.

Cultist_O

(Unassigned)

Confirmed

Minecraft 1.8, Minecraft 1.9.4, Minecraft 16w21b, Minecraft 1.10 Pre-Release 1, Minecraft 1.10 Pre-Release 2, ..., Minecraft 17w45a, Minecraft 17w45b, Minecraft 17w46a, Minecraft 17w47a, Minecraft 17w47b

Minecraft 17w50a

Retrieved