Giter Club home page Giter Club logo

altoclef's Introduction

altoclef

Plays block game.

Powered by Baritone.

A client side bot that can accomplish any Minecraft task that is relatively simple and can be split into smaller tasks. "Relatively Simple" is a vague term, so check the list of current capabilities to see examples.

Became the first bot to beat Minecraft fully autonomously on May 24, 2021.

Join the Discord Server for discussions/updates/goofs & gaffs

How it works

Take a look at this Guide from the wiki or this Video explanation

Current capabilities, Examples:

  • Obtain 400+ Items from a fresh survival world, like diamond armor, cake, and nether brick stairs
  • Dodge mob projectiles and force field mobs away while accomplishing arbitrary tasks
  • Collect + smelt food from animals, hay, & crops
  • Receive commands from chat whispers via /msg. Whitelist + Blacklist configurable (hereby dubbed the Butler System). Here's a Butler system demo video
  • Simple config file that can be reloaded via command (check .minecraft directory)
  • Beat the entire game on its own (no user input.)
  • Print the entire bee movie script with signs in a straight line, automatically collecting signs + bridging materials along the way.
  • Become the terminator: Run away from players while unarmed, gather diamond gear in secret, then return and wreak havoc.

Download

Note: After installing, please move/delete your old baritone configurations if you have any. Preexisting baritone configurations will interfere with altoclef and introduce bugs. This will be fixed in the future.

Alternate Versions (Recommended) (Unofficial)

If you are looking for 1.19.2 - 1.19.4 support, check out this gist. Note that these projects are forks of this original project and not directly affliated with Alto Clef. It is also more up-to-date with bug fixes and features.

(old) Nightly Release

Start by downloading the Latest Long Term Release, then Download the Nightly & replace altoclef-4.0-SNAPSHOT.jar.

If the Nightly Link doesn't work, check the latest Build Action that succeeded and download Artifacts.zip (you must be signed into GitHub). Replace your existing altoclef-4.0-SNAPSHOT.jar with the one found in Artifacts.zip

Then, copy altoclef-4.0-SNAPSHOT.jar from Artifacts.zip to ./mods.

Then, copy the baritone-unoptimized-fabric-1.XX.X.jar from the long term release zip file to ./mods

(old) Long Term Release

Check releases. Note you will need to copy over both jar files for the mod to work.

(old) Meloweh's Extra Features Release (Unofficial)

Has some schematic support, command macros and a few utility features. Will eventually be merged, but if you can try it out now if you'd like:

Versions

This is a fabric only mod, currently only available for Minecraft 1.18.

For older MC versions, try multiconnect (NOTE: multiconnect is untested and not affiliated with altoclef, use at your own risk!)

altoclef's People

Contributors

badpiggies007 avatar codef53 avatar diego367 avatar dolphin-cat avatar easyidle123 avatar jamesgreen31 avatar justasqu1d avatar nik77x avatar paloys avatar quadratickid avatar racoondog avatar scorbett123 avatar snivyllama avatar solonovamax avatar solsticespectrum avatar squidoodly avatar tacotechnica avatar theblueburger avatar wagyourtail avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

altoclef's Issues

@stop does not stop baritone

Bug Description

@Stop does not stop baritone

Steps to Reproduce (as best as you can)

Execute a task, then run @stop

Expected Behavior

Baritone and altoclef stops

Actual Behavior

Baritone doesn't stop

Crashlogs (if applicable)

None

MineOrCollect sometimes gets stuck wandering forever even when it should locate blocks

Bug Description

Bot should find but it go go go forever

Steps to Reproduce (as best as you can)

Difficult to reproduce.

Try running a crap ton of commands over and over again, going to and from the nether perhaps

Expected Behavior

After wandering to wait for calculations or a located object, the bot should quickly locate and interact with said object

Actual Behavior

On rare occasions, the bot gets stuck wandering forever

Crashlogs or Screenshots (if applicable)

Image courtesy of @TheBlueBurger
image
^^ Even if logs appear within proximity of the bot, it will still wander forever.

load recipe 'tree' from file

Basically, just remove TaskCatalogue, because stactic stuff is gross.

Recipes should be loaded from a file at runtime.

Move TaskCatalogue to file where users can add/edit recipies if they want

Create a file format that handles recipes, so that people can add custom recipes easily.

Examples:

