@spyglassmc/java-edition 0.1.2 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/binder/index.d.ts +1 -1
- package/lib/binder/index.js +11 -17
- package/lib/common/index.js +6 -33
- package/lib/dependency/common.js +6 -9
- package/lib/dependency/index.d.ts +6 -6
- package/lib/dependency/index.js +18 -49
- package/lib/dependency/mcmeta.d.ts +2 -2
- package/lib/dependency/mcmeta.js +8 -37
- package/lib/index.d.ts +3 -3
- package/lib/index.js +21 -48
- package/lib/json/checker/data/advancement.d.ts +13 -13
- package/lib/json/checker/data/advancement.js +263 -266
- package/lib/json/checker/data/biome.d.ts +3 -3
- package/lib/json/checker/data/biome.js +98 -101
- package/lib/json/checker/data/common.d.ts +1 -1
- package/lib/json/checker/data/common.js +145 -152
- package/lib/json/checker/data/dimension.d.ts +3 -3
- package/lib/json/checker/data/dimension.js +148 -151
- package/lib/json/checker/data/feature.d.ts +8 -8
- package/lib/json/checker/data/feature.js +370 -373
- package/lib/json/checker/data/index.d.ts +2 -2
- package/lib/json/checker/data/index.js +36 -39
- package/lib/json/checker/data/loot_table.d.ts +7 -7
- package/lib/json/checker/data/loot_table.js +125 -128
- package/lib/json/checker/data/recipe.d.ts +1 -1
- package/lib/json/checker/data/recipe.js +25 -28
- package/lib/json/checker/data/structure.d.ts +7 -7
- package/lib/json/checker/data/structure.js +80 -83
- package/lib/json/checker/data/tag.d.ts +6 -6
- package/lib/json/checker/data/tag.js +23 -26
- package/lib/json/checker/data/text_component.d.ts +1 -1
- package/lib/json/checker/data/text_component.js +61 -64
- package/lib/json/checker/index.js +14 -19
- package/lib/json/checker/util/advancement.d.ts +1 -1
- package/lib/json/checker/util/advancement.js +6 -10
- package/lib/json/checker/util/block_states.d.ts +1 -1
- package/lib/json/checker/util/block_states.js +25 -53
- package/lib/json/checker/util/color.d.ts +1 -1
- package/lib/json/checker/util/color.js +24 -29
- package/lib/json/checker/util/index.d.ts +7 -7
- package/lib/json/checker/util/index.js +7 -23
- package/lib/json/checker/util/nbt.d.ts +1 -1
- package/lib/json/checker/util/nbt.js +23 -28
- package/lib/json/checker/util/recipe.d.ts +1 -1
- package/lib/json/checker/util/recipe.js +4 -8
- package/lib/json/checker/util/uuid.d.ts +1 -1
- package/lib/json/checker/util/uuid.js +4 -7
- package/lib/json/checker/util/version.d.ts +2 -2
- package/lib/json/checker/util/version.js +7 -13
- package/lib/json/index.d.ts +1 -1
- package/lib/json/index.js +4 -31
- package/lib/mcfunction/checker/index.d.ts +1 -1
- package/lib/mcfunction/checker/index.js +24 -53
- package/lib/mcfunction/colorizer/index.d.ts +1 -1
- package/lib/mcfunction/colorizer/index.js +6 -35
- package/lib/mcfunction/common/index.js +7 -33
- package/lib/mcfunction/completer/argument.js +93 -120
- package/lib/mcfunction/completer/index.d.ts +1 -1
- package/lib/mcfunction/completer/index.js +1 -17
- package/lib/mcfunction/index.d.ts +5 -5
- package/lib/mcfunction/index.js +16 -43
- package/lib/mcfunction/inlayHintProvider.js +3 -30
- package/lib/mcfunction/node/argument.d.ts +7 -7
- package/lib/mcfunction/node/argument.js +38 -63
- package/lib/mcfunction/node/index.d.ts +1 -1
- package/lib/mcfunction/node/index.js +1 -17
- package/lib/mcfunction/parser/argument.d.ts +1 -1
- package/lib/mcfunction/parser/argument.js +72 -100
- package/lib/mcfunction/parser/index.d.ts +1 -1
- package/lib/mcfunction/parser/index.js +1 -17
- package/lib/mcfunction/signatureHelpProvider.js +3 -30
- package/lib/mcfunction/tree/argument.js +1 -2
- package/lib/mcfunction/tree/index.d.ts +1 -1
- package/lib/mcfunction/tree/index.js +1 -17
- package/lib/mcfunction/tree/patch.d.ts +1 -1
- package/lib/mcfunction/tree/patch.js +5 -9
- package/package.json +8 -7
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const configured_surface_builder: import("@spyglassmc/json/lib/checker").JsonChecker;
|
|
2
|
-
export declare const configured_carver: import("@spyglassmc/json/lib/checker").JsonChecker;
|
|
3
|
-
export declare const biome: import("@spyglassmc/json/lib/checker").JsonChecker;
|
|
1
|
+
export declare const configured_surface_builder: import("@spyglassmc/json/lib/checker/JsonChecker.js").JsonChecker;
|
|
2
|
+
export declare const configured_carver: import("@spyglassmc/json/lib/checker/JsonChecker.js").JsonChecker;
|
|
3
|
+
export declare const biome: import("@spyglassmc/json/lib/checker/JsonChecker.js").JsonChecker;
|
|
4
4
|
//# sourceMappingURL=biome.d.ts.map
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const common_1 = require("./common");
|
|
7
|
-
const feature_1 = require("./feature");
|
|
8
|
-
const structure_1 = require("./structure");
|
|
1
|
+
import { any, as, boolean, dispatch, float, floatRange, int, intRange, listOf, literal, object, opt, record, resource, when } from '@spyglassmc/json/lib/checker/primitives/index.js';
|
|
2
|
+
import { intColor, versioned } from '../util/index.js';
|
|
3
|
+
import { block_state, floatProvider, height_provider, vertical_anchor } from './common.js';
|
|
4
|
+
import { configured_feature_list_ref, placed_feature_list_ref } from './feature.js';
|
|
5
|
+
import { configured_structure_feature } from './structure.js';
|
|
9
6
|
const BiomeCategory = (ctx) => [
|
|
10
7
|
'beach',
|
|
11
8
|
'desert',
|
|
@@ -14,7 +11,7 @@ const BiomeCategory = (ctx) => [
|
|
|
14
11
|
'icy',
|
|
15
12
|
'jungle',
|
|
16
13
|
'mesa',
|
|
17
|
-
...
|
|
14
|
+
...versioned(ctx, '1.18', ['mountain']),
|
|
18
15
|
'mushroom',
|
|
19
16
|
'nether',
|
|
20
17
|
'none',
|
|
@@ -25,127 +22,127 @@ const BiomeCategory = (ctx) => [
|
|
|
25
22
|
'swamp',
|
|
26
23
|
'taiga',
|
|
27
24
|
'the_end',
|
|
28
|
-
...
|
|
25
|
+
...versioned(ctx, '1.17', ['underground']),
|
|
29
26
|
];
|
|
30
27
|
const MobCategory = (ctx) => [
|
|
31
|
-
...
|
|
28
|
+
...versioned(ctx, '1.18', ['axolotls']),
|
|
32
29
|
'monster',
|
|
33
30
|
'creature',
|
|
34
31
|
'ambient',
|
|
35
32
|
'water_creature',
|
|
36
33
|
'water_ambient',
|
|
37
|
-
...
|
|
34
|
+
...versioned(ctx, '1.17', ['underground_water_creature']),
|
|
38
35
|
'misc',
|
|
39
36
|
];
|
|
40
|
-
|
|
41
|
-
type:
|
|
42
|
-
config:
|
|
43
|
-
top_material:
|
|
44
|
-
under_material:
|
|
45
|
-
underwater_material:
|
|
37
|
+
export const configured_surface_builder = as('surface_builder', record({
|
|
38
|
+
type: resource('worldgen/surface_builder'),
|
|
39
|
+
config: record({
|
|
40
|
+
top_material: block_state,
|
|
41
|
+
under_material: block_state,
|
|
42
|
+
underwater_material: block_state,
|
|
46
43
|
}),
|
|
47
44
|
}));
|
|
48
|
-
|
|
49
|
-
type:
|
|
50
|
-
config:
|
|
51
|
-
probability:
|
|
52
|
-
...
|
|
53
|
-
y:
|
|
54
|
-
yScale:
|
|
55
|
-
lava_level:
|
|
56
|
-
aquifers_enabled:
|
|
57
|
-
debug_settings:
|
|
58
|
-
debug_mode:
|
|
59
|
-
air_state:
|
|
60
|
-
water_state:
|
|
61
|
-
lava_state:
|
|
62
|
-
barrier_state:
|
|
45
|
+
export const configured_carver = as('carver', dispatch('type', (type, _, ctx) => record({
|
|
46
|
+
type: resource('worldgen/carver'),
|
|
47
|
+
config: record({
|
|
48
|
+
probability: floatRange(0, 1),
|
|
49
|
+
...versioned(ctx, '1.17', {
|
|
50
|
+
y: height_provider,
|
|
51
|
+
yScale: floatProvider(),
|
|
52
|
+
lava_level: vertical_anchor,
|
|
53
|
+
aquifers_enabled: versioned(ctx, boolean, '1.18'),
|
|
54
|
+
debug_settings: opt(record({
|
|
55
|
+
debug_mode: opt(boolean),
|
|
56
|
+
air_state: opt(block_state),
|
|
57
|
+
water_state: opt(block_state),
|
|
58
|
+
lava_state: opt(block_state),
|
|
59
|
+
barrier_state: opt(block_state),
|
|
63
60
|
})),
|
|
64
|
-
...
|
|
65
|
-
horizontal_radius_multiplier:
|
|
66
|
-
vertical_radius_multiplier:
|
|
67
|
-
floor_level:
|
|
61
|
+
...when(type, ['cave', 'nether_cave', 'underwater_cave'], {
|
|
62
|
+
horizontal_radius_multiplier: floatProvider(),
|
|
63
|
+
vertical_radius_multiplier: floatProvider(),
|
|
64
|
+
floor_level: floatProvider(-1, 1),
|
|
68
65
|
}),
|
|
69
|
-
...
|
|
70
|
-
vertical_rotation:
|
|
71
|
-
shape:
|
|
72
|
-
distance_factor:
|
|
73
|
-
thickness:
|
|
74
|
-
width_smoothness:
|
|
75
|
-
horizontal_radius_factor:
|
|
76
|
-
vertical_radius_default_factor:
|
|
77
|
-
vertical_radius_center_factor:
|
|
66
|
+
...when(type, ['canyon', 'underwater_canyon'], {
|
|
67
|
+
vertical_rotation: floatProvider(),
|
|
68
|
+
shape: record({
|
|
69
|
+
distance_factor: floatProvider(),
|
|
70
|
+
thickness: floatProvider(),
|
|
71
|
+
width_smoothness: intRange(0, undefined),
|
|
72
|
+
horizontal_radius_factor: floatProvider(),
|
|
73
|
+
vertical_radius_default_factor: float,
|
|
74
|
+
vertical_radius_center_factor: float,
|
|
78
75
|
}),
|
|
79
76
|
}),
|
|
80
77
|
}),
|
|
81
78
|
}),
|
|
82
79
|
})));
|
|
83
|
-
|
|
84
|
-
...
|
|
85
|
-
depth:
|
|
86
|
-
scale:
|
|
80
|
+
export const biome = as('biome', dispatch((props, ctx) => record({
|
|
81
|
+
...versioned(ctx, {
|
|
82
|
+
depth: float,
|
|
83
|
+
scale: float,
|
|
87
84
|
}, '1.18'),
|
|
88
|
-
downfall:
|
|
89
|
-
temperature:
|
|
90
|
-
temperature_modifier:
|
|
91
|
-
precipitation:
|
|
92
|
-
category:
|
|
93
|
-
effects:
|
|
94
|
-
sky_color:
|
|
95
|
-
fog_color:
|
|
96
|
-
water_color:
|
|
97
|
-
water_fog_color:
|
|
98
|
-
grass_color:
|
|
99
|
-
foliage_color:
|
|
100
|
-
grass_color_modifier:
|
|
101
|
-
particle:
|
|
102
|
-
options:
|
|
103
|
-
type:
|
|
85
|
+
downfall: float,
|
|
86
|
+
temperature: float,
|
|
87
|
+
temperature_modifier: opt(literal(['none', 'frozen'])),
|
|
88
|
+
precipitation: literal(['none', 'rain', 'snow']),
|
|
89
|
+
category: literal(BiomeCategory(ctx)),
|
|
90
|
+
effects: record({
|
|
91
|
+
sky_color: intColor(),
|
|
92
|
+
fog_color: intColor(),
|
|
93
|
+
water_color: intColor(),
|
|
94
|
+
water_fog_color: intColor(),
|
|
95
|
+
grass_color: opt(intColor()),
|
|
96
|
+
foliage_color: opt(intColor()),
|
|
97
|
+
grass_color_modifier: opt(literal(['none', 'dark_forest', 'swamp'])),
|
|
98
|
+
particle: opt(record({
|
|
99
|
+
options: record({
|
|
100
|
+
type: resource('particle_type'),
|
|
104
101
|
}),
|
|
105
|
-
probability:
|
|
102
|
+
probability: floatRange(0, 1),
|
|
106
103
|
})),
|
|
107
|
-
ambient_sound:
|
|
108
|
-
mood_sound:
|
|
109
|
-
sound:
|
|
110
|
-
tick_delay:
|
|
111
|
-
block_search_extent:
|
|
112
|
-
offset:
|
|
104
|
+
ambient_sound: opt(resource('sound_event')),
|
|
105
|
+
mood_sound: opt(record({
|
|
106
|
+
sound: resource('sound_event'),
|
|
107
|
+
tick_delay: int,
|
|
108
|
+
block_search_extent: int,
|
|
109
|
+
offset: float,
|
|
113
110
|
})),
|
|
114
|
-
additions_sound:
|
|
115
|
-
sound:
|
|
116
|
-
tick_chance:
|
|
111
|
+
additions_sound: opt(record({
|
|
112
|
+
sound: resource('sound_event'),
|
|
113
|
+
tick_chance: floatRange(0, 1),
|
|
117
114
|
})),
|
|
118
|
-
music:
|
|
119
|
-
sound:
|
|
120
|
-
min_delay:
|
|
121
|
-
max_delay:
|
|
122
|
-
replace_current_music:
|
|
115
|
+
music: opt(record({
|
|
116
|
+
sound: resource('sound_event'),
|
|
117
|
+
min_delay: int,
|
|
118
|
+
max_delay: int,
|
|
119
|
+
replace_current_music: boolean,
|
|
123
120
|
})),
|
|
124
121
|
}),
|
|
125
|
-
player_spawn_friendly:
|
|
126
|
-
creature_spawn_probability:
|
|
127
|
-
spawners:
|
|
128
|
-
type:
|
|
129
|
-
weight:
|
|
130
|
-
minCount:
|
|
131
|
-
maxCount:
|
|
122
|
+
player_spawn_friendly: opt(versioned(ctx, boolean, '1.18')),
|
|
123
|
+
creature_spawn_probability: opt(floatRange(0, 0.9999999)),
|
|
124
|
+
spawners: object(literal(MobCategory(ctx)), () => listOf(record({
|
|
125
|
+
type: resource('entity_type'),
|
|
126
|
+
weight: int,
|
|
127
|
+
minCount: int,
|
|
128
|
+
maxCount: int,
|
|
132
129
|
}))),
|
|
133
|
-
spawn_costs:
|
|
134
|
-
energy_budget:
|
|
135
|
-
charge:
|
|
130
|
+
spawn_costs: object(resource('entity_type'), () => record({
|
|
131
|
+
energy_budget: float,
|
|
132
|
+
charge: float,
|
|
136
133
|
})),
|
|
137
|
-
surface_builder:
|
|
138
|
-
|
|
139
|
-
|
|
134
|
+
surface_builder: versioned(ctx, any([
|
|
135
|
+
resource('worldgen/configured_surface_builder'),
|
|
136
|
+
configured_surface_builder,
|
|
140
137
|
]), '1.18'),
|
|
141
|
-
carvers:
|
|
142
|
-
|
|
143
|
-
|
|
138
|
+
carvers: object(['air', 'liquid'], () => opt(any([
|
|
139
|
+
listOf(resource('worldgen/configured_carver')),
|
|
140
|
+
listOf(configured_carver),
|
|
144
141
|
]))),
|
|
145
|
-
starts:
|
|
146
|
-
|
|
147
|
-
|
|
142
|
+
starts: versioned(ctx, any([
|
|
143
|
+
listOf(resource('worldgen/configured_structure_feature')),
|
|
144
|
+
listOf(configured_structure_feature),
|
|
148
145
|
]), '1.18'),
|
|
149
|
-
features:
|
|
146
|
+
features: listOf(versioned(ctx, configured_feature_list_ref, '1.18', placed_feature_list_ref)),
|
|
150
147
|
})));
|
|
151
148
|
//# sourceMappingURL=biome.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { JsonChecker } from '@spyglassmc/json/lib/checker/JsonChecker';
|
|
1
|
+
import type { JsonChecker } from '@spyglassmc/json/lib/checker/JsonChecker.js';
|
|
2
2
|
export declare const Y_SIZE: number;
|
|
3
3
|
export declare const MAX_Y: number;
|
|
4
4
|
export declare const MIN_Y: number;
|