Quilt Loader 1
Loading...
Searching...
No Matches
org.quiltmc.loader.api.minecraft.ClientOnly Interface Reference

Applied to declare that the annotated element is present only in the client environment. More...

Public Member Functions

boolean stripLambdas () default true

Detailed Description

Applied to declare that the annotated element is present only in the client environment.

When applied to mod code this will result in quilt-loader removing that element when running on the dedicated server.

When the annotated element is removed, bytecode associated with the element will not be removed. For example, if a field is removed, its initializer code will not, and will cause an error on execution.

If an overriding method has this annotation and its overridden method doesn't, unexpected behavior may happen. If an overridden method has this annotation while the overriding method doesn't, it is safe, but the method can be used from the overridden class only in the specified environment.

When applied to an implemented interface (via ElementType#TYPE_USE) it will be removed on the dedicated server. Overridden interface methods need to be annotated separately in order to be removed.

See also
DedicatedServerOnly

Member Function Documentation

◆ stripLambdas()

boolean org.quiltmc.loader.api.minecraft.ClientOnly.stripLambdas ( )
Returns
True if lambda methods referenced by this method should also be stripped. Has no effect when used to annotate classes, implements declarations, or fields.

The documentation for this interface was generated from the following file:
  • src/main/java/org/quiltmc/loader/api/minecraft/ClientOnly.java