9
0
mirror of https://github.com/BX-Team/DivineMC.git synced 2025-12-23 08:49:18 +00:00
Files
DivineMC/patches/server/0015-Fix-rotating-UP-DOWN-CW-and-CCW.patch
2023-01-08 12:29:20 +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 4ebbd0bbbecb07eb1950231cf0b3a7f25e09f1c9..61eadbc9bf353319d98df1135ded05dfe9bcc3f4 100644
--- a/src/main/java/net/minecraft/core/Direction.java
+++ b/src/main/java/net/minecraft/core/Direction.java
@@ -247,6 +247,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);
}
@@ -359,6 +365,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);
}