Skip to main content
Version: Minecraft 26.2

Build, Run, Deploy

Commands at a glance​

CommandWhat it does
buildCompiles, validates poly.mod.json (validatePolyModJson), and creates the mod jar (build/libs/)
runClientRuns the client with Poly Mod Loader and this mod (run/client)
runServerRuns a dedicated server (run/server). Requires EULA consent
gameTests "-PpolyTests=crystal_garden:*"Runs the mod's in-game tests on a game test server (no window)
worldCreateSaveTestLoads the mod, creates and saves a world, and checks the log lines listed in build.gradle.kts (no window)
clientWorldReloadTestCreates a world in the client and reopens it (a window opens)
serverBootSmokeTestBoots a dedicated server up to the EULA check and verifies it

Build​

.\gradlew.bat build

The mod jar appears in build/libs/.

Run the game​

.\gradlew.bat runClient
  • The client runs in run/client and uses an offline account (PolyDev).
  • If the window title is Minecraft* <Ver k="minecraft" /> (the asterisk marks that mods are applied), the game was started through Poly Mod Loader.
Dedicated server and the EULA

runServer requires you to accept the Minecraft EULA. Poly Mod Loader does not accept it on your behalf. Read it yourself, and if you agree, write eula=true in run/server/eula.txt yourself.

Test​

.\gradlew.bat gameTests "-PpolyTests=crystal_garden:*" # in-game tests
.\gradlew.bat worldCreateSaveTest # world creation, save, and log check

How to use in-game tests is described in Testing.

Deploy​

The jar in build/libs/ is your mod. Players install Poly Mod Loader with the installer, then put this jar in the launcher folder's mods/. During development, put it in run/client/mods/ (run/server/mods/ for the server) or run it directly with runClient.

Use the same version on server and client

If a mod uses the same content on the server and the client, both sides need the same version of the jar. The game matches content such as block states by number.

A jar in the mods/ folder is handled like this.

  • Poly Mods (poly.mod.json) are loaded.
  • Fabric mods are loaded as Experimental only if they use nothing but entrypoints. See Compatibility.
  • Any other mod is not loaded, and the reason is written to the log.
Buy me a coffee