mojira.dev
MC-261638

Large hitboxes cannot be interacted with properly if they overlap two or more chunk sections

When a hitbox goes over several chunk sections, you can no longer interact with it properly after a certain point.

Affected entities

  • Ender dragon (see MC-158205)

  • Entities with a large generic.scale attribute

  • Interaction entities

  • Huge slimes

  • Giants

To reproduce

  1. Summon an interaction entity:

    /summon minecraft:interaction ~ ~ ~ {Tags:["intr"],height:33}
  2. Place a repeating command block chain with the following commands:

    execute as @e[tag=intr] if data entity @s attack.player as @a at @s run playsound minecraft:block.note_block.banjo block @s
    execute as @e[tag=intr] run data remove entity @s attack
  3. Enable F3+B to see the hitbox of the interaction entity.

  4. While looking at the interaction entity, attack it near the top.

Expected behaviour

When hitting the interaction entity, it should always play a sound.

Observed behaviour

No sound is played when the interaction entity is hit at the top.

Video

This video showcases the issue with giants and large slimes.

In the video, the vertical chunk section change is marked with purple particles.
https://youtu.be/SxYdbqZcstM

Note

It also seems that there is a difference between projectiles, player hitting and movement collision checks. For example, you can hit a mob, but an arrow can't hit it at the same point.

Code Analysis

A code analysis by @unknown for this issue happening with the ender dragon specifically can be found in this comment in MC-158205, although it is entangled with another unrelated code issue.

Linked issues

Attachments

Comments 4

Confirmed. I've added a guide for reproducing this issue with commands, without using entities like giants or big slimes that are not 100% supported.

can confirm in 1.20

This behavior is still present in 1.20.5 Pre-Release 4. Here is a video showcasing it:

[media]

This also applies to the ender dragon in vanilla. See MC-158205, which also includes a code analysis.

Rasmus

(Unassigned)

Confirmed

Platform

Normal

Hitboxes

1.19.4, 23w14a, 1.20.4, 23w51b, 1.21, 24w44a, 1.21.3

Retrieved