Example Repository for making custom altoclef commands and tasks
View the Programming VOD for an overview of everthing in this repo and more.
- Copy this repo/make a template repository
- If you are using an IDE and its linting isn't working, run
gradle build
once (it should download altoclef dependencies and kick in from there) - run
gradle runClient
. Load into a world. Send the example command to verify the repo works (@example
) - Use the examples to add your own custom commands and tasks.
- Always implement
isEqual
! - Whenever going to the closest object, remember the ping pong movement issue (to approach one goal it gets closer to another). This can be fixed in one of the following ways:
- Committing to one (
_target = closest
,if (target != null) {do to closest}
) - Use
DoToClosestBlockTask
/DoToClosestEntityTask
- Committing to one (
- What if your target is surrounded in bedrock or is floating way too high up in the air? If a block is unreachable/the bot fails to get there: Use
mod.getBlockTracker().unreachable(blockpos)
- Learning how to use a debugger is crucial to speeding up the debugging process!
- Hot Swapping can be done in Intellij, it lets you reload your code changes without restarting Minecraft.
- Commands with arguments examples
- A task demonstrating each system that you may use with the bot.