Skip to content

Implement server playerlist with head textures#45

Merged
creesch merged 5 commits intomainfrom
5-show-player-list-to-the-side
Dec 28, 2024
Merged

Implement server playerlist with head textures#45
creesch merged 5 commits intomainfrom
5-show-player-list-to-the-side

Conversation

@creesch
Copy link
Copy Markdown
Collaborator

@creesch creesch commented Dec 28, 2024

Fixes #5

image

A few implementation notes:

  • Updates the playerlist on an interval. For some bizarre reason it is trivial to get the complete list as a client but an event to listen for joins and leaves is not available through Fabric. Solutions I came across involved creating mixins, which is effectively reflection and very prone to breaking on new minecraft versions. Because of that I decided to go for the interval route as it effectively is just some lookups.
  • Player skins are handled by the client by fetching them from minecraft.net. In theory it is possible to fetch the textures from the client and send those along. But in practice I had little luck with that due to asynchronous loading of textures and various other factures. It likely would also make the whole operation a bit heavier which in combination with the interval for updates might actually cause some issues. The texture URL is trivial to fetch, so that is send along to the client and the client handles the head creation.

@danthedaniel
Copy link
Copy Markdown
Member

I'd have the connection status be 100% width in this scenario (or perhaps fixed width but right-aligned and hovering like before).

Screenshot 2024-12-28 at 10 56 30 AM

Otherwise I'm very happy with the UI implementation. Ideally the sidebar would be accessible when the window is skinny like this, but that could be a future enhancement.

Copy link
Copy Markdown
Member

@danthedaniel danthedaniel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR looks great! I just have a few small requests.

Copy link
Copy Markdown
Member

@danthedaniel danthedaniel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love it

@creesch creesch merged commit 1fd9fae into main Dec 28, 2024
@danthedaniel danthedaniel deleted the 5-show-player-list-to-the-side branch December 28, 2024 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show player list to the side

2 participants