From dd060bce488b9c6ec2744b42d5c72ef05c5ca207 Mon Sep 17 00:00:00 2001 From: akastijn Date: Sun, 21 Jun 2026 23:56:16 +0200 Subject: [PATCH] Adjust teleportation logic to set correct direction for player-facing location --- .../alttd/hunger_games/services/PlayerTeleporterService.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/com/alttd/hunger_games/services/PlayerTeleporterService.java b/src/main/java/com/alttd/hunger_games/services/PlayerTeleporterService.java index ddb5d3d..a5a79c1 100644 --- a/src/main/java/com/alttd/hunger_games/services/PlayerTeleporterService.java +++ b/src/main/java/com/alttd/hunger_games/services/PlayerTeleporterService.java @@ -66,7 +66,10 @@ public class PlayerTeleporterService implements RoundListener { double angleRadians = Math.toRadians(angleDegrees); double x = center.getX() + radius * Math.cos(angleRadians); double z = center.getZ() + radius * Math.sin(angleRadians); + Location location = new Location(center.getWorld(), x, center.getY(), z); + location.setDirection(center.toVector().subtract(location.toVector())); + usedLocations.computeIfAbsent(destination, k -> new HashSet<>()).add(location); return location; }