Class ToastAddEvent

java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.client.event.ToastAddEvent

public class ToastAddEvent extends net.minecraftforge.eventbus.api.Event
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 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.

  • Nested Class Summary

    Nested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event

    net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final Toast
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
     

    Methods inherited from class net.minecraftforge.eventbus.api.Event

    getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • toast

      private final Toast toast
  • Constructor Details

    • ToastAddEvent

      public ToastAddEvent(Toast toast)
  • Method Details

    • getToast

      public Toast getToast()