mirror of
https://github.com/kolbytn/mindcraft.git
synced 2025-07-30 03:45:36 +02:00
test blueprint layout file
This commit is contained in:
parent
9575437d56
commit
a383ee9d14
5 changed files with 43 additions and 0 deletions
0
Dockerfile
Normal file
0
Dockerfile
Normal file
6
randy.json
Normal file
6
randy.json
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"name": "randy",
|
||||
|
||||
"model": "gpt-4o-mini"
|
||||
|
||||
}
|
25
src/utils/blueprint_generation.js
Normal file
25
src/utils/blueprint_generation.js
Normal file
|
@ -0,0 +1,25 @@
|
|||
|
||||
export class BlueprintGenerator {
|
||||
constructor(num_levels,
|
||||
num_rooms,
|
||||
room_height,
|
||||
materials) {
|
||||
this.blueprint = {
|
||||
"name": "Blueprint",
|
||||
"nodes": [],
|
||||
"connections": []
|
||||
};
|
||||
}
|
||||
|
||||
addNode(node) {
|
||||
this.blueprint.nodes.push(node);
|
||||
}
|
||||
|
||||
addConnection(connection) {
|
||||
this.blueprint.connections.push(connection);
|
||||
}
|
||||
|
||||
getBlueprint() {
|
||||
return this.blueprint;
|
||||
}
|
||||
}
|
11
test/test_blueprint_layout.js
Normal file
11
test/test_blueprint_layout.js
Normal file
|
@ -0,0 +1,11 @@
|
|||
|
||||
const bot = mineflayer.createBot({
|
||||
host: 'localhost', // Replace with your server IP or hostname
|
||||
port: 55916, // Replace with your server port
|
||||
username: 'andy', // Replace with your bot's username
|
||||
// password: 'your_bot_password' // Only if the server has online-mode=true
|
||||
});
|
||||
|
||||
this.bot.on('spawn', async () => {
|
||||
bot.chat("/setblock ~ ~ ~ stone");
|
||||
});
|
|
@ -11,6 +11,7 @@ const bot = mineflayer.createBot({
|
|||
});
|
||||
|
||||
bot.on('spawn', async () => {
|
||||
bot.chat("/setblock ~ ~ ~ stone");
|
||||
console.log("Bot spawned. Starting blueprint check...");
|
||||
await new Promise((resolve) => setTimeout(resolve, 5000));
|
||||
const blockAtLocation = await bot.blockAt(new Vec3(142, -60, -179));
|
||||
|
|
Loading…
Add table
Reference in a new issue