mojira.dev
MC-93651

No placement sound when placing blocks on fence

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

Linked issues

MC-93753 fence sound Resolved MC-93769 Fences placed on other fences don't have a sound, or subtitle. Resolved MC-94140 placing blocks on fences Resolved MC-94276 Silent Fenceposts Resolved MC-94344 Problem whit fence's sound!! Resolved

Attachments

Comments 46

Can confirm.

Confirmed for 15w50a

Still an issue in 15w51b

Donald Granger

still seems to be an issue in 16w02a

Issue confirmed for 16w02a.

36 more comments

Underlying cause is MC-21433 (which is WIA :/)

That is not quite the problem here as the block is placed. The problem is that the client always asumes that it interacted with the fence whereas the server does not behave like this and places the block.

Read the comments on that issue. They're the same effectively (it's just that the issue title is not as detailed). The full title I'd give to MC-21433 is "Fences are always interactive blocks clientside".

To put it another way, the fix you're suggesting (which I approve of) would also fix MC-21433.

Sorry, yes you are right. I thought they acted the same way iron doors or trapdoors act.

Mods please do not close this report as a duplicate because then we have an unnecessary discussion about whether or not it is WAI and like @unknown said it is definitely not.

I would suggest fixing it by having client and server call the method net.minecraft.item.ItemLead.attachToFence(EntityPlayer, World, BlockPos) but change this method to only create the LeashKnot and leash the entity server-side.

Note: The method net.minecraft.item.ItemLead.onItemUse(ItemStack, EntityPlayer, World, BlockPos, EnumHand, EnumFacing, float, float, float) contains kind of dead code because if the player successfully interacts with a block it will not use the item. If the player fails right clicking while holding a leash, this method will fail as well.

Still in 16w38a.

Moore M

Erik Broes

Confirmed

Minecraft 15w49a, Minecraft 15w49b, Minecraft 15w50a, Minecraft 15w51b, Minecraft 16w02a, ..., Minecraft 16w35a, Minecraft 16w36a, Minecraft 16w38a, Minecraft 16w39a, Minecraft 16w39b

Minecraft 16w39c

Retrieved