-
-
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 required 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 required server resource pack.
- Set
require-resource-pack=trueinserver.properties.
Greenlight only trusts required server resource packs. Local packs, optional server packs, world packs, and built-in packs do not grant policies.
{
"protocol_version": 1,
"feature": "sodium-extra:protected_gameplay_fog",
"enabled": true,
"settings_version": 1,
"settings": {
"blindness": {
"enabled": true,
"max_distance_blocks": 16,
"allow_off": false
},
"darkness": {
"enabled": true,
"max_distance_blocks": 24,
"allow_off": false
},
"lava": {
"enabled": false
},
"powder_snow": {
"enabled": false
},
"water": {
"enabled": true,
"max_distance_blocks": 96,
"allow_off": true
}
}
}-
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.
Unknown or malformed policy files are ignored. 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.