Nota
L'accesso a questa pagina richiede l'autorizzazione. È possibile provare ad accedere o modificare le directory.
L'accesso a questa pagina richiede l'autorizzazione. È possibile provare a modificare le directory.
Le nebbie sono una funzione di rendering che può essere utilizzata per oscurare la distanza visiva del giocatore. È possibile utilizzare le nebbie per occludere i confini, come i chunck non scaricati oltre la distanza di rendering, o per produrre un effetto atmosferico. Esistono diversi tipi di nebbia che possono essere utilizzati in molte circostanze diverse.
Le nebbie sono impostate in singoli file JSON nel tuo pacchetto di risorse sotto la directory nebbie.
Schema della nebbia
{
version "format_version"
object "minecraft:fog_settings"
{
object "description"
{
string "identifier" // The identifier for these fog settings. The identifier must include a namespace.
}
object "distance" : opt // The distance fog settings for different camera locations.
{
object "air" : opt // The fog settings when the camera is in the air.
{
color "fog_color" // The color that the fog will take on.
float "fog_start"<0.000000-*> // The distance from the player that the fog will begin to appear. 'fog_start' must be less than or equal to 'fog_end'.
float "fog_end"<0.000000-*> // The distance from the player that the fog will become fully opaque. 'fog_end' must be greater than or equal to 'fog_start'.
string "render_distance_type"<"fixed", "render"> // Determines how distance value is used. Fixed distance is measured in blocks. Dynamic distance is multiplied by the current render distance.
}
object "weather" : opt // The fog settings for when the camera is in the air with active weather (rain, snow, etc..).
{
color "fog_color" // The color that the fog will take on.
float "fog_start"<0.000000-*> // The distance from the player that the fog will begin to appear. 'fog_start' must be less than or equal to 'fog_end'.
float "fog_end"<0.000000-*> // The distance from the player that the fog will become fully opaque. 'fog_end' must be greater than or equal to 'fog_start'.
string "render_distance_type"<"fixed", "render"> // Determines how distance value is used. Fixed distance is measured in blocks. Dynamic distance is multiplied by the current render distance.
}
object "water" : opt // The fog settings when the camera is in water.
{
color "fog_color" // The color that the fog will take on.
float "fog_start"<0.000000-*> // The distance from the player that the fog will begin to appear. 'fog_start' must be less than or equal to 'fog_end'.
float "fog_end"<0.000000-*> // The distance from the player that the fog will become fully opaque. 'fog_end' must be greater than or equal to 'fog_start'.
string "render_distance_type"<"fixed", "render"> // Determines how distance value is used. Fixed distance is measured in blocks. Dynamic distance is multiplied by the current render distance.
}
object "lava" : opt // The fog settings when the camera is in lava.
{
color "fog_color" // The color that the fog will take on.
float "fog_start"<0.000000-*> // The distance from the player that the fog will begin to appear. 'fog_start' must be less than or equal to 'fog_end'.
float "fog_end"<0.000000-*> // The distance from the player that the fog will become fully opaque. 'fog_end' must be greater than or equal to 'fog_start'.
string "render_distance_type"<"fixed", "render"> // Determines how distance value is used. Fixed distance is measured in blocks. Dynamic distance is multiplied by the current render distance.
}
object "lava_resistance" : opt // The fog settings when the camera is in lava and the player has the lava resistance effect active.
{
color "fog_color" // The color that the fog will take on.
float "fog_start"<0.000000-*> // The distance from the player that the fog will begin to appear. 'fog_start' must be less than or equal to 'fog_end'.
float "fog_end"<0.000000-*> // The distance from the player that the fog will become fully opaque. 'fog_end' must be greater than or equal to 'fog_start'.
string "render_distance_type"<"fixed", "render"> // Determines how distance value is used. Fixed distance is measured in blocks. Dynamic distance is multiplied by the current render distance.
}
object "powder_snow" : opt // The fog settings when the camera is inside a Powder Snow block.
{
color "fog_color" // The color that the fog will take on.
float "fog_start"<0.000000-*> // The distance from the player that the fog will begin to appear. 'fog_start' must be less than or equal to 'fog_end'.
float "fog_end"<0.000000-*> // The distance from the player that the fog will become fully opaque. 'fog_end' must be greater than or equal to 'fog_start'.
string "render_distance_type"<"fixed", "render"> // Determines how distance value is used. Fixed distance is measured in blocks. Dynamic distance is multiplied by the current render distance.
}
}
object "volumetric" : opt // The volumetric fog settings.
{
object "density" : opt // The density settings for different camera locations.
{
object "air" : opt // Fog density values as light passes through air blocks.
{
float "max_density"<0.000000-1.000000> // The maximum amount of opaqueness that the ground fog will take on. A value from [0.0, 1.0].
float "max_density_height"<0.000000-320.000000> : opt // The height in blocks that the ground fog will become it's maximum density.
float "zero_density_height"<0.000000-320.000000> : opt // The height in blocks that the ground fog will be completely transparent and begin to appear. This value needs to be at least 1 higher than 'max_density_height'.
bool "uniform" : opt // When set to true, the density will be uniform across all heights.
}
object "water" : opt // Fog density values as light passes through water blocks.
{
float "max_density"<0.000000-1.000000> // The maximum amount of opaqueness that the ground fog will take on. A value from [0.0, 1.0].
float "max_density_height"<0.000000-320.000000> : opt // The height in blocks that the ground fog will become it's maximum density.
float "zero_density_height"<0.000000-320.000000> : opt // The height in blocks that the ground fog will be completely transparent and begin to appear. This value needs to be at least 1 higher than 'max_density_height'.
bool "uniform" : opt // When set to true, the density will be uniform across all heights.
}
object "lava" : opt // Fog density values as light passes through lava blocks.
{
float "max_density"<0.000000-1.000000> // The maximum amount of opaqueness that the ground fog will take on. A value from [0.0, 1.0].
float "max_density_height"<0.000000-320.000000> : opt // The height in blocks that the ground fog will become it's maximum density.
float "zero_density_height"<0.000000-320.000000> : opt // The height in blocks that the ground fog will be completely transparent and begin to appear. This value needs to be at least 1 higher than 'max_density_height'.
bool "uniform" : opt // When set to true, the density will be uniform across all heights.
}
object "lava_resistance" : opt // Fog density values as light passes through lava blocks while the player has lava resistance.
{
float "max_density"<0.000000-1.000000> // The maximum amount of opaqueness that the ground fog will take on. A value from [0.0, 1.0].
float "max_density_height"<0.000000-320.000000> : opt // The height in blocks that the ground fog will become it's maximum density.
float "zero_density_height"<0.000000-320.000000> : opt // The height in blocks that the ground fog will be completely transparent and begin to appear. This value needs to be at least 1 higher than 'max_density_height'.
bool "uniform" : opt // When set to true, the density will be uniform across all heights.
}
}
object "media_coefficients" : opt // The coefficient settings for the volumetric fog in different blocks.
{
object "air" : opt // Fog coefficient values while light passes through air.
{
color "scattering" // Proportion of light that is scattered per block.
color "absorption" // Proportion of light that is absorbed (lost) per block.
}
object "water" : opt // Fog coefficient values while light passes through water.
{
color "scattering" // Proportion of light that is scattered per block.
color "absorption" // Proportion of light that is absorbed (lost) per block.
}
object "cloud" : opt // Fog coefficient values while light passes through clouds.
{
color "scattering" // Proportion of light that is scattered per block.
color "absorption" // Proportion of light that is absorbed (lost) per block.
}
}
}
}
}
Stack di nebbia attiva
Lo stack di nebbia attiva viene utilizzata per determinare quale impostazione di nebbia utilizzare in un dato momento del gioco. Ogni giocatore ha uno stack di nebbia unico.
Ogni volta che il gioco deve determinare i valori della nebbia, inizierà dalla parte superiore dello stack e lo controllerà finché non troverà un valore per il tipo di impostazione corrente. Se nessuna impostazione di nebbia sullo stack corrisponde, il gioco continuerà lungo lo stack e lo registrerà. Se non trova impostazioni corrispondenti, il gioco utilizzerà invece le impostazioni predefinite definite dal motore.
Lo stack di nebbia inizialmente è configurato come segue. Partendo dal basso:
- Predefinito dal motore: valori a codifica fissa
- Predefinito dai dati: le impostazioni predefinite basate sui dati.
- Biomi: le impostazioni definite per ogni bioma.
- Comando: le impostazioni impostate per il giocatore dai comandi del server.
Predefinito dal motore
Valori a codifica fissa nel caso in cui non ci siano valori guidati dai dati; le impostazioni predefinite dal motore verranno caricate se non ci sono impostazioni di nebbia corrispondenti quando il gioco raggiunge la fine dello stack di nebbia.
Predefinito dai dati
Definito in biomes_client.json sotto default se fa riferimento a una definizione di nebbia tramite fog_identifier.
Biomi
Il livello del bioma è una media di tutte le impostazioni definite dai biomi intorno alla posizione del giocatore. Le impostazioni del bioma sono definite in biomes_client.json anche per ogni singolo bioma.
Comando
Il livello di comando corrisponde a tutte le impostazioni impostate dal comando /nebbia e valutato come uno stack dall'alto verso il basso. Per ulteriori informazioni, consulta la sezione Comando nebbia.
Biomi
Le impostazioni di nebbia possono essere determinate per i biomi con biomes_client.json. In ogni voce del bioma, puoi avere una variabile chiamata fog_identifier e impostare un nome che corrisponda all'impostazione della nebbia che desideri utilizzare con questo bioma.
La voce default può anche essere impostata in questo modo e verrà utilizzata sotto le voci dei biomi nello stack di nebbia attivo. L'impostazione della nebbia di un bioma non sostituisce completamente l'impostazione predefinita, ma invece il bioma viene letto sopra l'impostazione predefinita come descritto nella sezione Stack di nebbia attivo.
La voce del bioma default ha il tag remove_all_prior_fog impostato su false per impostazione predefinita.
Mentre è impostata su false (o se il tag non viene inserito), le definizioni di nebbia mancanti verranno compilate da qualsiasi pacchetto di risorse inferiore che ha la definizione riempita.
Se impostato su true, tutte le definizioni di nebbia precedenti nei pacchetti di risorse prima del pacchetto attuale che l'hanno abilitata verranno cancellate, rendendo di fatto il pacchetto di risorse corrente il nuovo punto di partenza per tutte le nebbie.
In ogni bioma (incluso default) c'è il tag inherit_from_prior_fog impostato su false per impostazione predefinita.
Mentre è impostato su false (o se il tag non viene inserito), il bioma del pacchetto di risorse corrente sovrascriverà il tag fog_identifier attualmente memorizzato con il suo.
Se impostati su true, i tag fog_identifier di tutti i biomi corrispondenti verranno aggiunti insieme e creeranno una nuova definizione di nebbia unita per quel bioma.
Comando nebbia
Il comando /fog può essere utilizzato per gestire le impostazioni della nebbia nel livello corrente dello stack di nebbia attivo per ogni giocatore.
Le impostazioni della nebbia in questo livello sono ordinate tramite le modalità push, pop e remove del comando /fog.
Le impostazioni di nebbia vengono valutate dall'alto verso il basso nello stack di nebbia attivo che include prima dall'alto verso il basso nel livello corrente.
Le impostazioni della nebbia in questo livello vengono salvate e quindi ripristinate al caricamento del mondo per ogni giocatore. Un'impostazione di nebbia che viene spinta prima di un salvataggio del mondo sarà ancora applicata dopo un caricamento del mondo e può quindi essere fatta scoppiare.
Push
Inserisce una nuova impostazione di nebbia con un ID fornito dall'utente a giocatori specificati nella parte superiore dei livelli di comando nebbia dello stack di nebbia attivo dei giocatori.
Pop
Rimuove l'impostazione nebbia più in alto dai giocatori selezionati che corrisponde all'ID fornito dall'utente.
Remove (Rimuovi)
Rimuove tutte le impostazioni di nebbia dai giocatori selezionati che corrispondono all'ID fornito dall'utente.