Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Minecraft:Commands/fog: Difference between revisions

From SAS Gaming Wiki
imported>MinecraftBedrockPlayer7
 
SyncBot (talk | contribs)
Fix template calls: add MC/ prefix
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{exclusive|bedrock|education}}
{{MC/Exclusive|bedrock|education}}
{{Infobox command
{{Infobox command
|name=fog
|name=fog
Line 5: Line 5:
|cheat=1
|cheat=1
}}
}}
Used for managing active [[Minecraft:fog]] settings for players.
Used for managing active fog settings for players.


== Usage ==
== Usage ==
{{main|Fog}}
{{MC/Main|Fog}}
Fog settings pushed by this command are stored in each player's NBT data in a data structure similar to [[Minecraft:wikipedia:Stack (abstract data type)|stack]].
Fog settings pushed by this command are stored in each player's NBT data in a data structure similar to stack.


In this data structure, each element is in the format of <code>(''fogSettingID'', ''userProvidedId'')</code>. Multiple elements can share a same fogSettingID or userProvidedId. Duplicate elements are valid.
In this data structure, each element is in the format of <code>(''fogSettingID'', ''userProvidedId'')</code>. Multiple elements can share a same fogSettingID or userProvidedId. Duplicate elements are valid.
Line 28: Line 28:
== Arguments ==
== Arguments ==


{{argument|be=1|victim: target|CommandSelector<player>}}
{{MC/Argument|be=1|victim: target|CommandSelector<player>}}
: Specifies the player(s) to be targeted.
: Specifies the player(s) to be targeted.
: {{arg desc|type=player|be=player}} And it should be of player type.
: {{MC/Arg desc|type=player|be=player}} And it should be of player type.


