Skip to content

Commit

Permalink
Update Vec.java
Browse files Browse the repository at this point in the history
  • Loading branch information
Cadiboo committed Sep 16, 2023
1 parent b81a6c5 commit b6e2eec
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/main/java/io/github/cadiboo/nocubes/util/Vec.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public Vec set(float x, float y, float z) {
}

public Direction getDirectionFromNormal() {
// Might be able to replace this with code from https://github.com/CaffeineMC/sodium-fabric/blob/dev/src/main/java/me/jellysquid/mods/sodium/mixin/features/render/immediate/DirectionMixin.java
float x = this.x;
// Adding a tiny amount solves conflicts caused by floating point errors for faces that are perfectly diagonal
float y = this.y + 0.0002F;
Expand Down

0 comments on commit b6e2eec

Please sign in to comment.