From cafaa6ae9a0529defd2b3bf10e3e0c96ef3d283a Mon Sep 17 00:00:00 2001 From: Sollace Date: Fri, 9 Feb 2024 19:27:40 +0000 Subject: [PATCH] Fix incorrect plane uv coordinates (should fix sodium too) --- .../minelittlepony/mson/api/model/BoxParameters.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/minelittlepony/mson/api/model/BoxParameters.java b/src/main/java/com/minelittlepony/mson/api/model/BoxParameters.java index 887efb9..1d25ed5 100644 --- a/src/main/java/com/minelittlepony/mson/api/model/BoxParameters.java +++ b/src/main/java/com/minelittlepony/mson/api/model/BoxParameters.java @@ -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]; @@ -50,9 +50,11 @@ public Cuboid build(PartBuilder parent, Set 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]; }; }