Interface StatusBarHeightProvider

All Superinterfaces:
ToIntFunction<net.minecraft.world.entity.player.Player>
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface StatusBarHeightProvider extends ToIntFunction<net.minecraft.world.entity.player.Player>
Define the vertical space occupied by HUD elements, known as status bars, which are positioned on the left and right sides above the player's hotbar.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    default int
    applyAsInt(net.minecraft.world.entity.player.Player player)
     
    int
    getStatusBarHeight(net.minecraft.world.entity.player.Player player)
     
  • Method Details

    • getStatusBarHeight

      int getStatusBarHeight(net.minecraft.world.entity.player.Player player)
      Parameters:
      player - the Player from Gui.getCameraPlayer()
      Returns:
      the vertical space occupied by the status bar
    • applyAsInt

      @NonExtendable default int applyAsInt(net.minecraft.world.entity.player.Player player)
      Specified by:
      applyAsInt in interface ToIntFunction<net.minecraft.world.entity.player.Player>