EventRegistration

object EventRegistration

A "containing" object to make event registration callbacks less polluting to the global namespace.

Author

sschr15

Extensions

Link copied to clipboard
fun EventRegistration.afterKeyPress(callback: KeyboardKey<Unit>)
Link copied to clipboard
fun EventRegistration.afterKeyRelease(callback: KeyboardKey<Unit>)
Link copied to clipboard
fun EventRegistration.afterMouseClick(callback: MouseClick<Unit>)
Link copied to clipboard
fun EventRegistration.afterMouseRelease(callback: MouseClick<Unit>)
Link copied to clipboard
fun EventRegistration.afterMouseScroll(callback: MouseScroll<Unit>)
Link copied to clipboard
fun EventRegistration.afterScreenInit(callback: ScreenInitCallback)
Link copied to clipboard
fun EventRegistration.afterScreenRender(callback: ScreenRenderCallback)
Link copied to clipboard
fun EventRegistration.afterScreenTick(callback: ScreenGenericCallback)
Link copied to clipboard
fun EventRegistration.allowKeyPress(callback: KeyboardKey<TriState>)
Link copied to clipboard
fun EventRegistration.allowKeyRelease(callback: KeyboardKey<TriState>)
Link copied to clipboard
fun EventRegistration.allowMouseClick(callback: MouseClick<TriState>)
Link copied to clipboard
fun EventRegistration.allowMouseRelease(callback: MouseClick<TriState>)
Link copied to clipboard
fun EventRegistration.allowMouseScroll(callback: MouseScroll<TriState>)
Link copied to clipboard
fun EventRegistration.beforeKeyPress(callback: KeyboardKey<Unit>)
Link copied to clipboard
fun EventRegistration.beforeKeyRelease(callback: KeyboardKey<Unit>)
Link copied to clipboard
fun EventRegistration.beforeMouseClick(callback: MouseClick<Unit>)
Link copied to clipboard
fun EventRegistration.beforeMouseRelease(callback: MouseClick<Unit>)
Link copied to clipboard
fun EventRegistration.beforeMouseScroll(callback: MouseScroll<Unit>)
Link copied to clipboard
fun EventRegistration.beforeScreenInit(callback: ScreenInitCallback)
Link copied to clipboard
fun EventRegistration.beforeScreenRender(callback: ScreenRenderCallback)
Link copied to clipboard
fun EventRegistration.beforeScreenTick(callback: ScreenGenericCallback)
Link copied to clipboard
fun EventRegistration.onAddAffectedWorldDetails(callback: CrashDetailCallback<World>)
Link copied to clipboard
fun EventRegistration.onAddBlockDetails(callback: CrashBlockDetailCallback)
Link copied to clipboard
Link copied to clipboard
fun EventRegistration.onAddEntityDetails(callback: CrashDetailCallback<Entity>)
Link copied to clipboard
fun EventRegistration.onAddRecipes(consumer: (handler: RecipeLoadingEvents.AddRecipesCallback.RecipeHandler) -> Unit)

Called when recipes are loaded. This is the time to register your own recipes. It is called before onModifyRecipes and onRemoveRecipes.

Link copied to clipboard
fun EventRegistration.onAddSystemDetails(callback: SystemDetails.() -> Unit)
Link copied to clipboard
@Environment(value = EnvType.CLIENT)
fun EventRegistration.onClientCommandRegistration(callback: CommandRegisterCallback<QuiltClientCommandSource>)
Link copied to clipboard
fun EventRegistration.onClientPlayChannelRegister(callback: C2SPlayCallback)
Link copied to clipboard
fun EventRegistration.onClientPlayChannelUnregister(callback: C2SPlayCallback)
Link copied to clipboard
fun EventRegistration.onClientReady(callback: GenericClientCallback)
Link copied to clipboard
fun EventRegistration.onClientStopped(callback: GenericClientCallback)
Link copied to clipboard
fun EventRegistration.onClientStopping(callback: GenericClientCallback)
Link copied to clipboard
fun EventRegistration.onClientTickFinish(callback: GenericClientCallback)

This tends to be a code hotspot, so any code should be sure to run quickly.

Link copied to clipboard
fun EventRegistration.onClientTickStart(callback: GenericClientCallback)

This tends to be a code hotspot, so any code should be sure to run quickly.

Link copied to clipboard
Link copied to clipboard
fun EventRegistration.onCrashReportCreation(callback: CrashReport.() -> Unit)
Link copied to clipboard
fun EventRegistration.onDataPackReloadFinish(callback: DataPackReloadFinish)

Called when data pack reloading has finished.

Link copied to clipboard
fun EventRegistration.onDataPackReloadStart(callback: DataPackReloadStart)

Called when data pack reloading is about to begin.

