Hitboxes don't properly take projectile hits outside an entity's chunk.
Verification Build: Windows 1.20.10
Regression Build: None
Summary: When an entity's hitbox is well beyond the chunk of the entity itself, projectiles fail to hit it.
Impact:
I discovered this when I was making an entity with two hitboxes. Each one far apart from the entity's location (about 9 blocks). One worked fine, but the other was really hard to trigger with projectiles, which was how they are supposed to be triggered.
Due to this bug, we were thinking to shift the entity so that it all fits in a single chunk, but due to the complexity of the map, this would be more trouble than it's worth. So instead, we have to make two entities to detect hits for us. It should still work, but the less entities the better.
Steps to Reproduce:
- Play on 1.20.10 (the provided gametest pack will only work on that version).
- Apply the pack to a world with Beta APIs enabled.
- Enter the world and run the command: "/gametest run bugreport:hitbox_over_chunks"
Expected Result:
All spawned arrows hit the test entity.
Observed Result:
A couple of the arrows don't hit the test entity. These arrows are in a different chunk from the entity and quite a distance from the chunk border. It's recommended to use the developer build to visualize the hitboxes.
