Class ToastAddEvent

java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.client.event.ToastAddEvent
All Implemented Interfaces:
net.neoforged.bus.api.ICancellableEvent

public class ToastAddEvent extends net.neoforged.bus.api.Event implements net.neoforged.bus.api.ICancellableEvent
Fired when the client queues a Toast message to be shown onscreen. Toasts are small popups that appear on the top right of the screen, for certain actions such as unlocking Advancements and Recipes.

This event is cancellable, and does not

invalid reference
have a result
. Cancelling the event stops the toast from being queued, which means it never renders.

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

  • Field Details

    • toast

      private final Toast toast
  • Constructor Details

    • ToastAddEvent

      public ToastAddEvent(Toast toast)
  • Method Details

    • getToast

      public Toast getToast()