Class ExportSelection
- Namespace
- McServerLauncher.Services
- Assembly
- McServerLauncher.dll
Which of a server's jars belong in the pack its players are handed.
public static class ExportSelection
- Inheritance
-
ExportSelection
- Inherited Members
Remarks
A modded server usually carries a few jars the player has no use for: Geyser and Floodgate for Bedrock crossplay, a permissions plugin, a world-backup mod. They do nothing on a client, and they are megabytes the player downloads and copies into their mods folder for no reason.
Two sources answer the question, and neither on its own is enough. The jar's own manifest is the author speaking, but hardly any author ever changes the field. The store knows, but its data is community-edited and is sometimes plainly wrong. So the rule is asymmetric, and it is one sentence: a jar leaves the pack when either source says it is server-only and neither says a client needs it. A jar that declares itself client-side can never be dropped, whatever the store says.
"Declares itself both" is not in that list, and finding out why cost a real modpack. The
first folder this was tried on had eleven mods and all eleven said environment: "*" —
including Floodgate, which is a Bedrock authentication plugin and does nothing whatsoever on a
client. It is what the Fabric template writes and it means the same as leaving the key out, so
treating it as an assertion strong enough to overrule the store made the whole feature incapable
of excluding anything at all. Only client and server are worth anything in that
field.
Nothing here touches the network — see ExportGateTests, which checks that against the
file. What the store said is passed in, already fetched, already given up on if it did not
arrive. Offline the store simply says nothing, and saying nothing can only ever exclude
fewer jars, which is the direction a wrong answer should fail in.
Methods
Decide(IReadOnlyList<Candidate>, bool)
Decides what goes in the pack.
public static ExportSelection.Plan Decide(IReadOnlyList<ExportSelection.Candidate> candidates, bool includeEverything = false)
Parameters
candidatesIReadOnlyList<ExportSelection.Candidate>Every enabled jar in the server's content folder.
includeEverythingboolThe user pressed "include them anyway". Nothing is excluded and no reasoning is done.