private static <T extends BinaryTag, Y extends BinaryTagType<T>> Y register(final Y type) {
    TYPES.add(type);
    return type;
  }
Writes a tag.

@param tag the tag
@param output the output
@throws IOException if an exception was encountered while writing
@since 4.0.0
nbt/src/main/java/net/kyori/adventure/nbt/BinaryTagType.java