Files
Purpur/patches/server/0123-Fix-rotating-UP-DOWN-CW-and-CCW.patch
2023-06-14 23:11:18 -07:00

37 lines
1.3 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
Date: Wed, 6 Jan 2021 02:19:29 -0600
Subject: [PATCH] Fix rotating UP/DOWN CW and CCW
diff --git a/src/main/java/net/minecraft/core/Direction.java b/src/main/java/net/minecraft/core/Direction.java
index d0a8092bf57a29ab7c00ec0ddf52a9fdb2a33267..defe5951938ce3a7b7f83017d4af36bb49ff5be0 100644
--- a/src/main/java/net/minecraft/core/Direction.java
+++ b/src/main/java/net/minecraft/core/Direction.java
@@ -238,6 +238,12 @@ public enum Direction implements StringRepresentable {
case EAST:
var10000 = SOUTH;
break;
+ // Purpur start
+ case UP:
+ return UP;
+ case DOWN:
+ return DOWN;
+ // Purpur end
default:
throw new IllegalStateException("Unable to get Y-rotated facing of " + this);
}
@@ -350,6 +356,12 @@ public enum Direction implements StringRepresentable {
case EAST:
var10000 = NORTH;
break;
+ // Purpur start
+ case UP:
+ return UP;
+ case DOWN:
+ return DOWN;
+ // Purpur end
default:
throw new IllegalStateException("Unable to get CCW facing of " + this);
}