
[Suggestion] advanced shaped crafting supports item with amount
lyuxc-unknow opened this issue · 0 comments
Mod loader
NeoForge
Minecraft version
1.21.1
Mod version
6.0.10
Modloader version
21.1.127
Modpack info
No response
[IMPORTANT] If bug:
- I have confirmed this bug is reproducible on a minimal setup, not a modpack with many other mods.
[IMPORTANT] If bug: The latest.log file, not the crash report
No response
Issue description
Make Lychee's Advanced Shaped Crafting to support Advanced Crafting similar to that in IC2C (IC2 Classic), where crafting only takes place once the items reach a certain quantity.
使Lychee的高级有序合成支持类似IC2C(工业时代2经典版)的高级合成,只有满足一定数量时,才会进行合成,并消耗指定的数量。
效果图与使用的脚本
因为传入物品时使用了CraftTweaker提供的crafttweaker:iitemstack类型而非原版的类型(使用原版类型不读取数量,即使在配方中添加了),故使输入的物品支持了数量。
但是在原版中合成固定消耗为1,导致了合成时会匹配配方所需的数量,但是只会消耗一份材料的情况(如上图所示)
搭配LycheeTweaker使用的zs脚本:
LycheeRecipeManager.addAdvancedRecipe(<item:minecraft:slime_block>, [
[<item:minecraft:slime_ball> * 9,<item:minecraft:slime_ball> * 9,<item:minecraft:slime_ball> * 9],
[<item:minecraft:slime_ball> * 9,<item:minecraft:slime_ball> * 9,<item:minecraft:slime_ball> * 9],
[<item:minecraft:slime_ball> * 9,<item:minecraft:slime_ball> * 9,<item:minecraft:slime_ball> * 9]
], new LycheeRecipeBuilder()
.comment("testing")
);
由CraftTweaker导出的配方:
{
"result": {
"item": "minecraft:slime_block",
"count": 1,
"id": "minecraft:slime_block"
},
"pattern": [
"AAA",
"AAA",
"AAA"
],
"comment": "testing",
"type": "lychee:crafting",
"key": {
"A": {
"type": "crafttweaker:iitemstack",
"count": 9,
"base": {
"mutable": false,
"item": {
"count": 9,
"id": "minecraft:slime_ball"
}
}
}
}
}