zen-flow 4.4.2 → 4.4.4
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 +12 -14
- package/dist/zenflow.d.ts +9 -1
- package/dist/zenflow.mjs +12 -14
- package/package.json +1 -1
package/dist/zenflow.cjs
CHANGED
|
@@ -175,14 +175,13 @@ const addExtreme = (ingredient, recipe) => {
|
|
|
175
175
|
const removeExtreme = (id) => `mods.avaritia.ExtremeCrafting.remove(${id});`;
|
|
176
176
|
|
|
177
177
|
const createBlock = (name, recipe) => {
|
|
178
|
-
const texture = typeof recipe.texture === "string" ? recipe.texture : recipe.id;
|
|
179
178
|
const out = formatArgs(
|
|
180
179
|
formatLiteral(name),
|
|
181
180
|
formatLiteral(recipe.id),
|
|
182
181
|
formatLiteral(recipe.material),
|
|
183
|
-
formatLiteral(texture),
|
|
182
|
+
typeof recipe.texture === "string" ? formatLiteral(recipe.texture) : formatLiteral(recipe.id),
|
|
184
183
|
typeof recipe.creativeTab === "string" && formatLiteral(recipe.creativeTab),
|
|
185
|
-
recipe.renderType,
|
|
184
|
+
typeof recipe.renderType === "number" ? recipe.renderType : 1,
|
|
186
185
|
recipe.drops,
|
|
187
186
|
recipe.unbreakable,
|
|
188
187
|
typeof recipe.hardness === "number" && formatFloat(recipe.hardness),
|
|
@@ -192,18 +191,17 @@ const createBlock = (name, recipe) => {
|
|
|
192
191
|
return `mods.content.Block.registerBlock(${out});`;
|
|
193
192
|
};
|
|
194
193
|
const createItem = (name, recipe) => {
|
|
195
|
-
const texture = typeof recipe.texture === "string" ? recipe.texture : recipe.id;
|
|
196
194
|
const out = formatArgs(
|
|
197
195
|
formatLiteral(name),
|
|
198
196
|
formatLiteral(recipe.id),
|
|
199
|
-
formatLiteral(texture),
|
|
200
|
-
typeof recipe.creativeTab === "string"
|
|
201
|
-
recipe.damage,
|
|
202
|
-
recipe.stackSize,
|
|
203
|
-
typeof recipe.toolType === "string"
|
|
204
|
-
recipe.level,
|
|
205
|
-
recipe.is3d,
|
|
206
|
-
Array.isArray(recipe.tooltip)
|
|
197
|
+
typeof recipe.texture === "string" ? formatLiteral(recipe.texture) : formatLiteral(recipe.id),
|
|
198
|
+
typeof recipe.creativeTab === "string" ? formatLiteral(recipe.creativeTab) : formatLiteral("misc"),
|
|
199
|
+
typeof recipe.damage === "number" ? recipe.damage : 0,
|
|
200
|
+
typeof recipe.stackSize === "number" ? recipe.stackSize : 64,
|
|
201
|
+
typeof recipe.toolType === "string" ? formatLiteral(recipe.toolType) : formatLiteral("pickaxe"),
|
|
202
|
+
typeof recipe.level === "number" ? recipe.level : 0,
|
|
203
|
+
!!recipe.is3d,
|
|
204
|
+
Array.isArray(recipe.tooltip) ? recipe.tooltip.map(formatLiteral) : []
|
|
207
205
|
);
|
|
208
206
|
return `mods.content.Item.registerItem(${out});`;
|
|
209
207
|
};
|
|
@@ -218,8 +216,8 @@ const createLiquid = (id, recipe) => {
|
|
|
218
216
|
recipe.color,
|
|
219
217
|
!!recipe.setFire,
|
|
220
218
|
recipe.castingMaterial,
|
|
221
|
-
typeof recipe.texture?.still === "string"
|
|
222
|
-
typeof recipe.texture?.flowing === "string"
|
|
219
|
+
typeof recipe.texture?.still === "string" ? formatLiteral(recipe.texture.still) : void 0,
|
|
220
|
+
typeof recipe.texture?.flowing === "string" ? formatLiteral(recipe.texture.flowing) : void 0
|
|
223
221
|
);
|
|
224
222
|
return `mods.content.Fluid.registerFluid(${out});`;
|
|
225
223
|
};
|
package/dist/zenflow.d.ts
CHANGED
|
@@ -136,6 +136,8 @@ type RecipeBlock = {
|
|
|
136
136
|
*
|
|
137
137
|
* Textures can be placed in `/config/contenttweaker/icons/blocks/<texture>`
|
|
138
138
|
*
|
|
139
|
+
* Scripts containing `createBlock` must be placed in `/contentScripts`
|
|
140
|
+
*
|
|
139
141
|
* @see https://minetweaker3.aizistral.com/wiki/ContentTweaker:BlockItem_Support
|
|
140
142
|
*/
|
|
141
143
|
declare const createBlock: (name: string, recipe: RecipeBlock) => string;
|
|
@@ -153,6 +155,8 @@ type RecipeItem = {
|
|
|
153
155
|
/**
|
|
154
156
|
* Create custom item
|
|
155
157
|
*
|
|
158
|
+
* Scripts containing `createItem` must be placed in `/contentScripts`
|
|
159
|
+
*
|
|
156
160
|
* Textures can be placed in `/config/contenttweaker/icons/items/<texture>`
|
|
157
161
|
*
|
|
158
162
|
* @see https://minetweaker3.aizistral.com/wiki/ContentTweaker:BlockItem_Support
|
|
@@ -164,7 +168,7 @@ type RecipeLiquid = {
|
|
|
164
168
|
luminosity: number;
|
|
165
169
|
temperature: number;
|
|
166
170
|
viscosity: number;
|
|
167
|
-
color:
|
|
171
|
+
color: number;
|
|
168
172
|
setFire?: boolean;
|
|
169
173
|
castingMaterial?: number;
|
|
170
174
|
texture?: {
|
|
@@ -175,6 +179,8 @@ type RecipeLiquid = {
|
|
|
175
179
|
/**
|
|
176
180
|
* Create custom liquid
|
|
177
181
|
*
|
|
182
|
+
* Scripts containing `createLiquid` must be placed in `/contentScripts`
|
|
183
|
+
*
|
|
178
184
|
* Textures can be placed in `/config/contenttweaker/icons/blocks/<texture>`
|
|
179
185
|
*
|
|
180
186
|
* @see https://minetweaker3.aizistral.com/wiki/ContentTweaker:BlockItem_Support
|
|
@@ -213,6 +219,8 @@ type RecipeMaterial = {
|
|
|
213
219
|
/**
|
|
214
220
|
* Create custom [Tinkers' Construct material](https://tinkers-construct.fandom.com/wiki/Material_Stats)
|
|
215
221
|
*
|
|
222
|
+
* Scripts containing `createMaterial` must be placed in `/contentScripts`
|
|
223
|
+
*
|
|
216
224
|
* Textures can be placed in `/config/contenttweaker/icons/items/<texture>`
|
|
217
225
|
*
|
|
218
226
|
* @see https://minetweaker3.aizistral.com/wiki/ContentTweaker:BlockItem_Support
|
package/dist/zenflow.mjs
CHANGED
|
@@ -173,14 +173,13 @@ const addExtreme = (ingredient, recipe) => {
|
|
|
173
173
|
const removeExtreme = (id) => `mods.avaritia.ExtremeCrafting.remove(${id});`;
|
|
174
174
|
|
|
175
175
|
const createBlock = (name, recipe) => {
|
|
176
|
-
const texture = typeof recipe.texture === "string" ? recipe.texture : recipe.id;
|
|
177
176
|
const out = formatArgs(
|
|
178
177
|
formatLiteral(name),
|
|
179
178
|
formatLiteral(recipe.id),
|
|
180
179
|
formatLiteral(recipe.material),
|
|
181
|
-
formatLiteral(texture),
|
|
180
|
+
typeof recipe.texture === "string" ? formatLiteral(recipe.texture) : formatLiteral(recipe.id),
|
|
182
181
|
typeof recipe.creativeTab === "string" && formatLiteral(recipe.creativeTab),
|
|
183
|
-
recipe.renderType,
|
|
182
|
+
typeof recipe.renderType === "number" ? recipe.renderType : 1,
|
|
184
183
|
recipe.drops,
|
|
185
184
|
recipe.unbreakable,
|
|
186
185
|
typeof recipe.hardness === "number" && formatFloat(recipe.hardness),
|
|
@@ -190,18 +189,17 @@ const createBlock = (name, recipe) => {
|
|
|
190
189
|
return `mods.content.Block.registerBlock(${out});`;
|
|
191
190
|
};
|
|
192
191
|
const createItem = (name, recipe) => {
|
|
193
|
-
const texture = typeof recipe.texture === "string" ? recipe.texture : recipe.id;
|
|
194
192
|
const out = formatArgs(
|
|
195
193
|
formatLiteral(name),
|
|
196
194
|
formatLiteral(recipe.id),
|
|
197
|
-
formatLiteral(texture),
|
|
198
|
-
typeof recipe.creativeTab === "string"
|
|
199
|
-
recipe.damage,
|
|
200
|
-
recipe.stackSize,
|
|
201
|
-
typeof recipe.toolType === "string"
|
|
202
|
-
recipe.level,
|
|
203
|
-
recipe.is3d,
|
|
204
|
-
Array.isArray(recipe.tooltip)
|
|
195
|
+
typeof recipe.texture === "string" ? formatLiteral(recipe.texture) : formatLiteral(recipe.id),
|
|
196
|
+
typeof recipe.creativeTab === "string" ? formatLiteral(recipe.creativeTab) : formatLiteral("misc"),
|
|
197
|
+
typeof recipe.damage === "number" ? recipe.damage : 0,
|
|
198
|
+
typeof recipe.stackSize === "number" ? recipe.stackSize : 64,
|
|
199
|
+
typeof recipe.toolType === "string" ? formatLiteral(recipe.toolType) : formatLiteral("pickaxe"),
|
|
200
|
+
typeof recipe.level === "number" ? recipe.level : 0,
|
|
201
|
+
!!recipe.is3d,
|
|
202
|
+
Array.isArray(recipe.tooltip) ? recipe.tooltip.map(formatLiteral) : []
|
|
205
203
|
);
|
|
206
204
|
return `mods.content.Item.registerItem(${out});`;
|
|
207
205
|
};
|
|
@@ -216,8 +214,8 @@ const createLiquid = (id, recipe) => {
|
|
|
216
214
|
recipe.color,
|
|
217
215
|
!!recipe.setFire,
|
|
218
216
|
recipe.castingMaterial,
|
|
219
|
-
typeof recipe.texture?.still === "string"
|
|
220
|
-
typeof recipe.texture?.flowing === "string"
|
|
217
|
+
typeof recipe.texture?.still === "string" ? formatLiteral(recipe.texture.still) : void 0,
|
|
218
|
+
typeof recipe.texture?.flowing === "string" ? formatLiteral(recipe.texture.flowing) : void 0
|
|
221
219
|
);
|
|
222
220
|
return `mods.content.Fluid.registerFluid(${out});`;
|
|
223
221
|
};
|