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",
"propertyNames": {
"enum": ["water", "air", "weather", "lava", "lava_resistance"]
},
"additionalProperties": {
"title": "Fog specification",
"description": "TODO",
"type": "object", "type": "object",
"additionalProperties": false, "additionalProperties": false,
"properties": { "properties": {
"fog_start": { "air": {
"title": "Fog start", "title": "Air",
"description": "The distance where the fog will start", "description": "The fog settings when the camera is in the air.",
"type": "number" "$ref": "#/defintions/defaultFogSettings"
}, },
"fog_end": { "weather": {
"title": "Fog end", "title": "Weather",
"description": "The distance where the fog will be opague", "description": " The fog settings for when the camera is in the air with active weather (rain, snow, etc..).",
"type": "number" "$ref": "#/defintions/defaultFogSettings"
}, },
"fog_color": { "water": {
"title": "Fog color", "title": "Water",
"description": "The color of the fog", "description": "The fog settings when the camera is in water.",
"type": "string", "$ref": "#/defintions/defaultFogSettings"
"format": "color-hex"
}, },
"render_distance_type": { "lava": {
"title": "Render distance type", "title": "Lava",
"description": "Wheter the fog should be calculated from the render distance or a fixed depth", "description": "The fog settings when the camera is in lava.",
"type": "string", "$ref": "#/defintions/defaultFogSettings"
"enum": ["fixed", "render"] },
} "lava_resistance": {
"title": "Lava resistance",
"description": "The fog settings when the camera is in lava and the player has the lava resistance effect active.",
"$ref": "#/defintions/defaultFogSettings"
},
"powder_snow": {
"title": "Powder snow",
"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": {
"enum": ["water", "air", "weather", "lava", "lava_resistance"]
},
"additionalProperties": {
"description": "TODO",
"type": "object", "type": "object",
"additionalProperties": false, "additionalProperties": false,
"properties": { "properties": {
"max_density": { "air": {
"title": "Max density", "title": "Air",
"description": "How much the fog disrupts the light", "description": "Fog density values as light passes through air blocks.",
"type": "number", "$ref": "#/definitions/volumeDensityObject"
"minimum": 0,
"maximum": 1
}, },
"uniform": { "water": {
"title": "Uniform", "title": "Water",
"description": "If the fog should be evenly spread", "description": "Fog density values as light passes through water blocks.",
"type": "boolean" "$ref": "#/definitions/volumeDensityObject"
}, },
"zero_density_height": { "lava": {
"title": "Zero density height", "title": "Lava",
"description": "NOTE: only works if uniform is false, The amount of blocks this fog will appear above blocks", "description": "Fog density values as light passes through lava blocks.",
"type": "number" "$ref": "#/definitions/volumeDensityObject"
}, },
"max_density_height": { "lava_resistance": {
"title": "Max density height", "title": "Lava resistance",
"description": "NOTE: only works if uniform is false, The amount of blocks that the fog will become its maximum", "description": "Fog density values as light passes through lava blocks while the player has lava resistance.",
"type": "number" "$ref": "#/definitions/volumeDensityObject"
}
} }
} }
}, },
"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": {
"enum": ["water", "air", "cloud"]
},
"additionalProperties": {
"description": "TODO",
"type": "object",
"additionalProperties": false, "additionalProperties": false,
"properties": { "properties": {
"absorption": { "air": {
"title": "Absorption", "title": "Air",
"description": "How much of the light will be absorbed accross the RGB range", "description": "Fog coefficient values while light passes through air.",
"$ref": "#/definitions/colorHexOrArray" "$ref": "#/definitions/volumeMediaObject"
}, },
"scattering": { "water": {
"title": "Scattering", "title": "Water",
"description": "How much of the light will be spread accross the RGB range", "description": "Fog coefficient values while light passes through water.",
"$ref": "#/definitions/colorHexOrArray" "$ref": "#/definitions/volumeMediaObject"
} },
"cloud": {
"title": "Cloud",
"description": "Fog coefficient values while light passes through clouds.",
"$ref": "#/definitions/volumeMediaObject"
} }
} }
} }