package org.inventivetalent.npclib.nbt;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Retention(RetentionPolicy.RUNTIME)
@Target({
				ElementType.FIELD,
				ElementType.METHOD })
public @interface NBT {

	/**
	 * Path for this NBT value. Every entry of the array is a TAG_Compound, but the last entry matches {@link #type()}/the field type
	 *
	 * @return NBT path
	 */
	String[] value() default "";

	/**
	 * Type of this NBT value
	 *
	 * @return NBT type
	 */
	int type();

	/**
	 * Whether to write this value to NBT
	 *
	 * @return whether to write
	 */
	boolean write() default true;

	/**
	 * Whether to read this value from NBT
	 *
	 * @return whether to read
	 */
	boolean read() default true;

}

@@ -34,16 +34,55 @@
 b.nbt;%0A%0A
+import org.inventivetalent.nbt.TagID;%0A%0A
 import j
@@ -114,16 +114,16 @@
 ntType;%0A
-
 import j
@@ -326,16 +326,43 @@
 e.METHOD
+,%0A%09%09%09%09ElementType.PARAMETER
  %7D)%0Apubl
@@ -641,16 +641,16 @@
 pe%0A%09 */%0A
-
 %09int typ
@@ -652,16 +652,38 @@
 t type()
+ default TagID.TAG_END
 ;%0A%0A%09/**%0A

allow annotation on parameters | set the default type to TAG_End