create-the-brass-oncerto/kubejs/client_scripts/Ponder/multiblock_structure/hydropress.txt

211 lines
9.3 KiB
Plaintext

Ponder.registry((event) => {
event
.create(["kubejs:hydropress", "ad_astra:steel_block", "createbigcannons:molten_steel_bucket"])
.tag("kubejs:machine_and_multiblock")
.scene(
"kubejs:use_hydropress",
"使用液压机",
"kubejs:hydropress",
(scene, utils) => {
scene.configureBasePlate(0, 0, 9);
scene.showStructure(5);
scene.world.showIndependentSectionImmediately([3, 6, 0, 5, 13, 3])
const link = scene.world.showIndependentSectionImmediately([3, 6, 4, 5, 13, 7]);
scene.scaleSceneView(0.7);
scene.idle(20);
scene.addKeyframe();
scene.text(80, "液压机可以将金属流体压制成金属块,把金属块压制成大量金属板");
scene.idle(120);
scene.addKeyframe();
scene.text(60, "首先,液压机核心附近必须拥有正确的基础结构:");
scene.overlay.showOutline("blue", {}, [4, 3, 2], 60);
scene.idle(80);
scene.addKeyframe();
scene.text(60, "液压机应当朝向黄铜漏斗", [4, 3, 2]);
scene.overlay.showOutline("blue", {}, [4, 3, 2], 60);
scene.idle(40);
scene.rotateCameraY(-45);
scene.idle(40);
scene.addKeyframe();
scene.text(60, "起重机杆应当被提供正确的转向", [4, 4, 3]);
scene.overlay.showOutline("blue", {}, [4, 4, 3, 4, 7, 3], 60);
scene.world.modifyTileNBT([5, 3, 2], (nbt) => { nbt.Speed = -128.0 });
scene.world.modifyTileNBT([3, 3, 2], (nbt) => { nbt.Speed = 128.0 });
scene.world.modifyTileNBT([5, 2, 3], (nbt) => { nbt.Speed = 128.0 });
scene.world.modifyTileNBT([3, 2, 3], (nbt) => { nbt.Speed = -128.0 });
scene.world.modifyTileNBT([4, 2, 3, 4, 7, 3], (nbt) => { nbt.Speed = -128.0 });
for (let i = 4; i < 9; i++) {
scene.idle(15);
scene.effects.rotationDirectionIndicator([4, i, 3])
}
scene.addKeyframe();
scene.text(60, "接着,你需要通过动力泵输入水");
scene.idle(40);
scene.rotateCameraY(-45);
scene.idle(40);
scene.text(60, "如果一切正确,那么你应该会看到液压机核心内出现了液压液");
scene.overlay.showOutline("blue", {}, [4, 3, 2], 30);
scene.idle(80);
scene.addKeyframe();
scene.text(60, "接下来利用机械手、动力泵等物件在指定位置放置好输入的材料");
scene.overlay.showOutline("green", {}, [3, 2, 5, 5, 2, 7], 60);
scene.idle(40);
scene.rotateCameraY(90);
scene.idle(40);
scene.text(60, "...同时还要保持工作路径上没有其它方块");
scene.overlay.showOutline("red", {}, [3, 3, 5, 5, 5, 7], 60);
scene.idle(80);
scene.text(60, "在满足输入材料并且没有其它问题时,液压机便会开始工作");
for (let i1 = 3; i1 < 6; i1++) {
for (let i2 = 5; i2 < 8; i2++) {
scene.world.setBlock([i1, 2, i2], "minecraft:iron_block", true);
scene.idle(5);
}
}
scene.addKeyframe();
scene.idle(35);
scene.text(60, "接着只需要等待液压机复位即可");
for (let i1 = 3; i1 < 6; i1++) {
for (let i2 = 5; i2 < 8; i2++) {
scene.world.setBlock([i1, 2, i2], "minecraft:air", true);
}
}
scene.world.setBlock([4, 3, 3], "create_connected:inverted_gearshift", true);
scene.world.modifyBlock([4, 3, 3], state => state.with("axis", "y"), false)
scene.world.modifyTileNBT([4, 3, 3, 4, 8, 3], (nbt) => { nbt.Speed = 128.0 });
scene.world.moveSection(link, [0, -3, 0], 20)
scene.idle(20);
scene.world.flapFunnel([4, 3, 1], false);
scene.world.createItemEntity([4, 3, 1], Direction.north, "64x create:iron_sheet");
scene.idle(10);
scene.world.flapFunnel([4.5, 3.5, 1], false);
scene.world.createItemEntity([4.5, 3.5, 1], Direction.north, "17x create:iron_sheet");
scene.idle(10);
scene.world.setBlock([4, 3, 3], "create:gearshift", true);
scene.world.modifyBlock([4, 3, 3], state => state.with("axis", "y"), false)
scene.world.modifyTileNBT([4, 3, 3, 4, 8, 3], (nbt) => { nbt.Speed = -128.0 });
scene.world.moveSection(link, [0, 3, 0], 20)
scene.idle(40);
scene.addKeyframe();
scene.text(80, "如果遇到错误,请将液压机所有结构恢复到初始状态并重新放置液压机核心");
}
)
.scene(
"kubejs:hydropress",
"建造液压机",
"kubejs:hydropress",
(scene, utils) => {
scene.configureBasePlate(0, 0, 9);
scene.showStructure(14);
scene.scaleSceneView(0.4);
scene.text(60, "你需要在液压机核心附近建造结构来完成液压机");
scene.idle(80);
scene.addKeyframe();
scene.text(30, "...建造如下结构");
scene.world.hideSection([0, 1, 0, 8, 14, 8], Direction.up);
scene.idle(40);
scene.text(60, "如果你对方块种类有疑问,可以点击放大镜图标");
scene.idle(40);
scene.addKeyframe();
const Layer1 = [[3, 1, 1], [4, 1, 1], [5, 1, 1], [3, 1, 2], [4, 1, 2], [5, 1, 2], [3, 1, 3], [4, 1, 3], [5, 1, 3], [2, 1, 4], [6, 1, 4], [2, 1, 8], [6, 1, 8]]
const Layer2 = [[4, 2, 2], [3, 2, 3], [4, 2, 3], [5, 2, 3], [2, 2, 4], [3, 2, 4], [4, 2, 4], [5, 2, 4], [6, 2, 4], [2, 2, 5], [6, 2, 5], [2, 2, 6], [6, 2, 6], [2, 2, 7], [6, 2, 7], [2, 2, 8], [3, 2, 8], [4, 2, 8], [5, 2, 8], [6, 2, 8]]
const Layer3 = [[4, 3, 1], [3, 3, 2], [4, 3, 2], [5, 3, 2], [4, 3, 3]]
const Layer4 = [[4, 4, 2], [4, 4, 3]]
const Layer5 = [[4, 5, 1], [3, 5, 2], [4, 5, 2], [5, 5, 2], [4, 5, 3]]
const Layer6 = [[4, 6, 1], [3, 6, 2], [4, 6, 2], [5, 6, 2], [4, 6, 3]]
const Layer7 = [[4, 7, 1], [3, 7, 2], [4, 7, 2], [5, 7, 2], [4, 7, 3]]
const Layer8 = [[4, 8, 1], [3, 8, 2], [4, 8, 2], [5, 8, 2]]
const Layer9 = [[4, 9, 2], [4, 10, 2]]
const Piston = [[3, 6, 5], [4, 6, 5], [5, 6, 5], [3, 6, 6], [4, 6, 6], [5, 6, 6], [3, 6, 7], [4, 6, 7], [5, 6, 7], [4, 7, 5], [3, 7, 6], [4, 7, 6], [5, 7, 6], [4, 7, 7], [4, 7, 4], [4, 8, 5], [3, 8, 6], [4, 8, 6], [5, 8, 6], [4, 8, 7], [4, 9, 6], [4, 10, 6], [4, 11, 6], [4, 12, 6], [4, 13, 6]]
scene.addKeyframe();
scene.text(30, "第 1 层:", [3, 1, 4])
for (let i of Layer1) {
scene.idle(2);
scene.world.showSection(i, Direction.down);
};
scene.idle(40);
scene.addKeyframe();
scene.text(30, "第 2 层:", [3, 2, 4])
for (let i of Layer2) {
scene.idle(2);
scene.world.showSection(i, Direction.down);
};
scene.idle(40);
scene.addKeyframe();
scene.text(30, "第 3 层:", [3, 3, 4])
for (let i of Layer3) {
scene.idle(2);
scene.world.showSection(i, Direction.down);
};
scene.idle(40);
scene.rotateCameraY(-90);
scene.idle(40);
scene.addKeyframe();
scene.text(30, "第 4 层:", [3, 4, 4])
for (let i of Layer4) {
scene.idle(2);
scene.world.showSection(i, Direction.down);
};
scene.idle(40);
scene.addKeyframe();
scene.text(30, "第 5 层:", [3, 5, 4])
for (let i of Layer5) {
scene.idle(2);
scene.world.showSection(i, Direction.down);
};
scene.idle(40);
scene.addKeyframe();
scene.text(30, "第 6 层:", [3, 6, 4])
for (let i of Layer6) {
scene.idle(2);
scene.world.showSection(i, Direction.down);
};
scene.idle(40);
scene.addKeyframe();
scene.text(30, "第 7 层:", [3, 7, 4])
for (let i of Layer7) {
scene.idle(2);
scene.world.showSection(i, Direction.down);
};
scene.idle(40);
scene.addKeyframe();
scene.text(30, "第 8 层:", [3, 8, 4])
for (let i of Layer8) {
scene.idle(2);
scene.world.showSection(i, Direction.down);
};
scene.idle(40);
scene.addKeyframe();
scene.text(30, "第 9 , 10 层:", [3, 9.5, 4])
for (let i of Layer9) {
scene.idle(2);
scene.world.showSection(i, Direction.down);
};
scene.idle(80);
scene.addKeyframe();
scene.text(60, "接着建造运动部分并用胶水组装:");
scene.idle(30);
scene.addKeyframe();
for (let i of Piston) {
scene.idle(2);
scene.world.showSection(i, Direction.down);
};
scene.addKeyframe();
scene.idle(30);
scene.overlay.showOutline("red", {"glue": true}, [3, 6, 5], 15);
scene.showControls(30, [3, 6, 5], "right").rightClick().withItem("create:super_glue")
scene.idle(10);
scene.overlay.showOutline("blue", {"glue": true}, [5, 13, 7], 15);
scene.showControls(30, [5, 13, 7], "left").rightClick().withItem("create:super_glue")
scene.idle(10);
scene.overlay.showOutline("green", {"glue": true}, [3, 6, 5, 5, 13, 7], 60);
scene.addKeyframe();
scene.idle(80);
scene.rotateCameraY(-90);
scene.idle(40);
scene.rotateCameraY(-90);
scene.idle(40);
scene.rotateCameraY(-90);
scene.idle(40);
})
});