Update geometry identifier to allow for : in it (#297)

* - Add : to 1.16.0 model

* - Add : to 1.8.0 model

* - Fix

* - Fix 2
This commit is contained in:
Xterionix
2024-07-03 22:39:09 +05:00
committed by GitHub
parent c4b023ce74
commit 1638a68050
2 changed files with 928 additions and 577 deletions

View File

@@ -4,13 +4,24 @@
"type": "object",
"title": "Geometry 1.16.0",
"description": "The minecraft resourcepack model schema for 1.16.0",
"required": ["format_version", "minecraft:geometry"],
"required": [
"format_version",
"minecraft:geometry"
],
"definitions": {
"uv": {
"type": "array",
"items": [
{ "type": "number", "title": "X", "description": "The x component of the uv." },
{ "type": "number", "title": "Y", "description": "The y component of the uv." }
{
"type": "number",
"title": "X",
"description": "The x component of the uv."
},
{
"type": "number",
"title": "Y",
"description": "The y component of the uv."
}
]
},
"direction_uv": {
@@ -27,13 +38,25 @@
"description": "The face maps this many texels from the uv origin. If not specified, the box dimensions are used instead.",
"$ref": "#/definitions/uv"
},
"material_instance": { "type": "string", "title": "Material Instance", "description": "Specifies the UV's for the face that stretches." }
"material_instance": {
"type": "string",
"title": "Material Instance",
"description": "Specifies the UV's for the face that stretches."
}
}
}
},
"properties": {
"debug": { "title": "Debug", "description": "UNDOCUMENTED.", "$comment": "UNDOCUMENTED", "type": "boolean", "default": false },
"format_version": { "$ref": "../../../../general/format_version.json" },
"debug": {
"title": "Debug",
"description": "UNDOCUMENTED.",
"$comment": "UNDOCUMENTED",
"type": "boolean",
"default": false
},
"format_version": {
"$ref": "../../../../general/format_version.json"
},
"minecraft:geometry": {
"type": "array",
"title": "Geometry",
@@ -44,19 +67,23 @@
"description": "Model specification.",
"title": "Model",
"type": "object",
"required": ["description"],
"required": [
"description"
],
"properties": {
"description": {
"type": "object",
"additionalProperties": false,
"description": "The descriptions of the geometry.",
"title": "Description",
"required": ["identifier"],
"required": [
"identifier"
],
"properties": {
"identifier": {
"type": "string",
"description": "Entity definition and Client Block definition files refer to this geometry via this identifier.",
"pattern": "^geometry\\.[a-zA-Z0-9_\\-\\.]+$",
"pattern": "^geometry.[\\:a-zA-Z0-9_\\-\\.]+$",
"title": "Identifier"
},
"texture_width": {
@@ -75,7 +102,9 @@
"type": "array",
"minItems": 3,
"maxItems": 3,
"items": { "type": "number" }
"items": {
"type": "number"
}
},
"visible_bounds_width": {
"type": "number",
@@ -97,7 +126,9 @@
"additionalProperties": false,
"type": "object",
"description": "A bones specification.",
"required": ["name"],
"required": [
"name"
],
"properties": {
"binding": {
"title": "Binding",
@@ -233,8 +264,16 @@
{
"type": "array",
"items": [
{ "type": "number", "title": "X", "description": "The x component of the uv." },
{ "type": "number", "title": "Y", "description": "The y component of the uv." }
{
"type": "number",
"title": "X",
"description": "The x component of the uv."
},
{
"type": "number",
"title": "Y",
"description": "The y component of the uv."
}
]
}
]
@@ -242,8 +281,13 @@
}
}
},
"debug": { "type": "boolean" },
"inflate": { "type": "number", "description": "Grow this box by this additive amount in all directions (in model space units)." },
"debug": {
"type": "boolean"
},
"inflate": {
"type": "number",
"description": "Grow this box by this additive amount in all directions (in model space units)."
},
"locators": {
"description": "This is a list of locators associated with this bone. A locator is a point in model space that tracks a particular bone as the bone animates (by maintaining it's relationship to the bone through the animation).",
"type": "object",
@@ -251,23 +295,35 @@
"oneOf": [
{
"type": "object",
"required": ["offset", "rotation"],
"required": [
"offset",
"rotation"
],
"properties": {
"offset": {
"type": "array",
"minItems": 3,
"maxItems": 3,
"description": "Position of the locator in model space.",
"items": { "type": "number", "description": "Position of the locator in model space." }
"items": {
"type": "number",
"description": "Position of the locator in model space."
}
},
"rotation": {
"type": "array",
"minItems": 3,
"maxItems": 3,
"description": "Rotation of the locator in model space.",
"items": { "type": "number", "description": "Rotation of the locator in model space." }
"items": {
"type": "number",
"description": "Rotation of the locator in model space."
}
},
"ignore_inherited_scale": { "type": "boolean", "description": "Discard scale inherited from parent bone." }
"ignore_inherited_scale": {
"type": "boolean",
"description": "Discard scale inherited from parent bone."
}
}
},
{
@@ -275,7 +331,10 @@
"minItems": 3,
"maxItems": 3,
"description": "This is a list of locators associated with this bone. A locator is a point in model space that tracks a particular bone as the bone animates (by maintaining it's relationship to the bone through the animation).",
"items": { "type": "number", "description": "Position of the locator in model space." }
"items": {
"type": "number",
"description": "Position of the locator in model space."
}
}
]
}
@@ -285,7 +344,11 @@
"title": "Mirror",
"description": "Mirrors the UV's of the unrotated cubes along the x axis, also causes the east/west faces to get flipped."
},
"name": { "type": "string", "title": "Name", "description": "Animation files refer to this bone via this identifier." },
"name": {
"type": "string",
"title": "Name",
"description": "Animation files refer to this bone via this identifier."
},
"parent": {
"type": "string",
"title": "Parent",
@@ -296,16 +359,27 @@
"title": "Pivot",
"description": "The bone pivots around this point (in model space units).",
"items": [
{ "type": "number", "title": "X" },
{ "type": "number", "title": "Y" },
{ "type": "number", "title": "Z" }
{
"type": "number",
"title": "X"
},
{
"type": "number",
"title": "Y"
},
{
"type": "number",
"title": "Z"
}
]
},
"poly_mesh": {
"additionalProperties": false,
"type": "object",
"description": "***EXPERIMENTAL*** A triangle or quad mesh object. Can be used in conjunction with cubes and texture geometry.",
"required": ["polys"],
"required": [
"polys"
],
"properties": {
"normalized_uvs": {
"type": "boolean",
@@ -330,7 +404,10 @@
{
"type": "string",
"description": "If not specifying vertex indices, arrays of data must be a list of tris or quads, set by making this property either `tri_list` or `quad_list`.",
"enum": ["tri_list", "quad_list"]
"enum": [
"tri_list",
"quad_list"
]
},
{
"type": "array",
@@ -345,9 +422,18 @@
"minItems": 3,
"maxItems": 3,
"items": [
{ "type": "number", "description": "The index of the position." },
{ "type": "number", "description": "The index of the normal vertex." },
{ "type": "number", "description": "The index of the uv vertex." }
{
"type": "number",
"description": "The index of the position."
},
{
"type": "number",
"description": "The index of the normal vertex."
},
{
"type": "number",
"description": "The index of the uv vertex."
}
]
}
}
@@ -382,15 +468,30 @@
}
}
},
"render_group_id": { "type": "integer", "minimum": 0 },
"render_group_id": {
"type": "integer",
"minimum": 0
},
"rotation": {
"type": "array",
"title": "Rotation",
"description": "This is the initial rotation of the bone around the pivot, pre-animation (in degrees, x-then-y-then-z order).",
"items": [
{ "type": "number", "title": "X", "description": "in degrees." },
{ "type": "number", "title": "Y", "description": "in degrees." },
{ "type": "number", "title": "Z", "description": "in degrees." }
{
"type": "number",
"title": "X",
"description": "in degrees."
},
{
"type": "number",
"title": "Y",
"description": "in degrees."
},
{
"type": "number",
"title": "Z",
"description": "in degrees."
}
]
},
"texture_meshes": {
@@ -400,7 +501,9 @@
"items": {
"type": "object",
"additionalProperties": false,
"required": ["texture"],
"required": [
"texture"
],
"properties": {
"local_pivot": {
"type": "array",
@@ -427,23 +530,37 @@
"description": "The rotation (in degrees) of the texture geometry relative to the offset.",
"minItems": 3,
"maxItems": 3,
"items": { "type": "number", "description": "The rotation (in degrees) of the texture geometry relative to the offset." }
"items": {
"type": "number",
"description": "The rotation (in degrees) of the texture geometry relative to the offset."
}
},
"scale": {
"type": "array",
"description": "The scale (in degrees) of the texture geometry relative to the offset.",
"minItems": 3,
"maxItems": 3,
"items": { "type": "number", "description": "The scale (in degrees) of the texture geometry relative to the offset." }
"items": {
"type": "number",
"description": "The scale (in degrees) of the texture geometry relative to the offset."
}
},
"texture": { "type": "string", "description": "The friendly-named texture to use." }
"texture": {
"type": "string",
"description": "The friendly-named texture to use."
}
}
}
}
}
}
},
"cape": { "title": "Cape", "description": "UNDOCUMENTED.", "$comment": "UNDOCUMENTED", "type": "string" }
"cape": {
"title": "Cape",
"description": "UNDOCUMENTED.",
"$comment": "UNDOCUMENTED",
"type": "string"
}
}
}
}

