Compare commits
1 Commits
main
...
eb8a51ec89
| Author | SHA1 | Date | |
|---|---|---|---|
|
eb8a51ec89
|
6
.github/workflows/build.yaml
vendored
6
.github/workflows/build.yaml
vendored
@@ -24,13 +24,13 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Clone repository
|
- name: Clone repository
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install build dependencies
|
- name: Install build dependencies
|
||||||
run: sudo apt install -y libluajit-5.1-dev mold
|
run: sudo apt install -y libluajit-5.1-dev mold
|
||||||
|
|
||||||
- name: Set up build cache
|
- name: Set up build cache
|
||||||
uses: actions/cache@v5
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.cargo/bin/
|
~/.cargo/bin/
|
||||||
@@ -46,7 +46,7 @@ jobs:
|
|||||||
- run: cargo build --release ${{ matrix.feature.flags }}
|
- run: cargo build --release ${{ matrix.feature.flags }}
|
||||||
|
|
||||||
- name: Upload build artifacts
|
- name: Upload build artifacts
|
||||||
uses: actions/upload-artifact@v7
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: errornowatcher_${{ matrix.feature.name }}_${{ matrix.os }}
|
name: errornowatcher_${{ matrix.feature.name }}_${{ matrix.os }}
|
||||||
path: target/release/errornowatcher
|
path: target/release/errornowatcher
|
||||||
|
|||||||
12
.github/workflows/lint.yaml
vendored
12
.github/workflows/lint.yaml
vendored
@@ -15,7 +15,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Clone repository
|
- name: Clone repository
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install taplo
|
- name: Install taplo
|
||||||
uses: uncenter/setup-taplo@v1
|
uses: uncenter/setup-taplo@v1
|
||||||
@@ -47,13 +47,13 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Clone repository
|
- name: Clone repository
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install build dependencies
|
- name: Install build dependencies
|
||||||
run: sudo apt install -y libluajit-5.1-dev mold
|
run: sudo apt install -y libluajit-5.1-dev mold
|
||||||
|
|
||||||
- name: Set up build cache
|
- name: Set up build cache
|
||||||
uses: actions/cache@v5
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.cargo/bin/
|
~/.cargo/bin/
|
||||||
@@ -69,7 +69,11 @@ jobs:
|
|||||||
- name: Install components
|
- name: Install components
|
||||||
run: rustup component add clippy rustfmt
|
run: rustup component add clippy rustfmt
|
||||||
|
|
||||||
- run: cargo clippy ${{ matrix.feature.flags }} -- -D clippy::pedantic
|
- run: |
|
||||||
|
cargo clippy ${{ matrix.feature.flags }} -- \
|
||||||
|
-D warnings \
|
||||||
|
-D clippy::pedantic \
|
||||||
|
-A clippy::doc-markdown
|
||||||
|
|
||||||
- if: always()
|
- if: always()
|
||||||
run: cargo fmt --check
|
run: cargo fmt --check
|
||||||
|
|||||||
@@ -15,14 +15,6 @@ codegen-units = 1
|
|||||||
lto = true
|
lto = true
|
||||||
strip = true
|
strip = true
|
||||||
|
|
||||||
[profile.release-no-lto]
|
|
||||||
inherits = "release"
|
|
||||||
lto = false
|
|
||||||
|
|
||||||
[profile.small]
|
|
||||||
inherits = "release"
|
|
||||||
opt-level = "z"
|
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
built = { version = "0", features = ["git2"] }
|
built = { version = "0", features = ["git2"] }
|
||||||
|
|
||||||
|
|||||||
@@ -92,8 +92,7 @@ pub async fn go_to(
|
|||||||
client
|
client
|
||||||
.goto_with_opts(
|
.goto_with_opts(
|
||||||
goal,
|
goal,
|
||||||
PathfinderOpts::new()
|
PathfinderOpts::new().allow_mining(options.get("without_mining").unwrap_or_default()),
|
||||||
.allow_mining(!options.get::<bool>("without_mining").unwrap_or_default()),
|
|
||||||
)
|
)
|
||||||
.await;
|
.await;
|
||||||
|
|
||||||
@@ -117,8 +116,7 @@ pub async fn start_go_to(
|
|||||||
)?;
|
)?;
|
||||||
client.start_goto_with_opts(
|
client.start_goto_with_opts(
|
||||||
goal,
|
goal,
|
||||||
PathfinderOpts::new()
|
PathfinderOpts::new().allow_mining(options.get("without_mining").unwrap_or_default()),
|
||||||
.allow_mining(!options.get::<bool>("without_mining").unwrap_or_default()),
|
|
||||||
);
|
);
|
||||||
let _ = client.get_tick_broadcaster().recv().await;
|
let _ = client.get_tick_broadcaster().recv().await;
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
macro_rules! get_entities {
|
macro_rules! get_entities {
|
||||||
($client:ident) => {{
|
($client:ident) => {{
|
||||||
let ecs = $client.ecs.read();
|
let ecs = $client.ecs.read();
|
||||||
ecs.try_query::<(
|
if let Some(mut query) = ecs.try_query::<(
|
||||||
&AzaleaPosition,
|
&AzaleaPosition,
|
||||||
&CustomName,
|
&CustomName,
|
||||||
&EntityKindComponent,
|
&EntityKindComponent,
|
||||||
@@ -11,8 +11,7 @@ macro_rules! get_entities {
|
|||||||
&MinecraftEntityId,
|
&MinecraftEntityId,
|
||||||
Option<&Owneruuid>,
|
Option<&Owneruuid>,
|
||||||
&Pose,
|
&Pose,
|
||||||
)>()
|
)>() {
|
||||||
.map(|mut query| {
|
|
||||||
query
|
query
|
||||||
.iter(&ecs)
|
.iter(&ecs)
|
||||||
.map(
|
.map(
|
||||||
@@ -30,8 +29,9 @@ macro_rules! get_entities {
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
.collect::<Vec<_>>()
|
.collect::<Vec<_>>()
|
||||||
})
|
} else {
|
||||||
.unwrap_or_default()
|
Vec::new()
|
||||||
|
}
|
||||||
}};
|
}};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -39,7 +39,7 @@ macro_rules! get_entities {
|
|||||||
macro_rules! get_players {
|
macro_rules! get_players {
|
||||||
($client:ident) => {{
|
($client:ident) => {{
|
||||||
let ecs = $client.ecs.read();
|
let ecs = $client.ecs.read();
|
||||||
ecs.try_query_filtered::<(
|
if let Some(mut query) = ecs.try_query_filtered::<(
|
||||||
&MinecraftEntityId,
|
&MinecraftEntityId,
|
||||||
&EntityUuid,
|
&EntityUuid,
|
||||||
&EntityKindComponent,
|
&EntityKindComponent,
|
||||||
@@ -47,21 +47,22 @@ macro_rules! get_players {
|
|||||||
&LookDirection,
|
&LookDirection,
|
||||||
&Pose,
|
&Pose,
|
||||||
), (With<Player>, Without<Dead>)>()
|
), (With<Player>, Without<Dead>)>()
|
||||||
.map(|mut query| {
|
{
|
||||||
query
|
query
|
||||||
.iter(&ecs)
|
.iter(&ecs)
|
||||||
.map(|(id, uuid, kind, position, direction, pose)| {
|
.map(|(id, uuid, kind, position, direction, pose)| {
|
||||||
(
|
(
|
||||||
id.0,
|
id.0,
|
||||||
uuid.to_string(),
|
uuid.to_string(),
|
||||||
kind.to_string(),
|
kind.to_string(),
|
||||||
Vec3::from(*position),
|
Vec3::from(*position),
|
||||||
Direction::from(direction),
|
Direction::from(direction),
|
||||||
*pose as u8,
|
*pose as u8,
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
.collect::<Vec<_>>()
|
.collect::<Vec<_>>()
|
||||||
})
|
} else {
|
||||||
.unwrap_or_default()
|
Vec::new()
|
||||||
|
}
|
||||||
}};
|
}};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user