本模组已不再维护
本模组是 Mekanism 和 KubeJS 的附加组件。
它允许你使用 KubeJS JavaScript 脚本创建 Mekanism 的自定义气体和注入类型。
你并不需要具备高级模组开发知识即可使用本模组,但你必须掌握如何使用 KubeJS 编写基础脚本。其余部分只需复制粘贴下方的脚本并根据需求进行调整即可。
自定义气体:
要创建自定义的 Mekanism 气体,你只需要一个注册表名称(即气体的 ID),注册表名称必须为小写,且不能包含空格和特殊字符(允许使用下划线和数字)。
你还需要指定气体的颜色(如果不指定,气体将显示为黑色),颜色以整数格式表示(参见此处,你需要的是“MapInfo Color”)。)
可选地,你可以为气体指定自定义纹理(在 JEI 或机器界面中显示时),请记住颜色会叠加在纹理之上。你可以将纹理添加到 kubejs 文件夹下的 assets 目录中。
示例:
onEvent('gas.registry', event => {
event.create("test_gas").color(16711688).texture("kubejs:gases/test_gas_texture.png")
})
这将创建一个注册表名称为 "test_gas"、颜色为纯红色,并将纹理放置在 kubejs/assets/kubejs/textures/gases/test_gas_texture.png 的气体。
注意:纹理是可选的,如果未指定,将使用默认流体纹理。
记得在 kubejs/assets/lang/en_us.json 中添加 "gas.kubejs.test_gas":"Test Gas",否则游戏中该气体的名称将显示为 "gas.kubejs.test_gas"。
自定义注入类型:
要创建自定义的 Mekanism 注入类型,你只需要一个注册表名称(即气体的 ID,如果你愿意的话),注册表名称必须为小写,且不能包含空格和特殊字符(允许使用下划线和数字)。
你还需要指定注入类型的颜色(如果不指定,气体将显示为黑色),颜色以整数格式表示(参见此处,你需要的是“MapInfo Color”。)
可选地,你可以为注入类型指定自定义纹理(在 JEI 或机器界面中显示时),请记住颜色会叠加在纹理之上。你可以将纹理添加到 kubejs 文件夹下的 assets 目录中。
示例:
onEvent('infuse_type.registry', event => {
event.create("test_infuse_type").color(16711688).texture("kubejs:infuse_types/test_infuse_type_texture.png")
})
这将创建一个注册表名称为 "test_infuse_type"、颜色为纯红色,并将纹理放置在 kubejs/assets/kubejs/textures/infuse_types/test_infuse_type_texture.png 的气体。
注意:纹理是可选的,如果未指定,将使用默认的注入类型纹理。
记得在 kubejs/assets/lang/en_us.json 中添加 "gas.kubejs.test_infuse_type":"Test Infuser Type",否则游戏中该气体的名称将显示为 "gas.kubejs.test_infuse_type"。
问题反馈:
如果你在使用本模组时遇到任何问题,请在 MekaJS GitHub 问题追踪器 中报告。
权限说明:
只要你从本网站下载本模组且不将其重新发布到其他平台,你就有权在任何整合包中使用本模组。
This mod is no longer maintained
This mod is an addon for Mekanism and Kubejs.
It allow you to create mekanisms customs gases and infuser types using KubeJS JavaScripts.
You don't really need to have advanced modding knowledge to use this mod, however you must know how to use KubeJS to make a basic script. For the rest you can just copy-paste the scripts below and adapt to your needs.
Custom Gases :
To create a custom Mekanism gas, you only need a registry name (the id of the gas if you prefer), the registryname must be lowercase and without spaces and special characters (underscore and numbers are allowed).
You will also need to specify a color for the gas (if you don't the gas will be black), the color is in integer format (see this, the color you need is the "MapInfo Color").
Optionally, you can specify a custom texture for the gas (when displayed in jei or machines gui), remember that the color will be applied over the texture. You can add the texture in the kubejs folder under assets.
Example :
onEvent('gas.registry', event => {
event.create("test_gas").color(16711688).texture("kubejs:gases/test_gas_texture.png")
})
This will create a gas with a registry name of "test_gas", color full red and the texture dropped in kubejs/assets/kubejs/textures/gases/test_gas_texture.png
Note the texture is optional and if not specified the default fluid texture will be used.
Remember to add "gas.kubejs.test_gas":"Test Gas" in kubejs/assets/lang/en_us.json otherwise the in game name of the gas will be "gas.kubejs.test_gas".
Custom Infuse Types :
To create a custom Mekanism infuse type, you only need a registry name (the id of the gas if you prefer), the registryname must be lowercase and without spaces and special characters (underscore and numbers are allowed).
You will also need to specify a color for the infuser type (if you don't the gas will be black), the color is in integer format (see this, the color you need is the "MapInfo Color").
Optionally, you can specify a custom texture for the infuser type (when displayed in jei or machines gui), remember that the color will be applied over the texture. You can add the texture in the kubejs folder under assets.
Example :
onEvent('infuse_type.registry', event => {
event.create("test_infuse_type").color(16711688).texture("kubejs:infuse_types/test_infuse_type_texture.png")
})
This will create a gas with a registry name of "test_infuse_type", color full red and the texture dropped in kubejs/assets/kubejs/textures/infuse_types/test_infuse_type_texture.png
Note the texture is optional and if not specified the default infuser type texture will be used.
Remember to add "gas.kubejs.test_infuse_type":"Test Infuser Type" in kubejs/assets/lang/en_us.json otherwise the in game name of the gas will be "gas.kubejs.test_infuse_type".
Issues :
If you have any issues using this mod, please report them in the MekaJS github issue tracker.
Permissions :
You are allowed to use this mod in any modpack as long as you download it from this website and don't repost it elsewhere.
评论 0
登录后参与评分
还没有评论,来抢沙发吧