mojira.dev

Sk444

Assigned

No issues.

Comments

Implement a 3D DDA

Instead of generating a giant box from point A to point B, 3D DDA mathematically traces the exact line of movement and steps through the grid one block at a time.

Swept AABB (Axis-Aligned Bounding Box) Collision.

Minecraft resolves movement on axes individually (usually Y first, then X and Z). Instead of creating a 3D prism of the entire volume, the game should "sweep" the entity's hitbox along each axis one by one

If an entity is falling 100 blocks down (Y axis) and moving 1000 blocks forward (X axis), the game first sweeps the hitbox down the Y axis. If it hits the ground at block 50, its Y velocity stops there. Then it sweeps the X axis.

By calculating collisions progressively per axis, the game can immediately discard the remaining planned movement if an entity hits a wall early. The current vanilla method blindly checks the entire intended destination volume, even if the entity crashed into a wall on block 1.

I testing and I can say that the problem is fixed!