Skip to content
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

Make HeartType an extensible enum and add a hook for HeartType.forPlayer #961

Open
Shadows-of-Fire opened this issue May 15, 2024 · 0 comments · May be fixed by #999
Open

Make HeartType an extensible enum and add a hook for HeartType.forPlayer #961

Shadows-of-Fire opened this issue May 15, 2024 · 0 comments · May be fixed by #999
Labels
1.20.6 Targeted at Minecraft 1.20.6 enhancement New (or improvement to existing) feature or request

Comments

@Shadows-of-Fire
Copy link
Contributor

Following the GUI rendering changes in 1.20.5, HeartType no longer references hardcoded U/V coordinates and instead references individual sprites. This means that it is possible to add new HeartType(s) by providing the sprites, which can be done by making the enum extensible.

If we allow that, we also need to permit custom logic for setting the HeartType, which can be done either by adding an event to HeartType.forPlayer or by making custom HeartType(s) provide a Predicate<Player> for when they activate.

@Shadows-of-Fire Shadows-of-Fire added enhancement New (or improvement to existing) feature or request 1.20.6 Targeted at Minecraft 1.20.6 labels May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.20.6 Targeted at Minecraft 1.20.6 enhancement New (or improvement to existing) feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant