Formatting

This commit is contained in:
Casey 2023-09-12 21:54:16 +03:00
parent 7acce26ec5
commit 191b17fcc1
Signed by: hkc
GPG Key ID: F0F6CFE11CDB0960
2 changed files with 1437 additions and 421 deletions

View File

@ -1,173 +1,294 @@
{
"type": "object",
"properties": {
"protocol_version": {
"type": "object",
"properties": {
"protocol_version": {
"type": "integer"
},
"game_version": {
"type": "string"
},
"packets": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"game_version": {
},
"name": {
"type": "string"
},
"packets": {
},
"server": {
"type": "boolean"
},
"client": {
"type": "boolean"
},
"fields": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": { "type": "integer" },
"name": { "type": "string" },
"server": { "type": "boolean" },
"client": { "type": "boolean" },
"fields": {
"type": "array",
"items": {
"$ref": "#/definitions/field"
}
}
},
"required": [
"id",
"name"
]
"$ref": "#/definitions/field"
}
}
},
"definitions": {
"type": {
"type": "object",
"oneOf": [
{
"properties": {
"type": {
"type": "string",
"enum": [
"bool",
"byte", "ubyte",
"short", "ushort",
"int", "uint",
"long", "ulong",
"float", "double",
"itemstack", "optional_itemstack",
"itemstack_nbt", "optional_itemstack_nbt",
"compoundtag",
"synchedentitydata"
]
}
}
},
{
"properties": {
"type": { "type": "string", "const": "list" },
"item": { "$ref": "#/definitions/type" },
"size": { "type": "number" },
"sizetype": { "type": "string" },
"maxsize": { "type": "integer" }
},
"required": [ "item" ],
"oneOf": [
{ "required": [ "size" ] },
{ "required": [ "sizetype", "maxsize" ] }
]
},
{
"properties": {
"type": { "type": "string", "const": "column_major_list" },
"fields": {
"type": "array",
"items": { "$ref": "#/definitions/field" }
},
"size": { "type": "number" },
"sizetype": { "type": "string" },
"maxsize": { "type": "integer" }
},
"required": [ "fields" ],
"oneOf": [
{ "required": [ "size" ] },
{ "required": [ "sizetype", "maxsize" ] }
]
},
{
"properties": {
"type": { "type": "string", "enum": [ "string", "utfstring" ] },
"maxsize": { "type": "number" }
},
"required": [ "maxsize" ]
},
{
"properties": {
"type": { "type": "string", "const": "bytes" },
"size": { "type": "number" },
"sizetype": {
"type": "string",
"enum": [
"ubyte", "byte",
"ushort", "short",
"uint", "int"
]
},
"maxsize": { "type": "number" }
},
"oneOf": [
{ "required": [ "size" ] },
{ "required": [ "sizetype", "maxsize" ] }
]
},
{
"properties": {
"type": { "type": "string", "const": "bytes_compressed" },
"sizetype": {
"type": "string",
"enum": [
"ubyte", "byte",
"ushort", "short",
"uint", "int"
]
},
"maxsize": { "type": "number" },
"method": {
"type": "string",
"enum": [ "zlib", "gzip" ]
}
},
"required": [ "method", "maxsize", "sizetype" ]
},
{
"properties": {
"type": { "type": "string", "const": "struct" },
"name": { "type": "string" },
"fields": {
"type": "array",
"items": { "$ref": "#/definitions/type" }
}
}
}
],
"properties": {
"if": { "$ref": "#/definitions/condition" },
"post": { "type": "array" },
"proptype": { "type": "string" }
}
},
"required": [
"id",
"name"
]
}
}
},
"definitions": {
"type": {
"type": "object",
"oneOf": [
{
"properties": {
"type": {
"type": "string",
"enum": [
"bool",
"byte",
"ubyte",
"short",
"ushort",
"int",
"uint",
"long",
"ulong",
"float",
"double",
"itemstack",
"optional_itemstack",
"itemstack_nbt",
"optional_itemstack_nbt",
"compoundtag",
"synchedentitydata"
]
}
}
},
{
"properties": {
"type": {
"type": "string",
"const": "list"
},
"required": [ "type" ]
"item": {
"$ref": "#/definitions/type"
},
"size": {
"type": "number"
},
"sizetype": {
"type": "string"
},
"maxsize": {
"type": "integer"
}
},
"required": [
"item"
],
"oneOf": [
{
"required": [
"size"
]
},
{
"required": [
"sizetype",
"maxsize"
]
}
]
},
"field": {
"allOf": [
{
"properties": {
"name": { "type": "string" }
},
"required": [ "name" ]
},
{
"$ref": "#/definitions/type"
}
]
{
"properties": {
"type": {
"type": "string",
"const": "column_major_list"
},
"fields": {
"type": "array",
"items": {
"$ref": "#/definitions/field"
}
},
"size": {
"type": "number"
},
"sizetype": {
"type": "string"
},
"maxsize": {
"type": "integer"
}
},
"required": [
"fields"
],
"oneOf": [
{
"required": [
"size"
]
},
{
"required": [
"sizetype",
"maxsize"
]
}
]
},
"condition": {
"type": "array"
{
"properties": {
"type": {
"type": "string",
"enum": [
"string",
"utfstring"
]
},
"maxsize": {
"type": "number"
}
},
"required": [
"maxsize"
]
},
{
"properties": {
"type": {
"type": "string",
"const": "bytes"
},
"size": {
"type": "number"
},
"sizetype": {
"type": "string",
"enum": [
"ubyte",
"byte",
"ushort",
"short",
"uint",
"int"
]
},
"maxsize": {
"type": "number"
}
},
"oneOf": [
{
"required": [
"size"
]
},
{
"required": [
"sizetype",
"maxsize"
]
}
]
},
{
"properties": {
"type": {
"type": "string",
"const": "bytes_compressed"
},
"sizetype": {
"type": "string",
"enum": [
"ubyte",
"byte",
"ushort",
"short",
"uint",
"int"
]
},
"maxsize": {
"type": "number"
},
"method": {
"type": "string",
"enum": [
"zlib",
"gzip"
]
}
},
"required": [
"method",
"maxsize",
"sizetype"
]
},
{
"properties": {
"type": {
"type": "string",
"const": "struct"
},
"name": {
"type": "string"
},
"fields": {
"type": "array",
"items": {
"$ref": "#/definitions/type"
}
}
}
}
],
"properties": {
"if": {
"$ref": "#/definitions/condition"
},
"post": {
"type": "array"
},
"proptype": {
"type": "string"
}
},
"required": [
"type"
]
},
"required": [
"protocol_version",
"game_version",
"packets"
]
"field": {
"allOf": [
{
"properties": {
"name": {
"type": "string"
}
},
"required": [
"name"
]
},
{
"$ref": "#/definitions/type"
}
]
},
"condition": {
"type": "array"
}
},
"required": [
"protocol_version",
"game_version",
"packets"
]
}

File diff suppressed because it is too large Load Diff