This is documentation for a preview release of Minecraft. New features, components, and capabilities in this release are not final and might change without notice before the final release.
Be sure to check the documentation once the release is out of preview if your add-on isn't working properly. Resource and Behavior Packs created for the preview are not guaranteed to work on the final release.
Fogs are setup in Json files under the resource_packs, /'name of pack'/, fogs directory.
The active fog stack is used to determine which fog setting to use at any given time in the game. Each player has a unique fog stack.Whenever the game needs to determine the values for the fog, it will start at the top of the fog stack and check down it until it has found a value for the current setting type. So, if a fog setting on the stack does not not have the setting it's looking for, then it will continue down the stack and check in. If it finds no such setting, it will instead use the defaults defined by the engine.The fog stack initially is setup as follows. Starting at the bottom:- Engine Default: hard code values.- Data Default: The default data driven settings.- Biomes: The settings defined to be on each biome.- Command: The settings set on the player by server commands.
The biome layer is an average of all the settings defined by the biomes around the player's position. The biome settings are defined in "biomes_client.json" as well for each individual biome.
The command layer is all the settings set by the "/fog" command and evaluated it as one stack from top to bottom. More detail in the "Fog Command" section.
Defined in "biomes_client.json" under "default" if it references a fog definition via "fog_identifier".
Hard coded values in case there are no data driven values; the implicit bottom of the stack.
Fog settings can be determined for the biomes with "biomes_client.json". In each biome entry, you can have a variable called "fog_identifier" and set a name that matches the fog setting you want to use with this biome.The "default" entry can also be set this way and will be used underneath the biomes entries in the active fog stack.So, a biome's fog setting does not completely replace the default's setting, but instead the biome is read on top of the default as described in the "Active Fog Stack" section.The "default" biome entry has the tag "remove_all_prior_fog" that is defaulted to "false".While set to false (or if the tag is not entered), missing fog definitions will be filled in by any lower resource pack that does have the definition filled.When set to true, all previous fog definitions in resource packs before the current pack that enabled it will be cleared, effectively making the current resource pack the new starting point for all fogs.In each biome (including "default") there is the tag "inherit_from_prior_fog" that is also defaulted to "false".While set to false (or if the tag is not entered), the current resource pack's biome will overwrite the currently stored "fog_identifier" tag with its own.When set to true, the "fog_identifier" tags from all matching biomes will be added together and create a new merged fog definition for that biome.
"/fog" can be used to manage fog settings in this layer of the active fog stack for each player.Fog settings in this layer are ordered via the "push", "pop", "remove" modes of the "/fog" command described below.Fog Settings are evaluated top-to bottom in the active fog stack which includes top-to-bottom in this layer first.Fog settings in this layer are saved and then restored on world load per player. In this way a fog setting that is pushed before a world save, will still apply after a world load and can then be popped.
Removes the top-most fog setting, from selected player(s), that matches the user provided ID (i.e. as provided previously via a "/fog push" command).
Pushes a new fog setting, to specified player(s), along with a user provided ID, onto the top of the Fog Command layers of the players' active fog stacks.
Removes all matching fog settings, from the selected player(s), that matches the user-provided ID (i.e. as provided previously via one or more "/fog push" commands).
This website is not affiliated with Mojang Studios or Microsoft