From 510c2ad60042bccb337ff01c17d5fea18e7d18b4 Mon Sep 17 00:00:00 2001 From: Misode Date: Wed, 30 Oct 2024 16:48:32 +0100 Subject: [PATCH] Add changes from 22w44a --- java/1.21.2/package.json | 2 +- java/1.21.2/src/Collections.ts | 5 +++-- java/1.21.4/package.json | 2 +- java/1.21.4/src/Collections.ts | 4 ++-- java/1.21.4/src/schemas/PackMcmeta.ts | 2 +- java/1.21.4/src/schemas/TextComponent.ts | 13 +++++++++++++ java/1.21.4/src/schemas/worldgen/Biome.ts | 18 ++++++++++++------ java/1.21.4/src/schemas/worldgen/Feature.ts | 3 ++- package-lock.json | 20 +++++++++++++++++++- 9 files changed, 54 insertions(+), 15 deletions(-) diff --git a/java/1.21.2/package.json b/java/1.21.2/package.json index 5a6a891..aa23cb7 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.15", + "version": "0.0.16", "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/Collections.ts b/java/1.21.2/src/Collections.ts index c75f9bb..0728e15 100644 --- a/java/1.21.2/src/Collections.ts +++ b/java/1.21.2/src/Collections.ts @@ -427,9 +427,10 @@ export function initCollections(collections: CollectionRegistry) { collections.register('feature_flags', [ 'vanilla', - 'bundle', 'trade_rebalance', - 'update_1_21', + 'redstone_experiments', + 'minecart_improvements', + 'winter_drop', ]) collections.register('sprite_source_type', [ diff --git a/java/1.21.4/package.json b/java/1.21.4/package.json index cab89a8..2da744f 100644 --- a/java/1.21.4/package.json +++ b/java/1.21.4/package.json @@ -1,6 +1,6 @@ { "name": "@mcschema/java-1.21.4", - "version": "0.0.1", + "version": "0.0.2", "description": "Schemas for Java Edition 1.21.4", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/java/1.21.4/src/Collections.ts b/java/1.21.4/src/Collections.ts index c75f9bb..9fc58c3 100644 --- a/java/1.21.4/src/Collections.ts +++ b/java/1.21.4/src/Collections.ts @@ -427,9 +427,9 @@ export function initCollections(collections: CollectionRegistry) { collections.register('feature_flags', [ 'vanilla', - 'bundle', 'trade_rebalance', - 'update_1_21', + 'redstone_experiments', + 'minecart_improvements', ]) collections.register('sprite_source_type', [ diff --git a/java/1.21.4/src/schemas/PackMcmeta.ts b/java/1.21.4/src/schemas/PackMcmeta.ts index 20fc4ac..212d5eb 100644 --- a/java/1.21.4/src/schemas/PackMcmeta.ts +++ b/java/1.21.4/src/schemas/PackMcmeta.ts @@ -12,7 +12,7 @@ import { } from '@mcschema/core' import { InclusiveRange } from './Common' -const CURRENT_PACK_FORMAT = 57 +const CURRENT_PACK_FORMAT = 58 export function initPackMcmetaSchemas(schemas: SchemaRegistry, collections: CollectionRegistry) { const Reference = RawReference.bind(undefined, schemas) diff --git a/java/1.21.4/src/schemas/TextComponent.ts b/java/1.21.4/src/schemas/TextComponent.ts index e0e6fea..8feb83d 100644 --- a/java/1.21.4/src/schemas/TextComponent.ts +++ b/java/1.21.4/src/schemas/TextComponent.ts @@ -47,6 +47,19 @@ export function initTextComponentSchemas(schemas: SchemaRegistry, collections: C const StyleFields: NodeChildren = { color: Opt(StringNode()) /* TODO */, + shadow_color: Opt(ChoiceNode([ + { + type: 'number', + node: NumberNode({ integer: true }) + }, + { + type: 'list', + node: ListNode( + NumberNode({ min: 0, max: 1 }), + { minLength: 4, maxLength: 4 }, + ) + } + ])), font: Opt(StringNode({ validator: 'resource', params: { pool: 'font' } })), bold: Opt(BooleanNode()), italic: Opt(BooleanNode()), diff --git a/java/1.21.4/src/schemas/worldgen/Biome.ts b/java/1.21.4/src/schemas/worldgen/Biome.ts index 42c36dc..fc45a7c 100644 --- a/java/1.21.4/src/schemas/worldgen/Biome.ts +++ b/java/1.21.4/src/schemas/worldgen/Biome.ts @@ -60,12 +60,18 @@ export function initBiomeSchemas(schemas: SchemaRegistry, collections: Collectio sound: Reference('sound_event'), tick_chance: NumberNode({ min: 0, max: 1 }) })), - music: Opt(ObjectNode({ - sound: Reference('sound_event'), - min_delay: NumberNode({ integer: true, min: 0 }), - max_delay: NumberNode({ integer: true, min: 0 }), - replace_current_music: BooleanNode() - })), + music: Opt(ListNode( + ObjectNode({ + weight: NumberNode({ integer: true, min: 1 }), + data: ObjectNode({ + sound: Reference('sound_event'), + min_delay: NumberNode({ integer: true, min: 0 }), + max_delay: NumberNode({ integer: true, min: 0 }), + replace_current_music: BooleanNode() + }) + }) + )), + music_volume: Opt(BooleanNode()), particle: Opt(ObjectNode({ options: Reference('particle'), probability: NumberNode({ min: 0, max: 1 }) diff --git a/java/1.21.4/src/schemas/worldgen/Feature.ts b/java/1.21.4/src/schemas/worldgen/Feature.ts index 67e4925..cf55d52 100644 --- a/java/1.21.4/src/schemas/worldgen/Feature.ts +++ b/java/1.21.4/src/schemas/worldgen/Feature.ts @@ -312,7 +312,8 @@ export function initFeatureSchemas(schemas: SchemaRegistry, collections: Collect probability: NumberNode({ min: 0, max: 1 }) }, 'minecraft:simple_block': { - to_place: Reference('block_state_provider') + to_place: Reference('block_state_provider'), + schedule_tick: Opt(BooleanNode()), }, 'minecraft:simple_random_selector': { features: Tag({ resource: '$worldgen/placed_feature', inlineSchema: 'placed_feature' }), diff --git a/package-lock.json b/package-lock.json index 5612a75..2d3ef55 100644 --- a/package-lock.json +++ b/package-lock.json @@ -131,7 +131,15 @@ }, "java/1.21.2": { "name": "@mcschema/java-1.21.2", - "version": "0.0.15", + "version": "0.0.16", + "license": "MIT", + "dependencies": { + "@mcschema/core": "^0.13.0" + } + }, + "java/1.21.4": { + "name": "@mcschema/java-1.21.4", + "version": "0.0.2", "license": "MIT", "dependencies": { "@mcschema/core": "^0.13.0" @@ -202,6 +210,10 @@ "resolved": "java/1.21.2", "link": true }, + "node_modules/@mcschema/java-1.21.4": { + "resolved": "java/1.21.4", + "link": true + }, "node_modules/@mcschema/locales": { "resolved": "locales", "link": true @@ -2088,6 +2100,12 @@ "@mcschema/core": "^0.13.0" } }, + "@mcschema/java-1.21.4": { + "version": "file:java/1.21.4", + "requires": { + "@mcschema/core": "^0.13.0" + } + }, "@mcschema/locales": { "version": "file:locales" },