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

Falling torch block is placed at invalid positions and drops afterwards


    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • Minecraft 1.11.2, Minecraft 17w06a, Minecraft 18w48a, Minecraft 18w48b, Minecraft 18w49a, Minecraft 18w50a, 20w17a, 1.16.3, 20w46a, 1.20.2
    • Confirmed
    • (Unassigned)

      The bug

      Falling torch and redstone torch blocks (falling block entities) are placed at invalid positions. This is not MC-114728 and can therefor happen even without valid block below.

      How to reproduce

      1. Place a block on which a torch cannot be placed but a falling block entity lands, for example a sea lantern
      2. Place a block on which a torch can be placed on diagonally above the block in step 1 (in the screenshot 2017-03-15_16.12.14.png it is the command block)
      3. Stand on the block placed in step 1 and summon a falling torch block
        /summon falling_block ~ ~ ~ {Time:1,BlockState:{Name:"minecraft:torch"}}

        → You will notice that the torch dropped because it was placed at an invalid position

      Code analysis

      Based on 1.11.2 decompiled using MCP 9.35 rc1

      The class net.minecraft.block.BlockTorch is not overriding the method net.minecraft.block.Block.canPlaceBlockOnSide(World, BlockPos, EnumFacing) and therefor this method is called which ignores the side. The torch class then tests if the torch can be placed on any side. However, the specified block state is placed, which in this case is at an invalid position which causes it to drop.

            Unassigned Unassigned
            NoUser No User
            5 Vote for this issue
            4 Start watching this issue