WHen Right Clicking Fences it acts as if you are interacting with the fence (as if when u right click an iron door)
Related issues
is duplicated by
relates to
Attachments
Comments


Can confirm.
Indeed. Works as intended.

Duplicate of MC-4582

How is this works as intended? It adds several bugs, and makes no sense.
See MC-23384.
Also, the only reason why it was a duplicate of the other is it is assuming the other is a intended function, so it is a infinite loop.

Its the root bug. The client interacts with the fence, and it thus ignores any of the place code. That's also the cause for the sign bug. I'll be using MCP to find the code that was changed.

Ok, here is the root bug, in MCP names:
/**
* Called upon block activation (right click on the block.)
*/
public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9)
{
return par1World.isRemote ? true : ItemLeash.func_135066_a(par5EntityPlayer, par1World, par2, par3, par4);
}
It returns true if the world isn't remote, making the client always return true, and not place, but the server checks if there is a leash there.
The entire purpose of this change is so that when you rightclick on a fence with a lead, it does the rightclick animation. Is that really needed?
If set to false, all the buggy side-effects vanish, except leashes don't have the rightclick animation. That's fine, in my opinion.

WTF grum? That makes no sense whatsoever?
This means that if you are shooting a bow, and there is a fence in front of you, you can't draw the bow. Which I have run into several times. Same with blocking with a sword. So the bug has real consequences.
If you are holding a leash then yes, a fence is interactive. But there is no reason to make it interactive when holding a bow.

I agree.
But, interestingly, you actualy still gain the effect of blocking while looking at a fence, and you can move at full speed too.
So it is abusable.
The easiest fix is to change the oneline of code when it is activated (right clicked) from
/**
* Called upon block activation (right click on the block.)
*/
public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9)
{
return par1World.isRemote ? true : ItemLeash.func_135066_a(par5EntityPlayer, par1World, par2, par3, par4);
}
to
/**
* Called upon block activation (right click on the block.)
*/
public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9)
{
return par1World.isRemote ? false : ItemLeash.func_135066_a(par5EntityPlayer, par1World, par2, par3, par4);
}
(Basicly what that does is: If the game is in multiplayer, always do the rightclick action for the fence clientside (and skip placement), while on the server, it does a fence action only if there is a lead, otherwise it places the block.)
Changing that will make it default to not placing clientside, with the negative effect of no right click effect when rightclicking on a leash, and the positive effect of fixing a x-ray bug, fast movement while blocking, and several other things.
(And you probably could make it have no negative effects with a bit of work)
Should this be reopened due to MC-4582 being fixed?

Deniz Tufan Arslan: Last I checked, the purpose of fixing bugs is to improve the game, not to prevent the creative use of block interaction. Not only is the existence of fish farms not an issue, but the trap door fix already got people to find ways around relying on fences anyway.

this seems to be fixed in 16w39c
Back in 16w40a. Was originally marked WAI.