Skip to content

Conversation

msg-programs
Copy link
Contributor

The long-awaited customizeable fancy tab is finally (almost) here!
You can now specify your own layouts using some JSON files and load them via a resource pack. There's also a builtin resource pack for a top-aligned layout and a README containing some docs about how to write layout files.

Needs testing. The top aligned layout needs some work and the collide op doesn't work for all of the values that might be useful, which is TODO at the moment. Hence, this is just a draft for the moment

Instead of creating a new widget instance every frame, instantiate once and update content.
This means that every widget had to be updated to work like that.
This also necessitated some ugly hackery for the dwarven HUD.
Many other minor things like moving and renaming classes
Use resource pack logic to load the layouts.
Finally delete the old screen defs, replace with builtin layout JSON files.
Include a top-aligned layout as a builtin resource pack.
Implement more possibilites for the layout to support said pack.
…into json-tabhud

# Conflicts:
#	src/main/java/me/xmrvizzy/skyblocker/SkyblockerMod.java
#	src/main/java/me/xmrvizzy/skyblocker/skyblock/dwarven/DwarvenHud.java
#	src/main/java/me/xmrvizzy/skyblocker/skyblock/tabhud/screens/main/GardenScreen.java
#	src/main/java/me/xmrvizzy/skyblocker/skyblock/tabhud/util/PlayerLocator.java

Pull upstream changes
Latter looks a bit off thanks to whatever Minecraft uses to scale the icon...
@kevinthegreat1
Copy link
Collaborator

kevinthegreat1 commented Aug 7, 2023

Looks great so far! Maybe add a format version to the resource pack format in case we need to make breaking changes? I don't know if you can put extra stuff in pack.mcmeta or somewhere. I'm also a bit worried about clearing the components and rebuilding every frame.

@msg-programs msg-programs marked this pull request as ready for review August 14, 2023 18:14
@msg-programs
Copy link
Contributor Author

There we go, should be good to merge after some double checking

@kevinthegreat1
Copy link
Collaborator

kevinthegreat1 commented Aug 20, 2023

Pushed some refactors which Intellij was yelling at me for. Tested this by going to random skyblock island and seems to work.

Also, is the intended name of the resource pack to be "skyblocker/default_top"? Don't think that's a very user friendly name lol.

@AzureAaron
Copy link
Collaborator

Pushed some refactors which Intellij was yelling at me for. Tested this by going to random skyblock island and seems to work.

Also, is the intended name of the resource pack to be "skyblocker/default_top"? Don't think that's a very user friendly name lol.

I would just add to the pack's description instead of changing the packs name

Copy link
Member

@LifeIsAParadox LifeIsAParadox left a comment

Choose a reason for hiding this comment

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

lgtm

@kevinthegreat1 kevinthegreat1 merged commit 68eb255 into SkyblockerMod:master Sep 1, 2023
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.

4 participants