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 ee725b972d3d5fb22538aaff9c72e47c6bad0cea..2217968eb5ecac0a2063cf1eae7d754d760e9f28 100644 --- a/src/main/java/net/minecraft/core/Direction.java +++ b/src/main/java/net/minecraft/core/Direction.java @@ -252,6 +252,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); } @@ -364,6 +370,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); }