From 94b85591137ee52a6eeacfba9ada21c685721d09 Mon Sep 17 00:00:00 2001 From: Misode Date: Wed, 14 Aug 2024 18:32:04 +0200 Subject: [PATCH] Add show_notification field to shaped crafting recipes --- java/1.19.4/package.json | 2 +- java/1.19.4/src/schemas/Recipe.ts | 4 +++- java/1.20.2/package.json | 2 +- java/1.20.2/src/schemas/Recipe.ts | 4 +++- java/1.20.3/package.json | 2 +- java/1.20.3/src/schemas/Recipe.ts | 4 +++- java/1.20.5/package.json | 2 +- java/1.20.5/src/schemas/Recipe.ts | 4 +++- java/1.20/package.json | 2 +- java/1.20/src/schemas/Recipe.ts | 4 +++- java/1.21/package.json | 2 +- java/1.21/src/schemas/Recipe.ts | 4 +++- package-lock.json | 12 ++++++------ 13 files changed, 30 insertions(+), 18 deletions(-) diff --git a/java/1.19.4/package.json b/java/1.19.4/package.json index 9afc520..fe9aff8 100644 --- a/java/1.19.4/package.json +++ b/java/1.19.4/package.json @@ -1,6 +1,6 @@ { "name": "@mcschema/java-1.19.4", - "version": "0.1.18", + "version": "0.1.19", "description": "Schemas for Java Edition 1.19.4", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/java/1.19.4/src/schemas/Recipe.ts b/java/1.19.4/src/schemas/Recipe.ts index 8163d0c..909fc9c 100644 --- a/java/1.19.4/src/schemas/Recipe.ts +++ b/java/1.19.4/src/schemas/Recipe.ts @@ -12,6 +12,7 @@ import { SchemaRegistry, CollectionRegistry, Opt, + BooleanNode, } from '@mcschema/core' export function initRecipeSchemas(schemas: SchemaRegistry, collections: CollectionRegistry) { @@ -30,7 +31,8 @@ export function initRecipeSchemas(schemas: SchemaRegistry, collections: Collecti StringNode(), // TODO: add validation Reference('recipe_ingredient') ), - result: Reference('recipe_result') + result: Reference('recipe_result'), + show_notification: Opt(BooleanNode()), }, 'minecraft:crafting_shapeless': { group: Opt(StringNode()), diff --git a/java/1.20.2/package.json b/java/1.20.2/package.json index cfd3ed9..937f722 100644 --- a/java/1.20.2/package.json +++ b/java/1.20.2/package.json @@ -1,6 +1,6 @@ { "name": "@mcschema/java-1.20.2", - "version": "0.0.10", + "version": "0.0.11", "description": "Schemas for Java Edition 1.20.2", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/java/1.20.2/src/schemas/Recipe.ts b/java/1.20.2/src/schemas/Recipe.ts index 8163d0c..909fc9c 100644 --- a/java/1.20.2/src/schemas/Recipe.ts +++ b/java/1.20.2/src/schemas/Recipe.ts @@ -12,6 +12,7 @@ import { SchemaRegistry, CollectionRegistry, Opt, + BooleanNode, } from '@mcschema/core' export function initRecipeSchemas(schemas: SchemaRegistry, collections: CollectionRegistry) { @@ -30,7 +31,8 @@ export function initRecipeSchemas(schemas: SchemaRegistry, collections: Collecti StringNode(), // TODO: add validation Reference('recipe_ingredient') ), - result: Reference('recipe_result') + result: Reference('recipe_result'), + show_notification: Opt(BooleanNode()), }, 'minecraft:crafting_shapeless': { group: Opt(StringNode()), diff --git a/java/1.20.3/package.json b/java/1.20.3/package.json index c4dc899..4c2c774 100644 --- a/java/1.20.3/package.json +++ b/java/1.20.3/package.json @@ -1,6 +1,6 @@ { "name": "@mcschema/java-1.20.3", - "version": "0.0.11", + "version": "0.0.12", "description": "Schemas for Java Edition 1.20.3", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/java/1.20.3/src/schemas/Recipe.ts b/java/1.20.3/src/schemas/Recipe.ts index 8163d0c..909fc9c 100644 --- a/java/1.20.3/src/schemas/Recipe.ts +++ b/java/1.20.3/src/schemas/Recipe.ts @@ -12,6 +12,7 @@ import { SchemaRegistry, CollectionRegistry, Opt, + BooleanNode, } from '@mcschema/core' export function initRecipeSchemas(schemas: SchemaRegistry, collections: CollectionRegistry) { @@ -30,7 +31,8 @@ export function initRecipeSchemas(schemas: SchemaRegistry, collections: Collecti StringNode(), // TODO: add validation Reference('recipe_ingredient') ), - result: Reference('recipe_result') + result: Reference('recipe_result'), + show_notification: Opt(BooleanNode()), }, 'minecraft:crafting_shapeless': { group: Opt(StringNode()), diff --git a/java/1.20.5/package.json b/java/1.20.5/package.json index d920e07..3a0aa5e 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.33", + "version": "0.0.34", "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/Recipe.ts b/java/1.20.5/src/schemas/Recipe.ts index 80347a3..494fec6 100644 --- a/java/1.20.5/src/schemas/Recipe.ts +++ b/java/1.20.5/src/schemas/Recipe.ts @@ -12,6 +12,7 @@ import { SchemaRegistry, CollectionRegistry, Opt, + BooleanNode, } from '@mcschema/core' export function initRecipeSchemas(schemas: SchemaRegistry, collections: CollectionRegistry) { @@ -30,7 +31,8 @@ export function initRecipeSchemas(schemas: SchemaRegistry, collections: Collecti StringNode(), // TODO: add validation Reference('recipe_ingredient') ), - result: Reference('item_stack') + result: Reference('item_stack'), + show_notification: Opt(BooleanNode()), }, 'minecraft:crafting_shapeless': { group: Opt(StringNode()), diff --git a/java/1.20/package.json b/java/1.20/package.json index 2a130f4..d41963e 100644 --- a/java/1.20/package.json +++ b/java/1.20/package.json @@ -1,6 +1,6 @@ { "name": "@mcschema/java-1.20", - "version": "0.0.21", + "version": "0.0.22", "description": "Schemas for Java Edition 1.20", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/java/1.20/src/schemas/Recipe.ts b/java/1.20/src/schemas/Recipe.ts index 8163d0c..909fc9c 100644 --- a/java/1.20/src/schemas/Recipe.ts +++ b/java/1.20/src/schemas/Recipe.ts @@ -12,6 +12,7 @@ import { SchemaRegistry, CollectionRegistry, Opt, + BooleanNode, } from '@mcschema/core' export function initRecipeSchemas(schemas: SchemaRegistry, collections: CollectionRegistry) { @@ -30,7 +31,8 @@ export function initRecipeSchemas(schemas: SchemaRegistry, collections: Collecti StringNode(), // TODO: add validation Reference('recipe_ingredient') ), - result: Reference('recipe_result') + result: Reference('recipe_result'), + show_notification: Opt(BooleanNode()), }, 'minecraft:crafting_shapeless': { group: Opt(StringNode()), diff --git a/java/1.21/package.json b/java/1.21/package.json index 5701094..b6c24a0 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.18", + "version": "0.0.19", "description": "Schemas for Java Edition 1.21", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/java/1.21/src/schemas/Recipe.ts b/java/1.21/src/schemas/Recipe.ts index 3313076..b760929 100644 --- a/java/1.21/src/schemas/Recipe.ts +++ b/java/1.21/src/schemas/Recipe.ts @@ -12,6 +12,7 @@ import { SchemaRegistry, CollectionRegistry, Opt, + BooleanNode, } from '@mcschema/core' export function initRecipeSchemas(schemas: SchemaRegistry, collections: CollectionRegistry) { @@ -30,7 +31,8 @@ export function initRecipeSchemas(schemas: SchemaRegistry, collections: Collecti StringNode(), // TODO: add validation Reference('recipe_ingredient') ), - result: Reference('item_stack') + result: Reference('item_stack'), + show_notification: Opt(BooleanNode()), }, 'minecraft:crafting_shapeless': { group: Opt(StringNode()), diff --git a/package-lock.json b/package-lock.json index 1d86a4f..cae24b7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -83,7 +83,7 @@ }, "java/1.19.4": { "name": "@mcschema/java-1.19.4", - "version": "0.1.18", + "version": "0.1.19", "license": "MIT", "dependencies": { "@mcschema/core": "^0.13.0" @@ -91,7 +91,7 @@ }, "java/1.20": { "name": "@mcschema/java-1.20", - "version": "0.0.21", + "version": "0.0.22", "license": "MIT", "dependencies": { "@mcschema/core": "^0.13.0" @@ -99,7 +99,7 @@ }, "java/1.20.2": { "name": "@mcschema/java-1.20.2", - "version": "0.0.10", + "version": "0.0.11", "license": "MIT", "dependencies": { "@mcschema/core": "^0.13.0" @@ -107,7 +107,7 @@ }, "java/1.20.3": { "name": "@mcschema/java-1.20.3", - "version": "0.0.11", + "version": "0.0.12", "license": "MIT", "dependencies": { "@mcschema/core": "^0.13.0" @@ -115,7 +115,7 @@ }, "java/1.20.5": { "name": "@mcschema/java-1.20.5", - "version": "0.0.33", + "version": "0.0.34", "license": "MIT", "dependencies": { "@mcschema/core": "^0.13.0" @@ -123,7 +123,7 @@ }, "java/1.21": { "name": "@mcschema/java-1.21", - "version": "0.0.18", + "version": "0.0.19", "license": "MIT", "dependencies": { "@mcschema/core": "^0.13.0"