Compare commits

..

10 Commits

Author SHA1 Message Date
b2ed65519e build: add more profiles 2026-04-18 16:14:59 -04:00
dea30ceec9 fix(movement): flip without_mining 2026-04-16 21:45:29 -04:00
2c83072427 Merge pull request #4 from ErrorNoInternet/dependabot/github_actions/dot-github/workflows/actions/cache-5 2026-04-13 20:13:24 -04:00
91aafa3853 Merge pull request #3 from ErrorNoInternet/dependabot/github_actions/dot-github/workflows/actions/checkout-6 2026-04-13 20:13:15 -04:00
c5ccb494ba Merge pull request #2 from ErrorNoInternet/dependabot/github_actions/dot-github/workflows/actions/upload-artifact-7 2026-04-13 20:13:06 -04:00
dependabot[bot]
1d6ef9a63f build(deps): bump actions/upload-artifact in /.github/workflows
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 7.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v4...v7)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-14 00:03:51 +00:00
dependabot[bot]
8acbc84242 build(deps): bump actions/cache from 4 to 5 in /.github/workflows
Bumps [actions/cache](https://github.com/actions/cache) from 4 to 5.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-14 00:03:50 +00:00
dependabot[bot]
cde6bebb50 build(deps): bump actions/checkout from 4 to 6 in /.github/workflows
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-14 00:03:48 +00:00
55ee91885d refactor(client): use .map for queries 2026-04-13 20:02:56 -04:00
1acaa3d88c ci(lint): simplify clippy rules 2026-04-13 20:02:56 -04:00
5 changed files with 41 additions and 32 deletions

View File

@@ -24,13 +24,13 @@ jobs:
steps:
- name: Clone repository
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: Install build dependencies
run: sudo apt install -y libluajit-5.1-dev mold
- name: Set up build cache
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: |
~/.cargo/bin/
@@ -46,7 +46,7 @@ jobs:
- run: cargo build --release ${{ matrix.feature.flags }}
- name: Upload build artifacts
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: errornowatcher_${{ matrix.feature.name }}_${{ matrix.os }}
path: target/release/errornowatcher

View File

@@ -15,7 +15,7 @@ jobs:
steps:
- name: Clone repository
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: Install taplo
uses: uncenter/setup-taplo@v1
@@ -47,13 +47,13 @@ jobs:
steps:
- name: Clone repository
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: Install build dependencies
run: sudo apt install -y libluajit-5.1-dev mold
- name: Set up build cache
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: |
~/.cargo/bin/
@@ -69,7 +69,7 @@ jobs:
- name: Install components
run: rustup component add clippy rustfmt
- run: cargo clippy ${{ matrix.feature.flags }} -D clippy::pedantic
- run: cargo clippy ${{ matrix.feature.flags }} -- -D clippy::pedantic
- if: always()
run: cargo fmt --check

View File

@@ -15,6 +15,14 @@ codegen-units = 1
lto = true
strip = true
[profile.release-no-lto]
inherits = "release"
lto = false
[profile.small]
inherits = "release"
opt-level = "z"
[build-dependencies]
built = { version = "0", features = ["git2"] }

View File

@@ -92,7 +92,8 @@ pub async fn go_to(
client
.goto_with_opts(
goal,
PathfinderOpts::new().allow_mining(options.get("without_mining").unwrap_or_default()),
PathfinderOpts::new()
.allow_mining(!options.get::<bool>("without_mining").unwrap_or_default()),
)
.await;
@@ -116,7 +117,8 @@ pub async fn start_go_to(
)?;
client.start_goto_with_opts(
goal,
PathfinderOpts::new().allow_mining(options.get("without_mining").unwrap_or_default()),
PathfinderOpts::new()
.allow_mining(!options.get::<bool>("without_mining").unwrap_or_default()),
);
let _ = client.get_tick_broadcaster().recv().await;

View File

@@ -2,7 +2,7 @@
macro_rules! get_entities {
($client:ident) => {{
let ecs = $client.ecs.read();
if let Some(mut query) = ecs.try_query::<(
ecs.try_query::<(
&AzaleaPosition,
&CustomName,
&EntityKindComponent,
@@ -11,7 +11,8 @@ macro_rules! get_entities {
&MinecraftEntityId,
Option<&Owneruuid>,
&Pose,
)>() {
)>()
.map(|mut query| {
query
.iter(&ecs)
.map(
@@ -29,9 +30,8 @@ macro_rules! get_entities {
},
)
.collect::<Vec<_>>()
} else {
Vec::new()
}
})
.unwrap_or_default()
}};
}
@@ -39,7 +39,7 @@ macro_rules! get_entities {
macro_rules! get_players {
($client:ident) => {{
let ecs = $client.ecs.read();
if let Some(mut query) = ecs.try_query_filtered::<(
ecs.try_query_filtered::<(
&MinecraftEntityId,
&EntityUuid,
&EntityKindComponent,
@@ -47,7 +47,7 @@ macro_rules! get_players {
&LookDirection,
&Pose,
), (With<Player>, Without<Dead>)>()
{
.map(|mut query| {
query
.iter(&ecs)
.map(|(id, uuid, kind, position, direction, pose)| {
@@ -61,8 +61,7 @@ macro_rules! get_players {
)
})
.collect::<Vec<_>>()
} else {
Vec::new()
}
})
.unwrap_or_default()
}};
}