Skip to content

Commit

Permalink
Fix incorrect plane uv coordinates (should fix sodium too)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sollace committed Feb 9, 2024
1 parent 9ce76e7 commit cafaa6a
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public BoxParameters(float[] position, float[] size, float[] dilation, Texture u
public BoxParameters() {
this(new float[3], new float[3], new float[3], Texture.EMPTY);
}

public void flip(Face.Axis axis) {
int o = axis.ordinal();
position[o] += size[o];
Expand All @@ -50,9 +50,11 @@ public Cuboid build(PartBuilder parent, Set<Direction> enabledSides) {

public float getBoxFrameUOffset(Direction direction) {
return switch (direction) {
case WEST -> 0;
case DOWN, NORTH -> size[2];
case UP, EAST -> size[2] + size[0];
case DOWN -> 0;
case WEST -> size[2];
case EAST -> size[0];
case NORTH -> size[2];
case UP -> size[2] + size[0];
case SOUTH -> size[2] + size[0] + size[2];
};
}
Expand Down

0 comments on commit cafaa6a

Please sign in to comment.