Package net.neoforged.neoforge.client.extensions


@ParametersAreNonnullByDefault package net.neoforged.neoforge.client.extensions
Extension interfaces for client-only classes.

Extension interfaces allow the convenient addition of methods to the target class, as the target class is patched to implement the interface. Because of this, these interfaces must only be implemented by the target classes, and must not be implemented manually by mods.

These interfaces hold at least one method: the self() method which casts the object into the type of the targeted class, to allow methods in the extension interface to reference methods from the target class. Additional methods are usually default with an implementation in the interface itself, but methods may be implemented in the target class instead if it requires access to (patched-in or original) fields in the instance.