-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Goto GUI (Jump to Player) #116
base: main
Are you sure you want to change the base?
Conversation
This is seriously impressive, thanks for taking the time to implement this, and your continued dedication to improving this mod! It's definitely something I would consider merging after some additional testing and polishing has been done. This would probably have to be blocked off to the Modrinth version unless someone (lol) wants write something to detect whether the target is accessible without NoClip. Providing a list of players in render distance may also be problematic here, I would have to check with Modrinth staff. |
12230a7
to
a353871
Compare
Marking this as ready to review, since the actual changes now feel more-or-less done. I still want to cleanup the history and rebase once related commits are merged. Namely, Hack-fix common resources missing at runtime is part of #122 and Cleanup translatable config enums is part of #121. Some of the positioning consts & magic numbers could also be improved, but this feels like a loosing battle with GUI code...
Yes, I think so. It's a shame, as it is only the players within render distance, but I can see how it could be abused for cheating. |
d062a38
to
f9106e6
Compare
Marking this as ready for review again.
I'll probably try to add some more javadocs too. Let me know if there's anything in particular you feel would benefit from some docs or comments.
Done, see this method. |
628b5a6
to
986e6b3
Compare
Introduce `.get()`, `.save()`, & `.getConfig()`. No need to set `@Excluded` on a static field.
Move "perspective" concept to `FreecamPosition`. Move `isInRange` to `FreecamPosition`.
Enables Freecam if not already. Teleports freecam to the specified `FreecamPosition`. Intended for use by "Goto GUI".
Adds a GUI which allows jumping freecam to a player within render distance. Limited on Modrinth to `MC.player`. Could be expanded in future with tripod locations and other "saved" positions.
The `Tab` implementation provides a method to produce a list of `TargetListEntries`. Currently, the only implementation is `PlayerTab`, which provides a list of `PlayerListEntries` & a "perspective" button.
// FIXME this will move the camera to the default position and show a notification, | ||
// even though we'll move the camera and show our own notification immediately after. | ||
toggle(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can probably reword this so it is less severe; doesn't need to be a FIXME
if we're happy with the current behavior?
Should at least note that we do want to use the default msg.freecam.enable
notification when gotoNotify
is disabled and notifyFreecam
isn't.
I think I'm happy to call this "finished" pending any feedback or requested changes. The first three-or-four commits are really "prepping" the codebase for the meat of this PR, which is in the final few commits. Those initial prep commits could be moved to dedicated PRs if it makes this easier to review. That said, I've deliberately cleaned up the commit history such that you can review the commits individually, without having to go through the entire PR in one go. The last round of rebases were on my laptop, so I'll test them properly when I get chance. |
Goto GUI
(Originally "Jump" GUI, now renamed to "Goto". Open to other suggestions.)
This feature allows the user to view a list of useful targets (currently players within render distance) and then teleport Freecam to the selected target.
Freecam is automatically enabled if required.
Motivation
@TangoTek has been using a freecam mod in order to spectate players of his game Decked Out 2. However he often looses sight of the player and struggles to locate them. On such occasions he's expressed a wish for features that'd better enable freecam to locate and track nearby players.
This PR hopes to aid in locating players, active tracking/following/spectating is left out of scope, to be addressed by other issues.
Status
This PR is functional and lightly tested. The PR needs some further polish and iteration before it should be merged, however review, feedback and testing are still greatly appreciated.
Marking as draft for now.Video
Some translation strings have changed since recording this video:
2023-11-22.11-26-05.trimmed.mp4
TODO
G
)Follow on goals (separate issues)