zen-flow 4.4.2 → 4.4.3
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 +10 -12
- package/dist/zenflow.mjs +10 -12
- 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
|
};
|
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
|
};
|