View File

@@ -4,9 +4,16 @@
"title": "Model Schema For 1.8.0",
"description": "UNDOCUMENTED.",
"$comment": "UNDOCUMENTED",
"required": ["format_version"],
"required": [
"format_version"
],
"properties": {
"debug": { "type": "boolean", "description": "UNDOCUMENTED.", "$comment": "UNDOCUMENTED", "title": "Debug" },
"debug": {
"type": "boolean",
"description": "UNDOCUMENTED.",
"$comment": "UNDOCUMENTED",
"title": "Debug"
},
"format_version": {
"title": "1.8.0 Format Version",
"type": "string",
@@ -14,7 +21,9 @@
"description": "A version that tells minecraft what type of data format can be expected when reading this file."
}
},
"propertyNames": { "pattern": "(^geometry\\.[a-zA-Z0-9_.'\\-:]+|format_version)" },
"propertyNames": {
"pattern": "(^geometry.[\\:a-zA-Z0-9_\\-\\.]+|format_version)"
},
"additionalProperties": {
"additionalProperties": false,
"type": "object",
@@ -30,53 +39,168 @@
"type": "object",
"description": "The bone definition.",
"title": "Bone",
"required": ["name"],
"required": [
"name"
],
"properties": {
"bind_pose_rotation": { "type": "array", "items": [{ "type": "number" }, { "type": "number" }, { "type": "number" }] },
"bind_pose_rotation": {
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"cubes": {
"type": "array",
"items": {
"additionalProperties": false,
"type": "object",
"properties": {
"inflate": { "type": "number" },
"mirror": { "type": "boolean" },
"origin": { "type": "array", "items": [{ "type": "number" }, { "type": "number" }, { "type": "number" }] },
"size": { "type": "array", "items": [{ "type": "number" }, { "type": "number" }, { "type": "number" }] },
"uv": { "type": "array", "items": [{ "type": "number" }, { "type": "number" }] }
"inflate": {
"type": "number"
},
"mirror": {
"type": "boolean"
},
"origin": {
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"size": {
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"uv": {
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
}
]
}
}
}
},
"debug": { "type": "boolean" },
"inflate": { "type": "number" },
"locators": { "type": "object", "additionalProperties": { "type": "array", "items": { "type": "number" } } },
"mirror": { "type": "boolean" },
"name": { "type": "string" },
"neverRender": { "type": "boolean" },
"parent": { "type": "string" },
"pivot": { "type": "array", "items": [{ "type": "number" }, { "type": "number" }, { "type": "number" }] },
"debug": {
"type": "boolean"
},
"inflate": {
"type": "number"
},
"locators": {
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"type": "number"
}
}
},
"mirror": {
"type": "boolean"
},
"name": {
"type": "string"
},
"neverRender": {
"type": "boolean"
},
"parent": {
"type": "string"
},
"pivot": {
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"poly_mesh": {
"type": "object",
"required": ["polys"],
"required": [
"polys"
],
"title": "Poly Mesh",
"description": "UNDOCUMENTED.",
"$comment": "UNDOCUMENTED",
"additionalProperties": false,
"properties": {
"normalized_uvs": { "title": "Normalized Uvs", "description": "UNDOCUMENTED.", "$comment": "UNDOCUMENTED", "type": "boolean" },
"normalized_uvs": {
"title": "Normalized Uvs",
"description": "UNDOCUMENTED.",
"$comment": "UNDOCUMENTED",
"type": "boolean"
},
"positions": {
"title": "Positions",
"description": "UNDOCUMENTED.",
"$comment": "UNDOCUMENTED",
"type": "array",
"items": [{ "type": "number" }, { "type": "number" }, { "type": "number" }]
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"normals": {
"title": "Normals",
"description": "UNDOCUMENTED.",
"$comment": "UNDOCUMENTED",
"type": "array",
"items": [{ "type": "number" }, { "type": "number" }, { "type": "number" }]
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"polys": {
"title": "Polys",
@@ -87,7 +211,17 @@
"type": "array",
"minItems": 3,
"maxItems": 4,
"items": [{ "type": "number" }, { "type": "number" }, { "type": "number" }]
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
}
}
}
@@ -110,7 +244,17 @@
"description": "UNDOCUMENTED.",
"$comment": "UNDOCUMENTED",
"type": "array",
"items": [{ "type": "number" }, { "type": "number" }, { "type": "number" }]
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"texture_meshes": {
"type": "array",
@@ -121,28 +265,118 @@
"type": "object",
"additionalProperties": false,
"properties": {
"texture": { "type": "string" },
"local_pivot": { "type": "array", "items": [{ "type": "number" }, { "type": "number" }, { "type": "number" }] },
"position": { "type": "array", "items": [{ "type": "number" }, { "type": "number" }, { "type": "number" }] },
"rotation": { "type": "array", "items": [{ "type": "number" }, { "type": "number" }, { "type": "number" }] },
"scale": { "type": "array", "items": [{ "type": "number" }, { "type": "number" }, { "type": "number" }] }
"texture": {
"type": "string"
},
"local_pivot": {
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"position": {
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"rotation": {
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"scale": {
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
}
}
}
}
}
}
},
"cape": { "title": "Cape", "description": "UNDOCUMENTED.", "$comment": "UNDOCUMENTED", "type": "string" },
"debug": { "title": "Debug", "description": "UNDOCUMENTED.", "$comment": "UNDOCUMENTED", "type": "boolean" },
"texturewidth": { "type": "integer", "description": "UNDOCUMENTED: texturewidth.", "title": "Texturewidth" },
"textureheight": { "type": "integer", "description": "UNDOCUMENTED: textureheight.", "title": "Textureheight" },
"visible_bounds_width": { "type": "number", "description": "UNDOCUMENTED: visible bounds width.", "title": "Visible Bounds Width" },
"visible_bounds_height": { "type": "number", "description": "UNDOCUMENTED: visible bounds height.", "title": "Visible Bounds Height" },
"cape": {
"title": "Cape",
"description": "UNDOCUMENTED.",
"$comment": "UNDOCUMENTED",
"type": "string"
},
"debug": {
"title": "Debug",
"description": "UNDOCUMENTED.",
"$comment": "UNDOCUMENTED",
"type": "boolean"
},
"texturewidth": {
"type": "integer",
"description": "UNDOCUMENTED: texturewidth.",
"title": "Texturewidth"
},
"textureheight": {
"type": "integer",
"description": "UNDOCUMENTED: textureheight.",
"title": "Textureheight"
},
"visible_bounds_width": {
"type": "number",
"description": "UNDOCUMENTED: visible bounds width.",
"title": "Visible Bounds Width"
},
"visible_bounds_height": {
"type": "number",
"description": "UNDOCUMENTED: visible bounds height.",
"title": "Visible Bounds Height"
},
"visible_bounds_offset": {
"type": "array",
"description": "UNDOCUMENTED: visible bounds offset.",
"title": "Visible Bounds Offset",
"items": [{ "type": "number" }, { "type": "number" }, { "type": "number" }]
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
}
}
}