Mineuniverse
Log in Register
Mods

Options Enforcer

Modify values in options.txt and other top-level config files, and copy files from a subfolder into the mods folder
by AstroTibs
Download Claim this project
90,740 downloads
0 likes
Updated Jul 6, 2026
0 hypes
Miscellaneous

 

NOTE: This mod will not be updating past 1.19

This is due to Minecraft's draconic and overbearing report system, which can be tricked and exploited, and can result in the user being unable to play on their own private servers.
I am against this awful system on principle, and so long as I never run my game past 1.19, I will taint my account with the possibility.
Luckily, Option Enforcer's code is open source, and so you can port it forward yourself!
Sorry for any inconvenience.

 


Options Enforcer (OE) is a client-side only mod, and is designed primarily with modpacks in mind. It does two things.


Thing 1—config/options enforcement (primarily for the modpack owner)

Note: This functionality is very similar to Default Options and More Default Options. It may be identical, depending on what you're trying to do—I haven't looked into those mods in detail. By the time I discovered that they existed, I was already well along on this project. OE does its configuration differently so all other things equal, you may prefer OE's config syntax.


OE allows you to overwrite values in options.txt and other configuration files so that you don't have to bundle those files with every pack update.  Why does that matter?

Problem 1.1: If you include the full options.txt in your modpack, then it overwrites the user's copy, resetting all of their values (keybinds, sound, rendering, etc.) to the modpack defaults.

Problem 1.2: If you include an options.txt with only some values, then it overwrites the user's copy, resetting all non-included values to the Minecraft defaults.

Problem 1.3: If you do not include options.txt in your modpack, then the user's values will never be overwritten, but it will be up to them to resolve keybind conflicts and apply resourcepacks and set important values, etc.

 

With Options Enforcer, first, the modpack owner simply adds values he wishes to enforce to the optionsenforcer.cfg file such as:
options.txt|renderDistance:10
Second, the owner simply does not include options.txt in the modpack.
Now, every time the user updates or launches the pack, the value renderDistance:10 will be inserted into file options.txt, leaving all other values exactly as the user last left them.

Alternately, as of OE version 1.4, you can append |default to the end of the enforcement entry: doing so will ONLY set that value on first launch, but never when there is already a value!
OE is designed for use with options.txtoptionsof.txtsmart_moving_options.txt, etc. located in the root minecraft directory, but can even modify other mod config files such as, e.g. config/VillageNames4/general.cfg

Important: make sure not to bundle the config file you're enforcing values into, such e.g. options.txt, or else that defeats the purpose!

This mod was created with the Technic version of my modpack, Galaxy Odyssey in mind, but may be useful for multiple pack platforms.

 

Thing 2—mods carryover (primarily for the modpack user)

Note: This functionality is similar to Mod Director, which actually does this job better by downloading and loading the mods during startup; and MCInstance Loader. However, these mods rely on the download link being accessible on launch, and will crash on launch if it's not.

Perhaps you, the modpack user, would like to use mods such as OptiFine, WAILA, Fullscreen Windowed, Real First Person 2 etc. which aren't included in the modpack. However, every time you update the modpack, it wipes and replaces all the mods in the mods folder, forcing you to download those ancillary mods again.

On launch, OE will copy all .jar and .zip files from the mods-carryover folder (will be created by OE if it's not there) into the regular mods folder, if they're not present there already.

Generally, the modpack owner does not need to do anything with this config value, apart from renaming it to another folder name. It will be up to the user to manage the mods they'd like copied over between pack updates. Unless the modpack platform or launcher is especially strict and deletes all folder names it doesn't recognize, then the mods-carryover folder and its contents should survive between pack updates.

The modpack owner should not blank the config value for this added folder name, because that would prevent mods from being copied over, essentially nullifying this feature and causing the user to have to obtain or copy the mods again after a pack update. At that point you might as well just use Default Options or More Default Options instead of OE.

 

Notes:

1. This mod was inspired to solve the two above limitations when updating my technic pack, Galaxy Odyssey. Go check it out!

2. You may use this in modpacks. That is the point, after all!

3. You can come by my Discord server if you have questions or want to hang out and chat.

Options Enforcer 1.4.1 for Forge 1.18.2
MC 1.18.2, Forge
Release 2022-08-22 Get
Options Enforcer 1.4 for Forge 1.18.1
MC 1.18.1
Release 2022-01-20 Get

More from AstroTibs

Not Enough Pets
642,550
ChocoCraft Plus
56,486
Village Names
4,210,292
ASMC
363,952
EnviroMine for Galaxy Odyssey
2,636
Flying Cullers
15,207

You Might Also Like

LoadingTips
A mod that adds custom tips to the loading screen
999,218
Sampler
Performance oriented debugging/administration tools
998,926
VulkanMod
Vulkan renderer mod for Minecraft.
997,115
Charm Fixer
Disables some modules on charm to fix incompatbility issues with owo
996,251
Trading station
Basic items to item trading machines
99,755
NarrateBookForMe [FABRIC]
Adds a narration keybind, and two GUI buttons to the book screen. Text-to-speech (tts) / narration on the go! Client sided.
99,734