{{argument|be=1|fogID: string|basic_string}}
{{MC/Argument|be=1|fogID: string|basic_string}}
: Specifies a fog setting.
: Specifies a fog setting.
: {{arg desc|be=basic_string}} Should be a fog setting name defined under the Json path <code>"minecraft:fog_settings"."identifier"</code> in the <samp><resource_pack>/fogs/<fog_setting>.json</samp> file). See [[Minecraft:Fog#Vanilla fog settings]] for IDs of vanilla fog settings.
: {{MC/Arg desc|be=basic_string}} Should be a fog setting name defined under the Json path <code>"minecraft:fog_settings"."identifier"</code> in the <samp><resource_pack>/fogs/<fog_setting>.json</samp> file). See Fog for IDs of vanilla fog settings.


{{argument|be=1|mode: delete|enum}}
{{MC/Argument|be=1|mode: delete|enum}}
: Specifies whether to pop or remove the fog "stack".
: Specifies whether to pop or remove the fog "stack".
: Must be one of <code>pop</code> and <code>remove</code>.
: Must be one of <code>pop</code> and <code>remove</code>.


{{argument|be=1|userProvidedId: string|basic_string}}
{{MC/Argument|be=1|userProvidedId: string|basic_string}}
: Specified the userProvidedId.
: Specified the userProvidedId.
: {{arg desc|be=basic_string}}
: {{MC/Arg desc|be=basic_string}}


== Result ==
== Result ==
Line 57: Line 57:
== Output ==
== Output ==


{{Output table|onlybe=1}}
{{MC/Output table|onlybe=1}}
{{Output table|edition=be|On fail|0}}
{{MC/Output table|edition=be|On fail|0}}
{{Output table|On success|The number of targeted players}}
{{MC/Output table|On success|The number of targeted players}}
{{Output table}}
{{MC/Output table}}


== Examples ==
== Examples ==
{{see also|Fog#Bedrock Edition}}
{{MC/See also|Fog#Bedrock Edition}}


<code>/fog @p push minecraft:fog_basalt_deltas test:fog</code>
<code>/fog @p push minecraft:fog_basalt_deltas test:fog</code>
: Gives the nearest player the [[Minecraft:basalt deltas]] fog.
: Gives the nearest player the basalt deltas fog.


<code>/fog @p pop test:fog</code> or <code>/fog @p remove test:fog</code>
<code>/fog @p pop test:fog</code> or <code>/fog @p remove test:fog</code>
Line 73: Line 73:
== History ==
== History ==
{{HistoryTable
{{HistoryTable
|{{HistoryLine|bedrock}}
|{{MC/HistoryLine|bedrock}}
|{{HistoryLine||1.16.100|dev=beta 1.16.100.54|Added {{cmd|fog|link=none}}.}}
|{{HistoryLine||1.16.100|dev=beta 1.16.100.54|Added {{MC/Cmd|fog|link=none}}.}}
}}
}}


Line 82: Line 82:


== Navigation ==
== Navigation ==
{{Navbox commands}}
{{MC/Navbox commands}}


[[Category:Data driven id lists in Bedrock Edition]]
[[Category:Data driven id lists in Bedrock Edition]]


[[Minecraft:de:Befehl/fog]]
de:Befehl/fog
[[Minecraft:lzh:令/fog]]
lzh:令/fog
[[Minecraft:pt:Comandos/fog]]
pt:Comandos/fog
[[Minecraft:ru:Команды консоли/fog]]
ru:Команды консоли/fog
[[Minecraft:zh:命令/fog]]
zh:命令/fog

Latest revision as of 20:10, 9 April 2026

Script error: No such module "Exclusive". Template:Infobox command Used for managing active fog settings for players.

Usage

{{#vardefine:params|0 }}Template:Hatnote Fog settings pushed by this command are stored in each player's NBT data in a data structure similar to stack.

In this data structure, each element is in the format of (fogSettingID, userProvidedId). Multiple elements can share a same fogSettingID or userProvidedId. Duplicate elements are valid.

To push a new element into it, both fogSettingID and userProvidedId are required. To pop an element, userProvidedId is required. It searches from the top (newest) of the "stack", the first element with the specific userProvidedId is popped. All elememts with a specific userProvidedId can be removed together with remove mode. If you forget the userProvidedId of an element, then the only way to remove the elememt is editing the player's NBT via an NBT editor.

Each fog setting has fog effects of one or more of the six fog types (air, weather, water, lava, lava_resistance, powder_snow), for both classic graphics modes and Minecraft:Vibrant Visuals, and some other settings. When rendering, all fog settings in this are applied one by one from the bottom (oldest) to the top (newest) of this "stack". The fog effects defined in the later fog setting overrides the earlier's. Each fog type works independently.

Vanilla fog settings (biome fog, powder snow fog, etc) are applied before all fog settings in this "stack".

Syntax

fog <victim: target> push <fogID: string> <userProvidedId: string>
Pushes a fog setting into the fog "stack" of targeted players.
fog <victim: target> <mode: delete> <userProvidedId: string>
Pops a fog setting from the fog "stack", or removes all the fog settings with the specified userProvidedId from the "stack" of targeted players.

Arguments

victim: target: CommandSelector<player>

Specifies the player(s) to be targeted.
{{#vardefine:onlyje|Template:IN,}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|inapplicability}}Template:Error{{#vardefine:onlyje|}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|}} And it should be of player type.

fogID: string: basic_string

Specifies a fog setting.
{{#vardefine:onlyje|Template:IN,}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|string}}Template:Error{{#vardefine:onlyje|}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|}} Should be a fog setting name defined under the Json path "minecraft:fog_settings"."identifier" in the <resource_pack>/fogs/<fog_setting>.json file). See Fog for IDs of vanilla fog settings.

mode: delete: enum

Specifies whether to pop or remove the fog "stack".
Must be one of pop and remove.

userProvidedId: string: basic_string

Specified the userProvidedId.
{{#vardefine:onlyje|Template:IN,}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|string}}Template:Error{{#vardefine:onlyje|}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|}}

Result

Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table

Output

{{#vardefine:output-table-lines|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-table-lines|-2}}{{#vardefine:output-table-lines-now|}}{{#vardefine:command-num-now|}}{{#vardefine:command-line-now|}}{{#vardefine:commands-num|}}{{#vardefine:output-edition-num-now|}}{{#vardefine:output-edition-line-now|}}{{#vardefine:output-editions-num|}}{{#vardefine:je-outputs-dis|}}

{{#vardefine:output-table-lines|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:situation-{{#var:output-table-lines}}|On fail}}{{#vardefine:output1-{{#var:output-table-lines}}|0}}{{#vardefine:output2-{{#var:output-table-lines}}|N/A}}{{#vardefine:output3-{{#var:output-table-lines}}|N/A}}{{#vardefine:command-row-{{#var:commands-num}}|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-editions-num|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-edition-{{#var:output-editions-num}}|be}}{{#vardefine:output-edition-row-{{#var:output-editions-num}}|1}} {{#vardefine:output-table-lines|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:situation-{{#var:output-table-lines}}|On success}}{{#vardefine:output1-{{#var:output-table-lines}}|The number of targeted players}}{{#vardefine:output2-{{#var:output-table-lines}}|N/A}}{{#vardefine:output3-{{#var:output-table-lines}}|N/A}}{{#vardefine:command-row-{{#var:commands-num}}|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-edition-row-{{#var:output-editions-num}}|Expression error: Unrecognized punctuation character "{".}}

{{#vardefine:output-table-lines|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-table-lines|-2}}{{#vardefine:output-table-lines-now|}}{{#vardefine:command-num-now|}}{{#vardefine:command-line-now|}}{{#vardefine:commands-num|}}{{#vardefine:output-edition-num-now|}}{{#vardefine:output-edition-line-now|}}{{#vardefine:output-editions-num|}}{{#vardefine:je-outputs-dis|}}

Examples

{{#vardefine:params|0 }}Template:Hatnote

/fog @p push minecraft:fog_basalt_deltas test:fog

Gives the nearest player the basalt deltas fog.

/fog @p pop test:fog or /fog @p remove test:fog

Removes this fog from the nearest player.

History

Template:HistoryTable

External links

Navigation

All editions
Removed
Template:El only
Debug
Removed
Template:Els only
Template:El only
Removed
Template:El only
Removed
Template:Els only
Removed
Joke
Related

de:Befehl/fog lzh:令/fog pt:Comandos/fog ru:Команды консоли/fog zh:命令/fog