From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: William Blake Galbreath 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); }