Skip to content

Commit

Permalink
Fix issues with inline instrument component
Browse files Browse the repository at this point in the history
  • Loading branch information
misode committed Oct 15, 2024
1 parent 7e7f43f commit 97c83f8
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 16 deletions.
2 changes: 1 addition & 1 deletion java/1.20.5/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
4 changes: 2 additions & 2 deletions java/1.20.5/src/schemas/Components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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' }),
Expand Down
2 changes: 1 addition & 1 deletion java/1.21.2/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
7 changes: 1 addition & 6 deletions java/1.21.2/src/schemas/Components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({}),
Expand Down
2 changes: 1 addition & 1 deletion java/1.21/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
4 changes: 2 additions & 2 deletions java/1.21/src/schemas/Components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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' }),
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 97c83f8

Please sign in to comment.