暗影月赎
本帖最后由 暗影月赎 于 2021-8-4 11:54 编辑

IC2-Tweaker Documentation
IC2-Tweaker文档

Here are documentations of all public classes and methods provided by IC2-Tweaker. All classes/methods are provided undermods.ic2package in ZenScript.
这些是由IC2-Tweaker所提供的所有的公共类和方法。所有的类/方法都由包mods.ic2采用ZenScript语法提供

A sample ZenScript file is also provided here:Demo.zs.
我们为你准备了一个ZenScript脚本文件的例子:Demo.zs[译者注:例子已融入到各个机器中]

Due to limitation of IC2 API, it is not possible to remove any recipes via CraftTweaker/ZenScript. Please refer to respective chapters to see if there is alternative solution.
由于IC2 API的限制,导致你无法使用Crt/IC2T来移除任何配方[译者注:实际上可以在IC2自带的配置文件中直接移除]。请参考后续相关章节来寻找对于该问题的其他解决方案。


2021.12 数据,可能有更多内容
IC2-Tweaker Documentation
IC2-Tweaker文档


Here are documentations of all public classes and methods provided by IC2-Tweaker. All classes/methods are provided undermods.ic2package in ZenScript.
这些是由IC2-Tweaker所提供的所有的公共类和方法。所有的类/方法都由包mods.ic2采用ZenScript语法提供


A sample ZenScript file is also provided here:Demo.zs.
我们为你准备了一个ZenScript脚本文件的例子:Demo.zs[译者注:例子已融入到各个机器中]


Due to limitation of IC2 API, it is not possible to remove any recipes via CraftTweaker/ZenScript. Please refer to respective chapters to see if there is alternative solution.
由于IC2 API的限制,导致你无法使用Crt/IC2T来移除任何配方[译者注:实际上可以在IC2自带的配置文件中直接移除]。请参考后续相关章节来寻找对于该问题的其他解决方案。





Class
需要导入的类
import mods.ic2.BlastFurnace;
Methods
方法
/*
* Arguments: outputs, input, fluidCost, time
*   - IItemStack[] outputs
*   - IIngredient input
*   - int totalFluidCost   Per-tick IC2 liquefied air cost, measured in mB/tick
*   - int time    Total time cost, measured in ticks
*/
#参数:产物,原材料,空气消耗速度(以mb/tick为单位),完成该合成所需时间(以tick为单位)
BlastFurnace.addRecipe([<item:minecraft:diamond>, <item:minecraft:emerald>], <item:minecraft:dirt> * 64, 1, 1000);
[译者注:该脚本意为在高炉中,64块泥土经过1000tick,每tick消耗1mb空气后,将被转化为1钻石与1绿宝石]
This is equivalent to add the following line to config/ic2/blast_furnace.ini:
minecraft:dirt*64 = minecraft:diamond minecraft:emerald @fluid:1 @duration:1000
这相当于将以下代码添加入config/ic2/blast_furnace.ini中
minecraft:dirt*64 = minecraft:diamond minecraft:emerald @fluid:1 @duration:1000


To remove an existed recipe, simply remove the corresponding line in config/ic2/blast_furnace.ini.
要删除已有的配方,只需要在config/ic2/blast_furnace.ini中移除对应的代码行即可





Class
需要导入的类
import mods.ic2.BlockCutter;
Method
方法
/*
* Arguments: output, input, hardness
*   - IItemStack output
*   - IIngredient input
*   - @Optional int hardness Minimum hardness requirement for blade.
*    For reference, iron blade is 3; steel blade is 6; diamond blade is 9.
*    Default to 0 if not given.
*/
#参数:产物,原材料,切割所需的刀片硬度
#刀片硬度参考:铁制3,钢制6,钻石制9
#刀片硬度项若不设置默认为0
BlockCutter.addRecipe(<item:minecraft:diamond>, <item:minecraft:dirt>); // Hardness requirement defaults to 0
[译者注:该脚本意为将泥土切割为钻石,但因为未设置刀片硬度所以默认为0]
BlockCutter.addRecipe(<item:minecraft:diamond>, <item:minecraft:dirt>, 9);
[译者注:该脚本意为将泥土切割为钻石,需要硬度在9以上的刀片才能切割。钻石切泥土出钻石,无中生有了属于是]
This is equivalent to add the following line to config/ic2/block_cutter.ini:
这相当于将以下代码添加入config/ic2/block_cutter.ini中
minecraft:dirt = minecraft:diamond @hardness:9


To remove an existed recipe, simply remove the corresponding line in config/ic2/block_cutter.ini.
要移除已有的配方,只需在config/ic2/block_cutter.ini中移除对应的代码行即可