mine dirt from [dirt, grass_block, grass_path]
mine log[acacia_log, birch_log, crimson_log, dark_oak_log, oak_log, jungle_log, spruce_log, warped_log] from [acacia_log, birch_log, crimson_log, dark_oak_log, oak_log, jungle_log, spruce_log, warped_log]; any dimension
mine cobblestone from [stone, cobblestone] with wooden_pickaxe
mine netherrack with wooden_pickaxe; nether

simple planks from CollectPlanksTask; dont automine
simple cobblestone from CollectCobblestoneTask; dont automine

mob gunpowder CreeperEntity

smelt stone from cobblestone; dont automine

recipe2x2 crafting_table from [planks, planks, planks, planks]
recipe2x2 torch from [coal, , stick, ]

recipeSlab cobblestone_slab using cobblestone
recipeStairs cobblestone_stairs using cobblestone
recipeWall cobblestone_wall using cobblestone

tools wooden from planks

alias wooden_pick from wooden_pickaxe

mobCook porkchop PigEntity.class

crop carrot break carrot plant carrot
crop beetroot break beetroots plant beetroot_seeds
crop beetroot_seeds break beetroots plant beetroot_seeds

PROBLEM:

How to deal with stuff like this?

woodTasks("log", wood -> wood.log, (wood, count) -> new MineAndCollectTask(wood.log, count, new Block[]{Block.getBlockFromItem(wood.log)}, MiningRequirement.HAND));

I could manually write those out. For example:

mine acacia_log
mine birch_log
etc...

I think since this is a text based file it wouldn't hurt to add some extra lines and a comment system to make things more legible. We'll stick with that for now.

Hunt endermen in the nether instead

Your Idea

There is a biome in the nether where endermen are really common, maybe craft a chest before going to the nether, place it in the nether, and then find the biome where endermen spawn and hunt there

Panic mode

Gets triggered when the bot is low in health. Will attempt to hide from monsters, for example, hide in a wall and blocking itself in. If it sees any way to safely get food, it does.

Bot fails to escape lava effectively

Bug Description

Bot is really slow when in lava and easily dies there. Fails in two aspects:

  1. Baritone treats lava as solid blocks and not as a liquid, this makes it hesitate+recalculate a ton when it should just swim
  2. You pick bad "safe" spots, like spots underneath lava. Don't do that.

Steps to Reproduce (as best as you can)

With diamond armor: Idle, then get stuck in lava pool

Expected Behavior

Bot attempts to leave lava and escapes small lava pools pretty reliably with diamond armor

Actual Behavior

Bot pussyfoots around and slowly dies in the lava when it could escape

Bot can't get to place under water

Bug Description

Altoclef very often attempts to go to a place underwater and gets stuck

Steps to Reproduce (as best as you can)

Get the bot to go to a place underwater or the ocean

Expected Behavior

It successfully comes there

Actual Behavior

It gets stuck

Simplify build process

Currently our users don't need to copy over the fabritone jar to TEST the project, but to BUILD it they gotta open up the fabritone project. That's annoying.

When building a full jar the process should be easy. If at all possible, everything should be merged into one jar.

If not, at least every dependent jar should be included somewhere in the build folder.

Can't get stone

Can't believe I didn't find this earlier.

@get stone gets stuck while trying to craft a furnace.

Steps to repeat:
With 8 cobblestone, some fuel (1 coal is fine) and a placed crafting table, run @get stone.

The bot will try to craft a furnace, and will stop right before picking up the furnace from the table, repeating.

Uses Right Click to place when settings are different

Bug Description

If you change your place and break settings Alto Clef will try to use the default controls to place the block.

Steps to Reproduce (as best as you can)

Change Place settings in controls in minecraft then try to get diamond.

Expected Behavior

IT places the block with the user control

Actual Behavior

It places with default controls

Bot gets stuck inside nether portal after entering nether into soulsand biome

How to repeat:

Make the bot enter a portal that is standing on soulsand.

The issue (what it should do vs what it does):

The bot should exit the portal and proceed. Instead, after entering the nether the bot will simply stand in the portal and try to dig downwards into the portal, or trying to place a block on top of the neighboring soulsand.

Bot places chests under blocks

As most people know, you can't open a chest if a block is over it, but altoclef sometimes places a chest under a block and opens it.

Speedrun: One Cycle Dragon Idea

