mojira.dev
MC-21433

Fences Are Interactive Blocks

WHen Right Clicking Fences it acts as if you are interacting with the fence (as if when u right click an iron door)

Linked issues

Attachments

Comments 13

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.

I don't see the relation to MC-23384 AKA MC-22395

3 more comments

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.

Gian Cedric D. Mamaradlo

(Unassigned)

Unconfirmed

fence

Minecraft 1.6.1

Minecraft 16w39c

Retrieved