mirror of
https://github.com/kolbytn/mindcraft.git
synced 2025-09-04 05:13:04 +02:00
added automatic teleportation to the spot and made the house out of glass for better visualization
This commit is contained in:
parent
de3049b443
commit
69a830c9f2
1 changed files with 15 additions and 1 deletions
|
@ -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}`)
|
||||
|
|
Loading…
Add table
Reference in a new issue