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

Entity hitboxes of the same size overlap in unpredictable ways

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.16.1, 20w30a
    • None
    • Confirmed
    • (Unassigned)

      When two entities that have the same size hitbox occupy the same space, attempting to right click those entities where they overlap doesn't always prefer the same entity's hitbox over the other.

      In the example this was noticed and is demonstrated in, an Enderman and a Villager have the same width and length hitbox. (The villager is invisible, viewed in spectator mode in the attachment, so while the height is different of course, this doesn't affect the bug. For general interactivity, they are the same size. Both have NoAI:1 and therefore cannot move or be moved without commands.) When the player attempts to right click the "hybrid" entity in the parts of their hitbox which they overlap, they are given the villager's trading menu.

      Sometimes, however, especially after the player has left the End and then returned, the opposite will be true - interacting with the hybrid does not bring up the trade menu, presumably because now the Enderman's hitbox is taking precedence. This can be reversed yet again by changing dimensions, exiting and re-entering the world through the menu, etc., however never in any predictable way. Further, this has yet to be recreated for the same setup of entities in the Overworld - leaving and then re-entering the dimension doesn't seem to affect the preferred hitbox there, although this may be by chance than by function.

      Obviously this kind of arrangement of entities isn't a vanilla survival occurrence, however it is a useful mechanism for Adventure Maps and for Data Packs to use that should be possible in vanilla. The map/pack creator should be able to count on this type of entity arrangement working the same way, every time - to know which of the entities the game is going to give hitbox precedence to, even if that means removing the ability for the villager's hitbox to take priority over the Enderman's, although that would be the main reason to repair this bug.

            Unassigned Unassigned
            kanokarob Robert Duke
            Votes:
            6 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              CHK: