mojira.dev
MC-4582

Can't eat, throw, or shoot while looking at an Iron Door/Iron Trapdoor

You can't eat while looking at an Iron Door.

Also affects all other right-click actions.

VERY annoying.


Code analysis by @unknown in this comment

Related issues

MC-3413 Hoe on cauldron bug MC-7844 Continuous Right Clicking Iron Doors MC-9025 Can't fire a bow at an iron door MC-10107 Carrots and a Cauldron Glitch MC-15345 Food will single-"punch" an iron door as opposed to eating the food MC-19089 You can't use item while looking at fence MC-19136 Right-clicking fence with food MC-19504 Placing Blocks/Hitting Fences MC-19679 Punching fence when right clicked MC-20813 Eating at Fence MC-21537 Not able to consume food while facing fence post MC-22379 Right Clicking Fences MC-22829 fence bug MC-22999 carrots and fences MC-24298 Food Bug MC-24592 Right Clicking Fences Makes The Punch Action MC-24994 Cannot block with sword when facing a fence post MC-25284 Sword - Fence MC-25546 Fences + Anything MC-25794 Right Click with Steak on Fence results in swing animation MC-25969 Right-Clicking on a fence causes the player to swing fist MC-26670 right click on fence post with food not working MC-26822 Right clicking in Nether Fence and Fence causes block breaking animation MC-26850 Right clicking on fences makes you punch them MC-26936 Weird action when right clicking on fence MC-27903 Water cannot be placed on fences (clicking on fence with water bucket) MC-28417 Can't drink potions whilist looking at fence MC-28428 Eating vs Fence MC-33452 Right-clicking on a fence with a sword/bow shows the open animation instead of blocking/shooting MC-36297 Fence Bug MC-43094 Can't eat while aimed at fences MC-45594 Wrong action with sword MC-45647 lava invisible over wodden fence MC-46353 palcing blockes on iron doors requires shift clicking MC-49711 Swords are Buggy MC-50078 Cant eat while facing fence MC-51275 Right-Clicking Fences MC-53146 can't eat food while aiming on a fence MC-54001 Right clicking fences with sword bug MC-54573 the WATER!! MC-56826 Arm moves when right mouse button is pressed and looking at Fence or Nether Brick Fence with empty hand MC-61673 Use animation plays superfluously when right-clicking at an iron door MC-65046 Cannot use items when looking at a fence MC-66536 fence + liquid glitch MC-67012 Right Clicking Fence Makes "Open Chest" Animation MC-69604 If the cursor is looking at armor stand, you can not eat food, drink potions, and other activities. MC-71816 Netherbrick Fences are rightclickable MC-73569 You can "hit" fences by right clicking MC-76956 cant eat or drink while face fence. MC-77885 Right-click fence with a sword making hitting animation MC-79781 Bows Used Incorrectly On Fences MC-86451 Right click with any fence uses with hand MC-87610 Food is not consumed when aiming at fences MC-92209 Items with right-click functionality don't work while looking at fences. MC-94853 Right clicking fences with different items when standing

Comments

migrated

I guess it is because iron doors are handled as "doors" internally.
With wooden doors not eating/drinking/whatever makes sense because you right click the door to open it.
However since you can not open an iron door by right clicking it this should be changed for iron doors.

migrated

Confirmed in 1.5.1.

migrated

Turns out that many other right-click actions don't work well with Iron doors.

migrated

I did some work with Iron Doors myself, and I found this:

It is possible to retain the door functionality while doing away with the right-click actions.

It crashes quite often, but maybe I did something wrong.

If I can do it, Mojang definitely can do it.

kumasasa

Working as intendend (See comment in MC-21433)

migrated

Grum said that the bug with fences is intended, but that's because leads can be attached to fences by right-clicking. Iron doors and cauldrons, on the other hand, don't have any right-click action, so I think this ticket should be reopened.

migrated

This also happens with Nether Brick Fence. Please add this to the bug report.

migrated

I also think it should be re-opened.

Not being able to eat at a fence is clearly experienced as a bug.

Even if the fences etc are an interact-able block, there should be an exception in the code for eating. Period.

kumasasa

@unknown commented in MC-21433

Indeed. Works as intended.

For feature suggestions or changes please see: Minecraft Suggestions on Reddit.

migrated

Grum only said it's intended with fences, not with iron doors or cauldrons. It should at least be fixed for iron doors, which don't have any right click action.

migrated

I agree that this should be considered a bug. This behavior serves no purpose and really gets in the way.

migrated

Only fences were resolved as intended, nor doors or cauldrons.

marcono1234

Only iron doors and trapdoors are affected, for fences see MC-93651

marcono1234

Please link to this comment in the description

The following is based on decompiled version of Minecraft 1.9 using MCP 9.24 beta. All method and class names are the names used in the decompiled version.

The reason why this happens is because the methods net.minecraft.block.BlockDoor.onBlockActivated(World, BlockPos, IBlockState, EntityPlayer, EnumHand, ItemStack, EnumFacing, float, float, float) and net.minecraft.block.BlockTrapDoor.onBlockActivated(World, BlockPos, IBlockState, EntityPlayer, EnumHand, ItemStack, EnumFacing, float, float, float) return true if the material is iron.

migrated

Reopened, and changing report to only take account of iron (trap)doors, as fences was resolved as intended by @unknown because they're intractable blocks, but iron (trap)doors don't know any form of interaction.

Asteraoth

Confirmed for 1.9.4

Asteraoth

Confirmed for 16w20a

migrated

Confirmed for 1.10-pre1

migrated

noooo! this breaks AFK fish farms!

[Mod] Neko

Find an alternative. You can use a piston and a fence instead of an iron door.

migrated

You know you can just left shift while looking at iron doors in order to use items.

migrated

It's already fixed (and there was no reason for them to be interactable blocks).

migrated

True.

migrated

The fix causes weird behavior in 16w43a.

Instead of eating like normal, eating takes 3 times as long as normal. The eating animation stops after the normal lenfth, but the sound and particles continue. After this 3 times longer period, one food item is consumed and it's hunger and saturation applied once.

FaRo1

That's just lag and not specific to the current snapshot. I've seen the same in a video in 1.7.10. You are probably on a server. If you press tab (or whatever key you have for the player list), you see a network connection indicator that's not completely green. If you are in singleplayer, then you should look for lag sources on your internal server (permanently running machines, entities, etc.).

migrated

I'm on single player. Computer is completely idle, no lag, and it's 100% repeatable.

[edit] Tried it again in a brand new world. Same thing.

[edit2] Ok it has nothing to do with fences 😛

migrated

Agnes Larsson

Confirmed

Minecraft 1.4.5, Snapshot 12w50a, Minecraft 1.4.6, Minecraft 1.4.7, Snapshot 13w07a, ..., Minecraft 1.9.3, Minecraft 1.9.4, Minecraft 16w20a, Minecraft 1.10 Pre-Release 1, Minecraft 1.10.2

Minecraft 16w33a

Retrieved