Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
MiranCZ committed Apr 12, 2024
1 parent d8ebb5c commit 84c2ca1
Show file tree
Hide file tree
Showing 181 changed files with 6,378 additions and 8,688 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# User-specific stuff
.idea/
.vs/
baritone/

*.iml
*.ipr
Expand Down
64 changes: 17 additions & 47 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,73 +1,43 @@
# altoclef
# AltoClef
*Plays block game.*

Plays block game.
*Powered by Baritone.*

Powered by Baritone.
A client side bot that tries to beat Minecraft on its own...

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.
**This fork is still under development and is nowhere near perfect, if you have any questions, suggestions, ideas or find a bug don't hesitate to reach out!
You can use the [issues](https://github.com/MiranCZ/altoclef/issues). Or contact me on discord!**

Became [the first bot to beat Minecraft fully autonomously](https://youtu.be/baAa6s8tahA) on May 24, 2021.

**Join the [Discord Server](https://discord.gg/JdFP4Kqdqc)** for discussions/updates/goofs & gaffs

## About this fork
This fork aims to optimize `BeatMinecraftTask` by trying to fix a lot of cases where the bot gets stuck and improving some of the tasks.

You can look at the [changelog](changelog.md) if you are interested.

Because I rewrote a good portion of the `BeatMinecraftTask` a lot of the config settings don't work. Although I plan to implement configs in the future of course.

## How it works

Take a look at this [Guide from the wiki](https://github.com/gaucho-matrero/altoclef/wiki/1:-Documentation:-Big-Picture)
Take a look at this [Guide from the wiki](https://github.com/MiranCZ/altoclef/wiki/1:-Documentation:-Big-Picture)
or this [Video explanation](https://youtu.be/q5OmcinQ2ck?t=387)

## 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](https://drive.google.com/file/d/1axVYYMJ5VjmVHaWlCifFHTwiXlFssOUc/view?usp=sharing)
- 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.

### Nightly Release (Recommended) (has the latest bug fixes)

Start by downloading [the Latest Long Term Release](https://github.com/gaucho-matrero/altoclef/releases),
then [Download the Nightly](https://nightly.link/gaucho-matrero/altoclef/workflows/gradle/main/Artifacts.zip) &
replace `altoclef-4.0-SNAPSHOT.jar`.

If the Nightly Link doesn't work, check the latest [Build Action](https://github.com/gaucho-matrero/altoclef/actions)
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`

### Long Term Release

[Check releases](https://github.com/gaucho-matrero/altoclef/releases). Note you will need to copy over both jar files
for the mod to work.

### 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:

- [AltoClef jar](https://github.com/Meloweh/altoclef/releases)
- [Baritone jar](https://github.com/Meloweh/baritone/releases)
[Check releases](https://github.com/MiranCZ/altoclef/releases)

### Versions

This is a **fabric only** mod, currently only available for **Minecraft 1.19.2-1.19.4**.

For older MC versions, try [multiconnect](https://www.curseforge.com/minecraft/mc-mods/multiconnect) (NOTE: multiconnect
is untested and not affiliated with altoclef, use at your own risk!)
This is a **fabric only** mod, currently only available only for **Minecraft 1.20.2**.

## [Usage Guide](usage.md)

## [TODO's/Future Features](todos.md)
## [TODO's/Future Features](TODO.md)

## [Development Guide](develop.md)
14 changes: 14 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# TODO

### Misc
- Implement configs.
- Allow any bed color when crafting beds from wool.
- Add cherry blossom wood as a valid wood type or something? It doesn't seem to work properly atm.
- Maybe add some sort of system that finds and uses seed of the current world?


### Common death causes
- Improve escaping from lava.
- Do not hit pigmen in the nether (or implement a special behaviour when do).
- Prevent from looking endermen in the eyes.
- Maybe avoid bastions somehow?
60 changes: 60 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Change Log
*(this list may not contain all the changes, but I tried to list most of them)*

### Misc
- Fixed set gamma not working
- Blacklist wool in ancient cities
- Removed wandering and looking through chunks when looking for stronghold causing massive lag spikes
- Removed render distance manipulation
- Improved and fixed a lot of cases, where the bot gets stuck in an infinite loop/dies
- Removed usage of twisting vines
- Improved one cycle

### Removed usage of blast furnace
The bot currently gets **11** iron, (**6** for two buckets, **3** for pickaxe, **1** for shield, **1** for flint and steel) and **5** gold for golden helmet.

Blast furnace makes your smelting twice as fast, but it comes at a cost of crafting it.

To craft a blast furnace you need **5** iron and **3** smooth stone (done by smelting **3** normal stone).

So you need to smelt **11** items to craft a blast furnace (**5** iron, **3** cobblestone to make stone and **3** stone to make smooth stone).

Without a blast furnace you just need to smelt **11** items, with a blast furnace you need to smelt **11** items for even making it and additional **5.5** items for tools (**11** items two times faster).

**So it is currently not worth making a blast furnace even when we don't consider additional resources we use such as coal etc.**

### Rewrote most of `BeatMinecraftTask`

I changed the way tasks are selected to be more dynamic.

Each task gets some priority and is executed according to it,
if you want to understand this more in depth you can look at the [wiki](https://github.com/MiranCZ/altoclef/wiki/2:-Documentation:-The-task-priority-system).

### Useless items
The bot has a long handwritten list (hopefully a config in the future as well) of useless items that it throws out as soon as it picks them up.

### Chest looting
It now loots almost any chest, not a just ones from ruined portals and dessert temples.

### Rewrote BlockTracker
The new block tracker now keeps track of all blocks in loaded chunks instead of only scanning the ones the bot needs atm.

I plan on adding a config for this (amongst other things in the future, but its currently hardcoded).

It is not super optimized and I might edit it in the future.


### Iron pickaxe saving
Sometimes the bot would break its iron pickaxe before getting a diamond one. This caused it to mine additional 3 iron and craft another iron pickaxe.

Instead, I made it so that the bot doesn't use the iron pickaxe, when it doesn't need to once it gets to a low durability.

### Improved status overlay
The new status overlay is a bit smaller and has some color coding.

It also includes name of the class that is executing the tasks as well as the current task chain and its priority.

**OLD:**
![old_overlay.png]()
**NEW:**
![new_overlay.png]()
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ maven_group=gaucho-matrero.altoclef
archives_base_name=altoclef
# Dependencies
# check this on https://modmuss50.me/fabric.html
fabric_version=0.91.2+1.20.2
fabric_version=0.91.6+1.20.2
Loading

0 comments on commit 84c2ca1

Please sign in to comment.