@Retention(value=RUNTIME)
@Target(value={TYPE,FIELD,METHOD,CONSTRUCTOR})
public @interface OnlyIn
Dist
.
Classes, fields, methods and constructors can be marked as only available in a specific distribution
based on the presence of this annotation.
This is generally meant for internal Forge and FML use only and modders should avoid its use whenever possible.
Note, this will only apply to the direct element marked. This code:@OnlyIn(Dist.CLIENT) public MyField field = new MyField();
will not work,
as the initializer is a separate piece of code to the actual field declaration, and will not be able to find
it's field on the wrong side.修飾子とタイプ | 任意要素と説明 |
---|---|
java.lang.Class<?> |
_interface
Only valid on Type definitions.
|
public abstract Dist value
public abstract java.lang.Class<?> _interface