Repository navigation
Conversation
Minecraft reads level-type, hardcore, generator-settings and (from 1.19.3) initial-enabled-packs/initial-disabled-packs only when it generates a world, and a server only writes them to server.properties on its first start; 1.17 never writes most of them at all. So none of them could be set through Craftbox before the one start that uses them. New servers now get them up front, with the defaults each version writes itself, taken from real 1.12.2, 1.16.5, 1.17.1, 1.18.2, 1.19.2, 1.19.3 and 26.3 servers. The create page and Settings gain World Type, and their world options sit under a separator, two to a row: Game Mode and Difficulty, then World Type and World Seed. Minecraft 1.19 renamed the world types and reads none of the old names it doesn't happen to share: on 26.3 `largeBiomes` or `default` generates a normal world, and on 1.18.2 `minecraft:flat` does the same. So each version gets its own list, a value is stored in the spelling the server's version reads, and a version change in Settings translates it. A value Craftbox doesn't know, such as a modpack's own world type, is kept rather than saved over, and creating from a modpack offers "Modpack default" so the pack's stays unless another is picked. The API takes `levelType` on create, both modpack creates and edit, the server record mirrors it from server.properties, and templates carry it. The Properties page lists the new settings and matches enum values case-insensitively, since 1.12 writes `DEFAULT`.
Normal is now preselected on the create page, and is what the API uses when a create request leaves difficulty out, in place of Easy. It is also the default for a new server.properties and for templates saved from a server with none recorded. Existing servers keep whatever they have.
Forge and NeoForge start as `java ... @libraries/.../unix_args.txt`, and that file is a JVM argument file. A modpack's files and overrides land after the loader installs, so a pack could overwrite it, or add a higher-numbered folder beside it, which Craftbox picked, and put its own flags on the command line: -javaagent, or -XX:OnOutOfMemoryError running a shell command. A pack's mods already run inside the server, but how the JVM starts should not be the pack's to decide. Any pack file, from the manifest or the overrides, that would land under libraries/, as a .jar or *_args.txt at the top of the server directory, or as user_jvm_args.txt, run.sh, run.bat or fabric-server-launcher.properties is now skipped, and the install's warnings and the log name what was left out. Paths are checked in canonical form, so `./server.jar` or `Libraries/` don't slip past. Forge and NeoForge also launch the args file of the build Craftbox installed ahead of any other folder, falling back to the newest only when that build has none. A pack's recommended memory was checked too: the .mrpack format carries no memory setting, so the create page's 4 GB suggestion for modpacks stays.
…nstall The API smoke test now covers: - the Normal difficulty default and the first-start settings a new server gets, and the record's levelType; - World Type stored in the spelling the version reads, and unknown types refused on create and edit; - the Settings, Properties and create pages rendering the new fields, the first checks of any page's HTML, over the session the setup wizard opens; - a real .mrpack install (a Fabric pack built in the test) that plants launch files, which must all be skipped, while the pack's own server.properties values are kept and online-mode stays on. lib.mjs gains bootstrapPanel(), which also returns a logged-in page fetcher, and makeZip(), a stored-only zip writer so the test needs no zip dependency.
Both pages changed layout, so the README images were retaken: in Chrome on Windows, from the 1.2.2 Docker image, with the same Forge SMP server (Forge 1.20.1, port 25565, 2048 MB, running for Settings), the same selections and the same framing as before. The new World Type and the Normal difficulty default show at their defaults.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A patch release on top of 1.2.1: World Type and the other settings Minecraft only reads on a server's first start, Normal as the default difficulty, and a modpack hardening fix. Versioned
1.2.2in the last commit, so merging leavesmasterready to tag.New
largeBiomesordefaulton 26.3, andminecraft:flaton 1.18.2, all generate a normal world), so each version gets its own list. A value is stored in the spelling the server's version reads, and a version change in Settings translates it. A value Craftbox doesn't know, like a modpack's own world type, is kept rather than saved over, and creating from a modpack offers "Modpack default" so the pack's stays unless another is picked. The API takeslevelTypeon create, both modpack creates and edit; the server record mirrors it and templates carry it. Checked end to end: a flat world picked in Craftbox really generates flat on 26.3 and 1.18.2.level-type,hardcore,generator-settingsand (1.19.3+)initial-enabled-packs/initial-disabled-packsare only read when a world is generated, and Minecraft only writes them on the first start (1.17 never writes most of them), so they couldn't be set before the one start that uses them. New servers now get them up front with the defaults each version writes itself, taken from real 1.12.2 through 26.3 servers, and the Properties page lists them.Changed
Fixed
java … @libraries/…/unix_args.txt, a JVM argument file, and a pack's files and overrides land after the loader installs, so a pack could overwrite it (or add a higher-numbered folder, which Craftbox picked) with-javaagentor-XX:OnOutOfMemoryError=<command>. Any pack file that would land underlibraries/, as a top-level.jaror*_args.txt, or asuser_jvm_args.txt,run.sh,run.batorfabric-server-launcher.propertiesis now skipped and named in the install warnings, and Forge/NeoForge launch the args file of the build Craftbox installed first. A pack's recommended memory was checked as well: the.mrpackformat has no memory setting, so the 4 GB suggestion for modpacks stays.level-type=DEFAULTshows as Normal.CI
.mrpackinstall that plants launch files. It builds the pack itself with a small zip writer, so still no test dependencies.Screenshots
The README's Create and Settings images were retaken in Chrome on Windows from the 1.2.2 image, with the same server, selections and framing as before and the new options at their defaults.
Notes
difficultyandgamemodeas numbers, while Craftbox has always written names, so those versions fall back to Easy/Survival.