From e099c8d28e3b178f6503fcc83f5256fdb98df2d8 Mon Sep 17 00:00:00 2001 From: TylerS1066 Date: Sun, 8 Sep 2024 09:25:58 -0500 Subject: [PATCH] Update SupportUtils.java --- .../net/countercraft/movecraft/util/SupportUtils.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api/src/main/java/net/countercraft/movecraft/util/SupportUtils.java b/api/src/main/java/net/countercraft/movecraft/util/SupportUtils.java index bf0b96151..dbf94afdd 100644 --- a/api/src/main/java/net/countercraft/movecraft/util/SupportUtils.java +++ b/api/src/main/java/net/countercraft/movecraft/util/SupportUtils.java @@ -12,14 +12,14 @@ public class SupportUtils { @Nullable public static BlockFace getSupportFace(@NotNull BlockData data) { return switch (data) { - case Hangable hangable -> hangable.isHanging() ? BlockFace.UP : BlockFace.DOWN; + case Directional directional -> directional.getFacing().getOppositeFace(); + case Hangable hangable when hangable.isHanging() -> BlockFace.UP; + case Hangable hangable when !hangable.isHanging() -> BlockFace.DOWN; case FaceAttachable faceAttachable -> switch (faceAttachable.getAttachedFace()) { case FLOOR -> BlockFace.DOWN; - case WALL -> - faceAttachable instanceof Directional directional ? directional.getFacing().getOppositeFace() : null; case CEILING -> BlockFace.UP; + case WALL -> null; // Wall attachable should be Directional }; - case Directional directional -> directional.getFacing().getOppositeFace(); default -> null; }; }