Modern Companions 4.65 - one-time Prism client setup

Use this for the Schema Builder server channel that has enabled companions.
Schema Builder remains version 0.4.0. Existing updater helpers manage only the
Schema Builder JAR; they do not install Modern Companions.

1. Import the normal matching Schema Builder 0.4.0 Prism ZIP if you need a new
   profile. For an existing profile, keep using the same instance folder.
2. Close Minecraft, Prism and all Java applications.
3. Extract this companion installer ZIP. Open PowerShell in the extracted folder.
4. Run the command below, replacing the path with the Prism INSTANCE folder
   containing mmc-pack.json (not its .minecraft folder):

   powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\Install-Companions-4.65.ps1 -InstanceDirectory "C:\Prism\instances\Schema Builder" -Channel live

   Use -Channel beta only for an authenticated beta server that has also enabled
   companions. Live is 192.168.2.149:25565; beta is 192.168.2.149:25566.
5. After a successful install, run the usual matching Update & Play shortcut.
   Use Java 21 in Prism. Joining the game still requires the home LAN.

This installer works in Windows PowerShell 5.1 and PowerShell 7. It requires
Minecraft 1.21.1 and NeoForge 21.1.256 in mmc-pack.json. It refuses open
Java/Prism processes and junction/symlink paths. It preserves settings, saves,
accounts, unrelated mods, and the Schema Builder JAR. Repeating the installer
when the exact pinned companion JAR is present performs no download.

Internet access to GitHub is required for first install. The installer obtains
the unmodified author's JAR directly; the ZIP includes no game binaries, third-
party skins, voices, mod JAR, accounts, or world files. No cloud AI is required.

Upstream release:
https://github.com/Modern-Mods/ModernCompanions/releases/tag/v4.65
Download:
https://github.com/Modern-Mods/ModernCompanions/releases/download/v4.65/ModernCompanions-4.65.jar
Expected SHA256:
c50a8fd2c5bbba7890ecdfe0c3acde2c72b6f9202e79c3a4b4ee218b6a4f49bb

Replaced companion JARs go into companions-backups inside the instance folder.
On an install error, prior JARs are restored automatically when possible. If
rollback reports an error, keep the game closed and restore those backup JARs
manually. To remove this optional mod later, close the game/Prism/Java and move
ModernCompanions-4.65.jar out of .minecraft\mods; only join servers with a
matching mod set. This helper does not edit or launch offline development kits.

Gameplay: right-click a companion to open its controls. Follow, patrol and guard
are available in the mod. Experimental jobs may be hidden by default; use only
the features enabled by the server owner. Client file verification does not
prove multiplayer gameplay, NPC ownership, persistence or job behavior.
