aboutsummaryrefslogtreecommitdiff
path: root/azalea
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2023-10-08 03:58:57 -0500
committermat <git@matdoes.dev>2023-10-08 03:58:57 -0500
commit5212ba4d5d6cb34f9543b8a98d07798deeb7ba94 (patch)
tree7300befa1faaeebdcccb8ad1aacb7043daeb9e1e /azalea
parent682609a24e62587094397aab13fda924aa44509e (diff)
downloadazalea-drasl-5212ba4d5d6cb34f9543b8a98d07798deeb7ba94.tar.xz
update repo links
Diffstat (limited to 'azalea')
-rw-r--r--azalea/Cargo.toml2
-rwxr-xr-xazalea/README.md10
-rw-r--r--azalea/src/pathfinder/mod.rs18
3 files changed, 22 insertions, 8 deletions
diff --git a/azalea/Cargo.toml b/azalea/Cargo.toml
index 0b8eca12..bdab1233 100644
--- a/azalea/Cargo.toml
+++ b/azalea/Cargo.toml
@@ -3,7 +3,7 @@ description = "A framework for creating Minecraft bots."
edition = "2021"
license = "MIT"
name = "azalea"
-repository = "https://github.com/mat-1/azalea/tree/main/azalea"
+repository = "https://github.com/azalea-rs/azalea/tree/main/azalea"
version = "0.8.0"
[package.metadata.release]
diff --git a/azalea/README.md b/azalea/README.md
index ea882fc5..5a3751d5 100755
--- a/azalea/README.md
+++ b/azalea/README.md
@@ -13,7 +13,7 @@ default nightly`.
Then, add one of the following lines to your Cargo.toml:
Latest bleeding-edge version (recommended):
-`azalea = { git="https://github.com/mat-1/azalea" }`\
+`azalea = { git="https://github.com/azalea-rs/azalea" }`\
Latest "stable" release:
`azalea = "0.8.0"`
@@ -21,7 +21,7 @@ Latest "stable" release:
For faster compile times, make a `.cargo/config.toml` file in your project
and copy
-[this file](https://github.com/mat-1/azalea/blob/main/.cargo/config.toml)
+[this file](https://github.com/azalea-rs/azalea/blob/main/.cargo/config.toml)
into it. You may have to install the LLD linker.
For faster performance in debug mode, add the following code to your
@@ -73,11 +73,11 @@ async fn handle(bot: Client, event: Event, state: State) -> anyhow::Result<()> {
# Swarms
-Azalea lets you create "swarms", which are a group of bots in the same world that can perform actions together. See [testbot](https://github.com/mat-1/azalea/blob/main/azalea/examples/testbot.rs) for an example. Also, if you're using swarms, you should also have both `azalea::prelude::*` and `azalea::swarm::prelude::*`.
+Azalea lets you create "swarms", which are a group of bots in the same world that can perform actions together. See [testbot](https://github.com/azalea-rs/azalea/blob/main/azalea/examples/testbot.rs) for an example. Also, if you're using swarms, you should also have both `azalea::prelude::*` and `azalea::swarm::prelude::*`.
# Plugins
-Azalea uses [Bevy ECS](https://docs.rs/bevy_ecs) internally to store information about the world and clients. Bevy plugins are more powerful than async handler functions, but more difficult to use. See [pathfinder](https://github.com/mat-1/azalea/blob/main/azalea/src/pathfinder/mod.rs) as an example of how to make a plugin. You can then enable a plugin by adding `.add_plugin(ExamplePlugin)` in your client/swarm builder.
+Azalea uses [Bevy ECS](https://docs.rs/bevy_ecs) internally to store information about the world and clients. Bevy plugins are more powerful than async handler functions, but more difficult to use. See [pathfinder](https://github.com/azalea-rs/azalea/blob/main/azalea/src/pathfinder/mod.rs) as an example of how to make a plugin. You can then enable a plugin by adding `.add_plugin(ExamplePlugin)` in your client/swarm builder.
Also note that just because something is an entity in the ECS doesn't mean that it's a Minecraft entity. You can filter for that by having `With<MinecraftEntityId>` as a filter.
@@ -97,7 +97,7 @@ Note: If you get a `SetLoggerError`, it's because you have multiple loggers. Aza
## Deadlocks
-If your code is simply hanging, it might be a deadlock. Copy the deadlock block in [`azalea/examples/testbot.rs`](https://github.com/mat-1/azalea/blob/main/azalea/examples/testbot.rs) to the beginning of your code and it'll print a long backtrace if a deadlock is detected.
+If your code is simply hanging, it might be a deadlock. Copy the deadlock block in [`azalea/examples/testbot.rs`](https://github.com/azalea-rs/azalea/blob/main/azalea/examples/testbot.rs) to the beginning of your code and it'll print a long backtrace if a deadlock is detected.
## Backtraces
diff --git a/azalea/src/pathfinder/mod.rs b/azalea/src/pathfinder/mod.rs
index 3a75bff7..f0382634 100644
--- a/azalea/src/pathfinder/mod.rs
+++ b/azalea/src/pathfinder/mod.rs
@@ -699,8 +699,22 @@ fn stop_pathfinding_on_instance_change(
}
/// A component that makes bots run /particle commands while pathfinding to show
-/// where they're going. This requires the bots to have op permissions, and
-/// it'll make them spam *a lot* of commands.
+/// where they're going. This requires the bots to have server operator
+/// permissions, and it'll make them spam *a lot* of commands.
+///
+/// ```
+/// async fn handle(mut bot: Client, event: azalea::Event, state: State) -> anyhow::Result<()> {
+/// match event {
+/// azalea::Event::Init => {
+/// bot.ecs
+/// .lock()
+/// .entity_mut(bot.entity)
+/// .insert(PathfinderDebugParticles);
+/// }
+/// _ => {}
+/// }
+/// }
+/// ```
#[derive(Component)]
pub struct PathfinderDebugParticles;