Skip to content

Conversation

@Fuzzwah
Copy link

@Fuzzwah Fuzzwah commented Nov 28, 2025

Summary

Adds support for a settings_local.json file that overrides default settings without modifying tracked files.

Problem

When developing or running Mindcraft on different machines, you need different settings (host, port, profiles, etc.). Currently this requires modifying settings.js, which causes git conflicts when switching branches or pulling updates.

Solution

  • Load settings_local.json on top of defaults in settings.js if it exists
  • Add settings_local.json to .gitignore so it's never tracked
  • Include settings_local.json.example as a template
  • Document the feature in README.md

Usage

cp settings_local.json.example settings_local.json
# Edit with your local settings
node main.js

Example settings_local.json:

{
    "minecraft_version": "1.21.8",
    "host": "192.168.1.100",
    "port": 25565,
    "auto_open_ui": false,
    "profiles": [
        "./profiles/gemini.json"
    ]
}

Benefits

  • Switch branches freely without losing local config
  • No more merge conflicts on settings.js
  • Easy to share development setups via the example file
  • Only override settings you need - defaults still apply

- Load settings_local.json on top of defaults in settings.js
- Add settings_local.json to .gitignore
- Include example settings_local.json.example file
- Document feature in README.md

This allows per-machine settings without modifying tracked files.
@Sweaterdog
Copy link
Contributor

@Fuzzwah Can you explain why this would be better than just copying your settings.js file between instances?

@Fuzzwah
Copy link
Author

Fuzzwah commented Dec 2, 2025

@Sweaterdog Because as I'm making changes to the code, I'm git pulling and git pushing between my workstation and the host that runs mindcraft. Since my host has changes to the server.js each time I need to deal with the conflict (stashing the local change, pulling, then popping).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants