Experimental Scripts
Experimental Scripts
These are monolithic prototypes that duplicate module functionality. They were created during development to test ideas but should be refactored to use the existing module system.
Files
autonomous-survival.js
Role-based survival bot (survivor, helper, gatherer, guard, explorer). Duplicates AutoSurvival, Mining modules.
autonomous-v2.js
Phase-based progression bot (SPAWN -> EARLY_WOOD -> BASIC_TOOLS -> FOOD_SEARCH -> STONE_AGE -> ESTABLISHED). Contains working fixes:
lookAt()beforedig()to prevent "Digging aborted" errors- Manual movement fallback when pathfinder returns without moving
- Crafting table support for 3x3 recipes
Recommended Approach
Instead of using these monolithic scripts:
- Use
2b2t-escape.js- Production-ready bot using proper modules - Enhance existing modules - Add features to
src/modules/ - Create new entry points - Compose modules like
2b2t-escape.jsdoes
Useful Code to Extract
The manual movement fallback in these scripts works better than raw pathfinder:
async manualMoveToward(target, timeout = 3000) {
const dir = target.minus(bot.entity.position).normalize();
await bot.lookAt(target);
bot.setControlState('forward', true);
bot.setControlState('sprint', true);
// ... with stuck detection and jump recovery
}
This pattern should be integrated into DumbWalkModule.