From 97c83f8176724d082282651c434e3fe63996f156 Mon Sep 17 00:00:00 2001 From: Misode Date: Tue, 15 Oct 2024 03:37:06 +0200 Subject: [PATCH] Fix issues with inline instrument component --- java/1.20.5/package.json | 2 +- java/1.20.5/src/schemas/Components.ts | 4 ++-- java/1.21.2/package.json | 2 +- java/1.21.2/src/schemas/Components.ts | 7 +------ java/1.21/package.json | 2 +- java/1.21/src/schemas/Components.ts | 4 ++-- package-lock.json | 6 +++--- 7 files changed, 11 insertions(+), 16 deletions(-) diff --git a/java/1.20.5/package.json b/java/1.20.5/package.json index d190e57..8bf96ba 100644 --- a/java/1.20.5/package.json +++ b/java/1.20.5/package.json @@ -1,6 +1,6 @@ { "name": "@mcschema/java-1.20.5", - "version": "0.0.41", + "version": "0.0.42", "description": "Schemas for Java Edition 1.20.5", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/java/1.20.5/src/schemas/Components.ts b/java/1.20.5/src/schemas/Components.ts index 847185e..d6db42a 100644 --- a/java/1.20.5/src/schemas/Components.ts +++ b/java/1.20.5/src/schemas/Components.ts @@ -330,9 +330,9 @@ export function initComponentsSchemas(schemas: SchemaRegistry, collections: Coll { type: 'object', node: ObjectNode({ - sound_event: StringNode(), + sound_event: Reference('sound_event'), use_duration: NumberNode({ integer: true, min: 1 }), - range: NumberNode({ min: 1 }), + range: NumberNode({ min: 0 }), }, { context: 'instrument' }), }, ], { context: 'data_component.instrument' }), diff --git a/java/1.21.2/package.json b/java/1.21.2/package.json index 41abab9..b71d60f 100644 --- a/java/1.21.2/package.json +++ b/java/1.21.2/package.json @@ -1,6 +1,6 @@ { "name": "@mcschema/java-1.21.2", - "version": "0.0.12", + "version": "0.0.13", "description": "Schemas for Java Edition 1.21.2", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/java/1.21.2/src/schemas/Components.ts b/java/1.21.2/src/schemas/Components.ts index a19281d..4ac2450 100644 --- a/java/1.21.2/src/schemas/Components.ts +++ b/java/1.21.2/src/schemas/Components.ts @@ -321,12 +321,7 @@ export function initComponentsSchemas(schemas: SchemaRegistry, collections: Coll }, { type: 'object', - node: ObjectNode({ - sound_event: StringNode(), - duration: Reference('text_component'), - use_duration: NumberNode({ min: 0 }), - range: NumberNode({ min: 0 }), - }, { context: 'instrument' }), + node: Reference('instrument'), }, ], { context: 'data_component.instrument' }), 'minecraft:intangible_projectile': ObjectNode({}), diff --git a/java/1.21/package.json b/java/1.21/package.json index f8400ba..0a6b889 100644 --- a/java/1.21/package.json +++ b/java/1.21/package.json @@ -1,6 +1,6 @@ { "name": "@mcschema/java-1.21", - "version": "0.0.26", + "version": "0.0.27", "description": "Schemas for Java Edition 1.21", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/java/1.21/src/schemas/Components.ts b/java/1.21/src/schemas/Components.ts index 31b43ce..862e136 100644 --- a/java/1.21/src/schemas/Components.ts +++ b/java/1.21/src/schemas/Components.ts @@ -323,9 +323,9 @@ export function initComponentsSchemas(schemas: SchemaRegistry, collections: Coll { type: 'object', node: ObjectNode({ - sound_event: StringNode(), + sound_event: Reference('sound_event'), use_duration: NumberNode({ integer: true, min: 1 }), - range: NumberNode({ min: 1 }), + range: NumberNode({ min: 0 }), }, { context: 'instrument' }), }, ], { context: 'data_component.instrument' }), diff --git a/package-lock.json b/package-lock.json index 3b36173..3ae829f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -115,7 +115,7 @@ }, "java/1.20.5": { "name": "@mcschema/java-1.20.5", - "version": "0.0.41", + "version": "0.0.42", "license": "MIT", "dependencies": { "@mcschema/core": "^0.13.0" @@ -123,7 +123,7 @@ }, "java/1.21": { "name": "@mcschema/java-1.21", - "version": "0.0.26", + "version": "0.0.27", "license": "MIT", "dependencies": { "@mcschema/core": "^0.13.0" @@ -131,7 +131,7 @@ }, "java/1.21.2": { "name": "@mcschema/java-1.21.2", - "version": "0.0.12", + "version": "0.0.13", "license": "MIT", "dependencies": { "@mcschema/core": "^0.13.0"