Package dev.overlord.zomboidforge.api.annotations
@NotNullByDefault
package dev.overlord.zomboidforge.api.annotations
Annotations that stand for calls a mod can also make through the services of
Mod.-
Annotation InterfacesClassDescriptionRuns the method periodically on the mod's own thread, as
ModThread.scheduleAtFixedRate(Runnable, Duration, Duration)orModThread.scheduleWithFixedDelay(Runnable, Duration, Duration)do.Runs the method on the main thread every n-th frame of the main loop: aTickEventlistener for the ticks thatEveryNTicks.value()divides (n, 2n, ...).The key of a record component, instead of the one converted from its name (maxBalancetomax_balance): theconfig.tomlkey forModConfig.bind(Class), the column name forModStoragetables.The largest value a numeric component of a configuration record accepts; seeMin.A migration of a storage record, asTableDefinition.migrate(int, Function)adds one: turns a row stored with schema versionMigrate.from()into the record.The smallest value a numeric component of a configuration record accepts.Registers the method withEvents.onMain(Class, Consumer)for theClientCommandEvents of one module, and optionally one command.Registers the method withEvents.onMain(Class, Consumer)for the event type of its only parameter.Registers the method withEvents.onModThread(Class, Consumer)for the event type of its only parameter.Registers the class as an admin command, asCommands.register(Class)does, while the mod loads: after the entry point's listener methods and beforeMod.onLoad().The schema version of a storage record, read byModStorage.table(String, Class)andModStorage.define(String, Class);TableDefinition.version(int)overrides it.