@Retention(value=CLASS) @Target(value={TYPE,METHOD,FIELD,CONSTRUCTOR}) @Documented public @interface Environment
Use with caution, as Fabric-loader will remove the annotated element in a mismatched environment!
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.
EnvironmentInterfacepublic abstract EnvType value