@SuppressWarnings("unchecked") // HACK: generics suck
  static <T extends BinaryTag> void writeUntyped(final BinaryTagType<? extends BinaryTag> type, final T tag, final DataOutput output) throws IOException {
    ((BinaryTagType<T>) type).write(tag, output);
  }
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