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

Reading NBT data on the render function is very bad and should be fixed #3

Open
flashgnash opened this issue Jan 7, 2025 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@flashgnash
Copy link
Owner

Currently, in order to figure out whether to display the oxygen HUD, needsOxygen is called (method to determine whether the player is an android currently)

This function works by reading a player's NBT data, which as I understand is an expensive operation (on the server this is stored in memory, I'm unsure how it's accessed on the client)

There may be a solution in moving further up the call chain and stopping the render overlay handler being called in the first place if needsOxygen returns false (render overlay is only responsible for displaying info on whether a player is suffocating/how much oxygen they have left, which is irrelevant to androids who don't need it anymore)

@flashgnash flashgnash added the bug Something isn't working label Jan 7, 2025
@flashgnash flashgnash self-assigned this Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant