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

new: hide hud #59

Merged
merged 6 commits into from
Jan 26, 2023
Merged

new: hide hud #59

merged 6 commits into from
Jan 26, 2023

Conversation

MicrocontrollersDev
Copy link
Collaborator

Description

Hides certain HUD elements in servers where they don’t change. This is a very old accepted Hytilities suggestion that was never realized due to its discontinuation and it always made me sad.

Things that can be hidden:

  • Health
  • Food
  • Armor
  • Air

Might have work to do still (such as reverting the oneconfig gradle version) but PRing for feedback or something idk

Related Issue(s)

N/A

How to test

Join a game or lobby where you wouldn’t expect to see a certain HUD element. You should now see that it is hidden. The lobby is a good place to see all four in action. Similarly, for housing and lobby, if you were to take damage it will reintroduce the health bar.

Release Notes

new: hide hud feature to hide hud elements in game modes where they wouldn’t change

Documentation

return;
}

Arrays.asList(
Copy link
Member

Choose a reason for hiding this comment

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

can you use a switch statement or at least like not create the list every frame lol

Copy link
Member

Choose a reason for hiding this comment

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

Fixed in my PR, merge mine first to the hide-hud branch

@@ -32,6 +32,7 @@
public class GuiIngameForgeMixin_HideActionbar {
@Inject(method = "renderRecordOverlay", at = @At("HEAD"), cancellable = true)
private void cancelActionBar(int width, int height, float partialTicks, CallbackInfo ci) {
if (HypixelUtils.INSTANCE.isHypixel() && LocrawUtil.INSTANCE.getLocrawInfo() != null && (HytilsConfig.hideHousingActionBar && LocrawUtil.INSTANCE.getLocrawInfo().getGameType() == LocrawInfo.GameType.HOUSING) || HytilsConfig.hideDropperActionBar && LocrawUtil.INSTANCE.getLocrawInfo().getGameType() == LocrawInfo.GameType.DROPPER) ci.cancel();
Copy link
Member

Choose a reason for hiding this comment

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

can we update this in oneconfig too

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

LocrawInfo.GameType gameType = locraw.getGameType();
String gameMode = locraw.getGameMode();
switch (gameType) {
case DUELS:
Copy link
Member

Choose a reason for hiding this comment

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

if the logic for all of this is the same (haven't seen the actual code too lazy to + on ipad) can we move this to on method

@Wyvest Wyvest merged commit 4d34ded into master Jan 26, 2023
@MicrocontrollersDev MicrocontrollersDev deleted the hide-hud branch January 26, 2023 21:25
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.

None yet

4 participants