package org.inventivetalent.nbt;

public class TagID {

	public static final int TAG_END        = 0;
	public static final int TAG_BYTE       = 1;
	public static final int TAG_SHORT      = 2;
	public static final int TAG_INT        = 3;
	public static final int TAG_LONG       = 4;
	public static final int TAG_FLOAT      = 5;
	public static final int TAG_DOUBLE     = 6;
	public static final int TAG_BYTE_ARRAY = 7;
	public static final int TAG_STRING     = 8;
	public static final int TAG_LIST       = 9;
	public static final int TAG_COMPOUND   = 10;
	public static final int TAG_INT_ARRAY  = 11;

}

@@ -592,10 +592,1043 @@
  = 11;%0A%0A
+%09public static int forClass(Class%3C? extends NBTTag%3E clazz) %7B%0A%09%09return forName(clazz.getSimpleName());%0A%09%7D%0A%0A%09public static int forName(String name) %7B%0A%09%09switch (name) %7B%0A%09%09%09case %22ByteArrayTag%22:%0A%09%09%09case %22Tag_Byte_Array%22:%0A%09%09%09%09return TAG_BYTE_ARRAY;%0A%09%09%09case %22ByteTag%22:%0A%09%09%09case %22Tag_Byte%22:%0A%09%09%09%09return TAG_BYTE;%0A%09%09%09case %22CompoundTag%22:%0A%09%09%09case %22TAG_Compound%22:%0A%09%09%09%09return TAG_COMPOUND;%0A%09%09%09case %22DoubleTag%22:%0A%09%09%09case %22TAG_Double%22:%0A%09%09%09%09return TAG_DOUBLE;%0A%09%09%09case %22EndTag%22:%0A%09%09%09case %22TAG_End%22:%0A%09%09%09%09return TAG_END;%0A%09%09%09case %22FloatTag%22:%0A%09%09%09case %22TAG_Float%22:%0A%09%09%09%09return TAG_FLOAT;%0A%09%09%09case %22IntArrayTag%22:%0A%09%09%09case %22TAG_Int_Array%22:%0A%09%09%09%09return TAG_INT_ARRAY;%0A%09%09%09case %22IntTag%22:%0A%09%09%09case %22TAG_Int%22:%0A%09%09%09%09return TAG_INT;%0A%09%09%09case %22ListTag%22:%0A%09%09%09case %22TAG_List%22:%0A%09%09%09%09return TAG_LIST;%0A%09%09%09case %22LongTag%22:%0A%09%09%09case %22TAG_Long%22:%0A%09%09%09%09return TAG_LONG;%0A%09%09%09case %22ShortTag%22:%0A%09%09%09case %22TAG_Short%22:%0A%09%09%09%09return TAG_SHORT;%0A%09%09%09case %22StringTag%22:%0A%09%09%09case %22TAG_String%22:%0A%09%09%09%09return TAG_STRING;%0A%09%09%09default:%0A%09%09%09%09throw new IllegalArgumentException(%22Invalid NBTTag name: %22 + name);%0A%09%09%7D%0A%09%7D%0A%0A
 %7D%0A

add #forName & #forClass