mirror of
https://github.com/kolbytn/mindcraft.git
synced 2025-04-29 19:44:53 +02:00
use cheats for farming, default no code timeout
This commit is contained in:
parent
66a03bf893
commit
c5b37dc2c7
2 changed files with 8 additions and 3 deletions
|
@ -32,7 +32,7 @@ export default
|
|||
"show_bot_views": false, // show bot's view in browser at localhost:3000, 3001...
|
||||
|
||||
"allow_insecure_coding": false, // allows newAction command and model can write/run code on your computer. enable at own risk
|
||||
"code_timeout_mins": 10, // minutes code is allowed to run. -1 for no timeout
|
||||
"code_timeout_mins": -1, // minutes code is allowed to run. -1 for no timeout
|
||||
|
||||
"max_messages": 15, // max number of messages to keep in context
|
||||
"num_examples": 2, // number of examples to give to the model
|
||||
|
|
|
@ -1269,12 +1269,17 @@ export async function tillAndSow(bot, x, y, z, seedType=null) {
|
|||
* let position = world.getPosition(bot);
|
||||
* await skills.till(bot, position.x, position.y - 1, position.x);
|
||||
**/
|
||||
console.log(x, y, z)
|
||||
x = Math.round(x);
|
||||
y = Math.round(y);
|
||||
z = Math.round(z);
|
||||
let block = bot.blockAt(new Vec3(x, y, z));
|
||||
console.log(x, y, z)
|
||||
|
||||
if (bot.modes.isOn('cheat')) {
|
||||
placeBlock(bot, x, y, z, 'farmland');
|
||||
placeBlock(bot, x, y+1, z, seedType);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (block.name !== 'grass_block' && block.name !== 'dirt' && block.name !== 'farmland') {
|
||||
log(bot, `Cannot till ${block.name}, must be grass_block or dirt.`);
|
||||
return false;
|
||||
|
|
Loading…
Add table
Reference in a new issue