zen-flow 7.0.0 → 7.1.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/dist/zenflow.cjs +417 -444
- package/dist/zenflow.d.ts +60 -24
- package/dist/zenflow.mjs +414 -445
- package/package.json +6 -7
package/dist/zenflow.cjs
CHANGED
|
@@ -2,280 +2,249 @@
|
|
|
2
2
|
|
|
3
3
|
var util = require('node:util');
|
|
4
4
|
|
|
5
|
-
const
|
|
5
|
+
const object = (x) => x !== null && !Array.isArray(x) && typeof x === "object";
|
|
6
6
|
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const formatWeight = (id, weight) => `${id}.weight(${weight})`;
|
|
11
|
-
const formatStack = (stack) => `${stack.id} * ${stack.n}`;
|
|
12
|
-
const formatBonus$1 = (x) => `${x.id} % ${Math.round(x.chance * 100)}`;
|
|
13
|
-
const formatList = (arr, n) => {
|
|
7
|
+
const float = (n) => `${n}F`;
|
|
8
|
+
const literal = (x) => `"${x}"`;
|
|
9
|
+
const list = (n) => (arr) => {
|
|
14
10
|
if (arr.length > n) return `
|
|
15
11
|
${arr.join(",\n ")}
|
|
16
12
|
`;
|
|
17
13
|
return arr.join(", ");
|
|
18
14
|
};
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
15
|
+
const array = (n) => (arr) => `[${list(n)(arr)}]`;
|
|
16
|
+
const id = (id2) => typeof id2 === "string" ? id2 : "null";
|
|
17
|
+
const weight = (weight2) => (id2) => `${id2}.weight(${weight2})`;
|
|
18
|
+
const stack = (stack2) => `${stack2.id} * ${stack2.n}`;
|
|
19
|
+
const ingredient = (ingredient2) => object(ingredient2) ? stack(ingredient2) : ingredient2;
|
|
20
|
+
const bonus$1 = (bonus2) => `${bonus2.id} % ${Math.round(bonus2.chance * 100)}`;
|
|
21
|
+
const cast = (cast2) => cast2 ? [
|
|
22
|
+
cast2.id,
|
|
23
|
+
!!cast2.consume
|
|
23
24
|
] : [null, false];
|
|
24
|
-
const
|
|
25
|
-
const
|
|
26
|
-
const list = args.filter((x) => x !== void 0).map((x) => {
|
|
27
|
-
if (Array.isArray(x)) return formatArray(x, 3);
|
|
28
|
-
if (x === null) return "null";
|
|
29
|
-
return x;
|
|
30
|
-
});
|
|
31
|
-
return formatList(list, 3);
|
|
32
|
-
};
|
|
33
|
-
const formatRecipeShaped = (recipe) => {
|
|
34
|
-
const r = (...arr) => {
|
|
25
|
+
const shaped = (recipe2) => {
|
|
26
|
+
const f = (...arr) => {
|
|
35
27
|
for (const x of arr) {
|
|
36
28
|
if (typeof x === "string") return x;
|
|
37
29
|
}
|
|
38
30
|
return null;
|
|
39
31
|
};
|
|
40
32
|
const matrix = [[
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
33
|
+
f(recipe2.square, recipe2.ring, recipe2.corner, recipe2[1]),
|
|
34
|
+
f(recipe2.square, recipe2.ring, recipe2.edge, recipe2[2]),
|
|
35
|
+
f(recipe2.ring, recipe2.corner, recipe2[3])
|
|
44
36
|
], [
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
37
|
+
f(recipe2.square, recipe2.ring, recipe2.edge, recipe2[4]),
|
|
38
|
+
f(recipe2.square, recipe2.center, recipe2[5]),
|
|
39
|
+
f(recipe2.ring, recipe2.edge, recipe2[6])
|
|
48
40
|
], [
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
41
|
+
f(recipe2.ring, recipe2.corner, recipe2[7]),
|
|
42
|
+
f(recipe2.ring, recipe2.edge, recipe2[8]),
|
|
43
|
+
f(recipe2.ring, recipe2.corner, recipe2[9])
|
|
52
44
|
]];
|
|
53
45
|
if (matrix[0][2] === null && matrix[1][2] === null && matrix[2].every((x) => x === null)) {
|
|
54
46
|
matrix[0].splice(-1);
|
|
55
47
|
matrix[1].splice(-1);
|
|
56
48
|
matrix.splice(-1);
|
|
57
49
|
}
|
|
58
|
-
return
|
|
59
|
-
};
|
|
60
|
-
const
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
};
|
|
87
|
-
const createFormat = (type) => (tooltip) => `format.${type}(${tooltip})`;
|
|
88
|
-
const TOOLTIP_COLOR = {
|
|
89
|
-
black: createFormat("black"),
|
|
90
|
-
darkBlue: createFormat("darkBlue"),
|
|
91
|
-
darkGreen: createFormat("darkGreen"),
|
|
92
|
-
darkAqua: createFormat("darkAqua"),
|
|
93
|
-
darkRed: createFormat("darkRed"),
|
|
94
|
-
darkPurple: createFormat("darkPurple"),
|
|
95
|
-
gold: createFormat("gold"),
|
|
96
|
-
gray: createFormat("gray"),
|
|
97
|
-
darkGray: createFormat("darkGray"),
|
|
98
|
-
blue: createFormat("blue"),
|
|
99
|
-
green: createFormat("green"),
|
|
100
|
-
aqua: createFormat("aqua"),
|
|
101
|
-
red: createFormat("red"),
|
|
102
|
-
lightPurple: createFormat("lightPurple"),
|
|
103
|
-
yellow: createFormat("yellow"),
|
|
104
|
-
white: createFormat("white")
|
|
105
|
-
};
|
|
106
|
-
const TOOLTIP_STYLE = {
|
|
107
|
-
obfuscated: createFormat("obfuscated"),
|
|
108
|
-
bold: createFormat("bold"),
|
|
109
|
-
strikethrough: createFormat("strikethrough"),
|
|
110
|
-
underline: createFormat("underline"),
|
|
111
|
-
italic: createFormat("italic")
|
|
112
|
-
};
|
|
113
|
-
const formatName = (...texts) => formatLiteral(texts.map((text) => {
|
|
50
|
+
return array(2)(matrix.map((row) => array(3)(row.map(id))));
|
|
51
|
+
};
|
|
52
|
+
const COLOR = {
|
|
53
|
+
black: "\\u00A70",
|
|
54
|
+
darkBlue: "\\u00A71",
|
|
55
|
+
darkGreen: "\\u00A72",
|
|
56
|
+
darkAqua: "\\u00A73",
|
|
57
|
+
darkRed: "\\u00A74",
|
|
58
|
+
darkPurple: "\\u00A75",
|
|
59
|
+
gold: "\\u00A76",
|
|
60
|
+
gray: "\\u00A77",
|
|
61
|
+
darkGray: "\\u00A78",
|
|
62
|
+
blue: "\\u00A79",
|
|
63
|
+
green: "\\u00A7a",
|
|
64
|
+
aqua: "\\u00A7b",
|
|
65
|
+
red: "\\u00A7c",
|
|
66
|
+
lightPurple: "\\u00A7d",
|
|
67
|
+
yellow: "\\u00A7e",
|
|
68
|
+
white: "\\u00A7f"
|
|
69
|
+
};
|
|
70
|
+
const STYLE = {
|
|
71
|
+
obfuscated: "\\u00A7k",
|
|
72
|
+
bold: "\\u00A7l",
|
|
73
|
+
strikethrough: "\\u00A7m",
|
|
74
|
+
underline: "\\u00A7n",
|
|
75
|
+
italic: "\\u00A7o"
|
|
76
|
+
};
|
|
77
|
+
const name = (...texts) => literal(texts.map((text) => {
|
|
114
78
|
if (typeof text === "string") return text;
|
|
115
79
|
return [
|
|
116
|
-
text.color &&
|
|
117
|
-
text.style &&
|
|
80
|
+
text.color && COLOR[text.color],
|
|
81
|
+
text.style && STYLE[text.style],
|
|
118
82
|
text.text,
|
|
119
|
-
(text.color ?? text.style) &&
|
|
83
|
+
(text.color ?? text.style) && "\\u00A7r"
|
|
120
84
|
].filter((x) => x !== void 0).join("");
|
|
121
85
|
}).join(""));
|
|
122
|
-
const
|
|
123
|
-
if (typeof
|
|
124
|
-
let out =
|
|
125
|
-
if (
|
|
126
|
-
if (
|
|
86
|
+
const tooltip = (...tooltips) => tooltips.map((tooltip2) => {
|
|
87
|
+
if (typeof tooltip2 === "string") return literal(tooltip2);
|
|
88
|
+
let out = literal(tooltip2.text);
|
|
89
|
+
if (tooltip2.style) out = `format.${tooltip2.style}(${out})`;
|
|
90
|
+
if (tooltip2.color) out = `format.${tooltip2.color}(${out})`;
|
|
127
91
|
return out;
|
|
128
92
|
}).join(" + ");
|
|
93
|
+
const recipe = (...args) => list(3)(args.filter((x) => x !== void 0).map((x) => {
|
|
94
|
+
if (Array.isArray(x)) return array(3)(x);
|
|
95
|
+
if (x === null) return "null";
|
|
96
|
+
return x;
|
|
97
|
+
}));
|
|
129
98
|
|
|
130
|
-
const
|
|
99
|
+
const capitalise = (x) => `${x[0].toUpperCase()}${x.slice(1)}`;
|
|
131
100
|
|
|
132
101
|
const clamp = (min, max, n) => Math.max(min, Math.min(max, n));
|
|
133
102
|
|
|
134
|
-
const addGrinder = (id, recipe) => {
|
|
135
|
-
const
|
|
136
|
-
const out =
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
Math.max(1, recipe.turns),
|
|
140
|
-
recipe.bonus &&
|
|
141
|
-
recipe.bonus?.secondary &&
|
|
103
|
+
const addGrinder = (id, recipe$1) => {
|
|
104
|
+
const bonus = (bonus2) => `${bonus2.id}, ${clamp(0, 1, bonus2.chance)}`;
|
|
105
|
+
const out = recipe(
|
|
106
|
+
ingredient(recipe$1.input),
|
|
107
|
+
ingredient(id),
|
|
108
|
+
Math.max(1, recipe$1.turns),
|
|
109
|
+
recipe$1.bonus && bonus(recipe$1.bonus.primary),
|
|
110
|
+
recipe$1.bonus?.secondary && bonus(recipe$1.bonus.secondary)
|
|
142
111
|
);
|
|
143
112
|
return `mods.appeng.Grinder.addRecipe(${out});`;
|
|
144
113
|
};
|
|
145
114
|
const removeGrinder = (id) => `mods.appeng.Grinder.removeRecipe(${id});`;
|
|
146
|
-
const addInscriber = (id, recipe) => {
|
|
147
|
-
const out =
|
|
148
|
-
[recipe.center],
|
|
149
|
-
recipe.top,
|
|
150
|
-
recipe.bottom ?? null,
|
|
151
|
-
|
|
152
|
-
|
|
115
|
+
const addInscriber = (id, recipe$1) => {
|
|
116
|
+
const out = recipe(
|
|
117
|
+
[recipe$1.center],
|
|
118
|
+
recipe$1.top,
|
|
119
|
+
recipe$1.bottom ?? null,
|
|
120
|
+
ingredient(id),
|
|
121
|
+
literal(capitalise(recipe$1.type))
|
|
153
122
|
);
|
|
154
123
|
return `mods.appeng.Inscriber.addRecipe(${out});`;
|
|
155
124
|
};
|
|
156
125
|
const removeInscriber = (id) => `mods.appeng.Inscriber.removeRecipe(${id});`;
|
|
157
126
|
|
|
158
|
-
const addCompressor = (id, recipe) => {
|
|
159
|
-
const out =
|
|
127
|
+
const addCompressor = (id, recipe$1) => {
|
|
128
|
+
const out = recipe(
|
|
160
129
|
id,
|
|
161
|
-
Math.max(1, recipe.input.n),
|
|
162
|
-
recipe.input.id,
|
|
163
|
-
recipe.exact
|
|
130
|
+
Math.max(1, recipe$1.input.n),
|
|
131
|
+
recipe$1.input.id,
|
|
132
|
+
recipe$1.exact
|
|
164
133
|
);
|
|
165
134
|
return `mods.avaritia.Compressor.add(${out});`;
|
|
166
135
|
};
|
|
167
136
|
const removeCompressor = (id) => `mods.avaritia.Compressor.remove(${id});`;
|
|
168
|
-
const addExtreme = (ingredient, recipe) => {
|
|
169
|
-
const out =
|
|
170
|
-
|
|
171
|
-
recipe.map((row) =>
|
|
137
|
+
const addExtreme = (ingredient$1, recipe$1) => {
|
|
138
|
+
const out = recipe(
|
|
139
|
+
ingredient(ingredient$1),
|
|
140
|
+
recipe$1.map((row) => array(9)(row.map(id)))
|
|
172
141
|
);
|
|
173
142
|
return `mods.avaritia.ExtremeCrafting.addShaped(${out});`;
|
|
174
143
|
};
|
|
175
144
|
const removeExtreme = (id) => `mods.avaritia.ExtremeCrafting.remove(${id});`;
|
|
176
145
|
|
|
177
|
-
const createBlock = (name, recipe) => {
|
|
178
|
-
const out =
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
typeof recipe.texture === "string" ?
|
|
183
|
-
typeof recipe.creativeTab === "string" &&
|
|
184
|
-
typeof recipe.renderType === "number" ? recipe.renderType : 1,
|
|
185
|
-
recipe.drops,
|
|
186
|
-
recipe.unbreakable,
|
|
187
|
-
typeof recipe.hardness === "number" &&
|
|
188
|
-
typeof recipe.lightLevel === "number" &&
|
|
189
|
-
recipe.opacity
|
|
146
|
+
const createBlock = (name, recipe$1) => {
|
|
147
|
+
const out = recipe(
|
|
148
|
+
literal(name),
|
|
149
|
+
literal(recipe$1.id),
|
|
150
|
+
literal(recipe$1.material),
|
|
151
|
+
typeof recipe$1.texture === "string" ? literal(recipe$1.texture) : literal(recipe$1.id),
|
|
152
|
+
typeof recipe$1.creativeTab === "string" && literal(recipe$1.creativeTab),
|
|
153
|
+
typeof recipe$1.renderType === "number" ? recipe$1.renderType : 1,
|
|
154
|
+
recipe$1.drops,
|
|
155
|
+
recipe$1.unbreakable,
|
|
156
|
+
typeof recipe$1.hardness === "number" && float(recipe$1.hardness),
|
|
157
|
+
typeof recipe$1.lightLevel === "number" && float(recipe$1.lightLevel),
|
|
158
|
+
recipe$1.opacity
|
|
190
159
|
);
|
|
191
160
|
return `mods.content.Block.registerBlock(${out});`;
|
|
192
161
|
};
|
|
193
|
-
const createItem = (name, recipe) => {
|
|
194
|
-
const out =
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
typeof recipe.texture === "string" ?
|
|
198
|
-
typeof recipe.creativeTab === "string" ?
|
|
199
|
-
typeof recipe.damage === "number" ? recipe.damage : 0,
|
|
200
|
-
typeof recipe.stackSize === "number" ? recipe.stackSize : 64,
|
|
201
|
-
typeof recipe.toolType === "string" ?
|
|
202
|
-
typeof recipe.level === "number" ? recipe.level : 0,
|
|
203
|
-
!!recipe.is3d,
|
|
204
|
-
|
|
162
|
+
const createItem = (name, recipe$1) => {
|
|
163
|
+
const out = recipe(
|
|
164
|
+
literal(name),
|
|
165
|
+
literal(recipe$1.id),
|
|
166
|
+
typeof recipe$1.texture === "string" ? literal(recipe$1.texture) : literal(recipe$1.id),
|
|
167
|
+
typeof recipe$1.creativeTab === "string" ? literal(recipe$1.creativeTab) : literal("misc"),
|
|
168
|
+
typeof recipe$1.damage === "number" ? recipe$1.damage : 0,
|
|
169
|
+
typeof recipe$1.stackSize === "number" ? recipe$1.stackSize : 64,
|
|
170
|
+
typeof recipe$1.toolType === "string" ? literal(recipe$1.toolType) : literal("pickaxe"),
|
|
171
|
+
typeof recipe$1.level === "number" ? recipe$1.level : 0,
|
|
172
|
+
!!recipe$1.is3d,
|
|
173
|
+
(recipe$1.tooltip ?? []).map(literal)
|
|
205
174
|
);
|
|
206
175
|
return `mods.content.Item.registerItem(${out});`;
|
|
207
176
|
};
|
|
208
|
-
const createLiquid = (id, recipe) => {
|
|
209
|
-
const out =
|
|
210
|
-
|
|
211
|
-
recipe.density,
|
|
212
|
-
!!recipe.gaseous,
|
|
213
|
-
recipe.luminosity,
|
|
214
|
-
recipe.temperature,
|
|
215
|
-
recipe.viscosity,
|
|
216
|
-
recipe.color,
|
|
217
|
-
!!recipe.setFire,
|
|
218
|
-
typeof recipe.castingMaterial === "number" ? recipe.castingMaterial : 0,
|
|
219
|
-
typeof recipe.texture?.still === "string" ?
|
|
220
|
-
typeof recipe.texture?.flowing === "string" ?
|
|
177
|
+
const createLiquid = (id, recipe$1) => {
|
|
178
|
+
const out = recipe(
|
|
179
|
+
literal(id),
|
|
180
|
+
recipe$1.density,
|
|
181
|
+
!!recipe$1.gaseous,
|
|
182
|
+
recipe$1.luminosity,
|
|
183
|
+
recipe$1.temperature,
|
|
184
|
+
recipe$1.viscosity,
|
|
185
|
+
recipe$1.color,
|
|
186
|
+
!!recipe$1.setFire,
|
|
187
|
+
typeof recipe$1.castingMaterial === "number" ? recipe$1.castingMaterial : 0,
|
|
188
|
+
typeof recipe$1.texture?.still === "string" ? literal(recipe$1.texture.still) : null,
|
|
189
|
+
typeof recipe$1.texture?.flowing === "string" ? literal(recipe$1.texture.flowing) : null
|
|
221
190
|
);
|
|
222
191
|
return `mods.content.Fluid.registerFluid(${out});`;
|
|
223
192
|
};
|
|
224
|
-
const createMaterial = (material, recipe) => {
|
|
225
|
-
const out =
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
recipe.resource,
|
|
230
|
-
recipe.id,
|
|
231
|
-
recipe.level,
|
|
232
|
-
recipe.durability,
|
|
233
|
-
recipe.speed,
|
|
234
|
-
recipe.damage,
|
|
235
|
-
recipe.reinforced,
|
|
236
|
-
recipe.color.tool,
|
|
237
|
-
recipe.value,
|
|
238
|
-
recipe.modifier,
|
|
239
|
-
recipe.stonebound,
|
|
240
|
-
!!recipe.buildParts,
|
|
241
|
-
recipe.modifiers,
|
|
242
|
-
|
|
243
|
-
recipe.arrow.mass,
|
|
244
|
-
recipe.arrow.breakChance,
|
|
245
|
-
recipe.bow.drawSpeed,
|
|
246
|
-
recipe.bow.speed,
|
|
247
|
-
Array.isArray(recipe.nativeModifiers) &&
|
|
248
|
-
Array.isArray(recipe.nativeEnchantments) &&
|
|
193
|
+
const createMaterial = (material, recipe$1) => {
|
|
194
|
+
const out = recipe(
|
|
195
|
+
literal(material),
|
|
196
|
+
literal(recipe$1.name),
|
|
197
|
+
literal(recipe$1.color.name),
|
|
198
|
+
recipe$1.resource,
|
|
199
|
+
recipe$1.id,
|
|
200
|
+
recipe$1.level,
|
|
201
|
+
recipe$1.durability,
|
|
202
|
+
recipe$1.speed,
|
|
203
|
+
recipe$1.damage,
|
|
204
|
+
recipe$1.reinforced,
|
|
205
|
+
recipe$1.color.tool,
|
|
206
|
+
recipe$1.value,
|
|
207
|
+
recipe$1.modifier,
|
|
208
|
+
recipe$1.stonebound,
|
|
209
|
+
!!recipe$1.buildParts,
|
|
210
|
+
recipe$1.modifiers,
|
|
211
|
+
literal(recipe$1.tooltip),
|
|
212
|
+
recipe$1.arrow.mass,
|
|
213
|
+
recipe$1.arrow.breakChance,
|
|
214
|
+
recipe$1.bow.drawSpeed,
|
|
215
|
+
recipe$1.bow.speed,
|
|
216
|
+
Array.isArray(recipe$1.nativeModifiers) && array(1)([array(2)(recipe$1.nativeModifiers.map(ingredient))]),
|
|
217
|
+
Array.isArray(recipe$1.nativeEnchantments) && literal(recipe$1.nativeEnchantments.join(" "))
|
|
249
218
|
);
|
|
250
219
|
return `mods.content.Material.registerMaterial(${out});`;
|
|
251
220
|
};
|
|
252
221
|
|
|
253
|
-
const addComposter = (id, recipe) => {
|
|
254
|
-
const out =
|
|
222
|
+
const addComposter = (id, recipe$1) => {
|
|
223
|
+
const out = recipe(
|
|
255
224
|
id,
|
|
256
|
-
clamp(0, 1, recipe.n),
|
|
257
|
-
typeof recipe.color === "string" &&
|
|
225
|
+
clamp(0, 1, recipe$1.n),
|
|
226
|
+
typeof recipe$1.color === "string" && literal(recipe$1.color)
|
|
258
227
|
);
|
|
259
228
|
return `mods.exnihilo.Composting.addRecipe(${out});`;
|
|
260
229
|
};
|
|
261
230
|
const removeComposter = (id) => `mods.exnihilo.Composting.removeRecipe(${id});`;
|
|
262
231
|
const addCrucible = (liquid, id) => {
|
|
263
|
-
const out =
|
|
232
|
+
const out = recipe(id, stack(liquid));
|
|
264
233
|
return `mods.exnihilo.Crucible.addRecipe(${out});`;
|
|
265
234
|
};
|
|
266
235
|
const removeCrucible = (id) => `mods.exnihilo.Crucible.removeRecipe(${id});`;
|
|
267
236
|
const addCrucibleFuel = (id, n) => {
|
|
268
|
-
const out =
|
|
237
|
+
const out = recipe(id, n);
|
|
269
238
|
return `mods.exnihilo.Crucible.addHeatSource(${out});`;
|
|
270
239
|
};
|
|
271
240
|
const removeCrucibleFuel = (id) => `mods.exnihilo.Crucible.removeHeatSource(${id});`;
|
|
272
|
-
const addHammer = (id, recipe) => {
|
|
273
|
-
const items = Object.entries(recipe).map((entry) => ({
|
|
241
|
+
const addHammer = (id, recipe$1) => {
|
|
242
|
+
const items = Object.entries(recipe$1).map((entry) => ({
|
|
274
243
|
id: entry[0],
|
|
275
|
-
chance:
|
|
276
|
-
modifier:
|
|
244
|
+
chance: object(entry[1]) ? entry[1].n : entry[1],
|
|
245
|
+
modifier: object(entry[1]) ? entry[1].modifier : 1
|
|
277
246
|
})).flat();
|
|
278
|
-
const out =
|
|
247
|
+
const out = recipe(
|
|
279
248
|
id,
|
|
280
249
|
items.map((item) => item.id),
|
|
281
250
|
items.map((item) => item.chance),
|
|
@@ -284,155 +253,155 @@ const addHammer = (id, recipe) => {
|
|
|
284
253
|
return `mods.exnihilo.Hammer.addRecipe(${out});`;
|
|
285
254
|
};
|
|
286
255
|
const removeHammer = (id) => `mods.exnihilo.Hammer.removeRecipe(${id});`;
|
|
287
|
-
const addSieve = (id, recipe) => {
|
|
288
|
-
const items = Object.entries(recipe).map((entry) => Array.from({ length: Math.ceil(entry[1]) }).map((_, i) => ({
|
|
256
|
+
const addSieve = (id, recipe$1) => {
|
|
257
|
+
const items = Object.entries(recipe$1).map((entry) => Array.from({ length: Math.ceil(entry[1]) }).map((_, i) => ({
|
|
289
258
|
id: entry[0],
|
|
290
259
|
chance: entry[1] - i < 1 ? Math.round(1 / (entry[1] - i)) : 1
|
|
291
260
|
}))).flat();
|
|
292
|
-
const out =
|
|
261
|
+
const out = recipe(
|
|
293
262
|
id,
|
|
294
263
|
items.map((item) => item.id),
|
|
295
|
-
|
|
264
|
+
array(9)(items.map((item) => item.chance))
|
|
296
265
|
);
|
|
297
266
|
return `mods.exnihilo.Sieve.addRecipe(${out});`;
|
|
298
267
|
};
|
|
299
268
|
const removeSieve = (id) => `mods.exnihilo.Sieve.removeRecipe(${id});`;
|
|
300
269
|
|
|
301
|
-
const addQED = (ingredient, recipe) => {
|
|
302
|
-
const out =
|
|
303
|
-
|
|
304
|
-
|
|
270
|
+
const addQED = (ingredient$1, recipe$1) => {
|
|
271
|
+
const out = recipe(
|
|
272
|
+
ingredient(ingredient$1),
|
|
273
|
+
shaped(recipe$1)
|
|
305
274
|
);
|
|
306
275
|
return `mods.extraUtils.QED.addShapedRecipe(${out});`;
|
|
307
276
|
};
|
|
308
277
|
const removeQED = (id) => `mods.extraUtils.QED.removeRecipe(${id});`;
|
|
309
278
|
|
|
310
|
-
const addCarpenter = (id, recipe) => {
|
|
311
|
-
const out =
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
recipe.liquid &&
|
|
315
|
-
Math.max(1, Math.round(recipe.ticks)),
|
|
316
|
-
recipe.top
|
|
279
|
+
const addCarpenter = (id, recipe$1) => {
|
|
280
|
+
const out = recipe(
|
|
281
|
+
ingredient(id),
|
|
282
|
+
shaped(recipe$1.recipe),
|
|
283
|
+
recipe$1.liquid && stack(recipe$1.liquid),
|
|
284
|
+
Math.max(1, Math.round(recipe$1.ticks)),
|
|
285
|
+
recipe$1.top
|
|
317
286
|
);
|
|
318
287
|
return `mods.forestry.Carpenter.addRecipe(${out});`;
|
|
319
288
|
};
|
|
320
|
-
const removeCarpenter = (id, liquid) => `mods.forestry.Carpenter.removeRecipe(${
|
|
321
|
-
const addCentrifuge = (id, recipe) => {
|
|
322
|
-
const out =
|
|
323
|
-
Object.entries(recipe.out).map(([id2, chance]) =>
|
|
289
|
+
const removeCarpenter = (id, liquid) => `mods.forestry.Carpenter.removeRecipe(${recipe(id, liquid)});`;
|
|
290
|
+
const addCentrifuge = (id, recipe$1) => {
|
|
291
|
+
const out = recipe(
|
|
292
|
+
Object.entries(recipe$1.out).map(([id2, chance]) => bonus$1({ id: id2, chance })),
|
|
324
293
|
id,
|
|
325
|
-
recipe.ticks
|
|
294
|
+
recipe$1.ticks
|
|
326
295
|
);
|
|
327
296
|
return `mods.forestry.Centrifuge.addRecipe(${out});`;
|
|
328
297
|
};
|
|
329
298
|
const removeCentrifuge = (id) => `mods.forestry.Centrifuge.removeRecipe(${id});`;
|
|
330
|
-
const addFermenter = (liquid, recipe) => {
|
|
331
|
-
const out =
|
|
299
|
+
const addFermenter = (liquid, recipe$1) => {
|
|
300
|
+
const out = recipe(
|
|
332
301
|
liquid.id,
|
|
333
|
-
recipe.catalyst,
|
|
334
|
-
recipe.liquid.id,
|
|
335
|
-
recipe.liquid.n,
|
|
336
|
-
liquid.n / recipe.liquid.n
|
|
302
|
+
recipe$1.catalyst,
|
|
303
|
+
recipe$1.liquid.id,
|
|
304
|
+
recipe$1.liquid.n,
|
|
305
|
+
liquid.n / recipe$1.liquid.n
|
|
337
306
|
);
|
|
338
307
|
return `mods.forestry.Fermenter.addRecipe(${out});`;
|
|
339
308
|
};
|
|
340
309
|
const removeFermenter = (id) => `mods.forestry.Fermenter.removeRecipe(${id});`;
|
|
341
|
-
const addFermenterFuel = (id, recipe) => {
|
|
342
|
-
const out =
|
|
310
|
+
const addFermenterFuel = (id, recipe$1) => {
|
|
311
|
+
const out = recipe(
|
|
343
312
|
id,
|
|
344
|
-
recipe.cycles,
|
|
345
|
-
recipe.burn
|
|
313
|
+
recipe$1.cycles,
|
|
314
|
+
recipe$1.burn
|
|
346
315
|
);
|
|
347
316
|
return `mods.forestry.Fermenter.addFuel(${out});`;
|
|
348
317
|
};
|
|
349
318
|
const removeFermenterFuel = (id) => `mods.forestry.Fermenter.removeFuel(${id});`;
|
|
350
|
-
const addMoistener = (id, recipe) => {
|
|
351
|
-
const out =
|
|
319
|
+
const addMoistener = (id, recipe$1) => {
|
|
320
|
+
const out = recipe(
|
|
352
321
|
id,
|
|
353
|
-
recipe.input,
|
|
354
|
-
recipe.ticks
|
|
322
|
+
recipe$1.input,
|
|
323
|
+
recipe$1.ticks
|
|
355
324
|
);
|
|
356
325
|
return `mods.forestry.Moistener.addRecipe(${out});`;
|
|
357
326
|
};
|
|
358
327
|
const removeMoistener = (id) => `mods.forestry.Moistener.removeRecipe(${id});`;
|
|
359
|
-
const addSqueezer = (liquid, recipe) => {
|
|
360
|
-
const out =
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
recipe.input.map(
|
|
364
|
-
recipe.ticks
|
|
328
|
+
const addSqueezer = (liquid, recipe$1) => {
|
|
329
|
+
const out = recipe(
|
|
330
|
+
stack(liquid),
|
|
331
|
+
bonus$1(recipe$1.bonus),
|
|
332
|
+
recipe$1.input.map(ingredient),
|
|
333
|
+
recipe$1.ticks
|
|
365
334
|
);
|
|
366
335
|
return `mods.forestry.Squeezer.addRecipe(${out});`;
|
|
367
336
|
};
|
|
368
|
-
const removeSqueezer = (id, recipe) => `mods.forestry.Squeezer.removeRecipe(${
|
|
369
|
-
const addStill = (liquid, recipe) => {
|
|
370
|
-
const out =
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
recipe.ticks
|
|
337
|
+
const removeSqueezer = (id, recipe$1) => `mods.forestry.Squeezer.removeRecipe(${recipe(id, recipe$1)});`;
|
|
338
|
+
const addStill = (liquid, recipe$1) => {
|
|
339
|
+
const out = recipe(
|
|
340
|
+
stack(liquid),
|
|
341
|
+
stack(recipe$1.liquid),
|
|
342
|
+
recipe$1.ticks
|
|
374
343
|
);
|
|
375
344
|
return `mods.forestry.Still.addRecipe(${out});`;
|
|
376
345
|
};
|
|
377
|
-
const removeStill = (liquid, recipe) => `mods.forestry.Still.removeRecipe(${
|
|
378
|
-
const addFabricator = (id, recipe) => {
|
|
379
|
-
const out =
|
|
346
|
+
const removeStill = (liquid, recipe$1) => `mods.forestry.Still.removeRecipe(${recipe(liquid, recipe$1)});`;
|
|
347
|
+
const addFabricator = (id, recipe$1) => {
|
|
348
|
+
const out = recipe(
|
|
380
349
|
id,
|
|
381
|
-
|
|
382
|
-
recipe.n,
|
|
383
|
-
recipe.cast
|
|
350
|
+
shaped(recipe$1.recipe),
|
|
351
|
+
recipe$1.n,
|
|
352
|
+
recipe$1.cast
|
|
384
353
|
);
|
|
385
354
|
return `mods.forestry.ThermionicFabricator.addCast(${out});`;
|
|
386
355
|
};
|
|
387
356
|
const removeFabricator = (id) => `mods.forestry.ThermionicFabricator.removeCast(${id});`;
|
|
388
|
-
const addFabricatorGlass = (id, recipe) => {
|
|
389
|
-
const out =
|
|
390
|
-
recipe.n,
|
|
357
|
+
const addFabricatorGlass = (id, recipe$1) => {
|
|
358
|
+
const out = recipe(
|
|
359
|
+
recipe$1.n,
|
|
391
360
|
id,
|
|
392
|
-
recipe.temp
|
|
361
|
+
recipe$1.temp
|
|
393
362
|
);
|
|
394
363
|
return `mods.forestry.ThermionicFabricator.addSmelting(${out});`;
|
|
395
364
|
};
|
|
396
365
|
const removeFabricatorGlass = (id) => `mods.forestry.ThermionicFabricator.removeSmelting(${id});`;
|
|
397
366
|
|
|
398
|
-
const addChestLoot = (id, recipe) => {
|
|
399
|
-
const out =
|
|
400
|
-
|
|
367
|
+
const addChestLoot = (id, recipe$1) => {
|
|
368
|
+
const out = recipe(
|
|
369
|
+
literal(recipe$1.chest),
|
|
401
370
|
id,
|
|
402
|
-
recipe.chance,
|
|
403
|
-
recipe.n
|
|
371
|
+
recipe$1.chance,
|
|
372
|
+
recipe$1.n
|
|
404
373
|
);
|
|
405
374
|
return `vanilla.loot.addChestLoot(${out});`;
|
|
406
375
|
};
|
|
407
|
-
const removeChestLoot = (id, chest) => `vanilla.loot.removeChestLoot(${
|
|
376
|
+
const removeChestLoot = (id, chest) => `vanilla.loot.removeChestLoot(${recipe(literal(chest), id)});`;
|
|
408
377
|
const addSeed = (id) => `vanilla.seeds.addSeed(${id});`;
|
|
409
378
|
const removeSeed = (id) => `vanilla.seeds.removeSeed(${id});`;
|
|
410
379
|
|
|
411
|
-
const addShaped = (item, recipe) => {
|
|
412
|
-
const out =
|
|
413
|
-
|
|
414
|
-
|
|
380
|
+
const addShaped = (item, recipe$1) => {
|
|
381
|
+
const out = recipe(
|
|
382
|
+
ingredient(item),
|
|
383
|
+
shaped(recipe$1)
|
|
415
384
|
);
|
|
416
385
|
return `recipes.addShaped(${out});`;
|
|
417
386
|
};
|
|
418
|
-
const removeShaped = (id, recipe) => {
|
|
419
|
-
const out =
|
|
387
|
+
const removeShaped = (id, recipe$1) => {
|
|
388
|
+
const out = recipe(
|
|
420
389
|
id,
|
|
421
|
-
recipe &&
|
|
390
|
+
recipe$1 && shaped(recipe$1)
|
|
422
391
|
);
|
|
423
392
|
return `recipes.removeShaped(${out});`;
|
|
424
393
|
};
|
|
425
|
-
const addShapeless = (item, recipe) => {
|
|
426
|
-
const out =
|
|
427
|
-
|
|
428
|
-
|
|
394
|
+
const addShapeless = (item, recipe$1) => {
|
|
395
|
+
const out = recipe(
|
|
396
|
+
ingredient(item),
|
|
397
|
+
array(3)(recipe$1)
|
|
429
398
|
);
|
|
430
399
|
return `recipes.addShapeless(${out});`;
|
|
431
400
|
};
|
|
432
|
-
const removeShapeless = (id, recipe) => {
|
|
433
|
-
const out =
|
|
401
|
+
const removeShapeless = (id, recipe$1) => {
|
|
402
|
+
const out = recipe(
|
|
434
403
|
id,
|
|
435
|
-
recipe &&
|
|
404
|
+
recipe$1 && array(3)(recipe$1)
|
|
436
405
|
);
|
|
437
406
|
return `recipes.removeShapeless(${out});`;
|
|
438
407
|
};
|
|
@@ -441,23 +410,23 @@ const add = (item, recipe) => {
|
|
|
441
410
|
return addShaped(item, recipe);
|
|
442
411
|
};
|
|
443
412
|
const remove = (id) => `recipes.remove(${id});`;
|
|
444
|
-
const addMirror = (item, recipe) => {
|
|
445
|
-
const out =
|
|
446
|
-
|
|
447
|
-
|
|
413
|
+
const addMirror = (item, recipe$1) => {
|
|
414
|
+
const out = recipe(
|
|
415
|
+
ingredient(item),
|
|
416
|
+
shaped(recipe$1)
|
|
448
417
|
);
|
|
449
418
|
return `recipes.addShapedMirrored(${out});`;
|
|
450
419
|
};
|
|
451
|
-
const addFurnace = (id, recipe) => `furnace.addRecipe(${
|
|
452
|
-
const removeFurnace = (id, recipe) => {
|
|
453
|
-
if (typeof recipe === "string") return `furnace.remove(${
|
|
454
|
-
return `furnace.remove(${
|
|
420
|
+
const addFurnace = (id, recipe$1) => `furnace.addRecipe(${recipe(id, recipe$1.input, recipe$1.xp)});`;
|
|
421
|
+
const removeFurnace = (id, recipe$1) => {
|
|
422
|
+
if (typeof recipe$1 === "string") return `furnace.remove(${recipe(id, recipe$1)});`;
|
|
423
|
+
return `furnace.remove(${recipe(id)});`;
|
|
455
424
|
};
|
|
456
|
-
const addFurnaceFuel = (id, n) => `furnace.setFuel(${
|
|
425
|
+
const addFurnaceFuel = (id, n) => `furnace.setFuel(${recipe(id, n)});`;
|
|
457
426
|
const removeFurnaceFuel = (id) => addFurnaceFuel(id, 0);
|
|
458
427
|
|
|
459
|
-
const addBlacklistAutospawner = (id) => `mods.mfr.AutoSpawner.addBlacklist(${
|
|
460
|
-
const removeBlacklistAutospawner = (id) => `mods.mfr.AutoSpawner.removeBlacklist(${
|
|
428
|
+
const addBlacklistAutospawner = (id) => `mods.mfr.AutoSpawner.addBlacklist(${literal(id)});`;
|
|
429
|
+
const removeBlacklistAutospawner = (id) => `mods.mfr.AutoSpawner.removeBlacklist(${literal(id)});`;
|
|
461
430
|
const HARVESTER_TYPE = {
|
|
462
431
|
tree: "tree",
|
|
463
432
|
leaf: "treeLeaf",
|
|
@@ -465,23 +434,23 @@ const HARVESTER_TYPE = {
|
|
|
465
434
|
column: "column",
|
|
466
435
|
treeInverse: "treeFlipped"
|
|
467
436
|
};
|
|
468
|
-
const addHarvester = (id, recipe) => {
|
|
469
|
-
const out =
|
|
437
|
+
const addHarvester = (id, recipe$1) => {
|
|
438
|
+
const out = recipe(
|
|
470
439
|
id,
|
|
471
|
-
recipe.bonus &&
|
|
440
|
+
recipe$1.bonus && array(3)(recipe$1.bonus.map((x) => {
|
|
472
441
|
if (typeof x === "string") return x;
|
|
473
|
-
if ("n" in x) return
|
|
474
|
-
return
|
|
475
|
-
})
|
|
476
|
-
|
|
442
|
+
if ("n" in x) return stack(x);
|
|
443
|
+
return bonus$1(x);
|
|
444
|
+
})),
|
|
445
|
+
literal(HARVESTER_TYPE[recipe$1.type])
|
|
477
446
|
);
|
|
478
447
|
return `mods.mfr.Harvester.addHarvestable(${out});`;
|
|
479
448
|
};
|
|
480
|
-
const addLaserOre = (id, weight) => {
|
|
481
|
-
const out =
|
|
449
|
+
const addLaserOre = (id, weight$1) => {
|
|
450
|
+
const out = recipe(weight(weight$1)(id));
|
|
482
451
|
return `mods.mfr.MiningLaser.addOre(${out});`;
|
|
483
452
|
};
|
|
484
|
-
const removeLaserOre = (id) => `mods.mfr.MiningLaser.removeOre(${
|
|
453
|
+
const removeLaserOre = (id) => `mods.mfr.MiningLaser.removeOre(${recipe(id)});`;
|
|
485
454
|
const FOCI = {
|
|
486
455
|
white: 0,
|
|
487
456
|
orange: 1,
|
|
@@ -500,31 +469,31 @@ const FOCI = {
|
|
|
500
469
|
red: 14,
|
|
501
470
|
black: 15
|
|
502
471
|
};
|
|
503
|
-
const addLaserFoci = (id, foci) => `mods.mfr.MiningLaser.addPreferredOre(${
|
|
504
|
-
const removeLaserFoci = (id, foci) => `mods.mfr.MiningLaser.removePreferredOre(${
|
|
472
|
+
const addLaserFoci = (id, foci) => `mods.mfr.MiningLaser.addPreferredOre(${recipe(FOCI[foci], id)});`;
|
|
473
|
+
const removeLaserFoci = (id, foci) => `mods.mfr.MiningLaser.removePreferredOre(${recipe(FOCI[foci], id)});`;
|
|
505
474
|
const addLaser = (id, recipe) => [
|
|
506
475
|
addLaserOre(id, recipe.weight),
|
|
507
476
|
addLaserFoci(id, recipe.foci)
|
|
508
477
|
].join("\n");
|
|
509
478
|
const addPlanter = (id) => `mods.mfr.Planter.addPlantable(${id});`;
|
|
510
|
-
const addBiomeRubberTree = (id) => `mods.mfr.RubberTree.addBiome(${
|
|
511
|
-
const removeBiomeRubberTree = (id) => `mods.mfr.RubberTree.removeBiome(${
|
|
512
|
-
const addSludgeBoiler = (id, weight) => {
|
|
513
|
-
const out =
|
|
479
|
+
const addBiomeRubberTree = (id) => `mods.mfr.RubberTree.addBiome(${recipe(literal(id))});`;
|
|
480
|
+
const removeBiomeRubberTree = (id) => `mods.mfr.RubberTree.removeBiome(${recipe(literal(id))});`;
|
|
481
|
+
const addSludgeBoiler = (id, weight$1) => {
|
|
482
|
+
const out = recipe(weight(weight$1)(id));
|
|
514
483
|
return `mods.mfr.SludgeBoiler.addDrop(${out});`;
|
|
515
484
|
};
|
|
516
|
-
const removeSludgeBoiler = (id) => `mods.mfr.SludgeBoiler.removeDrop(${
|
|
485
|
+
const removeSludgeBoiler = (id) => `mods.mfr.SludgeBoiler.removeDrop(${recipe(id)});`;
|
|
517
486
|
|
|
518
487
|
const hide = (id) => `mods.nei.NEI.hide(${id});`;
|
|
519
488
|
const show = (id) => `mods.nei.NEI.addEntry(${id});`;
|
|
520
|
-
const rename = (id, name) => `mods.nei.NEI.overrideName(${
|
|
489
|
+
const rename = (id, name) => `mods.nei.NEI.overrideName(${recipe(id, literal(name))});`;
|
|
521
490
|
|
|
522
491
|
const addOreDict = (dict) => (id) => `${dict}.add(${id});`;
|
|
523
492
|
const removeOreDict = (dict) => (id) => `${dict}.remove(${id});`;
|
|
524
493
|
const joinOreDict = (a, b) => `${a}.addAll(${b});`;
|
|
525
494
|
const mirrorOreDict = (a, b) => `${a}.mirror(${b});`;
|
|
526
495
|
|
|
527
|
-
const withName = (name) => (id) => `${id}.displayName = ${
|
|
496
|
+
const withName = (name$1) => (id) => `${id}.displayName = ${name(name$1)};`;
|
|
528
497
|
const withTag = (tag) => (id) => {
|
|
529
498
|
return `${id}.withTag(${util.inspect(tag).replace(/(:\s?)'([^']+)'/gm, '$1"$2"')})`;
|
|
530
499
|
};
|
|
@@ -553,119 +522,119 @@ const ENCHANTMENTS = {
|
|
|
553
522
|
infinity: 51
|
|
554
523
|
};
|
|
555
524
|
const withEnchantment = (...enchantments) => withTag({ ench: enchantments });
|
|
556
|
-
const withTooltip = (...tooltip) => (id) => `${id}.addTooltip(${
|
|
557
|
-
const withTooltipShift = (...tooltip) => (id) => `${id}.addShiftTooltip(${
|
|
525
|
+
const withTooltip = (...tooltip$1) => (id) => `${id}.addTooltip(${tooltip(...tooltip$1)});`;
|
|
526
|
+
const withTooltipShift = (...tooltip$1) => (id) => `${id}.addShiftTooltip(${tooltip(...tooltip$1)});`;
|
|
558
527
|
|
|
559
|
-
const
|
|
560
|
-
|
|
561
|
-
Math.round(
|
|
528
|
+
const bonus = (bonus2) => bonus2 ? [
|
|
529
|
+
bonus2.id,
|
|
530
|
+
Math.round(bonus2.chance * 100)
|
|
562
531
|
] : [];
|
|
563
|
-
const addMagmaCrucible = (liquid, recipe) => {
|
|
564
|
-
const out =
|
|
565
|
-
recipe.rf,
|
|
566
|
-
recipe.input,
|
|
567
|
-
|
|
532
|
+
const addMagmaCrucible = (liquid, recipe$1) => {
|
|
533
|
+
const out = recipe(
|
|
534
|
+
recipe$1.rf,
|
|
535
|
+
recipe$1.input,
|
|
536
|
+
stack(liquid)
|
|
568
537
|
);
|
|
569
538
|
return `mods.thermalexpansion.Crucible.addRecipe(${out});`;
|
|
570
539
|
};
|
|
571
540
|
const removeMagmaCrucible = (id) => `mods.thermalexpansion.Crucible.removeRecipe(${id});`;
|
|
572
|
-
const addRedstoneFurnace = (item, recipe) => {
|
|
573
|
-
const out =
|
|
574
|
-
recipe.rf,
|
|
575
|
-
recipe.input,
|
|
576
|
-
|
|
541
|
+
const addRedstoneFurnace = (item, recipe$1) => {
|
|
542
|
+
const out = recipe(
|
|
543
|
+
recipe$1.rf,
|
|
544
|
+
recipe$1.input,
|
|
545
|
+
ingredient(item)
|
|
577
546
|
);
|
|
578
547
|
return `mods.thermalexpansion.Furnace.addRecipe(${out});`;
|
|
579
548
|
};
|
|
580
549
|
const removeRedstoneFurnace = (id) => `mods.thermalexpansion.Furnace.removeRecipe(${id});`;
|
|
581
|
-
const addInsolator = (item, recipe) => {
|
|
582
|
-
const out =
|
|
583
|
-
recipe.rf,
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
...
|
|
550
|
+
const addInsolator = (item, recipe$1) => {
|
|
551
|
+
const out = recipe(
|
|
552
|
+
recipe$1.rf,
|
|
553
|
+
ingredient(recipe$1.input.left),
|
|
554
|
+
ingredient(recipe$1.input.right),
|
|
555
|
+
ingredient(item),
|
|
556
|
+
...bonus(recipe$1.bonus)
|
|
588
557
|
);
|
|
589
558
|
return `mods.thermalexpansion.Insolator.addRecipe(${out});`;
|
|
590
559
|
};
|
|
591
|
-
const removeInsolator = (input) => `mods.thermalexpansion.Insolator.removeRecipe(${
|
|
592
|
-
const addPulverizer = (item, recipe) => {
|
|
593
|
-
const out =
|
|
594
|
-
recipe.rf,
|
|
595
|
-
recipe.input,
|
|
596
|
-
|
|
597
|
-
...
|
|
560
|
+
const removeInsolator = (input) => `mods.thermalexpansion.Insolator.removeRecipe(${recipe(input.left, input.right)});`;
|
|
561
|
+
const addPulverizer = (item, recipe$1) => {
|
|
562
|
+
const out = recipe(
|
|
563
|
+
recipe$1.rf,
|
|
564
|
+
recipe$1.input,
|
|
565
|
+
ingredient(item),
|
|
566
|
+
...bonus(recipe$1.bonus)
|
|
598
567
|
);
|
|
599
568
|
return `mods.thermalexpansion.Pulverizer.addRecipe(${out});`;
|
|
600
569
|
};
|
|
601
570
|
const removePulverizer = (id) => `mods.thermalexpansion.Pulverizer.removeRecipe(${id});`;
|
|
602
|
-
const addSawmill = (item, recipe) => {
|
|
603
|
-
const out =
|
|
604
|
-
recipe.rf,
|
|
605
|
-
recipe.input,
|
|
606
|
-
|
|
607
|
-
...
|
|
571
|
+
const addSawmill = (item, recipe$1) => {
|
|
572
|
+
const out = recipe(
|
|
573
|
+
recipe$1.rf,
|
|
574
|
+
recipe$1.input,
|
|
575
|
+
ingredient(item),
|
|
576
|
+
...bonus(recipe$1.bonus)
|
|
608
577
|
);
|
|
609
578
|
return `mods.thermalexpansion.Sawmill.addRecipe(${out});`;
|
|
610
579
|
};
|
|
611
580
|
const removeSawmill = (id) => `mods.thermalexpansion.Sawmill.removeRecipe(${id});`;
|
|
612
|
-
const addInductionSmelter = (item, recipe) => {
|
|
613
|
-
const out =
|
|
614
|
-
recipe.rf,
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
...
|
|
581
|
+
const addInductionSmelter = (item, recipe$1) => {
|
|
582
|
+
const out = recipe(
|
|
583
|
+
recipe$1.rf,
|
|
584
|
+
ingredient(recipe$1.input[1]),
|
|
585
|
+
ingredient(recipe$1.input[0]),
|
|
586
|
+
ingredient(item),
|
|
587
|
+
...bonus(recipe$1.bonus)
|
|
619
588
|
);
|
|
620
589
|
return `mods.thermalexpansion.Smelter.addRecipe(${out});`;
|
|
621
590
|
};
|
|
622
|
-
const removeInductionSmelter = (input) => `mods.thermalexpansion.Smelter.removeRecipe(${
|
|
623
|
-
const addTransposerFill = (item, recipe) => {
|
|
624
|
-
const out =
|
|
625
|
-
recipe.rf,
|
|
626
|
-
recipe.input,
|
|
627
|
-
|
|
628
|
-
|
|
591
|
+
const removeInductionSmelter = (input) => `mods.thermalexpansion.Smelter.removeRecipe(${recipe(input.left, input.right)});`;
|
|
592
|
+
const addTransposerFill = (item, recipe$1) => {
|
|
593
|
+
const out = recipe(
|
|
594
|
+
recipe$1.rf,
|
|
595
|
+
recipe$1.input,
|
|
596
|
+
ingredient(item),
|
|
597
|
+
stack(recipe$1.liquid)
|
|
629
598
|
);
|
|
630
599
|
return `mods.thermalexpansion.Transposer.addFillRecipe(${out});`;
|
|
631
600
|
};
|
|
632
|
-
const removeTransposerFill = (input) => `mods.thermalexpansion.Transposer.removeFillRecipe(${
|
|
633
|
-
const addTransposerExtract = (liquid, recipe) => {
|
|
634
|
-
const out =
|
|
635
|
-
recipe.rf,
|
|
636
|
-
recipe.input,
|
|
637
|
-
|
|
638
|
-
...
|
|
601
|
+
const removeTransposerFill = (input) => `mods.thermalexpansion.Transposer.removeFillRecipe(${recipe(input.id, input.liquid)});`;
|
|
602
|
+
const addTransposerExtract = (liquid, recipe$1) => {
|
|
603
|
+
const out = recipe(
|
|
604
|
+
recipe$1.rf,
|
|
605
|
+
recipe$1.input,
|
|
606
|
+
stack(liquid),
|
|
607
|
+
...bonus(recipe$1.bonus)
|
|
639
608
|
);
|
|
640
609
|
return `mods.thermalexpansion.Transposer.addExtractRecipe(${out});`;
|
|
641
610
|
};
|
|
642
611
|
const removeTransposerExtract = (id) => `mods.thermalexpansion.Transposer.removeExtractRecipe(${id});`;
|
|
643
612
|
|
|
644
|
-
const addCastingBasin = (id, recipe) => {
|
|
645
|
-
const out =
|
|
613
|
+
const addCastingBasin = (id, recipe$1) => {
|
|
614
|
+
const out = recipe(
|
|
646
615
|
id,
|
|
647
|
-
|
|
648
|
-
...
|
|
649
|
-
recipe.ticks
|
|
616
|
+
stack(recipe$1.liquid),
|
|
617
|
+
...cast(recipe$1.cast),
|
|
618
|
+
recipe$1.ticks
|
|
650
619
|
);
|
|
651
620
|
return `mods.tconstruct.Casting.addBasinRecipe(${out});`;
|
|
652
621
|
};
|
|
653
622
|
const removeCastingBasin = (id) => `mods.tconstruct.Casting.removeBasinRecipe(${id});`;
|
|
654
|
-
const addCastingTable = (id, recipe) => {
|
|
655
|
-
const out =
|
|
623
|
+
const addCastingTable = (id, recipe$1) => {
|
|
624
|
+
const out = recipe(
|
|
656
625
|
id,
|
|
657
|
-
|
|
658
|
-
...
|
|
659
|
-
recipe.ticks
|
|
626
|
+
stack(recipe$1.liquid),
|
|
627
|
+
...cast(recipe$1.cast),
|
|
628
|
+
recipe$1.ticks
|
|
660
629
|
);
|
|
661
630
|
return `mods.tconstruct.Casting.addTableRecipe(${out});`;
|
|
662
631
|
};
|
|
663
632
|
const removeCastingTable = (id) => `mods.tconstruct.Casting.removeTableRecipe(${id});`;
|
|
664
|
-
const addDryingRack = (id, recipe) => {
|
|
665
|
-
const out =
|
|
666
|
-
recipe.input,
|
|
633
|
+
const addDryingRack = (id, recipe$1) => {
|
|
634
|
+
const out = recipe(
|
|
635
|
+
recipe$1.input,
|
|
667
636
|
id,
|
|
668
|
-
recipe.ticks
|
|
637
|
+
recipe$1.ticks
|
|
669
638
|
);
|
|
670
639
|
return `mods.tconstruct.Drying.addRecipe(${out});`;
|
|
671
640
|
};
|
|
@@ -689,30 +658,30 @@ const MODIFIERS = {
|
|
|
689
658
|
baneOfAnthropods: "ModAntiSpider",
|
|
690
659
|
flux: "Flux"
|
|
691
660
|
};
|
|
692
|
-
const removeModifier = (id) => `mods.tconstruct.Modifiers.remove(${
|
|
693
|
-
const addSmelteryFluid = (liquid, recipe) => {
|
|
694
|
-
const out =
|
|
695
|
-
recipe.input,
|
|
696
|
-
|
|
697
|
-
recipe.temperature,
|
|
698
|
-
recipe.render
|
|
661
|
+
const removeModifier = (id) => `mods.tconstruct.Modifiers.remove(${literal(id)});`;
|
|
662
|
+
const addSmelteryFluid = (liquid, recipe$1) => {
|
|
663
|
+
const out = recipe(
|
|
664
|
+
recipe$1.input,
|
|
665
|
+
stack(liquid),
|
|
666
|
+
recipe$1.temperature,
|
|
667
|
+
recipe$1.render
|
|
699
668
|
);
|
|
700
669
|
return `mods.tconstruct.Smeltery.addMelting(${out});`;
|
|
701
670
|
};
|
|
702
671
|
const removeSmelteryFluid = (id) => `mods.tconstruct.Smeltery.removeMelting(${id});`;
|
|
703
|
-
const addSmelteryAlloy = (alloy, recipe) => {
|
|
704
|
-
const out =
|
|
705
|
-
|
|
706
|
-
recipe.map(
|
|
672
|
+
const addSmelteryAlloy = (alloy, recipe$1) => {
|
|
673
|
+
const out = recipe(
|
|
674
|
+
stack(alloy),
|
|
675
|
+
recipe$1.map(stack)
|
|
707
676
|
);
|
|
708
677
|
return `mods.tconstruct.Smeltery.addAlloy(${out});`;
|
|
709
678
|
};
|
|
710
679
|
const removeSmelteryAlloy = (id) => `mods.tconstruct.Smeltery.removeAlloy(${id});`;
|
|
711
|
-
const addSmelteryFuel = (id, recipe) => {
|
|
712
|
-
const out =
|
|
680
|
+
const addSmelteryFuel = (id, recipe$1) => {
|
|
681
|
+
const out = recipe(
|
|
713
682
|
id,
|
|
714
|
-
recipe.temperature,
|
|
715
|
-
recipe.ticks
|
|
683
|
+
recipe$1.temperature,
|
|
684
|
+
recipe$1.ticks
|
|
716
685
|
);
|
|
717
686
|
return `mods.tconstruct.Smeltery.addFuel(${out});`;
|
|
718
687
|
};
|
|
@@ -747,137 +716,141 @@ const MATERIALS = {
|
|
|
747
716
|
bedrock: "Bedrockium",
|
|
748
717
|
unstable: "Unstable Induced"
|
|
749
718
|
};
|
|
750
|
-
const addRepairMaterial = (id, recipe) => {
|
|
751
|
-
const out =
|
|
719
|
+
const addRepairMaterial = (id, recipe$1) => {
|
|
720
|
+
const out = recipe(
|
|
752
721
|
id,
|
|
753
|
-
|
|
754
|
-
recipe.n
|
|
722
|
+
literal(recipe$1.material),
|
|
723
|
+
recipe$1.n
|
|
755
724
|
);
|
|
756
725
|
return `mods.tconstruct.Tweaks.addRepairMaterial(${out});`;
|
|
757
726
|
};
|
|
758
727
|
const removeRepairMaterial = (id, material) => {
|
|
759
|
-
const out =
|
|
728
|
+
const out = recipe(
|
|
760
729
|
id,
|
|
761
|
-
typeof material === "string" &&
|
|
730
|
+
typeof material === "string" && literal(material)
|
|
762
731
|
);
|
|
763
732
|
return `mods.tconstruct.Tweaks.removeRepairMaterial(${out});`;
|
|
764
733
|
};
|
|
765
|
-
const setMaterialStats = (material, recipe) => {
|
|
766
|
-
const out =
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
recipe.level,
|
|
770
|
-
recipe.durability,
|
|
771
|
-
recipe.speed * 100,
|
|
772
|
-
recipe.damage,
|
|
773
|
-
recipe.modifier,
|
|
774
|
-
typeof recipe.reinforced === "number" ? recipe.reinforced : 0,
|
|
775
|
-
typeof recipe.stonebound === "number" ? recipe.stonebound : 0,
|
|
776
|
-
|
|
777
|
-
recipe.color.tool
|
|
734
|
+
const setMaterialStats = (material, recipe$1) => {
|
|
735
|
+
const out = recipe(
|
|
736
|
+
literal(material),
|
|
737
|
+
literal(recipe$1.name),
|
|
738
|
+
recipe$1.level,
|
|
739
|
+
recipe$1.durability,
|
|
740
|
+
recipe$1.speed * 100,
|
|
741
|
+
recipe$1.damage,
|
|
742
|
+
recipe$1.modifier,
|
|
743
|
+
typeof recipe$1.reinforced === "number" ? recipe$1.reinforced : 0,
|
|
744
|
+
typeof recipe$1.stonebound === "number" ? recipe$1.stonebound : 0,
|
|
745
|
+
literal(recipe$1.color.name),
|
|
746
|
+
recipe$1.color.tool
|
|
778
747
|
);
|
|
779
748
|
return `mods.tconstruct.ToolStats.setStats(${out});`;
|
|
780
749
|
};
|
|
781
750
|
const setMaterialName = (material, name) => {
|
|
782
|
-
const out =
|
|
783
|
-
|
|
784
|
-
|
|
751
|
+
const out = recipe(
|
|
752
|
+
literal(material),
|
|
753
|
+
literal(name)
|
|
785
754
|
);
|
|
786
755
|
return `mods.tconstruct.ToolStats.setDisplayName(${out});`;
|
|
787
756
|
};
|
|
788
757
|
const setMaterialMiningLevel = (material, n) => {
|
|
789
|
-
const out =
|
|
758
|
+
const out = recipe(literal(material), n);
|
|
790
759
|
return `mods.tconstruct.ToolStats.setHarvestLevel(${out});`;
|
|
791
760
|
};
|
|
792
761
|
const setMaterialDurability = (material, n) => {
|
|
793
|
-
const out =
|
|
762
|
+
const out = recipe(literal(material), n);
|
|
794
763
|
return `mods.tconstruct.ToolStats.setDurability(${out});`;
|
|
795
764
|
};
|
|
796
765
|
const setMaterialSpeed = (material, n) => {
|
|
797
|
-
const out =
|
|
766
|
+
const out = recipe(literal(material), n * 100);
|
|
798
767
|
return `mods.tconstruct.ToolStats.setSpeed(${out});`;
|
|
799
768
|
};
|
|
800
769
|
const setMaterialDamage = (material, n) => {
|
|
801
|
-
const out =
|
|
770
|
+
const out = recipe(literal(material), n);
|
|
802
771
|
return `mods.tconstruct.ToolStats.setDamage(${out});`;
|
|
803
772
|
};
|
|
804
773
|
const setMaterialHandleModifier = (material, n) => {
|
|
805
|
-
const out =
|
|
774
|
+
const out = recipe(literal(material), n);
|
|
806
775
|
return `mods.tconstruct.ToolStats.setHandleModifier(${out});`;
|
|
807
776
|
};
|
|
808
777
|
const setMaterialReinforcedLevel = (material, n) => {
|
|
809
|
-
const out =
|
|
778
|
+
const out = recipe(literal(material), n);
|
|
810
779
|
return `mods.tconstruct.ToolStats.setReinforcedLevel(${out});`;
|
|
811
780
|
};
|
|
812
781
|
const setMaterialLevelStonebound = (material, n) => {
|
|
813
|
-
const out =
|
|
782
|
+
const out = recipe(literal(material), n);
|
|
814
783
|
return `mods.tconstruct.ToolStats.setStoneboundLevel(${out});`;
|
|
815
784
|
};
|
|
816
785
|
const setMaterialStyle = (material, style) => {
|
|
817
|
-
const out =
|
|
818
|
-
|
|
819
|
-
|
|
786
|
+
const out = recipe(
|
|
787
|
+
literal(material),
|
|
788
|
+
literal(style)
|
|
820
789
|
);
|
|
821
790
|
return `mods.tconstruct.ToolStats.setStyle(${out});`;
|
|
822
791
|
};
|
|
823
|
-
const setBowMaterialStats = (material, recipe) => {
|
|
824
|
-
const out =
|
|
825
|
-
|
|
826
|
-
recipe.durability,
|
|
827
|
-
recipe.drawSpeed,
|
|
828
|
-
|
|
792
|
+
const setBowMaterialStats = (material, recipe$1) => {
|
|
793
|
+
const out = recipe(
|
|
794
|
+
literal(material),
|
|
795
|
+
recipe$1.durability,
|
|
796
|
+
recipe$1.drawSpeed,
|
|
797
|
+
float(recipe$1.flightSpeed)
|
|
829
798
|
);
|
|
830
799
|
return `mods.tconstruct.ToolStats.setBowStats(${out});`;
|
|
831
800
|
};
|
|
832
801
|
const setBowMaterialDurability = (material, durability) => {
|
|
833
|
-
const out =
|
|
802
|
+
const out = recipe(literal(material), durability);
|
|
834
803
|
return `mods.tconstruct.ToolStats.setBowDurability(${out});`;
|
|
835
804
|
};
|
|
836
805
|
const setBowMaterialDrawspeed = (material, drawspeed) => {
|
|
837
|
-
const out =
|
|
806
|
+
const out = recipe(literal(material), drawspeed);
|
|
838
807
|
return `mods.tconstruct.ToolStats.setBowDrawspeed(${out});`;
|
|
839
808
|
};
|
|
840
809
|
const setBowMaterialFlightSpeed = (material, flightSpeed) => {
|
|
841
|
-
const out =
|
|
842
|
-
|
|
843
|
-
|
|
810
|
+
const out = recipe(
|
|
811
|
+
literal(material),
|
|
812
|
+
float(flightSpeed)
|
|
844
813
|
);
|
|
845
814
|
return `mods.tconstruct.ToolStats.setBowFlightSpeed(${out});`;
|
|
846
815
|
};
|
|
847
|
-
const setArrowStats = (material, recipe) => {
|
|
848
|
-
const out =
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
816
|
+
const setArrowStats = (material, recipe$1) => {
|
|
817
|
+
const out = recipe(
|
|
818
|
+
literal(material),
|
|
819
|
+
float(recipe$1.mass),
|
|
820
|
+
float(recipe$1.breakChance),
|
|
821
|
+
float(recipe$1.accuracy)
|
|
853
822
|
);
|
|
854
823
|
return `mods.tconstruct.ToolStats.setArrowStats(${out});`;
|
|
855
824
|
};
|
|
856
825
|
const setArrowMass = (material, mass) => {
|
|
857
|
-
const out =
|
|
858
|
-
|
|
859
|
-
|
|
826
|
+
const out = recipe(
|
|
827
|
+
literal(material),
|
|
828
|
+
float(mass)
|
|
860
829
|
);
|
|
861
830
|
return `mods.tconstruct.ToolStats.setArrowMass(${out});`;
|
|
862
831
|
};
|
|
863
832
|
const setArrowBreakChance = (material, breakChance) => {
|
|
864
|
-
const out =
|
|
865
|
-
|
|
866
|
-
|
|
833
|
+
const out = recipe(
|
|
834
|
+
literal(material),
|
|
835
|
+
float(breakChance)
|
|
867
836
|
);
|
|
868
837
|
return `mods.tconstruct.ToolStats.setArrowBreakChance(${out});`;
|
|
869
838
|
};
|
|
870
839
|
const setArrowAccuracy = (material, accuracy) => {
|
|
871
|
-
const out =
|
|
872
|
-
|
|
873
|
-
|
|
840
|
+
const out = recipe(
|
|
841
|
+
literal(material),
|
|
842
|
+
float(accuracy)
|
|
874
843
|
);
|
|
875
844
|
return `mods.tconstruct.TooLStats.setArrowAccuracy(${out});`;
|
|
876
845
|
};
|
|
877
846
|
|
|
847
|
+
exports.COLOR = COLOR;
|
|
878
848
|
exports.ENCHANTMENTS = ENCHANTMENTS;
|
|
849
|
+
exports.FOCI = FOCI;
|
|
850
|
+
exports.HARVESTER_TYPE = HARVESTER_TYPE;
|
|
879
851
|
exports.MATERIALS = MATERIALS;
|
|
880
852
|
exports.MODIFIERS = MODIFIERS;
|
|
853
|
+
exports.STYLE = STYLE;
|
|
881
854
|
exports.add = add;
|
|
882
855
|
exports.addBiomeRubberTree = addBiomeRubberTree;
|
|
883
856
|
exports.addBlacklistAutospawner = addBlacklistAutospawner;
|