public abstract class NilModBase
extends java.lang.Object
implements java.lang.Runnable
| Modifier and Type | Field and Description |
|---|---|
protected ModBuildInfo |
buildInfo |
protected nilloader.api.NilLogger |
log |
protected SimpleRemap |
remap |
| Modifier | Constructor and Description |
|---|---|
protected |
NilModBase(ModBuildInfo buildInfo,
SimpleRemap remap) |
| Modifier and Type | Method and Description |
|---|---|
protected <T extends Event> |
listen(java.lang.Class<T> eventType,
EventBus.EventListener<T> listener)
Registers a typed listener callback using NORMAL priority.
|
protected <T extends Event> |
listen(java.lang.Class<T> eventType,
EventBus.EventListener<T> listener,
EventPriority priority,
boolean receiveCancelled)
Registers a typed listener callback with explicit delivery options.
|
protected abstract void |
onLoad()
Called automatically from run().
|
protected boolean |
post(Event event)
Posts an event to the global SDK EventBus.
|
protected void |
registerEvents()
Registers annotated listener methods in this mod instance to the global SDK EventBus.
|
protected void |
registerEvents(java.lang.Object listener)
Registers annotated listener methods from the provided instance to the global SDK EventBus.
|
void |
run() |
protected final nilloader.api.NilLogger log
protected final SimpleRemap remap
protected final ModBuildInfo buildInfo
protected NilModBase(ModBuildInfo buildInfo, SimpleRemap remap)
public final void run()
run in interface java.lang.Runnableprotected abstract void onLoad()
throws java.lang.Throwable
java.lang.Throwableprotected final void registerEvents()
protected final void registerEvents(java.lang.Object listener)
protected final <T extends Event> void listen(java.lang.Class<T> eventType, EventBus.EventListener<T> listener)
protected final <T extends Event> void listen(java.lang.Class<T> eventType, EventBus.EventListener<T> listener, EventPriority priority, boolean receiveCancelled)
protected final boolean post(Event event)