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

    XMLWordPrintable

    Details

    • Confirmation Status:
      Confirmed
    • Category:
      (Unassigned)

      Description

      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.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              NoUser No User
            • Votes:
              4 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                CHK: