Quilt Loader 1
Loading...
Searching...
No Matches
org.quiltmc.loader.api.entrypoint.EntrypointUtil Class Reference

Various methods for invoking entrypoints. More...

Static Public Member Functions

static< T > void invoke (String name, Class< T > type, Consumer<? super T > invoker)
 Passes every entrypoint value with the given name to the consumer.
static< T > void invoke (String name, Class< T > type, BiConsumer< T, ModContainer > invoker)
 Passes every entrypoint value and ModContainer with the given name to the consumer.
static< T > void invokeContainer (String name, Class< T > type, Consumer< EntrypointContainer< T > > invoker)
 Passes every EntrypointContainer with the given name to the consumer.

Detailed Description

Various methods for invoking entrypoints.

This is intended for use whenever you want to invoke a method on each returned entrypoint, likely via method reference. For example Quilt Loader uses this to invoke the "pre_launch" entrypoint:
EntrypointUtil.invoke("pre_launch", PreLaunchEntrypoint.class, PreLaunchEntrypoint::onPreLaunch);

Member Function Documentation

◆ invoke() [1/2]

static< T > void org.quiltmc.loader.api.entrypoint.EntrypointUtil.invoke ( String name,
Class< T > type,
BiConsumer< T, ModContainer > invoker )
inlinestatic

Passes every entrypoint value and ModContainer with the given name to the consumer.

Exceptions
EntrypointExceptionif anything goes wrong while gathering entrypoints (for example if an entrypoint cannot be cast to the given class).

◆ invoke() [2/2]

static< T > void org.quiltmc.loader.api.entrypoint.EntrypointUtil.invoke ( String name,
Class< T > type,
Consumer<? super T > invoker )
inlinestatic

Passes every entrypoint value with the given name to the consumer.

Exceptions
EntrypointExceptionif anything goes wrong while gathering entrypoints (for example if an entrypoint cannot be cast to the given class).

◆ invokeContainer()

static< T > void org.quiltmc.loader.api.entrypoint.EntrypointUtil.invokeContainer ( String name,
Class< T > type,
Consumer< EntrypointContainer< T > > invoker )
inlinestatic

Passes every EntrypointContainer with the given name to the consumer.

Exceptions
EntrypointExceptionif anything goes wrong while gathering entrypoints (for example if an entrypoint cannot be cast to the given class).

The documentation for this class was generated from the following file:
  • src/main/java/org/quiltmc/loader/api/entrypoint/EntrypointUtil.java