Class
需要导入的类
import mods.ic2.Canner;
Methods
方法
addBottleRecipe
添加固固混合配方
/*
* Arguments: output, container, filler
*   - IItemStack output   The product
*   - IIngredient containerThe ingredient to be "filled"
*   - IIngredient filler  The ingredient with which is filled into the container
*/
#参数:产物,原材料,填充物
Canner.addBottleRecipe(<item:minecraft:diamond>, <item:minecraft:glass>, <item:minecraft:dirt>);
[译者注:该脚本意为将玻璃与泥土进行固固装灌,会生成钻石]
addEnrichRecipe
添加固液混合配方
/*
* Arguments: output, container, filler
*   - ILiquidStack output    The product
*   - ILiquidStack input  The base fluid ingredient
*   - IIngredient additive   The solid ingredient to be mixed with
*/
#参数:产物,原材料,填充物
Canner.addEnrichRecipe(<liquid:lava> * 1000, <liquid:water> * 1000, <item:minecraft:redstone>);
[译者注:该脚本意为使用1000mb水与红石进行固液装灌,会生成1000mb岩浆]





Class
需要导入的类
import mods.ic2.Compressor;
Method
方法
/*
* Arguments: output, input
*   - IItemStack output
*   - IIngredient input
*/
#参数:产物,原材料
Compressor.addRecipe(<minecraft:diamond_block>, <minecraft:dirt> * 64);
[译者注:该脚本意为将64块泥土压缩成一块钻石块]
This is equivalent to add the following line to config/ic2/compressor.ini:
这相当于将以下代码添加入config/ic2/compressor.ini中
minecraft:dirt*64 = minecraft:diamond_block


To remove an existed recipe, simply remove the corresponding line in config/ic2/compressor.ini.
要移除已有的配方,只需在config/ic2/compressor.ini中移除对应的代码行即可





Class
需要导入的类
import mods.ic2.Electrolyzer;
Method
方法
addRecipe
添加配方
/*
* Arguments: outputs, input, power, time
*   - ILiquidStack[] outputs Array of all outputs. Each slot corresponds to Down-Up-North-South-West-East direction.
*    Tailing null may be omitted.
*   - ILiquidStack input  The input
*   - int power  Power consumption, measured in EU/tick
*   - @Optional int time  Time cost. Default to 200 if not given.
*/
#参数:产物,原材料,耗电功率(单位为EU/tick),时间(单位为tick)
#产物部分代表输出方向,依次是下底面,上底面,北面,南面,西面,东面(可以省略,也可以用null填充)
#时间项若不填写,默认为200tick


Electrolyzer.addRecipe([<liquid:lava> * 1000, <liquid:water> * 500], <liquid:water> * 1000, 30);
Electrolyzer.addRecipe([<liquid:lava> * 1000, <liquid:water> * 500, null, null, null, null], <liquid:water> * 1000, 30);
Electrolyzer.addRecipe([<liquid:lava> * 1000, <liquid:water> * 500, null, null, null, null], <liquid:water> * 1000, 30, 200);
[译者注:上面三个脚本意均为在每tick消耗30EU的情况下,运行200tick,将1000mb水电解成500mb水和1000mb岩浆,并且岩浆从下底面输出,水由上底面输出,其余四个面为空]





Class
需要导入的类
import mods.ic2.Extractor;
Method
方法
/*
* Arguments: output, input
*   - IItemStack output
*   - IIngredient input
*/
#参数:产物,原材料
Extractor.addRecipe(<minecraft:diamond_block>, <minecraft:dirt> * 64);
[译者注:该脚本意为从64块泥土中提取出一个钻石]
This is equivalent to add the following line to config/ic2/extractor.ini:
这相当于将以下代码添加入config/ic2/extractor.ini中
minecraft:dirt*64= minecraft:diamond_block


To remove an existed recipe, simply remove the corresponding line inconfig/ic2/extractor.ini.
要移除已有的配方,只需在config/ic2/extractor.ini中移除对应的代码行即可





Class
需要导入的类
import mods.ic2.Fermenter;
Methods
方法
/*
* Arguments: output, input, heat
*   - ILiquidStack output The fermented fluid
*   - ILiquidStack inputThe input fluid
*   - int heat   The amount of heat required for fermentation
*/
#参数:产物(液体),原材料,发酵所需热量
Fermenter.addRecipe(<liquid:lava> * 1000, <liquid:water> * 2000, 23333);
[译者注:该脚本意为2000mb的水在23333热量的情况下发酵生成1000mb的岩浆]





