本模组新增了(目前共 13 种)不同的发电机,均可直接从你的物品栏中使用。右键点击时,这些物品会打开一个图形用户界面(GUI),你可以在其中放入燃料以产生能量。利用产生的能量,你可以为物品栏(或饰品槽位)中的其他物品充电,例如喷气背包。你可以按住潜行键并右键点击来切换发电机的开启与关闭状态;在手持发电机的状态下按下切换模式键(默认为 M 键),可以在充电模式与非充电模式之间切换。
本模组还附带数据包支持,用于修改发电机的燃料配方。这允许你调整发电机接受的燃料种类,以及这些燃料在发电机中产生的能量量。
示例:在模组自带的配方文件中,我们在 ~data/inventorygenerators/recipe/death_generator 下有一个名为 bone_blocks.json 的文件:
{
"type": "inventorygenerators:generator_recipe",
"generator": {
"item": "inventorygenerators:inventory_death_generator"
},
"fuels": [
{
"tag": "c:storage_blocks/bone_meal"
}
],
"burnTime": 400,
"RF": 120
}
所有 Inventory Generator 配方的类型均为 inventorygenerators:generator_recipe。
Generator 指的是一个单一的成分对象,用于匹配游戏中的某个发电机物品。
fuels 是一个成分对象列表,表示该发电机配方中可接受的燃料。
burnTime 指燃料应产生能量的刻数。
RF 指发电机每刻应为这些燃料产生的能量值。
This mod adds (currently) 13 different generators which can be used entirely from your inventory. When right-clicking, these items open a GUI within which you can place fuel to generate energy. With this generated energy you can charge other items within your inventory (or curios slots) such as jetpacks. You can toggle between a generator being on and off by sneak right-clicking and toggle between charging and non-charging mode by pressing the change mode key while holding the generator (default M).
The mod also comes with data pack support for modifying generator fuel recipes. This allows you to modify the fuels a generator accepts and how much energy those fuels will generate within the generator.
Example: Within the mod's own recipes we have a file named bone_blocks.json within ~data/inventorygenerators/recipe/death_generator:
{
"type": "inventorygenerators:generator_recipe",
"generator": {
"item": "inventorygenerators:inventory_death_generator"
},
"fuels": [
{
"tag": "c:storage_blocks/bone_meal"
}
],
"burnTime": 400,
"RF": 120
}
The type of all Inventory Generator recipes is inventorygenerators:generator_recipe.
Generator refers to a single ingredient object which matches a generator item within the game.
fuels is a list of ingredient objects which are acceptable fuels within the generator recipe
burnTime refers to how many ticks the fuels should generate energy for
RF refers to how much energy the generator should generate each tick for these fuels
评论 0
登录后参与评分
还没有评论,来抢沙发吧