mirror of
https://github.com/kolbytn/mindcraft.git
synced 2025-04-21 21:52:07 +02:00
reset modes
This commit is contained in:
parent
0e251a7588
commit
6915cc15ac
1 changed files with 5 additions and 5 deletions
|
@ -19,7 +19,7 @@ const modes = [
|
||||||
name: 'self_preservation',
|
name: 'self_preservation',
|
||||||
description: 'Respond to drowning, burning, and damage at low health. Interrupts other actions.',
|
description: 'Respond to drowning, burning, and damage at low health. Interrupts other actions.',
|
||||||
interrupts: ['all'],
|
interrupts: ['all'],
|
||||||
on: false,
|
on: true,
|
||||||
active: false,
|
active: false,
|
||||||
fall_blocks: ['sand', 'gravel', 'concrete_powder'], // includes matching substrings like 'sandstone' and 'red_sand'
|
fall_blocks: ['sand', 'gravel', 'concrete_powder'], // includes matching substrings like 'sandstone' and 'red_sand'
|
||||||
update: async function (agent) {
|
update: async function (agent) {
|
||||||
|
@ -69,7 +69,7 @@ const modes = [
|
||||||
name: 'cowardice',
|
name: 'cowardice',
|
||||||
description: 'Run away from enemies. Interrupts other actions.',
|
description: 'Run away from enemies. Interrupts other actions.',
|
||||||
interrupts: ['all'],
|
interrupts: ['all'],
|
||||||
on: false,
|
on: true,
|
||||||
active: false,
|
active: false,
|
||||||
update: async function (agent) {
|
update: async function (agent) {
|
||||||
const enemy = world.getNearestEntityWhere(agent.bot, entity => mc.isHostile(entity), 16);
|
const enemy = world.getNearestEntityWhere(agent.bot, entity => mc.isHostile(entity), 16);
|
||||||
|
@ -85,7 +85,7 @@ const modes = [
|
||||||
name: 'self_defense',
|
name: 'self_defense',
|
||||||
description: 'Attack nearby enemies. Interrupts other actions.',
|
description: 'Attack nearby enemies. Interrupts other actions.',
|
||||||
interrupts: ['all'],
|
interrupts: ['all'],
|
||||||
on: false,
|
on: true,
|
||||||
active: false,
|
active: false,
|
||||||
update: async function (agent) {
|
update: async function (agent) {
|
||||||
const enemy = world.getNearestEntityWhere(agent.bot, entity => mc.isHostile(entity), 8);
|
const enemy = world.getNearestEntityWhere(agent.bot, entity => mc.isHostile(entity), 8);
|
||||||
|
@ -101,7 +101,7 @@ const modes = [
|
||||||
name: 'hunting',
|
name: 'hunting',
|
||||||
description: 'Hunt nearby animals when idle.',
|
description: 'Hunt nearby animals when idle.',
|
||||||
interrupts: ['defaults'],
|
interrupts: ['defaults'],
|
||||||
on: false,
|
on: true,
|
||||||
active: false,
|
active: false,
|
||||||
update: async function (agent) {
|
update: async function (agent) {
|
||||||
const huntable = world.getNearestEntityWhere(agent.bot, entity => mc.isHuntable(entity), 8);
|
const huntable = world.getNearestEntityWhere(agent.bot, entity => mc.isHuntable(entity), 8);
|
||||||
|
@ -147,7 +147,7 @@ const modes = [
|
||||||
name: 'torch_placing',
|
name: 'torch_placing',
|
||||||
description: 'Place torches when idle and there are no torches nearby.',
|
description: 'Place torches when idle and there are no torches nearby.',
|
||||||
interrupts: ['followPlayer'],
|
interrupts: ['followPlayer'],
|
||||||
on: false,
|
on: true,
|
||||||
active: false,
|
active: false,
|
||||||
update: function (agent) {
|
update: function (agent) {
|
||||||
// TODO: check light level instead of nearby torches, block.light is broken
|
// TODO: check light level instead of nearby torches, block.light is broken
|
||||||
|
|
Loading…
Add table
Reference in a new issue