MinecraftArchiveFontAssetSource

class MinecraftArchiveFontAssetSource(archive: Path, val name: String = archive.toString()) : MinecraftBoundedFontAssetSource(source)

ZIP or JAR pack source that opens and closes an archive for each operation. Files are read directly and never extracted to the filesystem. The caller must not modify the archive during snapshot loading.

Parameters

archive

existing archive file.

Throws

when the archive is not a regular file.

Constructors

Link copied to clipboard
constructor(archive: Path, name: String = archive.toString())

Properties

Link copied to clipboard
open override val name: String

diagnostic label.

Functions

Link copied to clipboard
open override fun paths(): Set<String>

Lists available canonical pack-relative file paths.

open override fun paths(limits: MinecraftFontLoadLimits): Set<String>

Lists paths under inclusive entry and path ceilings, checking while enumerating where possible. The default checks an already bounded original paths result before loader copying.

open override fun paths(limits: MinecraftFontLoadLimits, onEntryExamined: () -> Unit): Set<String>

Enumerates paths while reporting each examined entry before validation or filtering. Directory and ignored entries count even when absent from the returned set; implementations must stop if the callback throws. The callback is synchronous, owner-thread-only, and must not be retained; late or foreign-thread calls fail before changing loader counters. The default reports the bounded original result, so sources that filter physical entries must override this method.

Link copied to clipboard
open override fun read(path: String): ByteArray?

Reads one complete file without retaining a stream.

open override fun read(path: String, limits: MinecraftFontLoadLimits): ByteArray?

Reads one asset under inclusive encoded-byte and path ceilings. Streaming implementations must stop before allocating oversized input and close streams on success and failure. The default checks the already bounded original read result before a loader copy.