diff --git a/core/src/NestedStateModules/deathFunction.ts b/core/src/NestedStateModules/deathFunction.ts index 83090c3..13498db 100644 --- a/core/src/NestedStateModules/deathFunction.ts +++ b/core/src/NestedStateModules/deathFunction.ts @@ -6,6 +6,7 @@ import BehaviorLoadConfig from '@/BehaviorModules/BehaviorLoadConfig' import StartWork from '@/NestedStateModules/startWorkFunction' import Commands from '@/NestedStateModules/commandsFunction' import GoSleep from '@/NestedStateModules/goSleepFunction' +import GoChestsFunctions from '@/NestedStateModules/getReady/goChestsFunctions' import { Bot } from 'mineflayer' function deathFunction(bot: Bot, targets: LegionStateMachineTargets) { @@ -22,6 +23,10 @@ function deathFunction(bot: Bot, targets: LegionStateMachineTargets) { commands.x = 325 commands.y = 263 + const goChests = GoChestsFunctions(bot, targets) + goChests.x = 725 + goChests.y = 413 + const playerEntity = new BehaviorGetPlayer(bot, targets) playerEntity.stateName = 'Search Player' playerEntity.x = 525 @@ -124,12 +129,15 @@ function deathFunction(bot: Bot, targets: LegionStateMachineTargets) { new StateTransition({ // 10 parent: goSleep, - child: startWork, + child: goChests, shouldTransition: () => goSleep.isFinished() || targets.isNight === false }), - - + new StateTransition({ // 11 + parent: goChests, + child: startWork, + shouldTransition: () => goChests.isFinished() + }), ] function reloadTrigger() {