9
0
mirror of https://github.com/BX-Team/DivineMC.git synced 2025-12-19 14:59:25 +00:00
Files
DivineMC/patches/removed/1.19.4/server/0012-Fix-rotating-UP-DOWN-CW-and-CCW.patch
2023-03-27 02:03:05 +03:00

39 lines
1.5 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
Original code by PurpurMC, licensed under MIT
You can find the original code on https://github.com/PurpurMC/Purpur
diff --git a/src/main/java/net/minecraft/core/Direction.java b/src/main/java/net/minecraft/core/Direction.java
index 28f3145193e8bc22f3bbd0442248ea09ccc91973..28ecd137dd37759e7890d71635289c3f6e994b87 100644
--- a/src/main/java/net/minecraft/core/Direction.java
+++ b/src/main/java/net/minecraft/core/Direction.java
@@ -248,6 +248,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);
}
@@ -360,6 +366,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);
}