MinecraftFreecam / Freecam

A highly customizable freecam mod for Minecraft. [Maintiners: @hashalite @MattSturgeon]
https://curseforge.com/minecraft/mc-mods/free-cam
MIT License
75 stars 30 forks source link

Goto GUI (Jump to Player) #116

Open MattSturgeon opened 12 months ago

MattSturgeon commented 12 months ago

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:

https://github.com/hashalite/Freecam/assets/5046562/4d87dfd1-beac-461f-a406-06c962d93f89

TODO

Follow on goals (separate issues)

hashalite commented 11 months ago

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.

MattSturgeon commented 11 months ago

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...


This would probably have to be blocked off to the Modrinth version

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.

MattSturgeon commented 10 months ago

Marking this as ready for review again.

It will still need rebasing and a bunch of squashing, but I think the actual changes are more or less there. I'm ready to get some thoughts/suggestions/feedback/etc.

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.

This would probably have to be blocked off to the Modrinth version

Done, see this method.

MattSturgeon commented 10 months ago

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.