diff --git a/connector/src/main/java/org/geysermc/connector/network/session/GeyserSession.java b/connector/src/main/java/org/geysermc/connector/network/session/GeyserSession.java index a4a124c2176..a5ed47660b6 100644 --- a/connector/src/main/java/org/geysermc/connector/network/session/GeyserSession.java +++ b/connector/src/main/java/org/geysermc/connector/network/session/GeyserSession.java @@ -107,7 +107,7 @@ public class GeyserSession implements CommandSender { private InventoryCache inventoryCache; private ScoreboardCache scoreboardCache; private WindowCache windowCache; - private Map skullCache = new HashMap<>(); + private Object2LongMap skullCache = new Object2LongOpenHashMap() {}; @Setter private TeleportCache teleportCache; diff --git a/connector/src/main/java/org/geysermc/connector/network/translators/world/block/BlockTranslator.java b/connector/src/main/java/org/geysermc/connector/network/translators/world/block/BlockTranslator.java index b86b64acad6..68fcb734a10 100644 --- a/connector/src/main/java/org/geysermc/connector/network/translators/world/block/BlockTranslator.java +++ b/connector/src/main/java/org/geysermc/connector/network/translators/world/block/BlockTranslator.java @@ -159,7 +159,8 @@ public class BlockTranslator { } if (entry.getKey().contains("wall_skull") || entry.getKey().contains("wall_head")) { - BlockStateValues.getWallSkullDirection().put(javaBlockState, entry.getKey().substring(entry.getKey().lastIndexOf("facing=") + 7)); + String direction = entry.getKey().substring(entry.getKey().lastIndexOf("facing=") + 7); + BlockStateValues.getWallSkullDirection().put(javaBlockState, direction.substring(0, direction.length() - 1)); } if ("minecraft:water[level=0]".equals(javaId)) { diff --git a/connector/src/main/java/org/geysermc/connector/network/translators/world/block/entity/SkullBlockEntityTranslator.java b/connector/src/main/java/org/geysermc/connector/network/translators/world/block/entity/SkullBlockEntityTranslator.java index b23c3048df3..1f5ed2f3f5a 100644 --- a/connector/src/main/java/org/geysermc/connector/network/translators/world/block/entity/SkullBlockEntityTranslator.java +++ b/connector/src/main/java/org/geysermc/connector/network/translators/world/block/entity/SkullBlockEntityTranslator.java @@ -125,19 +125,19 @@ public static void spawnPlayer(GeyserSession session, com.github.steveice10.open if (BlockStateValues.getSkullRotation(blockState) == -1) { y += 0.25f; switch (BlockStateValues.getWallSkullDirection().get(blockState)) { - case "north]": + case "north": rotation = 180f; z += 0.24; break; - case "south]": + case "south": rotation = 0; z -= 0.24f; break; - case "west]": + case "west": rotation = 90; x += 0.24f; break; - case "east]": + case "east": rotation = 270; x -= 0.24f; break;