Skip to content

Commit

Permalink
Fix screen safe area for armor bars (fix #339)
Browse files Browse the repository at this point in the history
  • Loading branch information
juancarloscp52 committed May 8, 2024
1 parent 60d50d6 commit 49845a2
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,13 @@ public int modifyTextureStatusBar(int y){
private int modifyTextureStatusBarsHearts(int y){
return y-screenBorder;
}

/**
* Apply screen border offset to armor bars.
*/
@ModifyArg(method = "renderStatusBars", at = @At(value = "INVOKE",target = "Lnet/minecraft/client/gui/hud/InGameHud;renderArmor(Lnet/minecraft/client/gui/DrawContext;Lnet/minecraft/entity/player/PlayerEntity;IIII)V"), index = 2)
private int modifyTextureStatusBarsArmor(int i){
return i-screenBorder;
}
/**
* Apply screen border offset to food bars.
*/
Expand Down

0 comments on commit 49845a2

Please sign in to comment.