Skip to content

Commit

Permalink
comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Wide-Cat committed Aug 3, 2024
1 parent f007737 commit c7bc477
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ private HitResult getCollision() {
((IVec3d) pos3d).set(hitResult.getPos().x, hitResult.getPos().y, hitResult.getPos().z);
}

// Vanilla uses the current and next positions to check collisions, we use the previous and current positions
Box box = new Box(prevPos3d.x - (width / 2f), prevPos3d.y, prevPos3d.z - (width / 2f), prevPos3d.x + (width / 2f), prevPos3d.y + height, prevPos3d.z + (width / 2f))
.stretch(velocity.x, velocity.y, velocity.z).expand(1.0D);
HitResult hitResult2 = ProjectileUtil.getEntityCollision(
Expand Down

0 comments on commit c7bc477

Please sign in to comment.