Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-64036

Bed item appearing when right-clicking a bed in the nether



    • Type: Bug
    • Status: Resolved
    • Resolution: Awaiting Response
    • Affects Version/s: Minecraft 14w30c, Minecraft 1.8, Minecraft 1.8.1, Minecraft 1.8.2-pre1, Minecraft 1.8.8, Minecraft 15w43a, Minecraft 15w45a, Minecraft 15w46a, Minecraft 15w47a, Minecraft 1.9, Minecraft 1.9.1 Pre-Release 3, Minecraft 1.9.2, Minecraft 1.9.3 Pre-Release 1, Minecraft 1.9.3 Pre-Release 2, Minecraft 1.11, Minecraft 16w50a, Minecraft 1.11.2
    • Fix Version/s: None
    • Confirmation Status:


      The bug

      In the nether, when you right click on a bed no matter what is in your hand, a bed item will appear out of nowhere. This is a somewhat bed generator.
      Expected behavior would be that the bed blows up like normal and not drop a bed item.

      How to reproduce

      This can be done in creative, survival, or adventure

      1. Go to the nether
      2. Place a bed
      3. Right click it
      4. A bed item should appear coming out of the bed

      Code analysis

      Based on 1.11.2 decompiled using MCP 9.35 rc1

      The method net.minecraft.block.BlockBed.onBlockActivated(World, BlockPos, IBlockState, EntityPlayer, EnumHand, EnumFacing, float, float, float) moves the position to test and interact with to the head of the bed. The problem is that when you right click the bed in the nether it first sets this position to air. However, the method net.minecraft.block.BlockBed.neighborChanged(IBlockState, World, BlockPos, Block, BlockPos) drops the bed item if a bed foot part is without a head part.

      Therefor the method onBlockActivated should place both parts without causing block updates and after that cause for the neighboors of the blocks it replaced the block updates.


          Issue Links



              • Assignee:
                CDude00 C-Dude Zoki
              • Votes:
                4 Vote for this issue
                5 Start watching this issue


                • Created: