Skip to content

Commit

Permalink
Add changes from 22w44a
Browse files Browse the repository at this point in the history
  • Loading branch information
misode committed Oct 30, 2024
1 parent 98d2f9b commit 510c2ad
Show file tree
Hide file tree
Showing 9 changed files with 54 additions and 15 deletions.
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.15",
"version": "0.0.16",
"description": "Schemas for Java Edition 1.21.2",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down
5 changes: 3 additions & 2 deletions java/1.21.2/src/Collections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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', [
Expand Down
2 changes: 1 addition & 1 deletion java/1.21.4/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
4 changes: 2 additions & 2 deletions java/1.21.4/src/Collections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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', [
Expand Down
2 changes: 1 addition & 1 deletion java/1.21.4/src/schemas/PackMcmeta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
13 changes: 13 additions & 0 deletions java/1.21.4/src/schemas/TextComponent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()),
Expand Down
18 changes: 12 additions & 6 deletions java/1.21.4/src/schemas/worldgen/Biome.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 })
Expand Down
3 changes: 2 additions & 1 deletion java/1.21.4/src/schemas/worldgen/Feature.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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' }),
Expand Down
20 changes: 19 additions & 1 deletion package-lock.json

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

0 comments on commit 510c2ad

Please sign in to comment.