Class ServerPackManifest
-
- All Implemented Interfaces:
public final class ServerPackManifestThe server pack manifest shipped with every modpack. It includes information about the
Minecraft version
Modloader
Modloader version
ServerPackCreator version used in the generation of this server pack
A list of relative files included in a server pack
Griefed
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classServerPackManifest.CompanionWhere a server pack's manifest lives — the single place that answer is spelled.
Load-bearing rather than merely tidy: the manifest's presence is what tells ServerPackUpdater a generation is an update of an existing pack rather than a first run, and that decision governs what may be overwritten and what must be preserved — a world, an
ops.json, a hand-tunedserver.propertiesthat ServerPackCreator never wrote. A second spelling of the name would mean one caller looking where another does not write.
-
Field Summary
Fields Modifier and Type Field Description public final static StringFILE_NAMEprivate List<String>filesprivate StringminecraftVersionprivate Stringmodloaderprivate StringmodloaderVersionprivate final StringserverPackCreatorVersionpublic final static ServerPackManifest.CompanionCompanion
-
Constructor Summary
Constructors Constructor Description ServerPackManifest(List<String> files, String minecraftVersion, String modloader, String modloaderVersion)ServerPackManifest()
-
Method Summary
Modifier and Type Method Description final List<String>getFiles()Every file in the generated pack, so a later run can tell what it produced from what a user added. final UnitsetFiles(List<String> value)Every file in the generated pack, so a later run can tell what it produced from what a user added. final StringgetMinecraftVersion()Minecraft version this pack was generated for. final UnitsetMinecraftVersion(String value)Minecraft version this pack was generated for. final StringgetModloader()Modloader this pack was generated for, in SPC's canonical spelling. final UnitsetModloader(String value)Modloader this pack was generated for, in SPC's canonical spelling. final StringgetModloaderVersion()Modloader version this pack was generated for. final UnitsetModloaderVersion(String value)Modloader version this pack was generated for. final StringgetServerPackCreatorVersion()Which SPC build wrote this manifest — devfor a source build.final UnitwriteToFile(File destination, ObjectMapper objectMapper)Serialise this manifest into the given server pack directory as FILE_NAME. -
-
Method Detail
-
getFiles
final List<String> getFiles()
Every file in the generated pack, so a later run can tell what it produced from what a user added.
-
setFiles
final Unit setFiles(List<String> value)
Every file in the generated pack, so a later run can tell what it produced from what a user added.
-
getMinecraftVersion
final String getMinecraftVersion()
Minecraft version this pack was generated for.
-
setMinecraftVersion
final Unit setMinecraftVersion(String value)
Minecraft version this pack was generated for.
-
getModloader
final String getModloader()
Modloader this pack was generated for, in SPC's canonical spelling.
-
setModloader
final Unit setModloader(String value)
Modloader this pack was generated for, in SPC's canonical spelling.
-
getModloaderVersion
final String getModloaderVersion()
Modloader version this pack was generated for.
-
setModloaderVersion
final Unit setModloaderVersion(String value)
Modloader version this pack was generated for.
-
getServerPackCreatorVersion
final String getServerPackCreatorVersion()
Which SPC build wrote this manifest —
devfor a source build. Lets a migration recognise old packs.
-
writeToFile
final Unit writeToFile(File destination, ObjectMapper objectMapper)
Serialise this manifest into the given server pack directory as FILE_NAME.
-
-
-
-