Class ContentManifest.Manifest
- Namespace
- McServerLauncher.Services
- Assembly
- McServerLauncher.dll
One jar: what it offers under what names, and what it needs to be there.
public record ContentManifest.Manifest : IEquatable<ContentManifest.Manifest>
- Inheritance
-
ContentManifest.Manifest
- Implements
- Inherited Members
Constructors
Manifest(string, IReadOnlyList<string>, IReadOnlyList<string>)
One jar: what it offers under what names, and what it needs to be there.
public Manifest(string FileName, IReadOnlyList<string> Provides, IReadOnlyList<string> Requires)
Parameters
FileNamestringThe jar's own file name, for saying who needs what.
ProvidesIReadOnlyList<string>Every id this jar answers to, including its own.
RequiresIReadOnlyList<string>Ids that must be present for it to load.
Properties
FileName
The jar's own file name, for saying who needs what.
public string FileName { get; init; }
Property Value
Id
The id the jar gives itself, or null if it gives none.
public string? Id { get; init; }
Property Value
Remarks
Only the jar's own: Fabric's id, the first modId under [[mods]], a
plugin's name. Not its provides aliases and not anything bundled inside it,
which Provides does include. The difference is the whole point: a mod that
carries fabric-api inside itself provides fabric-api, but it is not fabric-api, and
deciding it was another copy of fabric-api would delete it.
IsSilent
True when the jar said nothing this app can act on.
public bool IsSilent { get; }
Property Value
Name
The name the jar shows people, if it declares one.
public string? Name { get; init; }
Property Value
OwnProvides
The ids the jar answers to by itself: its own and its provides aliases, without
anything bundled inside it. Provides when it bundles nothing.
public IReadOnlyList<string> OwnProvides { get; init; }
Property Value
Remarks
malilib carries three Fabric API modules inside itself. Asked "who provides fabric-resource-loader-v1?", Provides rightly says malilib does — and then every mod that uses that module looked like it used malilib.
Provides
Every id this jar answers to, including its own.
public IReadOnlyList<string> Provides { get; init; }
Property Value
References
Every id the jar mentions needing in any way: hard requirements, but also the ones it only recommends, suggests, softly depends on or marks optional.
public IReadOnlyList<string> References { get; init; }
Property Value
Remarks
Requires is what blocks a start, so it is strict. This is the opposite: it
answers "does anything here still use that library?", where counting too little means
offering to delete something a mod uses. Raw, as the jar wrote them — the loader's own ids
are not filtered, and Fabric's old fabric alias is left for the reader to resolve.
breaks, conflicts and incompatible dependencies are not references.
Requires
Ids that must be present for it to load.
public IReadOnlyList<string> Requires { get; init; }
Property Value
Side
Where the jar says it runs, if it says.
public ContentManifest.ContentSide Side { get; init; }
Property Value
Remarks
An init property with a default rather than a fourth positional parameter, so
that not one existing call site or test has to change to gain it. Everything that does
not set it keeps reading Unspecified, which is what the jars
that say nothing mean anyway.
Methods
Empty(string)
public static ContentManifest.Manifest Empty(string fileName)
Parameters
fileNamestring