挤压机配方

TGregRecipeRegistry.addGregTechPartRecipes() 的主产出,通过 GT_Values.RA.addExtruderRecipe(input, pattern, output, duration, voltage) 注册到 GregTech。 每个入选材料 × 27 个有 pattern 的部件(PartTypes.Chunk 的 pattern 是 null,被 if (pattern != null) 跳过)。

配方矩阵

# 配方 数量 时长 开关
1 锭 + pattern → 部件 n(price) max(80, mDurability × price) extruderRecipes
2 宝石 + pattern → 部件 n(price) 同上 extruderRecipes 且 gemToolPartRecipes
3 碎片 + pattern → 部件 n(price) 80 + mDurability × price extruderRecipes 且 shardToToolPartRecipe
4 锭 → 2 碎片 1 max(160, mDurability) ingotToShardRecipe
5 黄铜/金板 + 部件铸件 pattern → 部件 1 800 castExtruderRecipes
6 黄铜/金板 + 碎片铸件 → 2 碎片 1 800 castExtruderRecipes
7 blankPattern(meta 1) + 黑曜石碎片 → 碎片铸件 1 800 tinkersconstructcastrecipe
8 blankPattern(meta 2) + 黑曜石碎片 → 碎片铸件 1 800 tinkersconstructcastrecipe
9 黄铜板 + 黑曜石碎片 → 碎片铸件 1 800 tinkersconstructcastrecipe 且 !castExtruderRecipes

数量公式 n(price)

price 为奇数 → price / 2 + 1
price 为偶数 → MathHelper.ceiling_double_int(price / 2D)   // 即 price / 2

PartTypes.price 的实际取值只有 1 / 2 / 6 / 8 / 10 / 16,全部是偶数或 1,所以:

price 部件 n(price)
1 绑定结、手柄、宽护手、护手、十字柄、刀刃、大型护手、碎片、回旋镖 1
2 镐头、铲头、斧刃、剑刃、盘、牌板、凿刃、箭头 1
6 坚韧绑定结、坚韧手柄 3
8 弩臂 4
10 弩身 5
16 大板、镰刀刀刃、宽斧刃、开掘铲头、宽剑刃、锤头 8

材料输入的选取顺序

stack = GT_OreDictUnificator.get(OrePrefixes.ingot, m, n(price))
if (addGemToolPartRecipes && stack == null)
    stack = GT_OreDictUnificator.get(OrePrefixes.gem, m, n(price))
if (stack != null) { ... 注册配方 1/2/3 ... }

只有 ingot 完全取不到时才试 gem,没有"优先宝石"的选项。gemToolPartRecipes 同时 控制"宝石回退"和 addIngotRepair 里的宝石修复材料(见 修复修饰符)。

碎片路径(配方 3)的位置

源码里碎片路径在 if (stack != null) 块内、getChunk(m, price) 非空时注册:

stack = getChunk(m, price);         // TGregUtils.newItemStack(m, PartTypes.Chunk, price)
if (stack != null) {
    if (addExtruderRecipes && addShardToToolPart) addExtruderRecipe(碎片, pattern, 部件, 80 + 耐久×price, power);
    if (addReverseSmelting)             addAlloySmelterRecipe(部件, 碎片铸件, 碎片, 80 + 耐久×price, power);
}

getChunk 永远非空(无返回 null 的路径),所以回炉配方实际上不受 ingot/gem 是否存在的影响, 而碎片路径受 ingotStack != null 的外层判断约束——这构成一个不对称: 一种没有锭也没有宝石的材料无法用碎片做部件。

熔融量

FluidStack molten = m.getMolten((GT_Values.L / 2) * p.getPrice());

GT_Values.L = 1000(mB),所以熔融量 = 288 × price mB: price 1 → 288、2 → 576、6 → 1728、8 → 2304、10 → 2880、16 → 4608。 碎片相关的熔融量是 GT_Values.L / 2 = 144 mB(getMolten(144))。

电压

getPowerRequired(Materials m) = Math.round(m.mToolQuality < 3 ? 30 : 120) × energyMultiplier (energyMultiplier 来自 general.energyUsageMultiplier,默认 1.0)。 分档判据是 mToolQuality,不是 harvestLevel —— 与 弩箭配方 的 ToolMaterial.harvestLevel 判据不同。全部挤压机配方都按材料取同一个值。

⚠️ 倍率 < 0 或 120 × 倍率 > 524288 时被打回 1 并打一条 log.error,见 general 段配置。

相关条目