mirror of
https://github.com/barkeser2002/minecraft-data.git
synced 2026-11-24 10:46:09 +03:00
* Fix features schema inconsistencies and validation issues - Add support for both 'version' and 'versions' fields in features schema - Add 'values' field to schema for version-specific feature values - Add missing description to usesBlockStates feature - Make description field optional in schema - Add proper validation constraints with oneOf for feature types - Ensure schema matches supportsFeature.js implementation Fixes https://github.com/PrismarineJS/minecraft-data/issues/1046 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * Make description field required and add missing descriptions - Add missing descriptions to 4 PC features: effectNamesMatchRegistryName, shieldSlot, village&pillageInventoryWindows, netherUpdateInventoryWindows - Make description field required in features schema since all features now have descriptions - All features tests now pass with proper validation 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
91 lines
2.5 KiB
JSON
91 lines
2.5 KiB
JSON
{
|
|
"title": "features",
|
|
"type": "array",
|
|
"uniqueItems": true,
|
|
"items": {
|
|
"title": "featureEntry",
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"description": "The name of the feature",
|
|
"type": "string",
|
|
"pattern": ".+"
|
|
},
|
|
"description": {
|
|
"description": "The description of the feature",
|
|
"type": "string",
|
|
"pattern": ".+"
|
|
},
|
|
"version": {
|
|
"description": "Single version where this feature applies",
|
|
"type": "string"
|
|
},
|
|
"versions": {
|
|
"description": "A tuple that describes the range of versions where this feature applies [minVersion, maxVersion]",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"minItems": 2,
|
|
"maxItems": 2,
|
|
"additionalItems": false
|
|
},
|
|
"values": {
|
|
"description": "Version-specific values for features that have different values across versions",
|
|
"type": "array",
|
|
"items": {
|
|
"title": "versionSpecificValue",
|
|
"type": "object",
|
|
"properties": {
|
|
"value": {
|
|
"description": "The value for this feature in the specified versions"
|
|
},
|
|
"version": {
|
|
"description": "Single version where this value applies",
|
|
"type": "string"
|
|
},
|
|
"versions": {
|
|
"description": "Version range where this value applies [minVersion, maxVersion]",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"minItems": 2,
|
|
"maxItems": 2,
|
|
"additionalItems": false
|
|
}
|
|
},
|
|
"required": ["value"],
|
|
"oneOf": [
|
|
{
|
|
"required": ["version"],
|
|
"not": {"required": ["versions"]}
|
|
},
|
|
{
|
|
"required": ["versions"],
|
|
"not": {"required": ["version"]}
|
|
}
|
|
],
|
|
"additionalProperties": false
|
|
}
|
|
}
|
|
},
|
|
"required": ["name", "description"],
|
|
"oneOf": [
|
|
{
|
|
"required": ["version"],
|
|
"not": {"anyOf": [{"required": ["versions"]}, {"required": ["values"]}]}
|
|
},
|
|
{
|
|
"required": ["versions"],
|
|
"not": {"anyOf": [{"required": ["version"]}, {"required": ["values"]}]}
|
|
},
|
|
{
|
|
"required": ["values"],
|
|
"not": {"anyOf": [{"required": ["version"]}, {"required": ["versions"]}]}
|
|
}
|
|
],
|
|
"additionalProperties": false
|
|
}
|
|
}
|