mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-11-27 00:04:42 +00:00
@Ref had two attributes of which exactly one had to be given, checked only at pack load. One annotation per concept makes a wrong combination a compile error; giving both still fails the load.
17 lines
887 B
Java
17 lines
887 B
Java
package com.volmit.config;
|
|
|
|
import java.lang.annotation.*;
|
|
|
|
/** Says that an option's text names a resource of the pack by its key, {@code @ResourceRef(LootTable.class) String table},
|
|
* where the value is the type of a {@link com.volmit.resource.ResourceKind}: a host kind, the constants of
|
|
* {@link com.volmit.resource.PackResources}, or a kind some module of the pack registers. Studio then offers the pack's
|
|
* keys of that kind. Allowed on {@code String} and {@link com.volmit.resource.ResourceId} options and on lists, sets and
|
|
* arrays of them, where it applies to every element; a {@code ResourceId} option holds the id the pack gives the key it
|
|
* writes. An option with both this and {@link Ref}, or with either on any other type, fails the pack load.
|
|
*/
|
|
@Retention(RetentionPolicy.RUNTIME)
|
|
@Target(ElementType.FIELD)
|
|
public @interface ResourceRef {
|
|
Class<?> value();
|
|
}
|