From e8048ede0856ea2f985b0a4122fd1683bf0d8968 Mon Sep 17 00:00:00 2001 From: chris Date: Sun, 8 Oct 2023 20:33:35 +0200 Subject: [PATCH] Fix: Skull rotation issues since 1.20.2 (#4200) --- .../org/geysermc/geyser/level/block/BlockStateValues.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/org/geysermc/geyser/level/block/BlockStateValues.java b/core/src/main/java/org/geysermc/geyser/level/block/BlockStateValues.java index a686ba552..97ab18c6b 100644 --- a/core/src/main/java/org/geysermc/geyser/level/block/BlockStateValues.java +++ b/core/src/main/java/org/geysermc/geyser/level/block/BlockStateValues.java @@ -173,8 +173,8 @@ public final class BlockStateValues { } if (javaId.contains("wall_skull") || javaId.contains("wall_head")) { - String direction = javaId.substring(javaId.lastIndexOf("facing=") + 7); - int rotation = switch (direction.substring(0, direction.length() - 1)) { + String direction = javaId.substring(javaId.lastIndexOf("facing=") + 7, javaId.lastIndexOf("powered=") - 1); + int rotation = switch (direction) { case "north" -> 180; case "west" -> 90; case "east" -> 270;