@Override
	public void loadData(DataInput input) throws IOException {
		TagBase tag = null;
		
		while (true) {
			int tagTypeId = input.readByte();
			EnumTagType tagType = EnumTagType.fromTypeId(tagTypeId);
			
			if (tagType != null) {
				if (tagType != EnumTagType.TAG_End) {
					String tagName = input.readUTF();
					
					try {
						tag = (TagBase) tagType.getTagClass().getConstructor(String.class).newInstance(tagName);
					} catch (InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException | NoSuchMethodException | SecurityException e) {
						e.printStackTrace();
					}
				} else {
					tag = (TagBase) new TagEnd();
				}
			}
			
			if (tag != null && tag.getType() != EnumTagType.TAG_End) {
				tag.loadData(input);
				this.children.add(tag);
			} else {
				break;
			}
		}
	}