MixinRegistry

The set of TypeScript-defined injections currently active. Indexed two ways: by the internal class name (net/minecraft/...) so MixinTransformer can find what to inject when a class is (re)loaded, and by a small integer Hook.id that the injected bytecode passes back to MixinHooks to identify which callback to run.

Hooks carry their owning module so a /te reload or module unload can strip them again.

Types

Link copied to clipboard
data class Hook(val id: Int, val targetBinary: String, val targetInternal: String, val method: String, val descriptor: String?, val at: String, val module: TesseraModule?, val callback: TesseraCallback)

Functions

Link copied to clipboard
fun add(targetBinary: String, method: String, descriptor: String?, at: String, module: TesseraModule?, callback: TesseraCallback): MixinRegistry.Hook
Link copied to clipboard
fun clear(): Set<String>

Drop every hook; returns the binary names of all classes that need reverting.

Link copied to clipboard
Link copied to clipboard
fun hooksFor(internalName: String): List<MixinRegistry.Hook>

Hooks whose target is the class with this internal name (net/minecraft/...).

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun removeModule(moduleName: String): Set<String>

Drop every hook owned by moduleName; returns the binary names of classes that need reverting.