Items and blocks can't be put in an item frame with the off-hand
The bug
If you try put an item or a block in an item frame with the off-hand if you have nothing in you main hand, nothing happens.
Code analysis
Based on 1.11 decompiled using MCP 9.35 rc1
The problem is that the method net.minecraft.entity.item.EntityItemFrame.processInitialInteract(EntityPlayer, EnumHand) always returns true even if the no item was placed nor the item in the item frame was rotated. This makes the game skip the offhand. The check whether or not the world is a server world has to be removed as well because otherwise the client would always try to interact with both hands because it would always fail.
Fix
public boolean processInitialInteract(EntityPlayer player, EnumHand hand) { ItemStack itemstack = player.getHeldItem(hand); // if (!this.world.isRemote) // { if (this.getDisplayedItem().isEmpty()) { if (!itemstack.isEmpty()) { this.setDisplayedItem(itemstack); if (!player.capabilities.isCreativeMode) { itemstack.shrink(1); } ++ return true; } ++ return false; } else { this.playSound(SoundEvents.ENTITY_ITEMFRAME_ROTATE_ITEM, 1.0F, 1.0F); this.setItemRotation(this.getRotation() + 1); } // } return true; }
Linked Issues
is duplicated by1
relates to4
- Fixed
[Helper] Lord_QuadratoNathan
- 15
- 9
- Confirmed
- (Unassigned)
- item item-frame off-hand
15w31c - 19w40a
15w31c 15w33b 15w44b 16w06a 1.10.2 16w32a 16w32b 16w33a 16w35a 16w36a 16w38a 16w39a 16w39b 16w39c 16w40a 16w41a 16w42a 16w43a 16w44a 1.11-pre1 1.11 16w50a 1.11.2 17w06a 17w13a 17w13b 17w14a 17w15a 1.12-pre5 1.12-pre6 1.12.1 1.12.2 17w45b 17w46a 17w47a 17w47b 17w50a 18w05a 18w11a 18w22a 18w22c 1.13-pre1 1.13-pre2 1.13-pre3 1.13-pre4 1.13-pre5 1.13-pre6 1.13-pre7 1.13-pre8 1.13-pre9 1.13-pre10 1.13 18w30b 18w31a 18w32a 1.13.1-pre1 1.13.1-pre2 1.13.1 1.13.2-pre1 1.13.2-pre2 1.13.2 18w43a 18w43b 18w43c 18w44a 18w45a 18w48a 18w48b 18w49a 18w50a 19w02a 19w03a 19w03c 19w04b 19w12b 19w13b 19w14a 1.14-pre2 1.14-pre3 1.14.3 1.14.4-pre5 1.14.4 19w39a 19w40a- 19w46a
Created Issue:
Items and blocks can't be put in an item frame
If we try put an item or a block in an item frame with the off-hand if you have nothing in you main hand, nothing happens.
Environment
Everywhere
Items and blocks can't be put in an item frame with the off-hand
relates to
Everywhere
is duplicated by
MC-106692
is duplicated by
MC-106692
is duplicated by
If we try put an item or a block in an item frame with the off-hand if you have nothing in you main hand, nothing happens.
Code analysis
Based on 1.11 decompiled using MCP 9.35 rc1
The problem is that the method net.minecraft.entity.item.EntityItemFrame.processInitialInteract(EntityPlayer, EnumHand) always returns true even if the no item was placed nor the item in the item frame was rotated. This makes the game skip the offhand.
If we try put an item or a block in an item frame with the off-hand if you have nothing in you main hand, nothing happens.
Code analysis
Based on 1.11 decompiled using MCP 9.35 rc1
The problem is that the method net.minecraft.entity.item.EntityItemFrame.processInitialInteract(EntityPlayer, EnumHand) always returns true even if the no item was placed nor the item in the item frame was rotated. This makes the game skip the offhand. The check whether or not the world is a server world has to be removed as well because otherwise the client would always try to interact with both hands because it would always fail.
If
wetry put an item or a block in an item frame with the off-hand if you have nothing in you main hand, nothing happens.Code analysis
Based on 1.11 decompiled using MCP 9.35 rc1
The problem is that the method net.minecraft.entity.item.EntityItemFrame.processInitialInteract(EntityPlayer, EnumHand) always returns true even if the no item was placed nor the item in the item frame was rotated. This makes the game skip the offhand. The check whether or not the world is a server world has to be removed as well because otherwise the client would always try to interact with both hands because it would always fail.
The bug
If you try put an item or a block in an item frame with the off-hand if you have nothing in you main hand, nothing happens.
Code analysis
Based on 1.11 decompiled using MCP 9.35 rc1
The problem is that the method net.minecraft.entity.item.EntityItemFrame.processInitialInteract(EntityPlayer, EnumHand) always returns true even if the no item was placed nor the item in the item frame was rotated. This makes the game skip the offhand. The check whether or not the world is a server world has to be removed as well because otherwise the client would always try to interact with both hands because it would always fail.
The bug
If you try put an item or a block in an item frame with the off-hand if you have nothing in you main hand, nothing happens.
Code analysis
Based on 1.11 decompiled using MCP 9.35 rc1
The problem is that the method net.minecraft.entity.item.EntityItemFrame.processInitialInteract(EntityPlayer, EnumHand) always returns true even if the no item was placed nor the item in the item frame was rotated. This makes the game skip the offhand. The check whether or not the world is a server world has to be removed as well because otherwise the client would always try to interact with both hands because it would always fail.
Fix
EntityItemFrame.javapublic boolean processInitialInteract(EntityPlayer player, EnumHand hand) { ItemStack itemstack = player.getHeldItem(hand); // if (!this.world.isRemote) // { if (this.getDisplayedItem().isEmpty()) { if (!itemstack.isEmpty()) { this.setDisplayedItem(itemstack); if (!player.capabilities.isCreativeMode) { itemstack.shrink(1); } ++ return true; } ++ return false; } else { this.playSound(SoundEvents.ENTITY_ITEMFRAME_ROTATE_ITEM, 1.0F, 1.0F); this.setItemRotation(this.getRotation() + 1); } // } return true; }
relates to
Confirmed for 1.13-pre4
Confirmed for 1.13-pre3
Confirmed for 1.13-pre2
Confirmed for 1.13-pre1
Confirmed for 18w22c
relates to
relates to


I think that if the "use" button is pressed, the main slots are issued first, then if the main slots don't have an action it issues the command to the off-hand slot. Maybe it's just thinking that your hand has an item?
But if you have nothing in your main hand and something in your off-hand , we should be able to put it in the item frame.
Ps: Sorry for the spelling, I'm French ^^
Confirmed for 16w06a
The enviroment is supposed to contain pc details.
Confirmed for 1.12-pre5
Can confirm for MC 1.12.1.