Skip to content

Commit

Permalink
Merge pull request #1736 from Axionize/optimize-iteration-order-lookdir
Browse files Browse the repository at this point in the history
Reduce average iterations of RotationPlace
  • Loading branch information
SamB440 authored Sep 25, 2024
2 parents cc9273d + d592757 commit bde44f5
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ private boolean didRayTraceHit(BlockPlace place) {
SimpleCollisionBox box = new SimpleCollisionBox(place.getPlacedAgainstBlockLocation());

List<Vector3f> possibleLookDirs = new ArrayList<>(Arrays.asList(
new Vector3f(player.lastXRot, player.yRot, 0),
new Vector3f(player.xRot, player.yRot, 0)
new Vector3f(player.xRot, player.yRot, 0),
new Vector3f(player.lastXRot, player.yRot, 0)
));

// Start checking if player is in the block
Expand Down

0 comments on commit bde44f5

Please sign in to comment.