ForgeAnnotationScanner

class ForgeAnnotationScanner(objectMapper: ObjectMapper, utilities: Utilities) : JsonBasedScanner, Scanner<TreeSet<File>, Collection<File>>

fml-cache-annotation.json-based scanning of Forge-Minecraft mods of older versions.

Author

Griefed

Parameters

objectMapper

For JSON-parsing.

utilities

Common utilities used across ServerPackCreator.

Constructors

Link copied to clipboard
constructor(objectMapper: ObjectMapper, utilities: Utilities)

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open override fun checkForClientModsAndDeps(filesInModsDir: Collection<File>, clientMods: TreeSet<String>, modDependencies: ArrayList<Pair<String, Pair<String, String>>>)

Check every file and fill the clientMods and modDependencies sets with ids of mods which are clientside-only or dependencies of a mod.

Link copied to clipboard
fun cleanupClientMods(modDependencies: ArrayList<Pair<String, Pair<String, String>>>, clientMods: TreeSet<String>)

Remove any dependency from the list of clientside-only mods to prevent excluding dependencies of other mods, resulting in a potentially broken server pack.

Link copied to clipboard
fun getJarJson(file: File, entryInJar: String, objectMapper: ObjectMapper): JsonNode

Acquire a JsonNode from the specified file in the specified file.

Link copied to clipboard
open override fun getModsDelta(filesInModsDir: Collection<File>, clientMods: TreeSet<String>): TreeSet<File>

Get a list of mod-jars which can safely be excluded from the server pack.

Link copied to clipboard
open override fun scan(jarFiles: Collection<File>): TreeSet<File>

Scan the fml-cache-annotation.json-files in mod JAR-files of a given directory for their sideness.