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

Collision checking of block placement ignores block states of items

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.16.5, 21w11a, 21w13a, 21w14a, 21w15a, 21w16a, 21w17a, 21w18a, 1.17, 1.19.2, 22w42a, 1.20.2, 23w43b, 23w44a, 1.20.3, 1.20.4
    • None
    • Confirmed
    • Collision

      The Bug:

      Relates to MC-116877.

      When you have a block with a block state in item form and place it, the entity collision checking ignores the block state. This can lead to some strange valid or invalid placement conditions for certain blocks that have different collision boxes depending on the block state.

      Steps to Reproduce:

      1. Build the configuration as seen in MC-221256.png.
      2. Give yourself a slab with the "double" BlockStateTag using the following command:
        /give @s end_stone_brick_slab{BlockStateTag:{type:"double"}} 1
      3. Position yourself on the edge of the Enchanting Table.
      4. Place the slab on the side of the Gray Wool block to the left of the Enchanting Table.
        The block is placed even though it collides with the player's hitbox.

      Examples from Original Report:

      If you use this command:

      /give @s chain{BlockStateTag:{axis:"y"}} 1

      and aim at the side of a block with the item, the entity collision checking thinks that the chain will be placed horicontally even though you place it vertically. This means that for exmple when you are standing on the edge of a non-full block like an enchanting table you will be able to place the chain inside yourself when aiming at the side of a block.

      If you use this command:

      /give @s end_stone_brick_slab{BlockStateTag:{type:"double"}} 1

      and aim at the floor you would usually place a bottom slab, but with the item you will place a double slab. However the entity collision checking still thinks you are placing a bottom slab allowing you to place the double slab inside yourself when jumping of standing on the edge of a non-full block like for example an enchanting table.

      If you aiming at the side of a block with the chain that places a vertical chain and standing like this you can see in this screenshot, you will not be able to place chain even though it wouldn’t be insde you, if you are aiming at the floor however it will work.

      This affects every block with any block state that changes the collision box.

        1. 2021-03-28_17.06.17.png
          2021-03-28_17.06.17.png
          392 kB
        2. 2021-03-28_17.13.09.png
          2021-03-28_17.13.09.png
          324 kB
        3. MC-221256.mp4
          6.15 MB
        4. MC-221256.png
          MC-221256.png
          2.28 MB

            Unassigned Unassigned
            hentor5 hentor5
            Votes:
            5 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              CHK: