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

Carpets can have support blocks that make them instantly break


    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • Minecraft 1.8.8, Minecraft 15w46a, Minecraft 15w47a, Minecraft 15w47c, Minecraft 15w49a, Minecraft 15w49b, Minecraft 1.8.9, Minecraft 15w50a, Minecraft 15w51b, Minecraft 16w06a, Minecraft 1.9 Pre-Release 1, Minecraft 1.10.2, Minecraft 16w41a, Minecraft 16w42a, Minecraft 16w43a, Minecraft 1.11, Minecraft 1.11.2, Minecraft 17w14a, Minecraft 17w16b, Minecraft 1.12.1, Minecraft 1.12.2, Minecraft 17w48a, Minecraft 17w50a, Minecraft 18w07c, Minecraft 18w20c, Minecraft 1.13-pre3, Minecraft 1.13.1, 1.14.4, 19w45a, 19w46a, 19w46b, 1.15.2, 20w06a, 20w07a, 1.16.1, 1.16.2 Pre-release 1, 1.16.2 Pre-release 2, 1.16.2 Pre-release 3, 1.16.2 Release Candidate 1, 1.16.2 Release Candidate 2, 1.16.2, 1.16.3 Release Candidate 1, 1.16.3, 1.16.4 Pre-release 1, 1.16.4 Pre-release 2, 1.16.4, 20w45a, 20w46a, 20w48a, 20w49a, 20w51a, 21w03a, 1.16.5, 21w05a, 21w05b, 21w06a, 21w07a, 21w08b, 21w11a, 21w14a, 21w15a, 21w16a, 21w17a, 21w18a, 21w19a, 21w20a, 1.17 Pre-release 1, 1.17 Pre-release 4, 1.17, 1.17.1 Pre-release 1, 1.17.1, 21w37a, 21w38a, 21w39a, 21w40a, 21w41a, 21w42a, 21w43a, 1.18 Pre-release 7, 1.18, 1.18.2, 22w19a, 1.19 Pre-release 1, 1.19, 1.19.1 Pre-release 3, 1.19.2, 1.19.3, 23w03a, 23w04a, 23w05a, 23w06a, 23w07a, 1.19.4 Pre-release 3, 1.19.4, 23w13a, 23w14a, 1.20 Pre-release 1, 1.20 Pre-release 2, 1.20 Pre-release 4, 1.20.1, 23w31a, 23w32a, 23w33a, 23w35a, 1.20.2 Pre-release 1, 1.20.2 Pre-release 2, 23w40a, 23w41a, 23w42a, 23w44a, 1.20.3 Release Candidate 1, 1.20.4, 24w03b, 24w04a, 24w05a, 24w11a, 24w12a, 1.20.6
    • Confirmed
    • Block states

      The bug

      Carpets can use the lower half of tall grass and large fern as support blocks, which can't exist on their own without the upper half. When placing a carpet to replace the upper half the lower half is a support block before the game detects that the lower half should break, immediately breaking the carpet as well.

      Carpets can also be placed at a vine block that doesn't have a support block itself, which produces the same result as above.

      In 17w48a it's no longer possible for banners and signs to do the same. (Possibly fixed with MC-86980)

      Code analysis

      Based on 1.11.2 decompiled using MCP 9.35 rc1

      Signs and banners are not properly overriding the method net.minecraft.block.Block.canPlaceBlockAt(World, BlockPos), instead they test if they can be placed in the method net.minecraft.item.Item.onItemUse(EntityPlayer, World, BlockPos, EnumHand, EnumFacing, float, float, float). This method allows the item to be placed facing up (= on the ground) without checking if the block below is solid if the block it is placed on is replaceable, which causes problems with double plants.

      Carpets appear to override the method canPlaceBlockAt "correctly" by testing if the block below is not air. The problem is that once the upper part of the double plant was replaced the lower part is air and therefor the carpet drops.

      Bug discovered when testing

      Off topic, but when banners were affected (before 17w48a), another bug was discovered by reproducing this bug. When a non-black banner replaced a top block of tall grass or a large fern, a black banner drops, not the color of the banner placed. A bug report containing this seems to not be created yet.

        1. MC-92758.mp4
          2.83 MB
        2. MC-92758.png
          661 kB
        3. placedropbug.gif
          5.78 MB

            Unassigned Unassigned
            swekob Swekob
            14 Vote for this issue
            9 Start watching this issue