thecamo6 brought up some great descriptions for a one cycle ender dragon kill might look like.

  • Place obsidian above the pillar (either mine from the obsidian pillars or water + lava)
  • Move away from the pillar to wait for perching (keep this part modular), on the same side that you placed the obsidian is best
  • When the dragon perches, stand in the same place and wait for the dragon head to go below a certain height.
  • Once it does, place a bed if not there.
  • If a bed is placed and the head is close to the bed (XZ), right click the bed. Repeat the last few steps.

If no more beds, either suicide to get more beds or proceed to attack the dragon manually.

Double Nested mutex (Minor)

Make this more granular, and test thoroughly to make sure there are no multi-threaded shenanigans.

https://github.com/adrisj7-AltoClef/altoclef/blob/23bb175e0c85b5d5a7918fd9413ffe653f8f21df/src/main/java/adris/altoclef/ConfigState.java#L298

        private void readExtraState(AltoClefSettings settings) {
            synchronized (settings.getBreakMutex()) { // TODO: 2021-05-22 why is there synchronized nesting here?
                synchronized (settings.getPlaceMutex()) {
                    blocksToAvoidBreaking = new HashSet<>(settings.getBlocksToAvoidBreaking());
                    toAvoidBreaking = new ArrayList<>(settings.getBreakAvoiders());
                    toAvoidPlacing = new ArrayList<>(settings.getPlaceAvoiders());
                    protectedItems = new ArrayList<>(settings.getProtectedItems());
                    synchronized (settings.getPropertiesMutex()) {
                        allowWalking = new ArrayList<>(settings.getForceWalkOnPredicates());
                    }
                }
            }
            allowWalkThroughFlowingWater = settings.isFlowingWaterPassAllowed();
            allowShears = settings.areShearsAllowed();

            rayFluidHandling = RayTraceUtils.fluidHandling;
            mineProcSearchAnyFlag = MineProcess.searchAnyFlag;
        }

Bot lets endermen kill it

AltoClef might sometimes randomly look at endermen. This will cause the endermen to attempt to kill the player. There should be a check, if a enderman hits you, the bot fights back, but it should let the normal endermen be alone.

Include baritone jar when building

To create a build, both altoclef and the modified fabritone project must be built separately and then combined.

to make this easier, altoclef should include a copy of baritone-1.6.2.jar in the build directory.

Migrate crafting tree to JSON or YAML files

Currently, you have a massive class which constructs the tree of crafting recipes.
It would be MUCH nicer if that could instead just be a bunch of json files or smth.

Like logs.json, food.json, end.json, nether.json, materials.json, etc.

Doesn't work with legitMine

Baritone has a setting called legitMine, which prevents the bot from locating blocks it wants to mine through walls (kinda like xray), but the bot will continue to do so when legitMine is true.
If this is intended behavior maybe a setting to add legitMine could be added?

Faster Crafting Idea

The bot places items in the slots for each item one at a time. This can be made faster.

Apparently you can click+drag to evenly distribute items? This might make things way faster as the game automatically splits up our items quickly. The bot would still click the output slot one at a time (unless the output slot has just the right amount that we need), but it would reduce the craft time from 50-90%

Getting golden apples is broken

AltoClef cannot craft golden apples correctly. It tries to use iron nuggets, but you need golden ingots to make a golden apple.
image
image

Avoid Dragons Breath

Detect and avoid dragons breath

and

if there is stuff(armor / tools) at the floor pick that up and equip it

Mob Defense Overhaul is Needed

The bot doesn't use a sword when force-fielding enemies away and instead switches away from the sword to an empty hand or random item. In most cases the mobs (especially skeletons because they can shoot) will kill it since the bot can't quickly kill the mobs.

Bot doesn't de-equip item when sleeping in bed

Issue:
If the bot is holding an eye of ender and is instructed to sleep in a bed, it will right click on the bed with an eye of ender and throw the eye.

What should happen:
Before right clicking to interact with anything, the bot should de-equip itself of any usable items (preferably bare handed if inventory not full)

Steps to recreate:
Equip eye of ender, then make bot sleep in bed/set spawn.

Allow to travel between dimensions using @goto

Your Idea

Allow to travel between dimensions using @goto. A few examples:

@goto 0 100 0 = get to 0 100 0 in the current dimention
@goto 0 100 0 nether = get to 0 100 0 in the nether
@goto nether 0 100 0 = get to 0 100 0 in the nether
@goto nether = get to the nether

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.