Link copied to clipboard
fun EventRegistration.onEntityTrackingStart(callback: EntityTrackingCallback)

Invoked when a player on the server starts tracking an entity. This usually happens when the entity gets close enough to the player to be seen.

Link copied to clipboard
fun EventRegistration.onEntityTrackingStop(callback: EntityTrackingCallback)

Invoked when a player on the server stops tracking an entity. By the time this event runs, the player has already been told to destroy the entity instance, but the entity is still on the server.

Link copied to clipboard
fun EventRegistration.onItemTooltip(callback: TooltipCallback)
Link copied to clipboard
fun EventRegistration.onLoginDisconnect(callback: ClientLoginCallback)
fun EventRegistration.onLoginDisconnect(callback: GenericLoginCallback)
Link copied to clipboard
fun EventRegistration.onLoginInit(callback: ClientLoginCallback)
fun EventRegistration.onLoginInit(callback: GenericLoginCallback)
Link copied to clipboard
fun EventRegistration.onLoginQueryStart(callback: ClientLoginCallback)
fun EventRegistration.onLoginQueryStart(callback: LoginQueryStartCallback)
Link copied to clipboard
fun EventRegistration.onModifyRecipes(consumer: (handler: RecipeLoadingEvents.ModifyRecipesCallback.RecipeHandler) -> Unit)

Called when recipes are modified. This is the time to modify any recipes. It is called after onAddRecipes but before onRemoveRecipes.

Link copied to clipboard
fun EventRegistration.onPlayChannelRegister(callback: S2CPlayChannelCallback)
Link copied to clipboard
fun EventRegistration.onPlayChannelUnregister(callback: S2CPlayChannelCallback)
Link copied to clipboard
fun EventRegistration.onPlayConnectionDisconnect(callback: ClientPlayCallback)
Link copied to clipboard
fun EventRegistration.onPlayConnectionInit(callback: ClientPlayCallback)
Link copied to clipboard
fun EventRegistration.onPlayConnectionReady(callback: ClientPlayJoinCallback)
Link copied to clipboard
fun EventRegistration.onPlayDisconnect(callback: GenericPlayCallback)
Link copied to clipboard
fun EventRegistration.onPlayInit(callback: GenericPlayCallback)
Link copied to clipboard
fun EventRegistration.onPlayReady(callback: S2CPlayReadyCallback)
Link copied to clipboard
fun <V> EventRegistration.onRegistryEntryAdded(registry: Registry<V>, callback: (RegistryEntryContext<V>) -> Unit)

Get a callback when a given registry gets a new entry.

Link copied to clipboard
fun EventRegistration.onRemoveRecipes(consumer: (handler: RecipeLoadingEvents.RemoveRecipesCallback.RecipeHandler) -> Unit)

Called when recipes are removed. This is the time to remove any recipes. It is called after onAddRecipes and onModifyRecipes.

Link copied to clipboard
fun EventRegistration.onScreenRemoved(callback: ScreenGenericCallback)
Link copied to clipboard
fun EventRegistration.onServerReady(callback: GenericServerCallback)
Link copied to clipboard
fun EventRegistration.onServerStarting(callback: GenericServerCallback)
Link copied to clipboard
fun EventRegistration.onServerStopped(callback: GenericServerCallback)
Link copied to clipboard
fun EventRegistration.onServerStopping(callback: GenericServerCallback)
Link copied to clipboard
fun EventRegistration.onServerTickEnd(callback: GenericServerCallback)

This tends to be a code hotspot, so any code should be sure to run quickly.

Link copied to clipboard
fun EventRegistration.onServerTickStart(callback: GenericServerCallback)

This tends to be a code hotspot, so any code should be sure to run quickly.

Link copied to clipboard
fun EventRegistration.onServerWorldLoad(callback: ServerWorldCallback)
Link copied to clipboard
fun EventRegistration.onServerWorldTickEnd(callback: ServerWorldCallback)

This tends to be a code hotspot, so any code should be sure to run quickly.

Link copied to clipboard
fun EventRegistration.onServerWorldTickStart(callback: ServerWorldCallback)

This tends to be a code hotspot, so any code should be sure to run quickly.

Link copied to clipboard
fun EventRegistration.onServerWorldUnload(callback: ServerWorldCallback)
Link copied to clipboard
fun EventRegistration.onTooltipComponent(callback: TooltipComponentGenerator)
Link copied to clipboard
fun EventRegistration.onWorldTickFinish(callback: WorldTickCallback)

This tends to be a code hotspot, so any code should be sure to run quickly.

Link copied to clipboard
fun EventRegistration.onWorldTickStart(callback: WorldTickCallback)

This tends to be a code hotspot, so any code should be sure to run quickly.