This commit is contained in:
Anuken
2020-05-02 12:58:54 -04:00
parent fed4d10ec6
commit 25f07e7bcb
4 changed files with 19 additions and 8 deletions

View File

@@ -87,12 +87,22 @@ public class Annotations{
//endregion
//region misc. utility
/** Automatically loads block regions annotated with this. */
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.SOURCE)
public @interface Load{
/**
* The region name to load. Variables can be used:
* "@" -> block name
* "$size" -> block size
* "#" "#1" "#2" -> index number, for arrays
* */
String value();
/** 1D Array length, if applicable. */
int length() default 1;
/** 2D array lengths. */
int[] lengths() default {};
/** Fallback string used to replace "@" (the block name) if the region isn't found. */
String fallback() default "error";
}