mojira.dev
MCPE-244242

Inaccurate selection outline when one part of a multi-block has a disabled selection box

When one part of a multi-block has a selection box component defined while the other part has it disabled, the game treats the disabled selection box as if it were 16x16x16 when rendering the merged visual outline after selecting/hovering over the part with the defined selection box. Instead of rendering the selection box only for the part where it's defined and ignoring the other part, the game also includes the disabled selection box like it is a full block.

Here’s a code snippet of the block’s permutation from the uploaded test pack:

[
  {
    "condition": "query.block_state('minecraft:multi_block_part') == 0",
    "components": {
      // ... Other components
      
      // Selection box is disabled for the bottom part of the block
      "minecraft:selection_box": false
    }
  },
  {
    "condition": "query.block_state('minecraft:multi_block_part') == 1",
    "components": {
      // ... Other components
      
      // The top part of the block has a defined selection box
      "minecraft:selection_box": {
        "origin": [ -4, 2, -4 ],
        "size": [ 8, 8, 8 ]
      }
    }
  }
]

Steps to Reproduce:

  1. Install the “Bug Test Pack.mcaddon” in a world. Load the world with the add-on installed.

  2. Give yourself the test block by running the command: “/give @s test:creeper”.

  3. Place the creeper block on the ground.

  4. Notice the size of the outline that is visible when selecting the creeper head.

Expected Result:

The screenshot attachment below shows the expected result, where the size of the visual outline is supposed to only cover the head of the creeper since it is the only part with a defined selection box.

Actual Result:

The video attachment below demonstrates the observed result. Hovering over the creeper’s head reveals a large visual outline that also covers the bottom part of the block, even though the selection box for that part is disabled. Despite being covered by the outline, the bottom part still cannot be selected because its selection box is disabled, as intended.

Attachments

Comments 1

Thank you for helping us improve Minecraft! We saved your files:

[media][media][media]

CookieDookie

(Unassigned)

Unconfirmed

Multiple

26.62 Hotfix

Retrieved