Updated fog validation to 1.16.210

This commit is contained in:
DaanV2
2021-03-11 10:59:08 +01:00
parent 6afc2e6316
commit 0875fbf2e6

View File

@@ -7,6 +7,7 @@
"description": "TODO", "description": "TODO",
"definitions": { "definitions": {
"colorHexOrArray": { "colorHexOrArray": {
"examples": ["#056bd1"],
"oneOf": [ "oneOf": [
{ {
"type": "array", "type": "array",
@@ -22,6 +23,88 @@
"pattern": "^\\#[0-9a-fA-F]{6}$" "pattern": "^\\#[0-9a-fA-F]{6}$"
} }
] ]
},
"defaultFogSettings": {
"type": "object",
"additionalProperties": false,
"required": ["fog_start", "fog_end", "fog_color", "render_distance_type"],
"examples": [{ "fog_start": 100, "fog_end": 200, "fog_color": "#056bd1", "render_distance_type": "render" }],
"properties": {
"fog_start": {
"title": "Fog start",
"description": "The distance from the player that the fog will begin to appear. 'fog_start' must be less than or equal to 'fog_end'.",
"type": "number",
"minimum": 0
},
"fog_end": {
"title": "Fog end",
"description": "The distance from the player that the fog will become fully opaque. 'fog_end' must be greater than or equal to 'fog_start'.",
"type": "number",
"minimum": 0
},
"fog_color": {
"title": "Fog color",
"description": "The color that the fog will take on.",
"type": "string",
"format": "color-hex"
},
"render_distance_type": {
"title": "Render distance type",
"description": "Determines how distance value is used. Fixed distance is measured in blocks. Dynamic distance is multiplied by the current render distance.",
"type": "string",
"enum": ["fixed", "render"]
}
}
},
"volumeDensityObject": {
"type": "object",
"additionalProperties": false,
"required": ["max_density"],
"examples": [{ "max_density": 0.25 }, { "max_density": 0.25, "max_density_height": 128, "zero_density_height": 20, "uniform": true }],
"properties": {
"max_density": {
"title": "Max density",
"description": "The maximum amount of opaqueness that the ground fog will take on. A value from [0.0, 1.0].",
"minimum": 0,
"maximum": 1,
"type": "number"
},
"max_density_height": {
"title": "Max density height",
"description": "The height in blocks that the ground fog will become it's maximum density.",
"minimum": 0,
"maximum": 128,
"type": "number"
},
"zero_density_height": {
"title": "Zero density height",
"description": "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'.",
"minimum": 0,
"maximum": 128,
"type": "number"
},
"uniform": {
"title": "Uniform",
"description": "When set to true, the density will be uniform across all heights.",
"type": "boolean"
}
}
},
"volumeMediaObject": {
"type": "object",
"additionalProperties": false,
"properties": {
"absorption": {
"title": "Absorption",
"description": "Proportion of light that is absorbed (lost) per block.",
"$ref": "#/definitions/colorHexOrArray"
},
"scattering": {
"title": "Scattering",
"description": "Proportion of light that is scattered per block.",
"$ref": "#/definitions/colorHexOrArray"
}
}
} }
}, },
"properties": { "properties": {
@@ -32,7 +115,7 @@
}, },
"minecraft:fog_settings": { "minecraft:fog_settings": {
"title": "Fog settings", "title": "Fog settings",
"description": "TODO", "description": "The definition of a single fog",
"type": "object", "type": "object",
"additionalProperties": false, "additionalProperties": false,
"properties": { "properties": {
@@ -45,111 +128,102 @@
"identifier": { "identifier": {
"type": "string", "type": "string",
"title": "Identifier", "title": "Identifier",
"description": "The identifier for these fog settings. The identifier must include a namespace.",
"$ref": "../../../general/fog/identifier.json" "$ref": "../../../general/fog/identifier.json"
} }
} }
}, },
"distance": { "distance": {
"title": "Distance", "title": "Distance",
"description": "The fog that is generated by the distance of the players view", "description": "The distance fog settings for different camera locations.",
"type": "object", "type": "object",
"propertyNames": { "additionalProperties": false,
"enum": ["water", "air", "weather", "lava", "lava_resistance"] "properties": {
}, "air": {
"additionalProperties": { "title": "Air",
"title": "Fog specification", "description": "The fog settings when the camera is in the air.",
"description": "TODO", "$ref": "#/defintions/defaultFogSettings"
"type": "object", },
"additionalProperties": false, "weather": {
"properties": { "title": "Weather",
"fog_start": { "description": " The fog settings for when the camera is in the air with active weather (rain, snow, etc..).",
"title": "Fog start", "$ref": "#/defintions/defaultFogSettings"
"description": "The distance where the fog will start", },
"type": "number" "water": {
}, "title": "Water",
"fog_end": { "description": "The fog settings when the camera is in water.",
"title": "Fog end", "$ref": "#/defintions/defaultFogSettings"
"description": "The distance where the fog will be opague", },
"type": "number" "lava": {
}, "title": "Lava",
"fog_color": { "description": "The fog settings when the camera is in lava.",
"title": "Fog color", "$ref": "#/defintions/defaultFogSettings"
"description": "The color of the fog", },
"type": "string", "lava_resistance": {
"format": "color-hex" "title": "Lava resistance",
}, "description": "The fog settings when the camera is in lava and the player has the lava resistance effect active.",
"render_distance_type": { "$ref": "#/defintions/defaultFogSettings"
"title": "Render distance type", },
"description": "Wheter the fog should be calculated from the render distance or a fixed depth", "powder_snow": {
"type": "string", "title": "Powder snow",
"enum": ["fixed", "render"] "description": "The fog settings when the camera is inside a Powder Snow block.",
} "$ref": "#/defintions/defaultFogSettings"
} }
} }
}, },
"volumetric": { "volumetric": {
"title": "Volumetric", "title": "Volumetric",
"description": "Settings for light passing through blocks and the resulting fog", "description": "The volumetric fog settings.",
"type": "object", "type": "object",
"additionalProperties": false, "additionalProperties": false,
"properties": { "properties": {
"density": { "density": {
"title": "Density", "title": "Density",
"description": "TODO", "description": "The density settings for different camera locations.",
"propertyNames": { "type": "object",
"enum": ["water", "air", "weather", "lava", "lava_resistance"] "additionalProperties": false,
}, "properties": {
"additionalProperties": { "air": {
"description": "TODO", "title": "Air",
"type": "object", "description": "Fog density values as light passes through air blocks.",
"additionalProperties": false, "$ref": "#/definitions/volumeDensityObject"
"properties": { },
"max_density": { "water": {
"title": "Max density", "title": "Water",
"description": "How much the fog disrupts the light", "description": "Fog density values as light passes through water blocks.",
"type": "number", "$ref": "#/definitions/volumeDensityObject"
"minimum": 0, },
"maximum": 1 "lava": {
}, "title": "Lava",
"uniform": { "description": "Fog density values as light passes through lava blocks.",
"title": "Uniform", "$ref": "#/definitions/volumeDensityObject"
"description": "If the fog should be evenly spread", },
"type": "boolean" "lava_resistance": {
}, "title": "Lava resistance",
"zero_density_height": { "description": "Fog density values as light passes through lava blocks while the player has lava resistance.",
"title": "Zero density height", "$ref": "#/definitions/volumeDensityObject"
"description": "NOTE: only works if uniform is false, The amount of blocks this fog will appear above blocks",
"type": "number"
},
"max_density_height": {
"title": "Max density height",
"description": "NOTE: only works if uniform is false, The amount of blocks that the fog will become its maximum",
"type": "number"
}
} }
} }
}, },
"media_coefficients": { "media_coefficients": {
"title": "Density", "title": "Media coefficients",
"description": "Describes what happens to the light when it passes through a medium", "description": "The coefficient settings for the volumetric fog in different blocks.",
"propertyNames": { "additionalProperties": false,
"enum": ["water", "air", "cloud"] "properties": {
}, "air": {
"additionalProperties": { "title": "Air",
"description": "TODO", "description": "Fog coefficient values while light passes through air.",
"type": "object", "$ref": "#/definitions/volumeMediaObject"
"additionalProperties": false, },
"properties": { "water": {
"absorption": { "title": "Water",
"title": "Absorption", "description": "Fog coefficient values while light passes through water.",
"description": "How much of the light will be absorbed accross the RGB range", "$ref": "#/definitions/volumeMediaObject"
"$ref": "#/definitions/colorHexOrArray" },
}, "cloud": {
"scattering": { "title": "Cloud",
"title": "Scattering", "description": "Fog coefficient values while light passes through clouds.",
"description": "How much of the light will be spread accross the RGB range", "$ref": "#/definitions/volumeMediaObject"
"$ref": "#/definitions/colorHexOrArray"
}
} }
} }
} }