添加了对 Botania 配方以及自定义酿造 Flask、Incense 和 Tainted Pendant 的支持。
同时支持 Forge 和 Fabric(请检查Files标签页,因为 Recent Files 将仅显示最新的条目)。
对于 KJS6,您需要将以下代码调整为符合 KJS6 的样式。
示例:
在 startup_script 中:
onEvent("botania.brews.registry", event => {
event.create("torrent")
/**
* 每次酿造所需的法力消耗。
* 对于 Tainted Blood Pendant,其计算方式为 cost / duration / effectLevel * 2.5 每刻。
*/
.cost(5000)
/**
* 你希望为该药水施加的效果,
* 可以多次指定以同时应用
* 多个效果。
* 参数与 /effect 命令相同,
* 除了持续时间以刻(ticks)为单位而非秒。
*/
.effect("minecraft:water_breathing", 4800 * 20)
.effect("botania:allure", 300 * 20, 0, false, false)
/**
* 设置为禁止此药水使用香炉。
*/
.noIncense()
/**
* 设置为禁止对此药水进行吊坠注入。
*/
.noPendant()
)
在 server_scripts 中:
onEvent("recipes", event => {
event.remove({ output: "botania:livingrock" })
event.recipes.botania.mana_infusion("minecraft:acacia_boat", "minecraft:acacia_door", 200, "minecraft:acacia_log")
event.recipes.botania.elven_trade(["minecraft:acacia_boat"], "minecraft:diamond")
event.recipes.botania.elven_trade(["minecraft:acacia_boat", "minecraft:acacia_button"], ["minecraft:diamond_block", "minecraft:gold_ingot"])
event.recipes.botania.pure_daisy("minecraft:acacia_button", "minecraft:acacia_leaves")
event.recipes.botania.pure_daisy("minecraft:acacia_button", "minecraft:stone", 1)
event.recipes.botania.brew("kubejs:torrent", ["minecraft:acacia_boat"])
event.recipes.botania.petal_apothecary("minecraft:acacia_boat", ["minecraft:acacia_button"])
event.recipes.botania.runic_altar("minecraft:acacia_boat", ["minecraft:acacia_button", "minecraft:acacia_door"], 5000)
event.recipes.botania.terra_plate("minecraft:acacia_boat", ["minecraft:acacia_button", "minecraft:acacia_door"], 5000000)
event.recipes.botania.orechid("minecraft:acacia_button", "minecraft:acacia_fence", 1)
event.recipes.botania.orechid_ignem("minecraft:acacia_leaves", "minecraft:acacia_fence_gate", 1)
event.recipes.botania.marimorphosis("minecraft:acacia_door", "minecraft:acacia_fence_gate", 1, ["plains"], 10)
})
Adds support for Botania recipes, and custom brewing of Flasks, Incenses and Tainted Pendant.
Both Forge and Fabric are supported (Please check in Files tab since Recent Files will only show the latest entry).
For KJS6, you need to adapt code below to fit KJS6's style.
Examples:
In startup_script:
onEvent("botania.brews.registry", event => {
event.create("torrent")
/**
* The cost of mana per brew.
* For Tainted Blood Pendant, it is cost / duration / effectLevel * 2.5 per tick.
*/
.cost(5000)
/**
* The effect you want to specify for the Brew,
* can be specified for multiple times for applying
* multiple effects at once.
* The parameters come the same as /effect,
* except for duration is in ticks, not seconds.
*/
.effect("minecraft:water_breathing", 4800 * 20)
.effect("botania:allure", 300 * 20, 0, false, false)
/**
* Set to deny incense for this brew.
*/
.noIncense()
/**
* Set to deny pendant infusing for this brew.
*/
.noPendant()
})
In server_scripts:
onEvent("recipes", event => {
event.remove({ output: "botania:livingrock" })
event.recipes.botania.mana_infusion("minecraft:acacia_boat", "minecraft:acacia_door", 200, "minecraft:acacia_log")
event.recipes.botania.elven_trade(["minecraft:acacia_boat"], "minecraft:diamond")
event.recipes.botania.elven_trade(["minecraft:acacia_boat", "minecraft:acacia_button"], ["minecraft:diamond_block", "minecraft:gold_ingot"])
event.recipes.botania.pure_daisy("minecraft:acacia_button", "minecraft:acacia_leaves")
event.recipes.botania.pure_daisy("minecraft:acacia_button", "minecraft:stone", 1)
event.recipes.botania.brew("kubejs:torrent", ["minecraft:acacia_boat"])
event.recipes.botania.petal_apothecary("minecraft:acacia_boat", ["minecraft:acacia_button"])
event.recipes.botania.runic_altar("minecraft:acacia_boat", ["minecraft:acacia_button", "minecraft:acacia_door"], 5000)
event.recipes.botania.terra_plate("minecraft:acacia_boat", ["minecraft:acacia_button", "minecraft:acacia_door"], 5000000)
event.recipes.botania.orechid("minecraft:acacia_button", "minecraft:acacia_fence", 1)
event.recipes.botania.orechid_ignem("minecraft:acacia_leaves", "minecraft:acacia_fence_gate", 1)
event.recipes.botania.marimorphosis("minecraft:acacia_door", "minecraft:acacia_fence_gate", 1, ["plains"], 10)
})
评论 0
登录后参与评分
还没有评论,来抢沙发吧