-
-
Notifications
You must be signed in to change notification settings - Fork 91
Server Policies
Sodium Extra keeps gameplay-affecting fog controls disabled on normal multiplayer servers unless the server explicitly authorizes them. Authorization is handled through Greenlight policies in a server resource pack.
Clients must have Greenlight installed for these policies to be read. Sodium Extra bundles the Greenlight API so missing it fails closed: protected gameplay fog stays unavailable on normal multiplayer servers.
No server-side mod is required.
- Ask players to install Sodium Extra and Greenlight.
- Put the policy file in your server resource pack at:
assets/sodium-extra/client_features/v1/protected_gameplay_fog.json
- Host the pack as your server resource pack.
- Optionally set
require-resource-pack=trueinserver.propertiesif your server wants to require the pack.
Greenlight trusts selected resource packs that Minecraft marks as coming from the current server. Local packs, world packs, built-in packs, and files copied into the client by hand do not grant policies. If a player declines, removes, or fails to load an optional server pack, protected gameplay fog stays denied/vanilla.
{
"protocol_version": 1,
"feature": "sodium-extra:protected_gameplay_fog",
"enabled": true,
"settings_version": 1,
"settings": {
"blindness": {
"enabled": false
},
"darkness": {
"enabled": false
},
"lava": {
"enabled": true,
"max_distance_blocks": 256,
"allow_off": true
},
"powder_snow": {
"enabled": false
},
"water": {
"enabled": false
}
}
}-
protocol_version: Required. Must be1. -
feature: Required. Must besodium-extra:protected_gameplay_fog. -
enabled: Optional, defaultfalse. Iffalse, the policy denies the feature. -
settings_version: Optional, default1. Sodium Extra currently supports1. -
settings: Optional object. Missing fog rules deny that fog type.
Malformed policy files fail closed. Unsupported settings_version values deny the feature.
Each rule can appear under one of these keys:
blindnessdarknesslavapowder_snowwater
Rule fields:
-
enabled: Optional, defaultfalse. Iffalse, that fog type stays vanilla. -
max_distance_blocks: Optional, default0. Largest distance the client may use, clamped by Sodium Extra to0..256. -
allow_off: Optional, defaultfalse. Whether the client may disable that fog type.
The policy only authorizes and bounds the player's own Sodium Extra settings. It never turns protected fog changes on by itself. Players still need to enable Protected Gameplay Fog and choose local values.
- Local value
0always means vanilla. - Positive local values are clamped to
max_distance_blocks. - Local
Offis honored only whenallow_offistrue. - If
allow_offisfalse, localOffbecomesmax_distance_blocks; if that maximum is0, the result is vanilla.
Private singleplayer worlds and LAN worlds with cheats enabled continue to allow the player's local protected fog settings without a Greenlight policy.
This is an authorization signal for honest clients, not an anti-cheat system.
Thanks to CaffeineMC for their wiki format.