Class
需要导入的类
import mods.ic2.HeatExchanger;
Methods
方法
addFluidCoolDown
添加降温配方
//Both have the same effect
#这两条脚本效果相同
HeatExchanger.addFluidCoolDown(<liquid:lava>, <liquid:water>, 10);
HeatExchanger.addFluidCoolDown(<liquid:lava>.definition, <liquid:water>.definition, 10);
[译者注:该脚本意为水降温10单位后变为岩浆]
addFluidHeatUp
添加升温配方
//Both have the same effect
#这两条脚本效果相同
HeatExchanger.addFluidHeatUp(<liquid:lava>, <liquid:water>, 10);
HeatExchanger.addFluidHeatUp(<liquid:lava>.definition, <liquid:water>.definition, 10);
[译者注:该脚本意为水升温10单位后变为岩浆]





Class
需要导入的类
import mods.ic2.Macerator;
Method
方法
/*
* Arguments: output, input
*   - IItemStack output
*   - IIngredient input
*/
#参数:产物,原材料
Macerator.addRecipe(<minecraft:diamond_block>, <minecraft:dirt> * 64);
[译者注:该脚本意为将64块泥土打粉成一个钻石块]
This is equivalent to add the following line to config/ic2/macerator.ini:
这相当于将以下代码添加入config/ic2/macerator.ini中
minecraft:dirt*64 = minecraft:diamond_block


To remove an existed recipe, simply remove the corresponding line in config/ic2/macerator.ini.
要移除已有的配方,只需在config/ic2/macerator.ini中移除对应的代码行即可





Class
需要导入的类
import mods.ic2.MetalFormer;


Method
方法
addCuttingRecipe
添加切割配方(剪子图标)
/* * Arguments: output, input * - IItemStack output * - IIngredient input */
#参数:产物,原材料 MetalFormer.addCuttingRecipe(<minecraft:diamond>, <minecraft:dirt> * 64);
[译者注:该脚本意为将64块泥土切割为1个钻石]
This is equivalent to add the following line to config/ic2/metal_former_cutting.ini:
这相当于将以下代码添加入config/ic2/metal_former_cutting.ini
minecraft:dirt*64= minecraft:diamond_block


To remove an existed recipe, simply remove the corresponding line inconfig/ic2/metal_former_cutting.ini.
要移除已有的配方,只需在config/ic2/metal_former_cutting.ini中移除对应的代码行即可


addExtrudingRecipe
添加挤压配方(导线图标)
/* * Arguments: output, input * - IItemStack output * - IIngredient input */
#参数:产物,原材料 MetalFormer.addExtrudingRecipe(<minecraft:diamond_block>, <minecraft:dirt> * 64);
[译者注:该脚本意为将64块泥土挤压为一块钻石块]
This is equivalent to add the following line toconfig/ic2/metal_former_extruding.ini:
这相当于将以下代码添加入metal_former_extruding.ini
minecraft:dirt*64= minecraft:diamond_block


To remove an existed recipe, simply remove the corresponding line inconfig/ic2/metal_former_extruding.ini.
要移除已有的配方,只需在metal_former_extruding.ini中移除对应的代码行即可


addRollingRecipe
添加辊压配方(锻造锤图标)
/* * Arguments: output, input * - IItemStack output * - IIngredient input */
#参数:产物,原材料
MetalFormer.addRollingRecipe(<minecraft:diamond>, <minecraft:dirt> * 64);
[译者注:该脚本意为将64块泥土辊压成一个钻石]
This is equivalent to add the following line to config/ic2/metal_former_rolling.ini:
这相当于将以下代码添加入config/ic2/metal_former_rolling.ini
minecraft:dirt*64= minecraft:diamond_block


To remove an existed recipe, simply remove the corresponding line inconfig/ic2/metal_former_rolling.ini.
要移除已有的配方,只需在config/ic2/metal_former_rolling.ini中移除对应的代码行即可





Class
需要导入的类
import mods.ic2.OreWasher;
Method
方法
/*
* Arguments: outputs, input, hardness
*   - IItemStack[] outputs
*   - IIngredient input
*   - @Optional int waterAmount of water required for one round of processing of this recipe,
*  measured in mB. Default to 1000 if not given.
*/
#参数:产物,原材料,耗水量
#耗水量若不进行填写,则默认消耗1000mb的水
OreWasher.addRecipe([<minecraft:diamond>, <minecraft:emerald>, <minecraft:nether_star>], <minecraft:dirt>);
[译者注:该脚本意为消耗1000mb的水,可以从一块泥土中洗出一个钻石,一个绿宝石,以及一个下界之星]
OreWasher.addRecipe([<minecraft:diamond>, <minecraft:emerald>, <minecraft:nether_star>], <minecraft:dirt>, 500);
[译者注:该脚本意为消耗500mb的水,可以从一块泥土中洗出一个钻石,一个绿宝石,以及一个下界之星]
This is equivalent to add the following line to config/ic2/ore_washer.ini:
这相当于将以下代码添加入config/ic2/ore_washer.ini
minecraft:dirt = minecraft:diamond mincraft:emerald minecraft:nether_star @fluid:500


