@spyglassmc/java-edition 0.1.1 → 0.2.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 +3 -3
- package/lib/binder/index.js +11 -17
- package/lib/common/index.js +4 -28
- package/lib/dependency/common.d.ts +8 -5
- package/lib/dependency/common.js +18 -18
- package/lib/dependency/index.d.ts +6 -6
- package/lib/dependency/index.js +21 -48
- package/lib/dependency/mcmeta.d.ts +2 -3
- package/lib/dependency/mcmeta.js +28 -100
- package/lib/index.d.ts +3 -3
- package/lib/index.js +27 -50
- package/lib/json/checker/data/advancement.d.ts +13 -13
- package/lib/json/checker/data/advancement.js +259 -262
- 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 +2 -2
- 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 +369 -372
- 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.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 +4 -8
- package/lib/json/checker/util/block_states.d.ts +1 -1
- package/lib/json/checker/util/block_states.js +21 -45
- package/lib/json/checker/util/color.d.ts +1 -1
- package/lib/json/checker/util/color.js +20 -25
- package/lib/json/checker/util/index.d.ts +7 -7
- package/lib/json/checker/util/index.js +7 -19
- package/lib/json/checker/util/nbt.d.ts +2 -3
- package/lib/json/checker/util/nbt.js +17 -22
- 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 +13 -13
- package/lib/json/checker/util/version.js +7 -13
- package/lib/json/index.d.ts +1 -1
- package/lib/json/index.js +4 -27
- package/lib/mcfunction/checker/index.d.ts +1 -1
- package/lib/mcfunction/checker/index.js +79 -103
- package/lib/mcfunction/colorizer/index.d.ts +1 -1
- package/lib/mcfunction/colorizer/index.js +6 -31
- package/lib/mcfunction/common/index.js +7 -29
- package/lib/mcfunction/completer/argument.js +95 -119
- package/lib/mcfunction/completer/index.d.ts +1 -1
- package/lib/mcfunction/completer/index.js +1 -13
- package/lib/mcfunction/index.d.ts +6 -6
- package/lib/mcfunction/index.js +19 -54
- package/lib/mcfunction/inlayHintProvider.js +3 -26
- package/lib/mcfunction/node/argument.d.ts +3 -3
- package/lib/mcfunction/node/argument.js +47 -69
- package/lib/mcfunction/node/index.d.ts +1 -1
- package/lib/mcfunction/node/index.js +1 -13
- package/lib/mcfunction/parser/argument.d.ts +1 -1
- package/lib/mcfunction/parser/argument.js +76 -101
- package/lib/mcfunction/parser/index.d.ts +1 -1
- package/lib/mcfunction/parser/index.js +1 -13
- package/lib/mcfunction/signatureHelpProvider.js +3 -26
- package/lib/mcfunction/tree/argument.js +1 -2
- package/lib/mcfunction/tree/index.d.ts +1 -6
- package/lib/mcfunction/tree/index.js +1 -18
- package/lib/mcfunction/tree/patch.d.ts +4 -0
- package/lib/mcfunction/tree/patch.js +748 -0
- package/package.json +8 -7
- package/lib/mcfunction/tree/1.15.d.ts +0 -9
- package/lib/mcfunction/tree/1.15.js +0 -542
- package/lib/mcfunction/tree/1.16.d.ts +0 -10
- package/lib/mcfunction/tree/1.16.js +0 -77
- package/lib/mcfunction/tree/1.17.d.ts +0 -12
- package/lib/mcfunction/tree/1.17.js +0 -166
- package/lib/mcfunction/tree/1.18.d.ts +0 -26
- package/lib/mcfunction/tree/1.18.js +0 -6
- package/lib/mcfunction/tree/1.19.d.ts +0 -26
- package/lib/mcfunction/tree/1.19.js +0 -6
|
@@ -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 pack_mcmeta: JsonChecker;
|
|
3
|
-
export declare const Checkers: Map<"function" | "worldgen/biome" | "worldgen/configured_carver" | "worldgen/configured_feature" | "worldgen/configured_structure_feature" | "worldgen/configured_surface_builder" | "worldgen/noise" | "worldgen/noise_settings" | "worldgen/placed_feature" | "worldgen/processor_list" | "worldgen/template_pool" | "tag/function" | "tag/activity" | "tag/attribute" | "tag/block" | "tag/block_entity_type" | "tag/block_predicate_type" | "tag/chunk_status" | "tag/custom_stat" | "tag/enchantment" | "tag/entity_type" | "tag/float_provider_type" | "tag/fluid" | "tag/game_event" | "tag/height_provider_type" | "tag/int_provider_type" | "tag/item" | "tag/loot_condition_type" | "tag/loot_function_type" | "tag/loot_nbt_provider_type" | "tag/loot_number_provider_type" | "tag/loot_pool_entry_type" | "tag/loot_score_provider_type" | "tag/memory_module_type" | "tag/menu" | "tag/mob_effect" | "tag/motive" | "tag/particle_type" | "tag/point_of_interest_type" | "tag/pos_rule_test" | "tag/position_source_type" | "tag/potion" | "tag/recipe_serializer" | "tag/recipe_type" | "tag/rule_test" | "tag/schedule" | "tag/sensor_type" | "tag/sound_event" | "tag/stat_type" | "tag/villager_profession" | "tag/villager_type" | "tag/worldgen/biome_source" | "tag/worldgen/block_placer_type" | "tag/worldgen/block_state_provider_type" | "tag/worldgen/carver" | "tag/worldgen/chunk_generator" | "tag/worldgen/decorator" | "tag/worldgen/feature" | "tag/worldgen/feature_size_type" | "tag/worldgen/foliage_placer_type" | "tag/worldgen/material_condition" | "tag/worldgen/material_rule" | "tag/worldgen/placement_modifier_type" | "tag/worldgen/structure_feature" | "tag/worldgen/structure_piece" | "tag/worldgen/structure_pool_element" | "tag/worldgen/structure_processor" | "tag/worldgen/surface_builder" | "tag/worldgen/tree_decorator_type" | "tag/worldgen/trunk_placer_type" | "tag/worldgen/biome" | "tag/worldgen/configured_carver" | "tag/worldgen/configured_feature" | "tag/worldgen/configured_structure_feature" | "tag/worldgen/configured_surface_builder" | "tag/worldgen/noise" | "tag/worldgen/noise_settings" | "tag/worldgen/placed_feature" | "tag/worldgen/processor_list" | "tag/worldgen/template_pool"
|
|
3
|
+
export declare const Checkers: Map<"function" | "advancement" | "dimension" | "dimension_type" | "item_modifier" | "loot_table" | "predicate" | "recipe" | "structure" | "worldgen/biome" | "worldgen/configured_carver" | "worldgen/configured_feature" | "worldgen/configured_structure_feature" | "worldgen/configured_surface_builder" | "worldgen/noise" | "worldgen/noise_settings" | "worldgen/placed_feature" | "worldgen/processor_list" | "worldgen/template_pool" | "tag/function" | "tag/activity" | "tag/attribute" | "tag/block" | "tag/block_entity_type" | "tag/block_predicate_type" | "tag/chunk_status" | "tag/custom_stat" | "tag/enchantment" | "tag/entity_type" | "tag/float_provider_type" | "tag/fluid" | "tag/game_event" | "tag/height_provider_type" | "tag/int_provider_type" | "tag/item" | "tag/loot_condition_type" | "tag/loot_function_type" | "tag/loot_nbt_provider_type" | "tag/loot_number_provider_type" | "tag/loot_pool_entry_type" | "tag/loot_score_provider_type" | "tag/memory_module_type" | "tag/menu" | "tag/mob_effect" | "tag/motive" | "tag/particle_type" | "tag/point_of_interest_type" | "tag/pos_rule_test" | "tag/position_source_type" | "tag/potion" | "tag/recipe_serializer" | "tag/recipe_type" | "tag/rule_test" | "tag/schedule" | "tag/sensor_type" | "tag/sound_event" | "tag/stat_type" | "tag/villager_profession" | "tag/villager_type" | "tag/worldgen/biome_source" | "tag/worldgen/block_placer_type" | "tag/worldgen/block_state_provider_type" | "tag/worldgen/carver" | "tag/worldgen/chunk_generator" | "tag/worldgen/decorator" | "tag/worldgen/feature" | "tag/worldgen/feature_size_type" | "tag/worldgen/foliage_placer_type" | "tag/worldgen/material_condition" | "tag/worldgen/material_rule" | "tag/worldgen/placement_modifier_type" | "tag/worldgen/structure_feature" | "tag/worldgen/structure_piece" | "tag/worldgen/structure_pool_element" | "tag/worldgen/structure_processor" | "tag/worldgen/surface_builder" | "tag/worldgen/tree_decorator_type" | "tag/worldgen/trunk_placer_type" | "tag/worldgen/biome" | "tag/worldgen/configured_carver" | "tag/worldgen/configured_feature" | "tag/worldgen/configured_structure_feature" | "tag/worldgen/configured_surface_builder" | "tag/worldgen/noise" | "tag/worldgen/noise_settings" | "tag/worldgen/placed_feature" | "tag/worldgen/processor_list" | "tag/worldgen/template_pool", JsonChecker>;
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,43 +1,40 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
pack: (0, checker_1.record)({
|
|
16
|
-
pack_format: checker_1.int,
|
|
17
|
-
description: text_component_1.text_component,
|
|
1
|
+
import { as, int, record } from '@spyglassmc/json/lib/checker/index.js';
|
|
2
|
+
import { advancement } from './advancement.js';
|
|
3
|
+
import { biome, configured_carver, configured_surface_builder } from './biome.js';
|
|
4
|
+
import { dimension, dimension_type, noise_settings } from './dimension.js';
|
|
5
|
+
import { configured_feature } from './feature.js';
|
|
6
|
+
import { item_modifier_list, loot_table, predicate_list } from './loot_table.js';
|
|
7
|
+
import { recipe } from './recipe.js';
|
|
8
|
+
import { configured_structure_feature, processor_list, template_pool } from './structure.js';
|
|
9
|
+
import { block_tag, entity_type_tag, fluid_tag, function_tag, game_event_tag, item_tag } from './tag.js';
|
|
10
|
+
import { text_component } from './text_component.js';
|
|
11
|
+
export const pack_mcmeta = as('pack', record({
|
|
12
|
+
pack: record({
|
|
13
|
+
pack_format: int,
|
|
14
|
+
description: text_component,
|
|
18
15
|
}),
|
|
19
16
|
}, { allowUnknownProperties: true }));
|
|
20
|
-
|
|
21
|
-
['advancement',
|
|
22
|
-
['dimension',
|
|
23
|
-
['dimension_type',
|
|
24
|
-
['item_modifier',
|
|
25
|
-
['loot_table',
|
|
26
|
-
['predicate',
|
|
27
|
-
['recipe',
|
|
28
|
-
['tag/block',
|
|
29
|
-
['tag/entity_type',
|
|
30
|
-
['tag/fluid',
|
|
31
|
-
['tag/function',
|
|
32
|
-
['tag/game_event',
|
|
33
|
-
['tag/item',
|
|
34
|
-
['worldgen/biome',
|
|
35
|
-
['worldgen/configured_carver',
|
|
36
|
-
['worldgen/configured_surface_builder',
|
|
37
|
-
['worldgen/configured_feature',
|
|
38
|
-
['worldgen/configured_structure_feature',
|
|
39
|
-
['worldgen/noise_settings',
|
|
40
|
-
['worldgen/processor_list',
|
|
41
|
-
['worldgen/template_pool',
|
|
17
|
+
export const Checkers = new Map([
|
|
18
|
+
['advancement', advancement],
|
|
19
|
+
['dimension', dimension],
|
|
20
|
+
['dimension_type', dimension_type],
|
|
21
|
+
['item_modifier', item_modifier_list],
|
|
22
|
+
['loot_table', loot_table],
|
|
23
|
+
['predicate', predicate_list],
|
|
24
|
+
['recipe', recipe],
|
|
25
|
+
['tag/block', block_tag],
|
|
26
|
+
['tag/entity_type', entity_type_tag],
|
|
27
|
+
['tag/fluid', fluid_tag],
|
|
28
|
+
['tag/function', function_tag],
|
|
29
|
+
['tag/game_event', game_event_tag],
|
|
30
|
+
['tag/item', item_tag],
|
|
31
|
+
['worldgen/biome', biome],
|
|
32
|
+
['worldgen/configured_carver', configured_carver],
|
|
33
|
+
['worldgen/configured_surface_builder', configured_surface_builder],
|
|
34
|
+
['worldgen/configured_feature', configured_feature],
|
|
35
|
+
['worldgen/configured_structure_feature', configured_structure_feature],
|
|
36
|
+
['worldgen/noise_settings', noise_settings],
|
|
37
|
+
['worldgen/processor_list', processor_list],
|
|
38
|
+
['worldgen/template_pool', template_pool],
|
|
42
39
|
]);
|
|
43
40
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export declare const predicate: import("@spyglassmc/json/lib/checker").JsonChecker;
|
|
2
|
-
export declare const predicate_list: import("@spyglassmc/json/lib/checker").JsonChecker;
|
|
3
|
-
export declare const item_modifier: import("@spyglassmc/json/lib/checker").JsonChecker;
|
|
4
|
-
export declare const item_modifier_list: import("@spyglassmc/json/lib/checker").JsonChecker;
|
|
5
|
-
export declare const loot_entry: import("@spyglassmc/json/lib/checker").JsonChecker;
|
|
6
|
-
export declare const loot_pool: import("@spyglassmc/json/lib/checker").JsonChecker;
|
|
7
|
-
export declare const loot_table: import("@spyglassmc/json/lib/checker").JsonChecker;
|
|
1
|
+
export declare const predicate: import("@spyglassmc/json/lib/checker/JsonChecker.js").JsonChecker;
|
|
2
|
+
export declare const predicate_list: import("@spyglassmc/json/lib/checker/JsonChecker.js").JsonChecker;
|
|
3
|
+
export declare const item_modifier: import("@spyglassmc/json/lib/checker/JsonChecker.js").JsonChecker;
|
|
4
|
+
export declare const item_modifier_list: import("@spyglassmc/json/lib/checker/JsonChecker.js").JsonChecker;
|
|
5
|
+
export declare const loot_entry: import("@spyglassmc/json/lib/checker/JsonChecker.js").JsonChecker;
|
|
6
|
+
export declare const loot_pool: import("@spyglassmc/json/lib/checker/JsonChecker.js").JsonChecker;
|
|
7
|
+
export declare const loot_table: import("@spyglassmc/json/lib/checker/JsonChecker.js").JsonChecker;
|
|
8
8
|
//# sourceMappingURL=loot_table.d.ts.map
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const advancement_1 = require("./advancement");
|
|
7
|
-
const common_1 = require("./common");
|
|
8
|
-
const text_component_1 = require("./text_component");
|
|
1
|
+
import { any, as, boolean, dispatch, extract, float, floatRange, int, intRange, listOf, literal, object, opt, pick, record, resource, simpleString } from '@spyglassmc/json/lib/checker/primitives/index.js';
|
|
2
|
+
import { blockStateList, blockStateMap, nbt, nbtPath, uuid, versioned } from '../util/index.js';
|
|
3
|
+
import { damage_source_predicate, entity_predicate, item_predicate, location_predicate } from './advancement.js';
|
|
4
|
+
import { int_bounds, nbt_provider, number_provider, Slots } from './common.js';
|
|
5
|
+
import { text_component } from './text_component.js';
|
|
9
6
|
const loot_context_types = [
|
|
10
7
|
'empty',
|
|
11
8
|
'chest',
|
|
@@ -49,231 +46,231 @@ const map_decorations = [
|
|
|
49
46
|
'banner_red',
|
|
50
47
|
'banner_black',
|
|
51
48
|
];
|
|
52
|
-
|
|
53
|
-
condition:
|
|
54
|
-
...
|
|
49
|
+
export const predicate = as('predicate', dispatch('condition', (condition, props) => record({
|
|
50
|
+
condition: resource('loot_condition_type'),
|
|
51
|
+
...pick(condition, {
|
|
55
52
|
alternative: {
|
|
56
|
-
terms:
|
|
53
|
+
terms: listOf(predicate),
|
|
57
54
|
},
|
|
58
55
|
block_state_property: {
|
|
59
|
-
block:
|
|
60
|
-
properties:
|
|
56
|
+
block: resource('block'),
|
|
57
|
+
properties: blockStateMap({ id: extract('block', props) }),
|
|
61
58
|
},
|
|
62
59
|
damage_source_properties: {
|
|
63
|
-
predicate:
|
|
60
|
+
predicate: damage_source_predicate,
|
|
64
61
|
},
|
|
65
62
|
entity_properties: {
|
|
66
|
-
entity:
|
|
67
|
-
predicate:
|
|
63
|
+
entity: literal(['this', 'killer', 'killer_player', 'direct_killer']),
|
|
64
|
+
predicate: entity_predicate,
|
|
68
65
|
},
|
|
69
66
|
entity_scores: {
|
|
70
|
-
entity:
|
|
71
|
-
scores:
|
|
67
|
+
entity: literal(['this', 'killer', 'killer_player', 'direct_killer']),
|
|
68
|
+
scores: object(literal('objective'), () => int_bounds),
|
|
72
69
|
},
|
|
73
70
|
inverted: {
|
|
74
|
-
term:
|
|
71
|
+
term: predicate,
|
|
75
72
|
},
|
|
76
73
|
killed_by_player: {
|
|
77
|
-
inverse:
|
|
74
|
+
inverse: opt(boolean, false),
|
|
78
75
|
},
|
|
79
76
|
location_check: {
|
|
80
|
-
offsetX:
|
|
81
|
-
offsetY:
|
|
82
|
-
offsetZ:
|
|
83
|
-
predicate:
|
|
77
|
+
offsetX: opt(int, 0),
|
|
78
|
+
offsetY: opt(int, 0),
|
|
79
|
+
offsetZ: opt(int, 0),
|
|
80
|
+
predicate: location_predicate,
|
|
84
81
|
},
|
|
85
82
|
match_tool: {
|
|
86
|
-
predicate:
|
|
83
|
+
predicate: item_predicate,
|
|
87
84
|
},
|
|
88
85
|
random_chance: {
|
|
89
|
-
chance:
|
|
86
|
+
chance: floatRange(0, 1),
|
|
90
87
|
},
|
|
91
88
|
random_chance_with_looting: {
|
|
92
|
-
chance:
|
|
93
|
-
looting_multiplier:
|
|
89
|
+
chance: floatRange(0, 1),
|
|
90
|
+
looting_multiplier: float,
|
|
94
91
|
},
|
|
95
92
|
reference: {
|
|
96
|
-
name:
|
|
93
|
+
name: resource('predicate'),
|
|
97
94
|
},
|
|
98
95
|
table_bonus: {
|
|
99
|
-
enchantment:
|
|
100
|
-
chances:
|
|
96
|
+
enchantment: resource('enchantment'),
|
|
97
|
+
chances: listOf(floatRange(0, 1)),
|
|
101
98
|
},
|
|
102
99
|
time_check: {
|
|
103
|
-
value:
|
|
104
|
-
period:
|
|
100
|
+
value: int_bounds,
|
|
101
|
+
period: opt(int),
|
|
105
102
|
},
|
|
106
103
|
value_check: {
|
|
107
|
-
value:
|
|
108
|
-
range:
|
|
104
|
+
value: number_provider,
|
|
105
|
+
range: int_bounds,
|
|
109
106
|
},
|
|
110
107
|
weather_check: {
|
|
111
|
-
raining:
|
|
112
|
-
thundering:
|
|
108
|
+
raining: opt(boolean),
|
|
109
|
+
thundering: opt(boolean),
|
|
113
110
|
},
|
|
114
111
|
}),
|
|
115
112
|
})));
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
113
|
+
export const predicate_list = any([
|
|
114
|
+
predicate,
|
|
115
|
+
listOf(predicate),
|
|
119
116
|
]);
|
|
120
|
-
|
|
121
|
-
function:
|
|
122
|
-
...
|
|
117
|
+
export const item_modifier = as('item_modifier', dispatch('function', (function_, props, ctx) => record({
|
|
118
|
+
function: resource('loot_function_type'),
|
|
119
|
+
...pick(function_, {
|
|
123
120
|
apply_bonus: {
|
|
124
|
-
enchantment:
|
|
125
|
-
formula:
|
|
126
|
-
...
|
|
121
|
+
enchantment: resource('enchantment'),
|
|
122
|
+
formula: resource(['binomial_with_bonus_count', 'ore_drops', 'uniform_bonus_count']),
|
|
123
|
+
...pick(extract('formula', props), {
|
|
127
124
|
binomial_with_bonus_count: {
|
|
128
|
-
parameters:
|
|
129
|
-
extra:
|
|
130
|
-
probability:
|
|
125
|
+
parameters: record({
|
|
126
|
+
extra: float,
|
|
127
|
+
probability: floatRange(0, 1),
|
|
131
128
|
}),
|
|
132
129
|
},
|
|
133
130
|
uniform_bonus_count: {
|
|
134
|
-
parameters:
|
|
135
|
-
bonusMultiplier:
|
|
131
|
+
parameters: record({
|
|
132
|
+
bonusMultiplier: float,
|
|
136
133
|
}),
|
|
137
134
|
},
|
|
138
135
|
}),
|
|
139
136
|
},
|
|
140
137
|
copy_name: {
|
|
141
|
-
source:
|
|
138
|
+
source: literal(['this', 'killer', 'killer_player', 'block_entity']),
|
|
142
139
|
},
|
|
143
140
|
copy_nbt: {
|
|
144
|
-
source:
|
|
145
|
-
ops:
|
|
146
|
-
source:
|
|
147
|
-
target:
|
|
148
|
-
op:
|
|
141
|
+
source: nbt_provider,
|
|
142
|
+
ops: listOf(record({
|
|
143
|
+
source: nbtPath({ registry: 'entity_type' }),
|
|
144
|
+
target: nbtPath({ registry: 'item' }),
|
|
145
|
+
op: literal(['replace', 'append', 'merge']),
|
|
149
146
|
})),
|
|
150
147
|
},
|
|
151
148
|
copy_state: {
|
|
152
|
-
block:
|
|
153
|
-
properties:
|
|
149
|
+
block: resource('block'),
|
|
150
|
+
properties: blockStateList({ id: extract('block', props) }),
|
|
154
151
|
},
|
|
155
152
|
enchant_randomly: {
|
|
156
|
-
enchantments:
|
|
153
|
+
enchantments: opt(listOf(resource('enchantment'))),
|
|
157
154
|
},
|
|
158
155
|
enchant_with_levels: {
|
|
159
|
-
levels:
|
|
160
|
-
treasure:
|
|
156
|
+
levels: number_provider,
|
|
157
|
+
treasure: opt(boolean, false),
|
|
161
158
|
},
|
|
162
159
|
exploration_map: {
|
|
163
|
-
destination:
|
|
164
|
-
decoration:
|
|
165
|
-
zoom:
|
|
166
|
-
search_radius:
|
|
167
|
-
skip_existing_chunks:
|
|
160
|
+
destination: opt(resource('worldgen/structure_feature'), 'buried_treasure'),
|
|
161
|
+
decoration: opt(literal(map_decorations), 'mansion'),
|
|
162
|
+
zoom: opt(int, 2),
|
|
163
|
+
search_radius: opt(int, 50),
|
|
164
|
+
skip_existing_chunks: opt(boolean, true),
|
|
168
165
|
},
|
|
169
166
|
fill_player_head: {
|
|
170
|
-
entity:
|
|
167
|
+
entity: literal(['this', 'killer', 'killer_player', 'direct_killer']),
|
|
171
168
|
},
|
|
172
169
|
limit_count: {
|
|
173
|
-
limit:
|
|
170
|
+
limit: int_bounds,
|
|
174
171
|
},
|
|
175
172
|
looting_enchant: {
|
|
176
|
-
count:
|
|
177
|
-
limit:
|
|
173
|
+
count: number_provider,
|
|
174
|
+
limit: opt(int, 0),
|
|
178
175
|
},
|
|
179
176
|
set_attributes: {
|
|
180
|
-
modifiers:
|
|
181
|
-
attribute:
|
|
182
|
-
name:
|
|
183
|
-
operation:
|
|
184
|
-
id:
|
|
185
|
-
amount:
|
|
186
|
-
slot:
|
|
187
|
-
|
|
188
|
-
|
|
177
|
+
modifiers: listOf(record({
|
|
178
|
+
attribute: resource('attribute'),
|
|
179
|
+
name: simpleString,
|
|
180
|
+
operation: literal(['addition', 'multiply_base', 'multiply_total']),
|
|
181
|
+
id: opt(uuid),
|
|
182
|
+
amount: number_provider,
|
|
183
|
+
slot: any([
|
|
184
|
+
literal(Slots),
|
|
185
|
+
listOf(literal(Slots)),
|
|
189
186
|
]),
|
|
190
187
|
})),
|
|
191
188
|
},
|
|
192
189
|
set_contents: {
|
|
193
|
-
type:
|
|
194
|
-
entries:
|
|
190
|
+
type: versioned(ctx, '1.18', resource('block_entity_type')),
|
|
191
|
+
entries: listOf(loot_entry),
|
|
195
192
|
},
|
|
196
193
|
set_count: {
|
|
197
|
-
count:
|
|
198
|
-
add:
|
|
194
|
+
count: number_provider,
|
|
195
|
+
add: opt(versioned(ctx, '1.17', boolean), false),
|
|
199
196
|
},
|
|
200
197
|
set_damage: {
|
|
201
|
-
damage:
|
|
202
|
-
add:
|
|
198
|
+
damage: number_provider,
|
|
199
|
+
add: opt(versioned(ctx, '1.17', boolean), false),
|
|
203
200
|
},
|
|
204
201
|
set_loot_table: {
|
|
205
|
-
name:
|
|
206
|
-
seed:
|
|
202
|
+
name: resource('loot_table'),
|
|
203
|
+
seed: opt(int, 0),
|
|
207
204
|
},
|
|
208
205
|
set_lore: {
|
|
209
|
-
entity:
|
|
210
|
-
lore:
|
|
211
|
-
replace:
|
|
206
|
+
entity: opt(literal(['this', 'killer', 'killer_player', 'direct_killer'])),
|
|
207
|
+
lore: listOf(text_component),
|
|
208
|
+
replace: opt(boolean, false),
|
|
212
209
|
},
|
|
213
210
|
set_name: {
|
|
214
|
-
entity:
|
|
215
|
-
name:
|
|
211
|
+
entity: opt(literal(['this', 'killer', 'killer_player', 'direct_killer'])),
|
|
212
|
+
name: opt(text_component),
|
|
216
213
|
},
|
|
217
214
|
set_nbt: {
|
|
218
|
-
tag:
|
|
215
|
+
tag: nbt({ registry: 'item' }),
|
|
219
216
|
},
|
|
220
217
|
set_potion: {
|
|
221
|
-
id:
|
|
218
|
+
id: resource('potion'),
|
|
222
219
|
},
|
|
223
220
|
set_stew_effect: {
|
|
224
|
-
effects:
|
|
225
|
-
type:
|
|
226
|
-
duration:
|
|
221
|
+
effects: opt(listOf(record({
|
|
222
|
+
type: resource('mob_effect'),
|
|
223
|
+
duration: number_provider,
|
|
227
224
|
})), []),
|
|
228
225
|
},
|
|
229
226
|
}),
|
|
230
|
-
conditions:
|
|
227
|
+
conditions: opt(listOf(predicate)),
|
|
231
228
|
})));
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
229
|
+
export const item_modifier_list = any([
|
|
230
|
+
item_modifier,
|
|
231
|
+
listOf(item_modifier),
|
|
235
232
|
]);
|
|
236
|
-
|
|
237
|
-
type:
|
|
238
|
-
weight:
|
|
239
|
-
quality:
|
|
240
|
-
...
|
|
233
|
+
export const loot_entry = as('loot_entry', dispatch('type', (type) => record({
|
|
234
|
+
type: resource('loot_pool_entry_type'),
|
|
235
|
+
weight: opt(intRange(1, undefined), 1),
|
|
236
|
+
quality: opt(int, 0),
|
|
237
|
+
...pick(type, {
|
|
241
238
|
alternatives: {
|
|
242
|
-
children:
|
|
239
|
+
children: listOf(loot_entry),
|
|
243
240
|
},
|
|
244
241
|
dynamic: {
|
|
245
|
-
name:
|
|
242
|
+
name: resource(['contents']),
|
|
246
243
|
},
|
|
247
244
|
group: {
|
|
248
|
-
children:
|
|
245
|
+
children: listOf(loot_entry),
|
|
249
246
|
},
|
|
250
247
|
item: {
|
|
251
|
-
name:
|
|
248
|
+
name: resource('item'),
|
|
252
249
|
},
|
|
253
250
|
loot_table: {
|
|
254
|
-
name:
|
|
251
|
+
name: resource('loot_table'),
|
|
255
252
|
},
|
|
256
253
|
sequence: {
|
|
257
|
-
children:
|
|
254
|
+
children: listOf(loot_entry),
|
|
258
255
|
},
|
|
259
256
|
tag: {
|
|
260
|
-
name:
|
|
261
|
-
expand:
|
|
257
|
+
name: resource('tag/item'),
|
|
258
|
+
expand: boolean,
|
|
262
259
|
},
|
|
263
260
|
}),
|
|
264
|
-
functions:
|
|
265
|
-
conditions:
|
|
261
|
+
functions: opt(listOf(item_modifier), []),
|
|
262
|
+
conditions: opt(listOf(predicate), []),
|
|
266
263
|
})));
|
|
267
|
-
|
|
268
|
-
rolls:
|
|
269
|
-
bonus_rolls:
|
|
270
|
-
entries:
|
|
271
|
-
functions:
|
|
272
|
-
conditions:
|
|
264
|
+
export const loot_pool = as('loot_pool', record({
|
|
265
|
+
rolls: number_provider,
|
|
266
|
+
bonus_rolls: opt(number_provider, 0),
|
|
267
|
+
entries: listOf(loot_entry),
|
|
268
|
+
functions: opt(listOf(item_modifier), []),
|
|
269
|
+
conditions: opt(listOf(predicate), []),
|
|
273
270
|
}));
|
|
274
|
-
|
|
275
|
-
type:
|
|
276
|
-
pools:
|
|
277
|
-
functions:
|
|
271
|
+
export const loot_table = as('loot_table', record({
|
|
272
|
+
type: opt(resource(loot_context_types)),
|
|
273
|
+
pools: opt(listOf(loot_pool), []),
|
|
274
|
+
functions: opt(listOf(item_modifier), []),
|
|
278
275
|
}));
|
|
279
276
|
//# sourceMappingURL=loot_table.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const recipe: import("@spyglassmc/json/lib/checker").JsonChecker;
|
|
1
|
+
export declare const recipe: import("@spyglassmc/json/lib/checker/JsonChecker.js").JsonChecker;
|
|
2
2
|
//# sourceMappingURL=recipe.d.ts.map
|
|
@@ -1,41 +1,38 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const one_recipe_ingredient = (0, primitives_1.any)([
|
|
7
|
-
(0, primitives_1.record)({
|
|
8
|
-
item: (0, primitives_1.resource)('item'),
|
|
1
|
+
import { any, as, dispatch, float, int, intRange, listOf, object, opt, pick, record, resource, simpleString, when } from '@spyglassmc/json/lib/checker/primitives/index.js';
|
|
2
|
+
import { patternKeys, recipeGroup } from '../util/index.js';
|
|
3
|
+
const one_recipe_ingredient = any([
|
|
4
|
+
record({
|
|
5
|
+
item: resource('item'),
|
|
9
6
|
}),
|
|
10
|
-
|
|
11
|
-
tag:
|
|
7
|
+
record({
|
|
8
|
+
tag: resource('tag/item'),
|
|
12
9
|
}),
|
|
13
10
|
]);
|
|
14
|
-
const recipe_ingredient =
|
|
11
|
+
const recipe_ingredient = any([
|
|
15
12
|
one_recipe_ingredient,
|
|
16
|
-
|
|
13
|
+
listOf(one_recipe_ingredient),
|
|
17
14
|
]);
|
|
18
|
-
const recipe_result =
|
|
19
|
-
item:
|
|
20
|
-
count:
|
|
15
|
+
const recipe_result = record({
|
|
16
|
+
item: resource('item'),
|
|
17
|
+
count: opt(intRange(1, 64), 1),
|
|
21
18
|
});
|
|
22
|
-
|
|
23
|
-
type:
|
|
24
|
-
group:
|
|
25
|
-
...
|
|
19
|
+
export const recipe = as('recipe', dispatch('type', (type, props) => record({
|
|
20
|
+
type: resource('recipe_serializer'),
|
|
21
|
+
group: opt(recipeGroup),
|
|
22
|
+
...pick(type, {
|
|
26
23
|
crafting_shaped: {
|
|
27
|
-
pattern:
|
|
28
|
-
key:
|
|
24
|
+
pattern: listOf(simpleString),
|
|
25
|
+
key: object(patternKeys(props), () => recipe_ingredient),
|
|
29
26
|
result: recipe_result,
|
|
30
27
|
},
|
|
31
28
|
crafting_shapeless: {
|
|
32
|
-
ingredients:
|
|
29
|
+
ingredients: listOf(recipe_ingredient),
|
|
33
30
|
result: recipe_result,
|
|
34
31
|
},
|
|
35
32
|
stonecutting: {
|
|
36
33
|
ingredient: recipe_ingredient,
|
|
37
|
-
result:
|
|
38
|
-
count:
|
|
34
|
+
result: resource('item'),
|
|
35
|
+
count: int,
|
|
39
36
|
},
|
|
40
37
|
smithing: {
|
|
41
38
|
base: one_recipe_ingredient,
|
|
@@ -43,11 +40,11 @@ exports.recipe = (0, primitives_1.as)('recipe', (0, primitives_1.dispatch)('type
|
|
|
43
40
|
result: recipe_result,
|
|
44
41
|
},
|
|
45
42
|
}),
|
|
46
|
-
...
|
|
43
|
+
...when(type, ['blasting', 'campfire_cooking', 'smelting', 'smoking'], {
|
|
47
44
|
ingredient: recipe_ingredient,
|
|
48
|
-
result:
|
|
49
|
-
experience:
|
|
50
|
-
cookingtime:
|
|
45
|
+
result: resource('item'),
|
|
46
|
+
experience: opt(float, 0),
|
|
47
|
+
cookingtime: opt(int, type === 'smelting' ? 200 : 100),
|
|
51
48
|
}),
|
|
52
49
|
})));
|
|
53
50
|
//# sourceMappingURL=recipe.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export declare const rule_test: import("@spyglassmc/json/lib/checker").JsonChecker;
|
|
2
|
-
export declare const pos_rule_test: import("@spyglassmc/json/lib/checker").JsonChecker;
|
|
3
|
-
export declare const processor_list: import("@spyglassmc/json/lib/checker").JsonChecker;
|
|
4
|
-
export declare const processor_list_ref: import("@spyglassmc/json/lib/checker").JsonChecker;
|
|
5
|
-
export declare const template_pool: import("@spyglassmc/json/lib/checker").JsonChecker;
|
|
6
|
-
export declare const template_pool_ref: import("@spyglassmc/json/lib/checker").JsonChecker;
|
|
7
|
-
export declare const configured_structure_feature: import("@spyglassmc/json/lib/checker").JsonChecker;
|
|
1
|
+
export declare const rule_test: import("@spyglassmc/json/lib/checker/JsonChecker.js").JsonChecker;
|
|
2
|
+
export declare const pos_rule_test: import("@spyglassmc/json/lib/checker/JsonChecker.js").JsonChecker;
|
|
3
|
+
export declare const processor_list: import("@spyglassmc/json/lib/checker/JsonChecker.js").JsonChecker;
|
|
4
|
+
export declare const processor_list_ref: import("@spyglassmc/json/lib/checker/JsonChecker.js").JsonChecker;
|
|
5
|
+
export declare const template_pool: import("@spyglassmc/json/lib/checker/JsonChecker.js").JsonChecker;
|
|
6
|
+
export declare const template_pool_ref: import("@spyglassmc/json/lib/checker/JsonChecker.js").JsonChecker;
|
|
7
|
+
export declare const configured_structure_feature: import("@spyglassmc/json/lib/checker/JsonChecker.js").JsonChecker;
|
|
8
8
|
//# sourceMappingURL=structure.d.ts.map
|