added automatic teleportation to the spot and made the house out of glass for better visualization

This commit is contained in:
Isadora White 2025-01-31 15:25:41 -08:00
parent de3049b443
commit 69a830c9f2

View file

@ -502,7 +502,19 @@ function printMatrix(matrix) {
// main:
const resultMatrix = generateSequentialRooms(20, 10, 20, 10);
printMatrix(resultMatrix)
let blueprint = matrixToBlueprint(resultMatrix,[142, -60, -179])
const glass_matrix = resultMatrix.map((layer) => {
return layer.map((row) => {
return row.map((cell) => {
if (cell === 'stone') {
return 'purple_stained_glass';
}
return cell;
})
})
});
console.log(glass_matrix)
let blueprint = matrixToBlueprint(glass_matrix,[194, -60, -94])
console.log(blueprint)
import mineflayer from "mineflayer";
@ -526,6 +538,8 @@ bot.on('spawn', async () => {
}
console.log(commands.slice(-10));
bot.chat('I have built the house!');
bot.chat('/tp @a ' + nearbyPosition.x + ' ' + nearbyPosition.y + ' ' + nearbyPosition.z);
// Print out the location nearby the blueprint
console.log(`tp ${nearbyPosition.x} ${nearbyPosition.y} ${nearbyPosition.z}`)