To remove an existed recipe, simply remove the corresponding line in config/ic2/ore_washer.ini.
要移除已有的配方,只需在config/ic2/ore_washer.ini中移除对应的代码行即可





Class
需要导入的类
import mods.ic2.Recycler;
Methods
方法
addBlacklist
添加黑名单
/*
* Arguments: ingredient
*   - IIngredient ingredient The item to be blacklisted from recycler (as source of scrap)
*/
#参数:物品
#为物品添加黑名单,让它们不能被回收机回收为废料
Recycler.addBlacklist(<minecraft:dirt>);
Recycler.addBlacklist(<ore:gemDiamond>);
[译者注:该脚本意为将泥土与矿物词典为钻石的物品添加入黑名单,使其无法被回收]





Class
需要导入的类
import mods.ic2.ScrapBox;
Methods
方法
addDrop(WeightedItemStack)
#添加物品掉落几率(开启废料盒掉落特定物品的几率)
/*
* Arguments: weightedItem
*   - WeightedItemStack weightedItem The new entry of scrap box drop pool. Percentage weight will be divided by 100.
*/
#参数:物品,物品权重
#设置废料盒掉落物品的权重
#该方法是修改废料盒中原本就可以得到的物品的概率
#百分比权重将除以100
ScrapBox.addDrop(<minecraft:diamond_ore>.weight(0.1));
ScrapBox.addDrop(<minecraft:diamond_ore> % 10);
[译者注:该脚本意为开启废料盒时有着10%几率开出钻石原矿]
// Same as above, 10% == 0.1
#这两种表达方式效果相同,10%=0.1
addDrop(IItemStack, float)
/*
* Arguments: weightedItem, weight
*   - WeightedItemStack weightedItem The new entry of scrap box drop pool. Percentage weight will be divided by 100.
*   - float weight    The weight of this new entry
*/
#参数:物品,浮动权重
#这种方法是在废料盒中添加一种新的物品以及它被开出的概率


ScrapBox.addDrop(<minecraft:diamond_ore>, 0.1F);ScrapBox.addDrop(<minecraft:diamond_ore>.weight(0.1));
[译者注:该脚本意为开启废料盒时有着10%几率开出钻石原矿]





Class
需要导入的类
import mods.ic2.SemiFluidGenerator;
Methods
方法
addFluid
添加流体
/*
* Arguments: liquid, powerOutput
*   - ILiquidStack liquid The liquid which can be used as fuel in semi-fluid generator
*   - double powerOutputThe power output, measured in EU/tick
*/
#参数:流体,输出能量
#流体为可作为该发电机燃料的流体
#以双倍功率输出能量(单位为EU/tick)
SemiFluidGenerator.addFluid(<liquid:water>, 2333.0D);
[译者注:该脚本意为消耗水进行功率为4666EU/tick的能量输出]





Class
需要导入的类
import mods.ic2.ThermalCentrifuge;
Method
方法
/*
* Arguments: outputs, input, minHeat
*   - IItemStack[] outputs
*   - IIngredient input
*   - @Optional int minHeat Minimum heat requirement for the thermal centrifuge before it starts to process
*   this recipe. Default to 1000 if not given.
*/
#参数:产物,原材料,所需的最小热量
#在热能离心机开始工作之前,需要积蓄的最小热量,若不设置默认为1000
ThermalCentrifuge.addRecipe([<minecraft:diamond>, <minecraft:emerald>, <minecraft:nether_star>], <minecraft:dirt>);
[译者注:该脚本意为在1000热量的情况下,热能离心机开始工作,将泥土离心成钻石,绿宝石和下界之星]
ThermalCentrifuge.addRecipe([<minecraft:diamond>, <minecraft:emerald>, <minecraft:nether_star>], <minecraft:dirt>, 500);
[译者注:该脚本意为在500热量的情况下,热能离心机开始工作,将泥土离心成钻石,绿宝石和下界之星]
This is equivalent to add the following line to config/ic2/thermal_centrifuge.ini:
这相当于将以下代码添加入config/ic2/thermal_centrifuge.ini
minecraft:dirt = minecraft:diamond mincraft:emerald minecraft:nether_star @heat:500


To remove an existed recipe, simply remove the corresponding line in config/ic2/thermal_centrifuge.ini.
要移除已有的配方,只需在config/ic2/thermal_centrifuge.ini中移除对应的代码行即可

1143189411
感谢分享

第一页 上一页 下一页 最后一页