Interface HudStatusBarHeightRegistryImpl.ResolvedHeightProvider

All Superinterfaces:
ToIntFunction<net.minecraft.world.entity.player.Player>
Enclosing class:
HudStatusBarHeightRegistryImpl
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 static interface HudStatusBarHeightRegistryImpl.ResolvedHeightProvider extends ToIntFunction<net.minecraft.world.entity.player.Player>
Returns the sum of all registered provider heights that are considered "below" the position of the element associated with the given HudElement.

Exists in addition to StatusBarHeightProvider to help distinguish both functionalities in the implementation.

  • Field Details

  • Method Details

    • getResolvedHeight

      int getResolvedHeight(net.minecraft.world.entity.player.Player player)
      Parameters:
      player - the Player from Gui.getCameraPlayer()
      Returns:
      the vertical space occupied by all status bars "below" this one
    • applyAsInt

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