1
0

chore: 更新 ProbeJS 生成的文件

This commit is contained in:
2022-11-12 12:13:49 +08:00
parent bdfa9bb83a
commit 13fb345aa2
11 changed files with 73550 additions and 70016 deletions
File diff suppressed because it is too large Load Diff
+651
View File
@@ -0,0 +1,651 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"type": "object",
"definitions": {
"typePrimitive": {
"type": "object",
"required": [
"type",
"name"
],
"properties": {
"type": {
"const": "type:primitive",
"description": "A primitive type"
},
"name": {
"type": "string"
}
}
},
"typeClass": {
"type": "object",
"required": [
"type",
"name"
],
"properties": {
"type": {
"const": "type:class",
"description": "A class type"
},
"name": {
"type": "string",
"$ref": "probe.class-definitions.json#/definitions/typeClassname"
}
}
},
"typeVariable": {
"type": "object",
"required": [
"type",
"name"
],
"properties": {
"type": {
"const": "type:variable",
"description": "A variable type"
},
"name": {
"type": "string"
}
}
},
"typeParameterized": {
"type": "object",
"required": [
"type",
"base",
"params"
],
"properties": {
"type": {
"const": "type:parameterized"
},
"base": {
"$ref": "#/definitions/propertyType"
},
"params": {
"type": "array",
"items": {
"$ref": "#/definitions/propertyType"
}
}
}
},
"typeIntersection": {
"type": "object",
"required": [
"type",
"types"
],
"properties": {
"type": {
"const": "type:intersection"
},
"types": {
"type": "array",
"items": {
"$ref": "#/definitions/propertyType"
}
}
}
},
"typeUnion": {
"type": "object",
"required": [
"type",
"types"
],
"properties": {
"type": {
"const": "type:union"
},
"types": {
"type": "array",
"items": {
"$ref": "#/definitions/propertyType"
}
}
}
},
"typeArray": {
"type": "object",
"required": [
"type",
"component"
],
"properties": {
"type": {
"const": "type:array"
},
"component": {
"$ref": "#/definitions/propertyType"
}
}
},
"typeObject": {
"type": "object",
"required": [
"type",
"members"
],
"properties": {
"type": {
"const": "type:object"
},
"members": {
"type": "array",
"items": {
"type": "object",
"required": [
"key",
"value"
],
"properties": {
"key": {
"anyOf": [
{
"$ref": "#/definitions/propertyObjectKey"
}
]
},
"value": {
"$ref": "#/definitions/propertyType"
}
}
}
}
}
},
"propertyObjectKey": {
"anyOf": [
{
"type": "string"
},
{
"$ref": "#/definitions/propertyType"
},
{
"type": "object",
"required": [
"optional"
],
"properties": {
"optional": {
"type": "boolean",
"default": true
},
"key": {
"$ref": "#/definitions/propertyObjectKey"
}
},
"additionalProperties": false
}
]
},
"typeJSArray": {
"type": "object",
"required": [
"type",
"types"
],
"properties": {
"type": {
"const": "type:jsArray"
},
"types": {
"type": "array",
"items": {
"$ref": "#/definitions/propertyType"
}
}
}
},
"propertyType": {
"properties": {
"type": {
"type": "string",
"enum": [
"type:primitive",
"type:class",
"type:variable",
"type:parameterized",
"type:union",
"type:intersection",
"type:array",
"type:object",
"type:jsArray"
]
},
"properties": {
"type": "array",
"items": {
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"const": "property:underscored"
},
"underscored": {
"type": "boolean"
}
}
}
}
},
"anyOf": [
{
"$ref": "#/definitions/typePrimitive"
},
{
"$ref": "#/definitions/typeClass"
},
{
"$ref": "#/definitions/typeVariable"
},
{
"$ref": "#/definitions/typeParameterized"
},
{
"$ref": "#/definitions/typeUnion"
},
{
"$ref": "#/definitions/typeIntersection"
},
{
"$ref": "#/definitions/typeArray"
},
{
"$ref": "#/definitions/typeObject"
},
{
"$ref": "#/definitions/typeJSArray"
}
]
},
"propertyComment": {
"type": "object",
"required": [
"type",
"lines"
],
"properties": {
"type": {
"const": "property:comment"
},
"lines": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"propertyHide": {
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"const": "property:hide"
}
}
},
"propertyAssign": {
"type": "object",
"required": [
"type",
"assign"
],
"properties": {
"type": {
"const": "property:assign"
},
"shield": {
"type": "boolean"
},
"assign": {
"$ref": "#/definitions/propertyType"
}
}
},
"propertyMod": {
"type": "object",
"required": [
"type",
"mod"
],
"properties": {
"type": {
"const": "property:mod"
},
"mod": {
"type": "string"
}
}
},
"propertyModify": {
"type": "object",
"required": [
"type",
"index"
],
"properties": {
"type": {
"const": "property:modify"
},
"index": {
"type": "integer"
},
"newType": {
"$ref": "#/definitions/propertyType"
},
"name": {
"type": "string"
}
}
},
"propertyReturns": {
"type": "object",
"required": [
"type",
"returns"
],
"properties": {
"type": {
"const": "property:returns"
},
"returns": {
"$ref": "#/definitions/propertyType"
}
}
},
"propertyClass": {
"properties": {
"type": {
"type": "string",
"enum": [
"property:comment",
"property:hide",
"property:assign",
"property:mod"
]
}
},
"anyOf": [
{
"$ref": "#/definitions/propertyComment"
},
{
"$ref": "#/definitions/propertyHide"
},
{
"$ref": "#/definitions/propertyAssign"
},
{
"$ref": "#/definitions/propertyMod"
}
]
},
"propertyMethod": {
"properties": {
"type": {
"type": "string",
"enum": [
"property:comment",
"property:hide",
"property:mod",
"property:modify",
"property:returns"
]
}
},
"anyOf": [
{
"$ref": "#/definitions/propertyComment"
},
{
"$ref": "#/definitions/propertyHide"
},
{
"$ref": "#/definitions/propertyMod"
},
{
"$ref": "#/definitions/propertyModify"
},
{
"$ref": "#/definitions/propertyReturns"
}
]
},
"propertyField": {
"properties": {
"type": {
"type": "string",
"enum": [
"property:comment",
"property:hide",
"property:mod"
]
}
},
"anyOf": [
{
"$ref": "#/definitions/propertyComment"
},
{
"$ref": "#/definitions/propertyHide"
},
{
"$ref": "#/definitions/propertyMod"
}
]
},
"propertyConstructor": {
"properties": {
"type": {
"type": "string",
"enum": [
"property:comment",
"property:hide",
"property:mod",
"property:modify"
]
}
},
"anyOf": [
{
"$ref": "#/definitions/propertyComment"
},
{
"$ref": "#/definitions/propertyHide"
},
{
"$ref": "#/definitions/propertyMod"
},
{
"$ref": "#/definitions/propertyModify"
}
]
}
},
"properties": {
"properties": {
"type": "array",
"items": {
"anyOf": [
{
"$ref": "#/definitions/propertyMod"
}
]
}
},
"classes": {
"type": "array",
"items": {
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"const": "document:class"
},
"className": {
"type": "string",
"description": "The class name",
"$ref": "probe.class-definitions.json#/definitions/typeClassname"
},
"properties": {
"type": "array",
"items": {
"$ref": "#/definitions/propertyClass"
}
},
"methods": {
"type": "array",
"items": {
"type": "object",
"required": [
"type",
"name",
"returns"
],
"properties": {
"type": {
"const": "document:method"
},
"name": {
"type": "string"
},
"static": {
"type": "boolean"
},
"abstract": {
"type": "boolean"
},
"params": {
"type": "array",
"items": {
"type": "object",
"required": [
"type",
"name",
"paramType"
],
"properties": {
"type": {
"const": "property:param"
},
"name": {
"type": "string"
},
"paramType": {
"$ref": "#/definitions/propertyType"
}
}
}
},
"returns": {
"$ref": "#/definitions/propertyType"
},
"properties": {
"type": "array",
"items": {
"$ref": "#/definitions/propertyMethod"
}
}
}
}
},
"interfaces": {
"type": "array",
"items": {
"$ref": "#/definitions/propertyType"
}
},
"constructors": {
"type": "array",
"items": {
"required": [
"type"
],
"type": "object",
"properties": {
"type": {
"const": "document:constructor"
},
"params": {
"type": "array",
"items": {
"type": "object",
"required": [
"type",
"name",
"paramType"
],
"properties": {
"type": {
"const": "property:param"
},
"name": {
"type": "string"
},
"paramType": {
"$ref": "#/definitions/propertyType"
}
}
}
},
"properties": {
"type": "array",
"items": {
"$ref": "#/definitions/propertyConstructor"
}
}
}
}
},
"fields": {
"type": "array",
"items": {
"type": "object",
"required": [
"type",
"name",
"fieldType"
],
"properties": {
"type": {
"const": "document:field"
},
"name": {
"type": "string"
},
"fieldType": {
"$ref": "#/definitions/propertyType"
},
"properties": {
"type": "array",
"items": {
"$ref": "#/definitions/propertyField"
}
},
"final": {
"type": "boolean"
},
"static": {
"type": "boolean"
}
}
}
}
}
}
}
}
}
+10
View File
@@ -0,0 +1,10 @@
{
"json.schemas": [
{
"fileMatch": [
"/probe/docs/*.json"
],
"url": "./.vscode/probe.doc-schema.json"
}
]
}
+9 -2
View File
@@ -1,6 +1,13 @@
{
"compilerOptions": {
"lib": ["ES5", "ES2015"],
"typeRoots": ["./probe/generated", "./probe/user"]
"lib": [
"ES5",
"ES2015"
],
"typeRoots": [
"./probe/generated",
"./probe/user"
],
"target": "ES2015"
}
}
+1080 -86
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+66234 -66272
View File
File diff suppressed because one or more lines are too long
+2395 -2381
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1,4 +1,4 @@
/// <reference path="./globals.d.ts" />
const Vec3d: typeof Vec3
const Direction: typeof Facing
const Text: typeof Component
const Direction: typeof Facing
+4
View File
@@ -0,0 +1,4 @@
interface String {
readonly namespace: string,
readonly path: string
}
+9 -9
View File
@@ -1,6 +1,6 @@
/// <reference path="./globals.d.ts" />
declare namespace Registry {
class Sound_event extends Internal.RegistryObjectBuilderTypes$RegistryEventJS<any> {
class SoundEvent extends Internal.RegistryObjectBuilderTypes$RegistryEventJS<any> {
create(id: string, type: "basic"): Internal.SoundEventBuilder;
create(id: string): Internal.SoundEventBuilder;
}
@@ -42,19 +42,19 @@ declare namespace Registry {
create(id: string, type: "basic"): Internal.EnchantmentBuilder;
create(id: string): Internal.EnchantmentBuilder;
}
class Mob_effect extends Internal.RegistryObjectBuilderTypes$RegistryEventJS<any> {
class MobEffect extends Internal.RegistryObjectBuilderTypes$RegistryEventJS<any> {
create(id: string, type: "basic"): Internal.BasicMobEffect$Builder;
create(id: string): Internal.BasicMobEffect$Builder;
}
class Entity_type extends Internal.RegistryObjectBuilderTypes$RegistryEventJS<any> {
class EntityType extends Internal.RegistryObjectBuilderTypes$RegistryEventJS<any> {
}
class Block_entity_type extends Internal.RegistryObjectBuilderTypes$RegistryEventJS<any> {
class BlockEntityType extends Internal.RegistryObjectBuilderTypes$RegistryEventJS<any> {
}
class Potion extends Internal.RegistryObjectBuilderTypes$RegistryEventJS<any> {
create(id: string, type: "basic"): Internal.PotionBuilder;
create(id: string): Internal.PotionBuilder;
}
class Particle_type extends Internal.RegistryObjectBuilderTypes$RegistryEventJS<any> {
class ParticleType extends Internal.RegistryObjectBuilderTypes$RegistryEventJS<any> {
create(id: string, type: "basic"): Internal.ParticleTypeBuilder;
create(id: string): Internal.ParticleTypeBuilder;
}
@@ -62,19 +62,19 @@ declare namespace Registry {
create(id: string, type: "basic"): Internal.MotiveBuilder;
create(id: string): Internal.MotiveBuilder;
}
class Custom_stat extends Internal.RegistryObjectBuilderTypes$RegistryEventJS<any> {
class CustomStat extends Internal.RegistryObjectBuilderTypes$RegistryEventJS<any> {
create(id: string, type: "basic"): Internal.CustomStatBuilder;
create(id: string): Internal.CustomStatBuilder;
}
class Point_of_interest_type extends Internal.RegistryObjectBuilderTypes$RegistryEventJS<any> {
class PointOfInterestType extends Internal.RegistryObjectBuilderTypes$RegistryEventJS<any> {
create(id: string, type: "basic"): Internal.PoiTypeBuilder;
create(id: string): Internal.PoiTypeBuilder;
}
class Villager_type extends Internal.RegistryObjectBuilderTypes$RegistryEventJS<any> {
class VillagerType extends Internal.RegistryObjectBuilderTypes$RegistryEventJS<any> {
create(id: string, type: "basic"): Internal.VillagerTypeBuilder;
create(id: string): Internal.VillagerTypeBuilder;
}
class Villager_profession extends Internal.RegistryObjectBuilderTypes$RegistryEventJS<any> {
class VillagerProfession extends Internal.RegistryObjectBuilderTypes$RegistryEventJS<any> {
create(id: string, type: "basic"): Internal.VillagerProfessionBuilder;
create(id: string): Internal.VillagerProfessionBuilder;
}