Repository navigation
feat(navigator): teleport in front of the portal on right click - #414
Merged
Merged
Conversation
Contributor
Test results 873 files 873 suites 41m 14s ⏱️ Results for commit 834d69c. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Behaviour
Portal.task()equalsDestination.task(), facing the portal centre.isAllowedapplies to every click type as before; the spawn entry is untouched.Selection.TELEPORTED(teleported); the fallback is recorded assent.Implementation
PortalApproach(core, pure geometry): front side is the side of the portal's label (map author puts it where players approach), else the side the player is on. Box: nearest face (normalised by half extents), 2 blocks clear of the face, feet at the box floor. Disc: horizontal part of the normal, signed towards the front, 2 blocks clear of the plane; near-horizontal discs use the direction to the player and stand outside the rim; feet at the ring's lowest point. Yaw/pitch look from eye height at the portal centre.NavigatorModuletakes the existingLobbyPortalsbean (no cycle; the column declares it inrequires).Tests
PortalApproachTest: each shape, side selection, label precedence, never inside/entering the trigger, looks at the centre.NavigatorPortalTeleportTest(Minestom Env): right click teleports, spot outside the trigger, no portal falls back, left and shift click connect, denied right/left click does nothing.NavigatorTelemetryTest:teleportedand fallbacksent.https://claude.ai/code/session_01GXose9rakuRNZoM3TP3xj1