From 16a658fec453ffa548e31b7fcb7f8c9e89e3e256 Mon Sep 17 00:00:00 2001
From: Technici4n <bruno.ploumhans@gmail.com>
Date: Sun, 18 Oct 2020 19:28:31 +0200
Subject: [PATCH] Fix sprite and spriteBake (#1122)

---
 .../fabricmc/fabric/api/renderer/v1/mesh/QuadEmitter.java | 8 ++++----
 .../impl/client/indigo/renderer/helper/TextureHelper.java | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/fabric-renderer-api-v1/src/main/java/net/fabricmc/fabric/api/renderer/v1/mesh/QuadEmitter.java b/fabric-renderer-api-v1/src/main/java/net/fabricmc/fabric/api/renderer/v1/mesh/QuadEmitter.java
index 30a84abbc..9eab1650b 100644
--- a/fabric-renderer-api-v1/src/main/java/net/fabricmc/fabric/api/renderer/v1/mesh/QuadEmitter.java
+++ b/fabric-renderer-api-v1/src/main/java/net/fabricmc/fabric/api/renderer/v1/mesh/QuadEmitter.java
@@ -157,10 +157,10 @@ public interface QuadEmitter extends MutableQuadView {
 			right = 1 - right;
 
 		case NORTH:
-			pos(0, right, top, depth);
-			pos(1, right, bottom, depth);
-			pos(2, left, bottom, depth);
-			pos(3, left, top, depth);
+			pos(0, 1 - left, top, depth);
+			pos(1, 1 - left, bottom, depth);
+			pos(2, 1 - right, bottom, depth);
+			pos(3, 1 - right, top, depth);
 			break;
 		}
 
diff --git a/fabric-renderer-indigo/src/main/java/net/fabricmc/fabric/impl/client/indigo/renderer/helper/TextureHelper.java b/fabric-renderer-indigo/src/main/java/net/fabricmc/fabric/impl/client/indigo/renderer/helper/TextureHelper.java
index ca5326ea1..5b3e53d76 100644
--- a/fabric-renderer-indigo/src/main/java/net/fabricmc/fabric/impl/client/indigo/renderer/helper/TextureHelper.java
+++ b/fabric-renderer-indigo/src/main/java/net/fabricmc/fabric/impl/client/indigo/renderer/helper/TextureHelper.java
@@ -104,6 +104,6 @@ public class TextureHelper {
 		UVLOCKERS[Direction.NORTH.getId()] = (q, i, t) -> q.sprite(i, t, 1 - q.x(i), 1 - q.y(i));
 		UVLOCKERS[Direction.SOUTH.getId()] = (q, i, t) -> q.sprite(i, t, q.x(i), 1 - q.y(i));
 		UVLOCKERS[Direction.DOWN.getId()] = (q, i, t) -> q.sprite(i, t, q.x(i), 1 - q.z(i));
-		UVLOCKERS[Direction.UP.getId()] = (q, i, t) -> q.sprite(i, t, q.x(i), 1 - q.z(i));
+		UVLOCKERS[Direction.UP.getId()] = (q, i, t) -> q.sprite(i, t, q.x(i), q.z(i));
 	}
 }