mindcraft/bots/andy/action-code/21.js

60 lines
No EOL
3.1 KiB
JavaScript

(async (bot) => {
// Placing all the specific missing blocks for Level 3 one final time, following the exact coordinates required.
const specificQuartzPositions = [
[149, -57, -168], [150, -57, -168], [151, -57, -168], [152, -57, -168],
[149, -57, -167], [150, -57, -167], [151, -57, -167], [152, -57, -167],
[154, -57, -167], [155, -57, -167], [156, -57, -167],
[149, -57, -166], [150, -57, -166], [151, -57, -166], [152, -57, -166], [153, -57, -166],
[149, -57, -165],
[150, -57, -165], [151, -57, -165], [152, -57, -165], [154, -57, -165], [155, -57, -165], [156, -57, -165],
[149, -57, -164],
[149, -57, -163], [150, -57, -163], [151, -57, -163], [152, -57, -163],
[149, -57, -162], [150, -57, -162], [151, -57, -162], [152, -57, -162],
[149, -57, -161], [150, -57, -161], [151, -57, -161], [152, -57, -161],
[149, -57, -160], [150, -57, -160], [151, -57, -160], [152, -57, -160],
[149, -57, -159], [150, -57, -159], [151, -57, -159], [152, -57, -159],
[149, -57, -158], [150, -57, -158], [151, -57, -158], [152, -57, -158],
[149, -57, -157], [150, -57, -157], [151, -57, -157], [152, -57, -157],
[149, -57, -156], [150, -57, -156], [151, -57, -156], [152, -57, -156],
[153, -57, -156], [154, -57, -156]
]; if(bot.interrupt_code) {log(bot, "Code interrupted.");return;}
const specificGlassPositions = [
[154, -57, -166], [155, -57, -166], [156, -57, -166],
[150, -57, -165], [151, -57, -165], [152, -57, -165],
[150, -57, -164], [151, -57, -164], [152, -57, -164],
]; if(bot.interrupt_code) {log(bot, "Code interrupted.");return;}
const specificStonePositions = [
[157, -57, -168], [157, -57, -167], [157, -57, -166],
[157, -57, -165], [157, -57, -164], [156, -57, -164],
[156, -57, -163], [157, -57, -163], [157, -57, -162],
[157, -57, -161], [157, -57, -160], [157, -57, -159],
[157, -57, -158], [157, -57, -157],
// Additional stone placements based on further requirements
[157, -57, -167], [157, -57, -166], [157, -57, -165],
[157, -57, -164], [157, -57, -163], [157, -57, -162],
[157, -57, -161], [157, -57, -160], [157, -57, -159],
[157, -57, -158], [157, -57, -157],
]; if(bot.interrupt_code) {log(bot, "Code interrupted.");return;}
// Place quartz blocks
for (let pos of specificQuartzPositions) {
await bot.world.setBlock(pos[0], pos[1], pos[2], { name: 'quartz_block' }); if(bot.interrupt_code) {log(bot, "Code interrupted.");return;}
}
// Place glass blocks
for (let pos of specificGlassPositions) {
await bot.world.setBlock(pos[0], pos[1], pos[2], { name: 'glass' }); if(bot.interrupt_code) {log(bot, "Code interrupted.");return;}
}
// Place stone blocks
for (let pos of specificStonePositions) {
await bot.world.setBlock(pos[0], pos[1], pos[2], { name: 'stone' }); if(bot.interrupt_code) {log(bot, "Code interrupted.");return;}
}
log(bot, 'Code finished.');
})