本篇教程由作者设定使用 CC BY-NC 协议。

完整内容请参阅github上的wiki https://github.com/LakMoore/InfiniTiC/wiki

前言:

        该教程为我个人理解后,进行编写的。由于我个人技术不强,必定有不足之处,尽请谅解。

        如果出现无法理解的词语,如“数组”,请进行Bing搜索。一般不做额外解释。

        以下教程适用与1.12.2,如果您希望使用在别的版本,请参阅wiki。

        2021-02-18更新:该模组在源码上是getGems()[0],但是拿不到非原版注册的物品堆,因此报数组下标越界异常。如果需要魔改其他模组提供的物品作为匠魂材料,请移步Pewter模组。链接:使用Pewter自定义匠魂材料-官方范例翻译再编辑

关键指令:

        /infinitic traits     // 输出所有注册特性到聊天栏,可以打开"./minecraft/logs/latest.txt"复制这些特性

        /infinitic hand     // 可以获得项目名称以及所有OreDictionary(矿物词典)条目到剪切板。同上,也可以在latest文件中找到这段被输出到聊天栏的内容。


自定义材料:

        json放在"./minecraft/config/infinitic" 目录下,可以创建子目录来更好的分类魔改材料

        一个json文件定义一种材料,按照wiki的说明,可以读取到zip压缩包内的json。

        以下为wiki中的1.10.2及更高版本的基本范例。可以将包括花括号的内容复制到json中直接使用使用,用户只需要修改特定参数即可。

        注:".*?comment" 这一段创建的都是注释。官方github的范例中是没有中文的,下面的中文都是我按自己的理解添加上去的。“?”表示我目前不理解的功能。

        

{

    "__name_comment": "创建该匠魂材料的名称,不可重复",

    "name": "tic_glass_0",

    

    "__make_comment": "A list of materials to be made by the mod.  Currently only 'fluid' is valid, which will cause the fluid to be made and recipes to use the smeltery.  Use an empty array to NOT make a fluid, any parts defined below to be crafted using solid materials and the part builder instead. 定义一个材料类型,目前只有‘液体’是有效的。如果设置为空数组,则可以不依靠冶炼厂直接制造匠魂部件。",

    "make": ["fluid"],

    "__color_comment": "The three colors are all in the format #AARRGGBB.  Tinkers will change fully transparent materials to fully opaque! 指定该匠魂材料的材质颜色,采用AARRGGBB格式。",

    "textColor": "#FF45ACA5",

    "whitelist": {

        "__comment": "Everything in the whitelist will be added to the OreDictionary with the above name. 这个白名单的效果设定铸造台使用注模制造物品时的结果。这些数组也表示可以熔融的物品,熔融结果就是我们本次json设定的熔融液体。从gems开始才是熔融材料,上面的都是在部件台直接制造部件的设定。",

        "oredict": [],

        "ingots": [],

        "nuggets": [],

        "dusts": [],

        "gems": ["minecraft:glass:0"],

        "blocks": [],

        "ores": []

    },

    

    "blacklist": {

        "__comment": "Optionally use the blacklist to exclude specific items. 使用黑名单排除特定的项目。",

        "oredict": [],

        "ores": []

    },

    

    "fluidData": {

        "color": "#FF45ACA5",

        "density": 2000,

        "viscosity": 10000,

        "temperature": 1000,

        "luminosity": 10,

        "__comment": "rarity can be COMMON, UNCOMMON, RARE or EPIC;定义这个熔融液体的 颜色、密度、粘度、温度、亮度等。",

        "rarity": "COMMON"

    },

    

    "__comment": "If you do not want to be able to craft the Tool Forge (using blocks of this material) set the following to false.",

    "canCraftToolForge": true,

    

    "toolData": {

        "__durability_comment": "Usually between 1 and 1000;作为顶端部件的耐久 1-1000.",

        "durability": 500,

        

        "__harvestLevel_comment": "0=STONE, 1=IRON, 2=DIAMOND, 3=OBSIDIAN, 4=COBALT;挖掘等级",

        "harvestLevel": 3,

        

        "__extraDurability_comment": "Durability added (or removed!) by a binding (or similar) of this material. 该材料在其他部件时提供的耐久量。",

        "extraDurability": -200,

        

        "__miningSpeed_comment": "Usually between 1 and 10;挖掘速度设定",

        "miningSpeed": 7.0,

        "__attack_comment": "Usually between 0 and 10 (in 1/2 hearts, so divide by 2 for damage in hearts 下面顺序:伤害-手柄系数-手柄耐久-颜色设定-?)",

        "attack": 6.0,

        "handleModifier": 2,

        "handleDurability": 200,

        "color": "#FF45ACA5",

        "temperature": 200,

        

        "__projectiles_comment": "Set to true to enable building Shurikens",

        "projectiles": false,

        

        "__bow_comment": "Following example stats are for a wood bow 拉弓速度-范围系数-附加伤害",

        "drawSpeed": 1.0,

        "range": 1.0,

        "bonusDamage": 0.0,

        

        "__stringModifier_comment": "Use 1.0 for standard string.  Use 0.0 to disable for this material.",

        "stringModifier": 0.0,

        

        "__arrow_shaft_comment": "Following example stats are for wood arrow shafts.  Set modifier to 0 to disable. 箭杆系数-额外弹药",

        "shaftModifier": 1.0,

        "bonusAmmo": 4.0,

        

        "__arrows_comment": "Following example stats are for feather fletchings.  Set to 0 to disable. 准确度-箭数系数",

        "accuracy": 2.0,

        "fletchingModifier": 3.0,

        

            "__traits_comment": "Optional list of traits to be applied generally to parts made of this material.  Use /infinitic traits in-game to see the full list! 可选特性列表,应用于这种材料制造的零件,在游戏中使用 /infinitic traits查看完整列表,下面的traits是箭羽的特性设定(fletchingTraits设置后,下面的traits就被覆盖掉了),如果安装了兵工厂,一样使用这一条",

            "traits": ["stonebound"],

            "__specific_traits_comment": "Optional lists of traits to be applied to specific parts made of this material.  Use /infinitic traits in-game to see the full list! 设定部件的特性列表,依次为:头部-手柄-额外-弓-?-箭-箭杆-箭羽",

            "headTraits": ["sharp"],

            "handleTraits": ["superheavy"],

            "extraTraits": ["ecological"],

            "bowTraits": ["diffuse"],

            "stringTraits": ["cheap"],

            "projectileTraits": ["dense"],

            "shaftTraits": ["xu_whispering"],

            "fletchingTraits": ["reviving"]

    },

    "localizations": [{

        "__comment": "The name of the material in various languages.  solid = the material and the tool.  liquid = the name of the fluid.  bucket = the name of the bucket.  To add more languages just add another object with the 4 elements; 语言-固体-液体-存储的桶;如果要支持更多语言,需要新建一个对象来包含这四个元素",

        "locale": "zh_CN",

        "solid": "玻璃",

        "liquid": "熔融玻璃",

        "bucket": "熔融玻璃桶"

    }]

}