本 Mod 是 Create: Vintage Improvements 的 KubeJS 附属,允许对其进行魔改。
配方脚本展示:
ServerEvents.recipes((event) => {
const { vintageimprovements } = event.recipes
// 离心机[支持多输入输出]
vintageimprovements.centrifugation([
Item.of("minecraft:apple").withChance(0.5),
Fluid.of("minecraft:lava", 500)
], [
Fluid.of("minecraft:water", 500),
]).processingTime(114514).minimalRPM(64)
// 卷簧机[支持多输出]
vintageimprovements.coiling("vintageimprovements:iron_spring", [
"minecraft:iron_ingot"
]).processingTime(114514).springColor("5D595E")
// 冲压机[支持多输出]
vintageimprovements.curving("vintageimprovements:vanadium_rod", [
"vintageimprovements:vanadium_sheet"
]).mode(3).head("minecraft:heart_of_the_sea")
// 杠杆锤[支持多输入多输出]
vintageimprovements.hammering("minecraft:apple", [
"minecraft:iron_block", 3
])
// 激光切割(支持多输出)
vintageimprovements.laser_cutting("vintageimprovements:vanadium_rod", [
"vintageimprovements:vanadium_sheet"
]).energyCost(5000).maxChargeRate(500)
// 磨床抛光[支持多输出]
vintageimprovements.polishing("minecraft:diamond", [
"minecraft:coal_block"
]).speedLimits(1).fragile()
// 加压处理[支持多输出输入]
vintageimprovements.pressurizing([
Item.of("minecraft:apple").withChance(0.5),
Fluid.of("minecraft:lava", 500)
], [
Fluid.of("minecraft:water", 500),
]).heated().secondaryFluidOutput(0)
// 真空处理[支持多输出]
vintageimprovements.vacuumizing([
Item.of("minecraft:apple").withChance(0.5),
Fluid.of("minecraft:lava", 500)
], [
Fluid.of("minecraft:water", 500),
]).heated().secondaryFluidOutput(0)
// 车床[支持多输出]
vintageimprovements.turning("minecraft:sand", [
"minecraft:iron_block"
]).processingTime(114514)
// 振动[支持多输出]
vintageimprovements.vibrating("minecraft:diamond", [
"minecraft:coal_block"
]).processingTime(114514)
})
物品注册脚本展示:
StartupEvents.registry("item", (event) => {
event.create("small_spring", 'vintageimprovements:spring')
.texture("example:item/small_spring")
.tag("vintageimprovements:small_springs")
event.create("spring", 'vintageimprovements:spring')
.texture("example:item/spring")
.tag("vintageimprovements:springs")
.setStiffness(150)
})