Class CustomizeGuiOverlayEvent.BossEventProgress

java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.client.event.CustomizeGuiOverlayEvent
net.neoforged.neoforge.client.event.CustomizeGuiOverlayEvent.BossEventProgress
All Implemented Interfaces:
net.neoforged.bus.api.ICancellableEvent
Enclosing class:
CustomizeGuiOverlayEvent

public static class CustomizeGuiOverlayEvent.BossEventProgress extends CustomizeGuiOverlayEvent implements net.neoforged.bus.api.ICancellableEvent

Fired before a boss health bar is rendered to the screen.

This event is cancellable. Cancelling this event will prevent the given bar from rendering. The Y position increment is always applied, even if the event is canceled, to give way for any custom elements rendered in place of vanilla's bar rendering.

This event is fired on the game event bus, only on the logical client.

  • Field Details

    • bossEvent

      private final LerpingBossEvent bossEvent
    • x

      private final int x
    • y

      private final int y
    • increment

      private int increment
  • Constructor Details

  • Method Details

    • getBossEvent

      public LerpingBossEvent getBossEvent()
      Returns the boss health bar currently being rendered.
      Returns:
      the boss health bar currently being rendered
    • getX

      public int getX()
      Returns the X position of the boss health bar.
      Returns:
      the X position of the boss health bar
    • getY

      public int getY()
      Returns the Y position of the boss health bar.
      Returns:
      the Y position of the boss health bar
    • getIncrement

      public int getIncrement()
      Returns the Y position increment, applied before rendering the next boss health bar. This is always applied, even if the event is canceled.
      Returns:
      the Y position increment, applied before rendering the next boss health bar
    • setIncrement

      public void setIncrement(int increment)
      Sets the Y position increment, which is applied before rendering the next boss health bar.
      Parameters:
      increment - the new Y position increment