code: public static void register(int id, Class<? extends Tag> tag) throws TagRegisterException {
          if(idToTag.containsKey(id)) {
              throw new TagRegisterException("Tag ID \"" + id + "\" is already in use.");
          }
  
          if(tagToId.containsKey(tag)) {
              throw new TagRegisterException("Tag \"" + tag.getSimpleName() + "\" is already registered.");
          }
  
          idToTag.put(id, tag);
          tagToId.put(tag, id);
      }
docs: Registers a tag class.
  
  @param id  ID of the tag.
  @param tag Tag class to register.
  @throws TagRegisterException If an error occurs while registering the tag.